Skip to content

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

Open
ethDreamer wants to merge 1 commit into
unstablefrom
stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d
Open

Add Gloas bid selection, block production, and bid gossip processing (Gloas builder API 3/5)#9805
ethDreamer wants to merge 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

@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
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5d branch from 332a33e to db7f733 Compare August 21, 2026 14:15
@ethDreamer ethDreamer added ready-for-review The code is ready for review gloas labels Aug 21, 2026
…(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 db7f733 to 1ab6945 Compare August 24, 2026 18:03

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

Just one minor question as a blocker, everything else looks great.
Really nice separation of concerns with bid_selection.rs.
Enjoyed reviewing this one as well!

) => {
self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Ignore);
}
// `InvalidParentBlockHash` / `InvalidParentBlockRoot` are equality checks against the

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.

Maybe we move these explanations to the Error enum like we do with other gossip errors?

// The gas limit must be compatible with the parent's, given the proposer's target.
if let Ok(parent_bid) = state.latest_execution_payload_bid()
&& !is_gas_limit_target_compatible(
parent_bid.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.

the parent gas limit would be different depending on whether we are building on full or empty here right?

/// The proposer's boost multiplier for this candidate; `100` (neutral) for the local build.
builder_boost_factor: u64,
/// The proposer's `min_bid` acceptance floor (gwei) for this candidate; `0` for the local build,
/// which is the proposer's own block and is never gated.

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.

what does "is never gated" mean here?

pub fn select_payload_bid<E: EthSpec>(candidates: Vec<BidCandidate<E>>) -> Option<BidCandidate<E>> {
// `reduce` keeps `best` unless `candidate` is *strictly* greater, so the earliest of any tied
// maxima wins.
candidates.into_iter().reduce(|best, candidate| {

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.

Neat!

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.

@jimmygchen would appreciate your review on this file. Just want to confirm that this makes sense from the builder perspective

@mergify

mergify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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

Labels

gloas ready-for-review The code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants