Skip to content

Check gas limit consistency with the target#5236

Merged
jtraglia merged 15 commits into
ethereum:masterfrom
potuz:gloas_gas_limit
May 15, 2026
Merged

Check gas limit consistency with the target#5236
jtraglia merged 15 commits into
ethereum:masterfrom
potuz:gloas_gas_limit

Conversation

@potuz

@potuz potuz commented May 11, 2026

Copy link
Copy Markdown
Contributor

This is one approach to check that the builder's bid is compatible with the user's preference. In this approach this consistency check is not part of consensus as discussed during ACDT 79. In this approach the bid is required to have the actual gas limit in the payload and the CL just imposes compatibility with proposer preferences at the gossip layer rather than the consensus layer.

This relies on getting the parent gas limit from cached information in the node.

Another approach to make it part of consensus as discussed in ACDT would be to store the latest gas limit in the beacon state and make this part of verify_execution_payload_envelope. This avoids this computation on gossip validation but requires an extra cache in the beacon state.

A third approach is to send the preferences to the engine on notify_newPayload and require the EL to make this check.

@github-actions github-actions Bot added the gloas label May 11, 2026
@potuz potuz force-pushed the gloas_gas_limit branch from aefc7f5 to 3f80200 Compare May 11, 2026 16:28
Comment thread specs/gloas/p2p-interface.md

@finterne finterne left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think the gas-limit compatibility helper needs one boundary fix

Comment thread specs/gloas/p2p-interface.md Outdated
Comment thread specs/gloas/p2p-interface.md Outdated

@nflaig nflaig 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.

addressed my comments in potuz#21

Comment thread specs/gloas/p2p-interface.md Outdated
Comment thread specs/gloas/p2p-interface.md Outdated
Comment thread specs/gloas/p2p-interface.md Outdated
@github-actions github-actions Bot added the testing CI, actions, tests, testing infra label May 12, 2026
@jtraglia jtraglia merged commit 2add957 into ethereum:master May 15, 2026
15 checks passed
@zilm13 zilm13 mentioned this pull request May 18, 2026
17 tasks
EIP-1559 transition rule from ``parent_gas_limit``.
"""
max_gas_limit_difference = max(parent_gas_limit // 1024, 1) - 1
min_gas_limit = parent_gas_limit - max_gas_limit_difference

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.

Don't we have to worry about overflow here? What if parent_gas_limit is really small (or 0, as we encountered at default Gloas genesis).

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.

Actually nvm, it's fine because of how max_gas_limit_difference is calculated (parent_gas_limit <= 1024 implies max_gas_limit_difference == 0).

james-prysm added a commit to ethereum/beacon-APIs that referenced this pull request May 20, 2026
twoeths added a commit to ChainSafe/lodestar that referenced this pull request May 21, 2026
**Motivation**

- alpha.8 spec

**Description**

- implement ethereum/consensus-specs#5236

**AI Assistance Disclosure**

- codex

---------

Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
nflaig added a commit to ethereum/beacon-APIs that referenced this pull request Jun 29, 2026
Supersedes #593 with
ethereum/consensus-specs#5196,
ethereum/consensus-specs#5236 added

Adds the proposer preferences API for Gloas, deprecates the legacy
fee-recipient/gas-limit endpoints, and tightens
`beacon_committee_subscriptions` for
  CGC bookkeeping.

  ## Added

- `POST /eth/v1/validator/proposer_preferences` — VC submission of
signed
preferences and publishes them on the `proposer_preferences` gossipsub
topic.
- `proposer_preferences` SSE event for messages passing gossip
validation.
- `Gloas.ProposerPreferences` / `Gloas.SignedProposerPreferences` types,
including
    `dependent_root` (used for gossip dedup and validation).

  ## Deprecated

- `POST /eth/v1/validator/prepare_beacon_proposer` — superseded by
signed proposer
preferences. Pre-Gloas support is REQUIRED; post-Gloas the endpoint MAY
be a no-op
    or removed.
- `POST /eth/v1/validator/register_validator` — fee recipient and gas
limit move to
signed proposer preferences. Same pre/post-Gloas support rules apply.

  ## Updated

- `POST /eth/v1/validator/beacon_committee_subscriptions` — from Gloas
onwards, BNs
use the subscription set to identify which validators are using the node
and to
size the node's custody group count (CGC). VCs SHOULD submit one entry
per
attached active validator per attestation duty, including when multiple
validators share the same `(slot, committee_index)`, so the BN tracks
every
    attached validator rather than only one per subnet.
    
    

Fixes #570

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
- _[IGNORE]_ `bid.parent_block_hash` is the block hash of a known execution
payload in fork choice.
payload in fork choice and
`is_gas_limit_target_compatible(parent_gas_limit, bid.gas_limit, proposer_preferences.target_gas_limit)`

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.

just realized this but shouldn't this be a REJECT if is_gas_limit_target_compatible = False? we do the same if fee recipient is incorrect, wondering if we used IGNORE just because it's combined with "known execution payload in fork choice" condition

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.

Yes, I think it should. Can you open a PR for this?

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.

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

Labels

gloas testing CI, actions, tests, testing infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants