feat(engine/ssz): add target_gas_limit to PayloadAttributesV4 wire#11646
Merged
benaadams merged 1 commit intoMay 18, 2026
Conversation
Aligns the SSZ wire schema for engine_forkchoiceUpdatedV4 with the target_gas_limit field added to PayloadAttributesV4 in execution-apis PR NethermindEth#796. Without this, CLs that include target_gas_limit in the SSZ body get rejected as "Malformed SSZ body" because the 8 extra trailing bytes shift the inner withdrawals offset. JSON-RPC support for TargetGasLimit landed in 4e226fd ("feat(engine): support targetGasLimit in PayloadAttributesV4"); this plumbs the same value through the SSZ-REST decoder. Changes: - PayloadAttributesWire gains target_gas_limit: uint64 at the end of the container (matches execution-apis ssz-encoding.md). - SszCodec.PayloadAttributesFromWire forwards the wire ulong as long to PayloadAttributes.TargetGasLimit. - DecodeFcuV4Request roundtrip test now also asserts target_gas_limit survives encode/decode.
Closed
3 tasks
c367954
into
NethermindEth:glamsterdam-devnet-4
509 of 510 checks passed
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.
Summary
target_gas_limit: uint64to the SSZPayloadAttributesWire(V4) and plumbs it throughSszCodec.PayloadAttributesFromWireinto the existingPayloadAttributes.TargetGasLimitdomain field.DecodeFcuV4Requestround-trip test to assert the new field survives encode/decode.Context
JSON-RPC support for
targetGasLimitlanded in 4e226fd (feat(engine): support targetGasLimit in PayloadAttributesV4). The SSZ wire schema lagged behind, so CLs that include the alpha-8targetGasLimitover the SSZ-REST transport (POST /engine/v4/forkchoice) get rejected as Malformed SSZ body — the 8 trailing bytes shift the innerwithdrawalsoffset insidePayloadAttributesV4.execution-apis PR #796 added
targetGasLimitto the JSON spec (commit a22fbd4). The matching SSZ-encoding spec change was just submitted in ethereum/execution-apis#764 (commit 949d6a8 on thebbusa/sszbranch). This PR aligns Nethermind's SSZ decoder with that schema so it accepts the field on the wire.Hit in practice
Consensoor on Gloas devnet hits this every fcU at slot transition:
After this fix the EL decodes
PayloadAttributesV4with 7 fields (target_gas_limitlast) and forwards the value toPayloadAttributes.TargetGasLimit.Test plan
DecodeFcuV4Request_spec_layout_roundtrips_parent_beacon_block_root_and_slot_numbernow also assertstarget_gas_limitround-trips