Skip to content
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

fix: module consensus version is not correctly set when upgrade after state sync #562

Closed
wants to merge 3 commits into from

Conversation

forcodedancing
Copy link
Contributor

@forcodedancing forcodedancing commented Jan 18, 2024

Description

  • add tool to compare module root hash, and find the different keys
  • fix module consensus version is not correctly set issue

Rationale

When doing migration, the to version (will be stored) is read from app.

toVersion := uint64(0)
if module, ok := module.(HasConsensusVersion); ok {
	toVersion = module.ConsensusVersion()
}
...

updatedVM[moduleName] = toVersion

However, when doing state sync, it will not call all previous upgrade initializers, leading to toVersion is not correct.

Example

NA

Changes

Notable changes:

  • upgrade handler

Potential Impacts

@unclezoro unclezoro changed the base branch from master to develop January 19, 2024 06:09
app/upgrade.go Outdated Show resolved Hide resolved
app/upgrade.go Outdated Show resolved Hide resolved
@forcodedancing forcodedancing requested a review from j75689 January 19, 2024 07:02
@forcodedancing
Copy link
Contributor Author

This pr will be closed, please move to the following one for fix.
bnb-chain/greenfield-cosmos-sdk#389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants