Skip to content

engine: add targetGasLimit to PayloadAttributesV4#796

Open
nflaig wants to merge 3 commits into
ethereum:mainfrom
nflaig:fcu-gas-limit
Open

engine: add targetGasLimit to PayloadAttributesV4#796
nflaig wants to merge 3 commits into
ethereum:mainfrom
nflaig:fcu-gas-limit

Conversation

@nflaig
Copy link
Copy Markdown
Member

@nflaig nflaig commented May 11, 2026

Adds targetGasLimit to PayloadAttributesV4 so that the CL can pass the target gas limit to the EL on engine_forkchoiceUpdatedV4, instead of relying on a static flag on the EL side for local building.

This is useful for several reasons

  1. it unifies where users have to configure their target gas limit
  2. it allows to configure the gas limit per validator/pubkey, similar to the fee recipient
  3. allows us to use vanilla ELs as builders, see comment

Based on #608 (credit to @mcdee)

Comment thread src/engine/amsterdam.md Outdated
@nerolation
Copy link
Copy Markdown
Contributor

LGTM!

Just to note, this means the EL has to then determine the block.gas_limit based on the target_gas_limit, e.g.:

max_delta = parent_gas_limit // 1024

block.gas_limit = max(
    parent_gas_limit - max_delta,
    min(
        target_gas_limit,
        parent_gas_limit + max_delta,
    ),
)

@nflaig
Copy link
Copy Markdown
Member Author

nflaig commented May 12, 2026

Just to note, this means the EL has to then determine the block.gas_limit based on the target_gas_limit, e.g.:

should the engine spec have more details about this? from the EL side nothing should change, just the source from where they get the target gas limit changes

Copy link
Copy Markdown
Contributor

@mkalinin mkalinin left a comment

Choose a reason for hiding this comment

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

The spec change looks good to me 👍 Is there a consensus among CL and EL devs on the acceptance of this change?

@nflaig
Copy link
Copy Markdown
Member Author

nflaig commented May 12, 2026

Is there a consensus among CL and EL devs on the acceptance of this change?

we've discussed this on ACDT 79 yesterday, there was no opposition to this but we should probably get approvals before merging this change

@barnabasbusa
Copy link
Copy Markdown
Member

barnabasbusa commented May 12, 2026

I think this must be bundled together with the removal of gas limit target flags on the EL side. Otherwise the expected behaviour might be unknown. If we merge this in, it would be good for EL teams to start signalling that the EL side gas limit flag will be deprecated post glamsterdam, and probably following the fork the flag should just go away completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants