-
Notifications
You must be signed in to change notification settings - Fork 563
feat(network
): check no gentx are present in the initial genesis
#2646
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
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.
LGTM
Some questions though :
-
gentxs represent pre-registered validators, and in the context of spn, you don't want to have them at this state, I suppose this is because spn has an other way to register them ?
-
How gentxs are generated ? I found one way: the client of the
x/genutil
module, but the output format has different naming, so I'm confuse... (for instance the JSON field is namedgentxs
and notgen_txs
, see https://github.com/cosmos/cosmos-sdk/blob/main/x/genutil/types/genesis.pb.go#L30)
Gentxs should not be defined if the monitoring module for incentivized testnet is used since
Gentxs are generated from the
This command will generate a signed gentx for the validator in the chain home |
…gnite#2646) * gentxs counter * gentx check * lint * fix errors * lint 2 * fix test
ChainGenesis
object to count gentxs in a genesisinitGenesis
.initGenesis
generate the initial genesis of the chain so it makes sense to add this check here as a consideration that the initial genesis is only valid without gentx so that the condition is checked in any workflow using the initial genesis likepublish
but other command in the case a coordinator published a chain without the CLITESTING
Run a local
spn
:Chain with default genesis can be published
Chain with a custom genesis with gentxs can't be published
Chain with a custom genesis with no gentx can be published