-
Notifications
You must be signed in to change notification settings - Fork 27
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
Generate genesis file from input config file #747
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dzmitryhil, @miladz68, and @ysv)
cmd/cored/cosmoscmd/generate_network.go
line 89 at r1 (raw file):
if genCfg.Denom != "" { sdk.DefaultBondDenom = genCfg.Denom
why is it needed?
cmd/cored/cosmoscmd/generate_network.go
line 132 at r1 (raw file):
customparamsGenesis := customparamstypes.DefaultGenesisState() if !cfg.CustomParamsConfig.MinSelfDelegation.IsNil() && cfg.CustomParamsConfig.MinSelfDelegation.IsPositive() {
shouldn't it return error if it's not positive?
cmd/cored/cosmoscmd/generate_network.go
line 139 at r1 (raw file):
// assetft params assetftGenesis := assetfttypes.DefaultGenesis() assetftGenesis.Params.IssueFee.Amount = sdk.NewInt(10_000_000)
Here and below: shouldn't all the numbers be taken from config file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @miladz68, @wojtek-coreum, and @ysv)
cmd/cored/cosmoscmd/generate_network.go
line 139 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
Here and below: shouldn't all the numbers be taken from config file?
Same question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @wojtek-coreum and @ysv)
cmd/cored/cosmoscmd/generate_network.go
line 89 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
why is it needed?
All modules read the bond denom from this variable, when creating the default genesis.
cmd/cored/cosmoscmd/generate_network.go
line 132 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
shouldn't it return error if it's not positive?
Done.
cmd/cored/cosmoscmd/generate_network.go
line 139 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Same question.
if all config is taken from the file, then we have the same situation that crust must know all the config of all the modules and actively manage it.
the point is that crust should know as little as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ysv)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 3 files at r1.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ysv)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @ysv)
Description
This PR adds a CLI command which allows to generate a genesis file from a given input config file. The point of the PR is to remove genesis creation logic from crust, so crust will be less dependent on coreum version, and can create correct genesis by just interacting with the cored binary, and will not need to import genesis template.
Reviewers checklist:
Authors checklist
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)