-
Notifications
You must be signed in to change notification settings - Fork 616
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
chore: adding upgrade handler for 09-localhost removal #1671
chore: adding upgrade handler for 09-localhost removal #1671
Conversation
I think this PR also requires some migration docs added to instruct devs to wire up the upgrade handler. I've added a new directory |
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.
Maybe we could call the folder migrations
? Not very strongly opposed to upgrades
anyway, but thought that migrations
is how the folder is called in docs
and we could also have migrations that not necessarily need to run on the upgrade to a major version. Well, just an idea!
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.
Looks great :)
Might be nice to add information to the localhost removal changelog entry that this function can be used to remove existing localhost implementations
…cosmos/ibc-go into damian/1201-migrations-for-09-localhost
Which approach should we take with naming? I chose |
I like migrations. Typically this functionality would be run by SDK's |
Sounds good, that's a compelling enough argument for me! I'll update this today with the naming changes throughout 👍 |
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.
Just a small nit..
Nice work, @damiannolan!
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.
nice :)
const Localhost string = "09-localhost" | ||
|
||
// MigrateToV5 prunes the 09-Localhost client and associated consensus states from the ibc store | ||
func MigrateToV5(ctx sdk.Context, clientKeeper clientkeeper.Keeper) { |
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.
nit: we could potentially rename this function to make it more explicit as to what it does? (something like Migrate_RemoveLocalHostClient
)
// ... | ||
|
||
app.UpgradeKeeper.SetUpgradeHandler( | ||
upgradeName, |
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.
nit: upgradeName
can be MigrateToV5
or MigrateLocalHostClient
?
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
* adding localhost migration code with tests * updating test cases * renaming test func * updating migration docs and moving to v4-to-v5.md * fixing indentation of code snippet * Update docs/migrations/v4-to-v5.md * adding sample query check for localhost client to docs * updating changelog to provide info on localhost upgrade handler * updating migrations docs with nit * renaming upgrades to migrations * updating function namings, tests and docs * Update CHANGELOG.md Co-authored-by: Carlos Rodriguez <carlos@interchain.io> Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
Description
09-localhost
client and consensus statescloses: #1201
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes