Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ADR 041: In-Place Store Migrations #8646
ADR 041: In-Place Store Migrations #8646
Changes from 4 commits
a23b5fa
6f69bc5
9f24445
f153843
6993093
0eea75b
151149b
01c3507
6dc29f9
94c0475
2f7fede
8494883
aaa991b
3579a10
865713e
cb361b7
1f1d4ce
cbda00b
31357e6
0fc97c5
53a13ab
9e07b4d
41386ca
606aec1
633d07b
dd2b62c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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
ModuleManager
goes to thex/upgrade.Keeper
constructor? I thought that thex/upgrade.QueryServer
will provide that functionality. In that case we would simply query thex/upgrade
and as for old versions.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.
To query the current versions from loaded modules
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.
I updated this a little bit: we unfortunately cannot add it in the constructor, because of a definition cycle in app.go: UpgradeKeeper needs ModuleManager which needs UpgradeKeeper. The way proposed here is to add a
SetVersionManager
setter on UpgradeKeeper.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.
Let's explain that if there is no old ConsensusVersion, no migration is run but the version is set in the new migration map. i.e. if we add module
foo
to our chain at version 5, no migrations will be run but 5 will be saved as the current version after migrations are run.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.
Done. The
upgradeKeeper.SetCurrentConsensusVersions()
method to store the current module versions is run right after the upgrade handler.This file was deleted.