Skip to content

Fix last commit hash missmatch during replay#3097

Merged
masih merged 1 commit intomainfrom
masih/legacy-hash-64
Mar 20, 2026
Merged

Fix last commit hash missmatch during replay#3097
masih merged 1 commit intomainfrom
masih/legacy-hash-64

Conversation

@masih
Copy link
Copy Markdown
Collaborator

@masih masih commented Mar 20, 2026

The Commit.Hash() algorithm was changed in CON-76 (#2600) to include Height, Round, and BlockID in the Merkle tree alongside signatures. Blocks stored by v6.3 nodes have LastCommitHash computed with the old signatures-only algorithm. When v6.4 loads these blocks during ABCI handshake replay, ValidateBasic recomputes the hash with the new algorithm, producing a different value and causing a panic first observed on arctic-1.

Adds Commit.LegacyHash() that uses the old (signatures-only) algorithm, and updates Block.ValidateBasic() to fall back to it when the new hash doesn't match.

Note that release 6.5 would make this fallback path entirely redundant, and it should be removed in the next release.

Separated out from #3095 to capture a clear commit history of changes for the future archeologists.

The Commit.Hash() algorithm was changed in CON-76 (#2600) to include Height, Round, and BlockID in the Merkle tree alongside signatures. Blocks stored by v6.3 nodes have LastCommitHash computed with the old signatures-only algorithm. When v6.4 loads these blocks during ABCI handshake replay, ValidateBasic recomputes the hash with the new algorithm, producing a different value and causing a panic first observed on `arctic-1`.

Adds Commit.LegacyHash() that uses the old (signatures-only) algorithm, and updates Block.ValidateBasic() to fall back to it when the new hash doesn't match.

Note that release 6.5 would make this fallback path entirely redundant, and it should be removed in the next release.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 20, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 20, 2026, 2:30 PM

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.71%. Comparing base (02b141d) to head (100d28c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sei-tendermint/types/block.go 69.23% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3097   +/-   ##
=======================================
  Coverage   58.71%   58.71%           
=======================================
  Files        2094     2094           
  Lines      172970   172982   +12     
=======================================
+ Hits       101555   101573   +18     
+ Misses      62430    62421    -9     
- Partials     8985     8988    +3     
Flag Coverage Δ
sei-chain-pr 81.79% <69.23%> (?)
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-tendermint/types/block.go 86.99% <69.23%> (-0.40%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masih masih enabled auto-merge March 20, 2026 14:41
@masih masih disabled auto-merge March 20, 2026 14:41
@masih masih requested a review from sei-will March 20, 2026 14:41
@masih masih added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit 512976d Mar 20, 2026
42 of 43 checks passed
@masih masih deleted the masih/legacy-hash-64 branch March 20, 2026 15:47
github-actions bot pushed a commit that referenced this pull request Mar 20, 2026
The Commit.Hash() algorithm was changed in CON-76 (#2600) to include
Height, Round, and BlockID in the Merkle tree alongside signatures.
Blocks stored by v6.3 nodes have LastCommitHash computed with the old
signatures-only algorithm. When v6.4 loads these blocks during ABCI
handshake replay, ValidateBasic recomputes the hash with the new
algorithm, producing a different value and causing a panic first
observed on `arctic-1`.

Adds Commit.LegacyHash() that uses the old (signatures-only) algorithm,
and updates Block.ValidateBasic() to fall back to it when the new hash
doesn't match.

Note that release 6.5 would make this fallback path entirely redundant,
and it should be removed in the next release.

Separated out from #3095
to capture a clear commit history of changes for the future
archeologists.

(cherry picked from commit 512976d)
@seidroid
Copy link
Copy Markdown

seidroid bot commented Mar 20, 2026

Successfully created backport PR for release/v6.4:

masih added a commit that referenced this pull request Mar 20, 2026
…#3100)

Backport of #3097 to `release/v6.4`.

Co-authored-by: Masih H. Derkani <m@derkani.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants