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 the mismatch between "State.Version.Consensus.App" and "State.ConsensusParams.Version.AppVersion" #533

Merged
merged 7 commits into from
Dec 21, 2022

Conversation

tnasu
Copy link
Member

@tnasu tnasu commented Dec 15, 2022

Description

Cannot run a node after Rollback since there is a mismatch between "State.Version.Consensus.App" and "State.ConsensusParams.Version.AppVersion". While starting a node, Handshake is running. Until replaying the last Block do "ExecCommitBlock", but replaying the last Block is the same process as "ApplyBlock". It needs the correct "State" for the last Block.
And it also needs to fix the mismatch between "State.Version.Consensus" and "Block.Header.Consensus".

@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #533 (4e72913) into main (2f25796) will increase coverage by 0.01%.
The diff coverage is 77.27%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #533      +/-   ##
==========================================
+ Coverage   66.02%   66.03%   +0.01%     
==========================================
  Files         279      279              
  Lines       38045    38059      +14     
==========================================
+ Hits        25119    25134      +15     
+ Misses      11127    11121       -6     
- Partials     1799     1804       +5     
Impacted Files Coverage Δ
abci/example/kvstore/kvstore.go 73.83% <ø> (ø)
p2p/node_info.go 95.12% <ø> (ø)
statesync/stateprovider.go 35.37% <0.00%> (-0.25%) ⬇️
consensus/wal_generator.go 69.65% <50.00%> (+0.21%) ⬆️
consensus/replay.go 71.58% <66.66%> (+0.35%) ⬆️
node/node.go 60.56% <100.00%> (+0.08%) ⬆️
state/state.go 83.33% <100.00%> (ø)
statesync/syncer.go 82.33% <100.00%> (-0.48%) ⬇️
types/block.go 77.10% <100.00%> (ø)
types/params.go 78.99% <100.00%> (ø)
... and 17 more

@tnasu tnasu changed the title Main validation Fix the mismatch between "State.Version.Consensus.App" and "State.ConsensusParams.Version.AppVersion" Dec 15, 2022
@torao torao added the C: bug Classification: Something isn't working label Dec 15, 2022
@tnasu tnasu marked this pull request as ready for review December 16, 2022 10:29
@tnasu tnasu requested review from Kynea0b and torao as code owners December 16, 2022 10:29
Copy link
Contributor

@torao torao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

Copy link
Contributor

@Kynea0b Kynea0b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

consensus/replay_test.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: bug Classification: Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants