-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: Add x/gov v043->v046 migrations #11036
Conversation
Ah yeah, thanks, I just saw that. Yeah, you put in a |
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
@@ -19,3 +20,8 @@ func NewMigrator(keeper Keeper) Migrator { | |||
func (m Migrator) Migrate1to2(ctx sdk.Context) error { | |||
return v043.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) | |||
} | |||
|
|||
// Migrate2to3 migrates from version 2 to 3. |
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.
Why do we use 1, 2, and 3 version numbers - do they relate to anything. Might it be more intuitive to specify SDK version migrations?
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.
We decided in adr-041 to use uint here. I guess the idea back then was to prepare when modules will have their own go.mods. It might be that this ConsensusVersion == the major version in go.mod. Or not. Anyways, I think it's better for modules to have independent consensus versions than be tied up to SDK versions.
(note the v04*
migration folders could probably be renamed though).
@@ -188,7 +192,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw | |||
} | |||
|
|||
// ConsensusVersion implements AppModule/ConsensusVersion. | |||
func (AppModule) ConsensusVersion() uint64 { return 2 } | |||
func (AppModule) ConsensusVersion() uint64 { return 3 } |
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.
Ah I see this is where the versioning numbers come from
…sdk into am/10869-migrations
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, except the failing tests.
sim tests are failing on master |
Description
Closes: #10869
depends on:
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change