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

Generalize Genutil Genesis Transaction #4771

Closed
rigelrozanski opened this issue Jul 24, 2019 · 3 comments
Closed

Generalize Genutil Genesis Transaction #4771

rigelrozanski opened this issue Jul 24, 2019 · 3 comments
Labels
C:genesis relating to chain genesis C:x/staking T: State Machine Breaking State machine breaking changes (impacts consensus).

Comments

@rigelrozanski
Copy link
Contributor

REF #4422

Genesis transactions are currently designed specifically for Staking Create-Validator transactions - This should be abstracted in such a way that any module can register acceptable genesis transactions and special genesis-time transaction validity checks. This registration process should take place during application definition (app.go).

@rigelrozanski rigelrozanski added C:x/staking C:genesis relating to chain genesis T: State Machine Breaking State machine breaking changes (impacts consensus). labels Jul 24, 2019
@tac0turtle
Copy link
Member

What approach would be best for this issue? I would like to generalize it for the POA module as right now, I'm duplicating the gentx logic. @rigelrozanski can you point me in the direction you had in mind?

@rigelrozanski
Copy link
Contributor Author

We would need to define a new interface probably something like:

type GenesisMsgExecution interface {
  MsgParsable(sdk.Msg) bool // is the sdk.Msg can be parsed into specific message struct used in this genesis transaction 
  ValidateTx(sdk.Msg) error
  ExecuteGenesisTx(sdk.Msg) error
}

which could be defined on a per-module basis and passed into genutils here https://github.com/cosmos/cosmos-sdk/blob/master/simapp/app.go#L177

The registration process would be the passing it in.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:genesis relating to chain genesis C:x/staking T: State Machine Breaking State machine breaking changes (impacts consensus).
Projects
None yet
Development

No branches or pull requests

3 participants