Skip to content

fix: Commit on reprocess for archival#5301

Merged
ceyonur merged 3 commits intomasterfrom
alarso16/archive-reprocess
Apr 28, 2026
Merged

fix: Commit on reprocess for archival#5301
ceyonur merged 3 commits intomasterfrom
alarso16/archive-reprocess

Conversation

@alarso16
Copy link
Copy Markdown
Contributor

@alarso16 alarso16 commented Apr 21, 2026

Why this should be merged

If the node crashes with a full acceptor queue, the blocks will be re-executed on startup. However, if the node is archival, the states will not be committed. This can result in missing state.

How this works

commit every state if archival

How this was tested

Added a test

Need to be documented in RELEASES.md?

No

@alarso16 alarso16 force-pushed the alarso16/archive-reprocess branch 2 times, most recently from eac1c1b to 1ee1e93 Compare April 21, 2026 08:29
@alarso16 alarso16 marked this pull request as ready for review April 21, 2026 08:34
@alarso16 alarso16 requested a review from a team as a code owner April 21, 2026 08:34
Copilot AI review requested due to automatic review settings April 21, 2026 08:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes missing state persistence on restart for archival nodes when accepted blocks must be re-executed (e.g., after an ungraceful shutdown with unprocessed accepted blocks).

Changes:

  • Update reprocessState to commit every regenerated state root for archival mode (and for Firewood scheme).
  • Add regression tests covering archival ungraceful shutdown recovery for both coreth and subnet-evm.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
graft/subnet-evm/core/blockchain.go Commit regenerated trie roots during state reprocessing for archival/Firewood so all historical states remain available.
graft/subnet-evm/core/blockchain_test.go Add test verifying archival restart after unprocessed accepts has all states available.
graft/coreth/core/blockchain.go Same reprocessState commit behavior adjustment for archival/Firewood.
graft/coreth/core/blockchain_test.go Same archival ungraceful shutdown recovery test as subnet-evm.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread graft/subnet-evm/core/blockchain_test.go Outdated
Comment thread graft/coreth/core/blockchain_test.go Outdated
Comment thread graft/coreth/core/blockchain_test.go Outdated
Comment thread graft/subnet-evm/core/blockchain_test.go Outdated
@alarso16 alarso16 force-pushed the alarso16/archive-reprocess branch from 1ee1e93 to 8ea58cf Compare April 21, 2026 08:43
Copy link
Copy Markdown
Contributor

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

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

changes lgtm just some comments for tests

Comment thread graft/coreth/core/blockchain_test.go
Comment thread graft/coreth/core/blockchain_test.go
Comment thread graft/coreth/core/blockchain_test.go Outdated
@ceyonur ceyonur added this pull request to the merge queue Apr 28, 2026
Merged via the queue into master with commit 2df7bc9 Apr 28, 2026
60 checks passed
@ceyonur ceyonur deleted the alarso16/archive-reprocess branch April 28, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants