Validate a Gloas/Amsterdam block in the simulation role - #571
Open
0w3n-d wants to merge 1 commit into
Open
Conversation
Set the header's EIP-7928 block access list hash and EIP-7843 slot number from the submission, and compare the list against the one execution recomputes. Route Gloas to SSZ simulators again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 3, 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.
Issue: #561 (step 3 of 6)
What this PR does
Teaches the simulation role to validate a Gloas/Amsterdam block. The header's
EIP-7928
block_access_list_hashand EIP-7843slot_numbercome from thesubmission — the wire
ExecutionPayloadV3carries neither — and the list isthen checked against the one execution recomputes. The relay routes Gloas to
SSZ simulators again, sending the Gloas wire shape so the list travels with it.
Two decisions worth review:
to those exact bytes, so re-encoding could silently change it. This matches
ethrex's own
engine_newPayloadV5.when the VM returns no list (
if let Some(bal) = &bal); a relay simulatorcannot afford that, so this fails closed instead.
Two checks fall out of setting the header field, rather than being added:
existing hash check.
validate_block_access_list_hash, which also enforces EIP-7928's indexbounds and size cap.
It also closes a hole step 2 left:
decode_dehydratedanddecode_mergewoulddecode a Gloas submission into a Fulu shape and drop its list. Both now refuse
the combination. Step 3 is what starts routing Gloas to simulators, so leaving
it would have been exploitable.
What this PR deliberately does not do
/validate_mergedkeeps itsshorter fork list; the merging protocol carries
ExecutionPayloadV3only.That is step 5.
validateandvalidate_mergednow takeeight and nine arguments, silenced with
#[allow]. Grouping them touches all49 call sites and belongs in its own change.
Tests
Tests were written first and approved before implementation, as in every
earlier step of this issue. 20 new tests; 399 pass in total.
The fixture gained
Fixture::amsterdam(), which needs the two EIP-8282predeploys in genesis — without them every Amsterdam block is invalid. The
first test exists only to prove the fixture really is on Amsterdam, so the rest
cannot silently pass under Fulu rules.
Existing call sites now pass
built.amsterdam()rather than a literalNone,so the whole pre-existing suite re-runs unchanged for Fulu and the same
assertions cover Amsterdam wherever an Amsterdam fixture is used.
Covered:
hash is
keccakof the submitted bytes/validatein therelay's own request shape
reason is the access list and not another post-execution check
fork's bytes are unchanged
Reviewer checklist
lint,unit-test) is green