Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move standard library initialization to genesis transactions #2730

Open
thehowl opened this issue Aug 26, 2024 · 1 comment
Open

Move standard library initialization to genesis transactions #2730

thehowl opened this issue Aug 26, 2024 · 1 comment
Labels
help wanted Want to contribute? We recommend these issues. 📦 ⛰️ gno.land Issues or PRs gno.land package related 🌟 improvement performance improvements, refactors ...

Comments

@thehowl
Copy link
Member

thehowl commented Aug 26, 2024

Standard libraries can and should be treated as regular packages; which, at least for the time being, can only be loaded at genesis.

Related discussion: #2319 (comment)

After discussing with Milos, we agreed that it makes sense for the gno.land node at startup to be ignorant about standard libraries; this way, we can further separate the gno.land application binary from needing a surrounding gno repository to work.

To make this work, we'll likely additionally need adequate mechanisms to make stdlib loading fast in testing code and in gnodev, which often restart nodes from genesis. Currently, this is implemented by the method LoadStdlibCached, which is very effective at cutting down start-up costs in these scenarios currently, but would have to be removed if we moved to having stdlibs in the genesis file.

Related #1248

@thehowl thehowl added 📦 ⛰️ gno.land Issues or PRs gno.land package related 🌟 improvement performance improvements, refactors ... labels Aug 26, 2024
@thehowl thehowl added this to the 🌟 main.gno.land (wanted) milestone Aug 26, 2024
@Kouteki Kouteki added the help wanted Want to contribute? We recommend these issues. label Oct 29, 2024
@moul
Copy link
Member

moul commented Oct 29, 2024

The goal is to use a go-embed of the standard libraries and utilize this embedded component while generating the hot genesis in gnodev/gnoland start. At the end, we will be able to manually craft a static genesis when creating the mainnet one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Want to contribute? We recommend these issues. 📦 ⛰️ gno.land Issues or PRs gno.land package related 🌟 improvement performance improvements, refactors ...
Development

No branches or pull requests

6 participants
@moul @thehowl @Kouteki @zivkovicmilos and others