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
x/upgrade: added consensus version tracking (part of ADR-041) #8743
x/upgrade: added consensus version tracking (part of ADR-041) #8743
Changes from 1 commit
e900fb1
036db4f
b640766
8c7b105
5c1ae59
4c48f35
6db21e3
c9b435a
1c5b132
304abfa
d06bbbd
5c75ead
e53423e
c36086f
758c67d
0dac9c2
8f526ef
027740d
18eaed2
fc38e5a
28d5c04
1fca959
d912f4f
a99c538
e6424ce
9b40fe7
799b646
0f9447c
a157c48
b839a59
75f8ae5
22ab55e
47ce533
7f5b6aa
8547426
1504a2d
c3072ab
1f82fff
cf1343f
3f6bea8
d987555
5d6e4ab
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.
@tyler I think i might have been mistaken as to when we should call
keeper.SetConsensusVersions
. We actually don't need to call it in InitChain, just leave it blank on a fresh chain, as per #8504 (comment), I believe it should be called AFTER the handler has run (so here), to say "ok I've ran the handler (e.g. migration scripts), now I'll update the store with the newest modules' ConsensusVersions".I think the ultimate E2E test would be with 2 binaries, but since that's hard, let's try to simulate that in a test here:
module.VersionManager
, say withbank
set to 1, and everything else set to latest ConsensusVersion.upgradeKeeper.SetModuleManager(mockVersionMgr)
. This simulates saving the "old" modules version to state.keeper.GetConsensusVersions
, test that the return value'sbank
key should be 2, not 1.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.
test added and initchainer removed
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.
If it's not set in IntiChain then how do initial versions get set?? I don't see a good alternative and it's not a safe assumption that all chains start at module version 1
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 think we need to add this back
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.
InitGenesis added back