fix: Commit on reprocess for archival#5301
Merged
Conversation
eac1c1b to
1ee1e93
Compare
Contributor
There was a problem hiding this comment.
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
reprocessStateto commit every regenerated state root for archival mode (and for Firewood scheme). - Add regression tests covering archival ungraceful shutdown recovery for both
corethandsubnet-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.
1ee1e93 to
8ea58cf
Compare
ceyonur
reviewed
Apr 21, 2026
Contributor
ceyonur
left a comment
There was a problem hiding this comment.
changes lgtm just some comments for tests
ceyonur
approved these changes
Apr 21, 2026
RodrigoVillar
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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