-
Notifications
You must be signed in to change notification settings - Fork 375
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
[chain] Chain Creation Flow Improvement #1836
Comments
Question for 3️⃣
As we all know base on current rpc struct, that |
That's the plan, it should be downloadable easily |
Relevant Docs Efforts: #1820 (comment) |
On this front, maybe we should consider moving the loading of I think we want to go in the direction whereby As for standard libraries, I think we'll have to wait for #1248, so that stdlibs are embedded into Gno by default. |
Description
This effort covers an overhaul of how new Gno chains are initialized.
Currently, to start a chain, users need 2 things:
This is also in addition to the user being required to specify absolutely everything in the config file, otherwise the configuration is not valid (current implementation).
However, there is no way to specify any of these things in advance to creating the config, because Gno is lacking a command suite for generating and manipulating a config file.
The current flow initializes the config file automatically, along with a plethora of other things, such as validator keys.
Additionally, there is also no way to generate validator / node keys in advance, that can be used in the config / genesis files.
The optimal flow for chain creation should look something like this:
This flow not only gives the ability to create a new network without worrying about setting everything up from the get-go. Additionally, it also enables easy orchestration, containerization and testing suite buildup (to understand how cumbersome the testing process is, take a look at how the in-memory node was implemented, and how
gno dev
works).Successful outcome of this effort:
BaseConfig
) as flags when starting the Gno nodeCopied over from #1593:
1️⃣ A user wants to connect to the existing gno mainnet (testnet, whatever):
gnoland init
gnoland start
That's it -> you don't really need to configure anything else, because our genesis.json will be publicly known and initial bootnodes hardcoded by default in the config p2p section
2️⃣ A user wants to set up their own Gno network (testnet):
gnoland init
gnoland genesis ...
-> if they want to edit the genesis json (to add validators)gnoland config p2p --persistent-peers ...
-> so they can set their bootnodesgnoland start
For the user to get these persistent-peers Node IDs, those peers would need to make their IDs public, and they can fetch them locally with:
gnoland secrets show
(all, or a single secret, in this case the node key)3️⃣ A user wants to connect to a custom Gno network (testnet):
gnoland init
gnoland config p2p --persistent-peers ...
-> so they can connect to the custom network's bootnodesgnoland start
This user would reuse the genesis.json that was generated at some point for the custom gno network, and have info on the custom Gno network's persistent peers
The foundations of this flow are built with #1605 and #1593.
The text was updated successfully, but these errors were encountered: