Skip to content

execution,cl: add TargetGasLimit to PayloadAttributesV4#21297

Merged
taratorio merged 4 commits into
mainfrom
worktree-payload-attr-v4-target-gas-lim
May 25, 2026
Merged

execution,cl: add TargetGasLimit to PayloadAttributesV4#21297
taratorio merged 4 commits into
mainfrom
worktree-payload-attr-v4-target-gas-lim

Conversation

@taratorio

@taratorio taratorio commented May 20, 2026

Copy link
Copy Markdown
Member

for ethereum/execution-apis#796 in glamsterdam-devnet-4

@domiwei domiwei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for the Amsterdam/Gloas PayloadAttributesV4.targetGasLimit field (per execution-apis/pull/796) and wires it through Erigon’s Engine API + block builder so a CL-provided gas target can override the EL’s static --miner.gaslimit when building blocks.

Changes:

  • Plumbs TargetGasLimit from Engine API payload attributes into builder.Parameters and uses it during header construction.
  • Extends SSZ + JSON-RPC payload attributes schemas to carry targetGasLimit, and updates test/mock CL paths to populate it.
  • Adds an Engine API test ensuring CL targetGasLimit overrides the EL configured gas limit for block building.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
execution/execmodule/chainreader/chain_reader.go Passes TargetGasLimit into builder.Parameters for assembling blocks.
execution/engineapi/testing_api.go Propagates TargetGasLimit into builder params in the testing API path.
execution/engineapi/sszrest_test.go Extends SSZ REST forkchoice test to include TargetGasLimit.
execution/engineapi/engineapitester/mock_cl.go Mock CL now supplies TargetGasLimit for Amsterdam builds.
execution/engineapi/engine_types/ssz.go SSZ encode/decode updated to include TargetGasLimit for Gloas attrs.
execution/engineapi/engine_types/jsonrpc.go Adds targetGasLimit field to JSON-RPC PayloadAttributes.
execution/engineapi/engine_server.go For FCU builds, passes TargetGasLimit into builder params; TODO’d validation for requirement.
execution/engineapi/engine_api_builder_test.go New test proving CL targetGasLimit overrides EL --miner.gaslimit.
execution/builder/parameters.go Adds TargetGasLimit to builder parameters struct.
execution/builder/create_block.go Uses CL TargetGasLimit (when present) as the gas target instead of static config.
cl/phase1/stages/forkchoice.go CL event emission now includes TargetGasLimit for Gloas+.
cl/beacon/handler/block_production.go CL block production path sets TargetGasLimit for Gloas+.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread execution/engineapi/engine_server.go
Comment thread execution/engineapi/sszrest_test.go
@yperbasis yperbasis added the Glamsterdam https://eips.ethereum.org/EIPS/eip-7773 label May 20, 2026
@taratorio taratorio enabled auto-merge May 25, 2026 07:16
@taratorio taratorio added this pull request to the merge queue May 25, 2026
Merged via the queue into main with commit 6214b03 May 25, 2026
133 of 135 checks passed
@taratorio taratorio deleted the worktree-payload-attr-v4-target-gas-lim branch May 25, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Glamsterdam https://eips.ethereum.org/EIPS/eip-7773

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants