Skip to content

Add Gloas bid selection, block production, and bid gossip processing (Gloas builder API 3/5) - #9805

Merged
mergify[bot] merged 1 commit into
unstablefrom
stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d
Sep 3, 2026
Merged

mergify[bot] merged 1 commit into
unstablefrom
stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d

Conversation

@ethDreamer

@ethDreamer ethDreamer commented Aug 13, 2026

Copy link
Copy Markdown
Member

Third PR of the Gloas builder API stack:

  • beacon_chain: direct builder bid verification (spawned on the blocking
    executor), gossip-bid refinements, wei-domain bid selection
    (BidCandidate/BidSource), and Gloas block production that assembles
    local, gossip, and direct-builder candidates
  • network: process payload-bid and proposer-preference gossip, including the
    new PayloadBidError variants
  • client: construct the Builders service when the Gloas fork is scheduled
    and wire it into the beacon chain

The HTTP API still serves GET produceBlockV4 at this point; the POST
conversion and the Eth-Builder-Url round-trip land in the next PR.

@ethDreamer

ethDreamer commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 Add Gloas bid selection, block production, and bid gossip processing (Gloas builder API 3/5) #9805 👈
2 Convert produceBlockV4 to POST and round-trip Eth-Builder-Url (Gloas builder API 4/5) #9806
3 Migrate the validator client to the Gloas builder API (Gloas builder API 5/5) #9807

@ethDreamer

ethDreamer commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

Revision history

# Type Changes Reason Date
1 initial cfe5775 2026-08-13 23:38 UTC
2 content cfe5775 → ea4ef14 catch up to Aug 10 spec revisions: builder_pubkeys membership check in direct bid verification; fork_name in BidRequestContext 2026-08-13 23:38 UTC
3 rebase ea4ef14 → 46ee0fa (rebase only) 2026-08-14 00:03 UTC
4 rebase 46ee0fa → 1ad80bd (rebase only) 2026-08-14 18:25 UTC
5 rebase 1ad80bd → 9b3cb1f (rebase only) 2026-08-17 16:52 UTC
6 rebase 9b3cb1f → e71bb39 (rebase only) 2026-08-18 17:51 UTC
7 content e71bb39 → c3501ac rebase on unstable: merged #9763 multiple-bids-per-head-view cache rework with the single-lock observe_bid refactor (BidParent keying, per-parent seen tracking preserved) 2026-08-19 19:31 UTC
8 rebase c3501ac → f95e1b9 (rebase only) 2026-08-19 21:57 UTC
9 rebase f95e1b9 → bd0b326 (rebase only) 2026-08-20 17:50 UTC
10 rebase bd0b326 → 12a2374 (rebase only) 2026-08-20 21:41 UTC
11 rebase 12a2374 → 332a33e (rebase only) 2026-08-20 23:35 UTC
12 rebase 332a33e → db7f733 (rebase only) 2026-08-21 14:14 UTC
13 rebase db7f733 → 1ab6945 (rebase only) 2026-08-24 18:03 UTC
14 rebase 1ab6945 → 441777c (rebase only) 2026-08-25 17:47 UTC
15 content 441777c → eb37595 rebase on unstable: adapt #9920's new prepare_payload test call to the BuilderConfig production signature 2026-08-26 19:20 UTC
16 content eb37595 → c73f272 rebase over #9905 (ObservedExecutionPayloads gas-limit machinery). Patch delta is conflict resolution only, no review content: upstream's new verify_builder unified with verify_bid_state_conditions (… 2026-09-01 17:18 UTC
17 content c73f272 → 80ae5be review response (content only, base unchanged): direct-bid gas limit now uses the ObservedExecutionPayloads baseline at the selected parent (reusing #9905; correct after an empty parent), with tests;… 2026-09-01 18:32 UTC
18 rebase 80ae5be → 0ca4808 (rebase only) 2026-09-02 15:53 UTC
19 content 0ca4808 → cc73f1b review response (content only, base unchanged): rename the selected parent-payload hash to executed_ancestor_hash through the bid plumbing (wire names kept at spec boundaries), exact wei-domain trust… 2026-09-02 17:59 UTC
20 rebase cc73f1b → 6dafd2b (rebase only) 2026-09-03 21:03 UTC
21 content 6dafd2b → 74a86e2 rebase over #9970 (block_hash != parent_block_hash gossip REJECT). Patch delta is conflict resolution only: the new check kept at upstream's placement inside the payment/blobs gossip helper our refac… 2026-09-03 22:40 UTC

@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch from ea4ef14 to 46ee0fa Compare August 14, 2026 00:03
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch 2 times, most recently from 1ad80bd to 9b3cb1f Compare August 17, 2026 16:52
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch from 9b3cb1f to e71bb39 Compare August 18, 2026 17:51
@eserilev eserilev mentioned this pull request Aug 19, 2026
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch from e71bb39 to c3501ac Compare August 19, 2026 19:31
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch from c3501ac to f95e1b9 Compare August 19, 2026 21:58
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch from f95e1b9 to bd0b326 Compare August 20, 2026 17:50
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch from bd0b326 to 12a2374 Compare August 20, 2026 21:41
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch from 12a2374 to 332a33e Compare August 20, 2026 23:35
Base automatically changed from stack/ethDreamer/gloas-builder-api-stacked/add-gloas-builder-api-client-adapt-execution--5bcab56f to unstable August 21, 2026 00:18
@mergify

mergify Bot commented Aug 29, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Could you please resolve them @ethDreamer? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Aug 29, 2026
// eligibility or coverage can go stale before production. Re-check against the production
// state and drop it if it would now fail `per_block_processing`, so a stale gossip bid
// can't outrank a viable candidate and sink the whole proposal.
match verify_bid_state_conditions(&gossip_bid.message, state, &self.spec) {

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.

I believe this validation is still too weak. An exit in the parent payload can cause the builder to become inactive, in which case their bid is invalid.

I've opened an issue on the spec to ensure this gets added to the honest validator guide. We could definitely consider merging in the meantime.

In terms of a fix, we could apply the execution payload to the state early (seems simple), or try to infer the effect of the requests (like we do for voluntary exits).

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.

I think this is handled in the spec update that would prevent the bid from getting considered at all.

fn rank_key(&self) -> (bool, bool, Uint256, bool) {
(
self.overrides_builder(),
self.meets_min_bid(),

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.

This fallback makes sense to avoid missing the block, but min_bid is currently documented as the minimum payment accepted for p2p bids and accepted from a direct builder. Should we document it as a preference rather than a hard minimum?

/// post-state advanced to `proposal_slot` — and `parent_block_hash` / `parent_block_root` the
/// FULL/EMPTY parent the producer selected.
#[allow(clippy::too_many_arguments)]
pub fn verify_direct_bid<E: EthSpec>(

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.

max_execution_payment currently only caps the value used for ranking, so a bid can still be accepted with a larger execution payment. Should we reject it during validation as required by the builder spec?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I explicitly opted for these departures from the spec. I actually thought they had changed it but perhaps not..
https://discord.com/channels/595666850260713488/1539632415641964584/1540123275978342534

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.

I saw this too and actually like Mark's version better. Happy to consider the spec compliant change in a later PR, but gonna merge this one to unblock other stuff now.

Comment thread beacon_node/beacon_chain/src/block_production/bid_selection.rs Outdated
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch 5 times, most recently from cc73f1b to 6dafd2b Compare September 3, 2026 21:03
@pawanjay176

pawanjay176 commented Sep 3, 2026

Copy link
Copy Markdown
Member

Let's get this in!
@mergify queue

@pawanjay176

Copy link
Copy Markdown
Member

@mergify queue

@mergify

mergify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Merge Queue Status

  • Entered queue2026-09-03 21:40 UTC · Rule: default · triggered by @pawanjay176 with the @mergifyio queue command
  • 🚫 Left the queue2026-09-03 22:10 UTC · at 6dafd2b4565cdde6471c20c321429dddbd65cf65

This pull request spent 30 minutes 51 seconds in the queue, with no time running CI.

Reason

The pull request conflicts with the base branch

The pull request was held in the queue, conflicting with 1 pull request ahead of it. The conflict became a base branch one after #9970 merged.

Hint

You should update or rebase your pull request.

If you want to requeue this pull request, you can post a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

…(Gloas builder API 3/5)

Third PR of the Gloas builder API stack:

- beacon_chain: direct builder bid verification (spawned on the blocking
  executor), gossip-bid refinements, wei-domain bid selection
  (`BidCandidate`/`BidSource`), and Gloas block production that assembles
  local, gossip, and direct-builder candidates
- network: process payload-bid and proposer-preference gossip, including the
  new `PayloadBidError` variants
- client: construct the `Builders` service when the Gloas fork is scheduled
  and wire it into the beacon chain

The HTTP API still serves `GET` produceBlockV4 at this point; the `POST`
conversion and the `Eth-Builder-Url` round-trip land in the next PR.

Change-Id: Ieccaee5db81bf871c19cef1b79fc48283be9dd51
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch from 6dafd2b to 74a86e2 Compare September 3, 2026 22:40
@mergify mergify Bot removed the dequeued label Sep 3, 2026

@pawanjay176 pawanjay176 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. Lets merge 🚀

@pawanjay176

Copy link
Copy Markdown
Member

@mergify queue

@mergify

mergify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Merge Queue Status

This pull request spent 30 minutes 54 seconds in the queue, including 28 minutes 47 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Sep 3, 2026
@mergify
mergify Bot merged commit 115bd16 into unstable Sep 3, 2026
38 checks passed
@mergify mergify Bot removed the queued label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gloas waiting-on-author The reviewer has suggested changes and awaits thier implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants