fix: add slotNumber and targetGasLimit to testing_buildBlockV1 - #862
Open
O1ahmad wants to merge 2 commits into
Open
fix: add slotNumber and targetGasLimit to testing_buildBlockV1#862O1ahmad wants to merge 2 commits into
O1ahmad wants to merge 2 commits into
Conversation
…utes The method described its payload attributes as PayloadAttributesV3 but the Amsterdam fork requires PayloadAttributesV4, which adds slotNumber and targetGasLimit. Align the schema title, properties, and example so the method is valid for the current fork and matches engine specs.
Amsterdam's PayloadAttributesV4 requires slotNumber and targetGasLimit. Gate the new fields on the Amsterdam fork, mirroring the existing Cancun parentBeaconBlockRoot gating, so the generated fixtures include them when filled against an Amsterdam-capable chain.
4 tasks
Contributor
|
I think that in order to do this we need two things:
|
This was referenced Aug 10, 2026
rjl493456442
pushed a commit
to ethereum/go-ethereum
that referenced
this pull request
Aug 11, 2026
…5501) `testing_buildBlockV1` decodes `targetGasLimit` from the payload attributes but does not pass it to `miner.BuildPayloadArgs`. The miner then falls back to its configured gas ceiling, so the field is silently ignored. The engine API path (`forkchoiceUpdated`) already passes it through. This matters for fixture generation in ethereum/execution-apis, where `testing_buildBlockV1` builds Amsterdam test blocks and the gas limit must honor the CL-provided target (see ethereum/execution-apis#857 and ethereum/execution-apis#862). The new test builds an Amsterdam block with a target inside the per-block adjustment bound and checks the payload hits it exactly.
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.
Closes #857
Problem
testing_buildBlockV1described its payload attributes asPayloadAttributesV3, but Amsterdam requiresPayloadAttributesV4withslotNumberandtargetGasLimit. As reported in #857, this makes clients disagree — Erigon rejects with-32602 targetGasLimit required for Glamsterdam and later forks.Changes
PayloadAttributesV4and add the twouintfields, plus the inline example.testing_buildBlockV1generators, gated onIsAmsterdam(mirroring the existing Cancun gating), so fixtures carry them when filled against an Amsterdam-capable chain.Verification
make build,make test(speccheck),make lint, andgo test ./...pass;make fillstays idempotent on the pre-Amsterdam test chain.Note
The committed fixtures can't be regenerated in-repo to include
targetGasLimit(the bundled geth and test chain are pre-Amsterdam, and geth'sPayloadAttributeshas no such field); filling them is a follow-up against an Amsterdam-capable client.