simulators/engine: make SetBlock robust for reorg chains#1395
Merged
Conversation
…rg sync chains Signed-off-by: Delweng <delweng@gmail.com>
Contributor
Author
|
@fjl PTAL |
SetBlock robust for reorg chains
yperbasis
added a commit
to erigontech/erigon
that referenced
this pull request
Apr 28, 2026
The previous pinned ref (684d4add) lacks ethereum/hive#1395 "simulators/engine: make SetBlock robust for reorg chains", which is the upstream fix for the two cancun TEST ISSUE failures observed in the prior run on this branch: - Invalid Missing Ancestor Syncing ReOrg, ..., CanonicalReOrg=False, Invalid P8 - Invalid Missing Ancestor Syncing ReOrg, ..., CanonicalReOrg=True, Invalid P8 Bumping to current master (02075f47) so the gate tightening to max-allowed-failures: 0 in the previous commit is testable against a hive that no longer trips on the SetBlock reorg path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Fix the test in
InvalidMissingAncestorReOrgSyncTest, ref https://hive.ethpandaops.io/#/test/generic/1772181860-0161f15e42e305dde23a1cb982021954?testnumber=323The engine simulator uses
SetBlockto force-insert sidechain blocks, including invalid ones.SetBlockused the payload parentStateRootas the only source of truth for state reconstruction.After inserting invalid blocks, that root can be non-replayable in the local path-scheme trie, so the next insertion fails with:
failed to commit state ... missing trie node.So proposed to change:
SetBlockfor each inserted block hash.parentRootfirst.This keeps sidechain injection progressing even when payload-header roots on invalid branches are not replayable.
also closes #1382