Execute a submitted block and check it against its header - #532
Open
0w3n-d wants to merge 1 commit into
Open
Conversation
10 tasks
Runs validate_block_pre_execution, executes on the parent state, then checks gas used, receipts root, requests hash and state root. The store is only read: the submitted block is never persisted. Step 4 of #527. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0w3n-d
force-pushed
the
od/builder-sim-execute-step4
branch
from
August 29, 2026 14:03
bd496ba to
3824c92
Compare
3 tasks
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.
Issue: #527 (step 4 of 10)
Base branch:
od/builder-sim-validation-step3(#531, step 3). Retarget as thestack merges.
What this PR does
BlockValidator::executerunsvalidate_block_pre_execution, executes theblock on its parent state through ethrex's
Evm, then checks gas used, thereceipts root and logs bloom, the requests hash and the state root.
validatechains it onto
prepare.The store is read-only throughout.
apply_account_updates_batchcomputes thepost-state root in memory without committing, and nothing calls
Blockchain::add_block.What this PR deliberately does not do
No payment check, no blacklist. Two checks the reth simulator performs are
deliberately absent, both verified rather than assumed:
validate_block_body. It compares the transactions and withdrawals rootsagainst the body, but the conversion computes both roots from that body, so it
cannot fail. The relay checks the transactions root itself.
ExecutionPayloadV3carries no BAL hash, so Amsterdamneeds a newer payload version before this is checkable at all.
Inclusion lists are now out of scope for this simulator entirely; the issue's
step 7 is struck out. A block that violates a submitted list passes here and
fails on the reth simulator.
Tests
Written first and signed off before implementation. 8 new, 20 in the file:
and the block is absent from the store afterwards. This guards the property
that makes this a simulator and not a node.
actually run.
One fixture change:
bid_tracerecomputes the block hash from the convertedblock, so a payload-tampering test reaches execution instead of stopping at the
step 3 bid-trace check.
just fmt-check,just testandcargo clippy --all-features --no-deps -- -D warningsare clean. 54 tests pass in
helix-builder, up from 46.Reviewer checklist
lint,unit-test) is green