-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
x/upgrade should track module versions #8514
Comments
Tagging this as 0.42 nice-to-have. I think the way this would concretely work is:
type ModuleManager interface {
GetConsensusVersions() ModuleVersionMap
} when
|
I would like to bring back the idea of on-the fly upgrades using a block number:
Initially I though it will kick the consensus stability, but after reflection it won't be worse the current approach - because now it's even more tricky: all nodes at the same time need to do a restart, run migrations and resume. The clear benefit are:
When doing a new release we will remove the legacy branches (switch) (so to keep the code clean) and add new ones if needed. |
I don't think I understand.
This is already possible now.
if an upgrade happens at block |
@AmauryM - what I'm proposing is different. In my proposal there is no binary swap. More specificall: binary V+1 (so for next version), will have logic for both V and V+1 and migrations required for going from V to V+1. Then, when doing V+2 we remove old migrations and old logic (from version This could be tricky to implement if we have a significant app structure change (like ADR-33). |
On the fly upgrades in the same binary will be confounded by subtle client compatible, but consensus breaking changes to protobuf schemas and generated code. It will be very hard if not impossible to get this right! Switching binaries at the same height is resistant to subtle consensus breaking changes, is tested and has automated tooling in the form of cosmovisor. I have tried to work out how to do what you're saying @robert-zaremba and it's not a bad idea in theory but will not work with protobuf. Also I'm not sure what is tricky about the current approach. I'm pretty sure the concerns you're raising have been addressed by the current upgrade module. |
Summary
x/upgrade should track
ConsensusVersions
of different modules.Problem Definition
In-place store migrations (#8485) introduce a
ConsensusVersion
for each module. When performing upgrades, the app developer needs to tack & hardcode a migrations map into the UpgradeHandler (see example here)It would be good to store this migrations map in x/upgrade itself.
Proposal
migrationsMap
argument to the UpgradeHandler function signature.cc @aaronc @robert-zaremba
For Admin Use
The text was updated successfully, but these errors were encountered: