Skip to content

Consider builder bids during block production - #11209

Open
StefanBratanov wants to merge 7 commits into
Consensys-Incorporated:masterfrom
StefanBratanov:builder_bids_block_production
Open

Consider builder bids during block production#11209
StefanBratanov wants to merge 7 commits into
Consensys-Incorporated:masterfrom
StefanBratanov:builder_bids_block_production

Conversation

@StefanBratanov

@StefanBratanov StefanBratanov commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

PR Description

Calling eth/v1/builder/execution_payload_bid/{slot}/{parent_hash}/{parent_root}/{proposer_pubkey} during block production with each configured builder and considering the bid (comparing it vs p2p bids and local bid)

image

Kurtosis config

participants_matrix:
  el:
    - el_type: nethermind
      el_image: ethpandaops/nethermind:glamsterdam-devnet-8
  cl:
    - cl_type: teku
      cl_image: consensys/teku:develop
      cl_extra_params:
        - "--Xbuilder-urls=http://buildoor:8080"
        - "--Xbuilder-circuit-breaker-enabled=false"
  count: 1

mev_type: buildoor
buildoor_params:
  image: ethpandaops/buildoor:main
  builder_api: true
  epbs_builder: true
  lifecycle: true
  extra_args:
    - --log-level=debug
    - --builder-api-require-auth

network_params:
  preset: minimal
  seconds_per_slot: 6
  gloas_fork_epoch: 0
  withdrawal_type: "0x01"
  validator_balance: 32
  builder_count: 1
  builder_balance: 100
  deploy_eip8282_contracts: true

additional_services:
  - dora

snooper_enabled: true
global_log_level: info

port_publisher:
  additional_services:
    enabled: true

dora_params:
  image: ethpandaops/dora:master

Fixed Issue(s)

fixes #10822

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Note

High Risk
Changes core Gloas block production and bid economics (selection, scoring, caching) with new external builder HTTP calls on the hot path; mis-selection or auth/API mismatches could affect proposer revenue or block validity.

Overview
Adds builder API bid retrieval at proposal time for Gloas: configured builders are queried via eth/v1/builder/execution_payload_bid/... (auth always sent in the POST body), and those bids compete with gossip P2P bids and the local EL payload when choosing the signed execution payload bid.

Bid selection and metadata are refactored around new RemoteBid / BidForBlock records: builder bids are scored with on-chain value plus capped execution payment; P2P bids use collateral value only and respect min_bid; ties favor the builder API bid. The winning bid鈥檚 wei value and optional builder URL are written into per-slot SlotCaches during block body assembly (replacing validator-side value derivation from the bid message alone).

The builder REST client no longer supports unauthenticated empty POSTs for payload bids. ethereum:statetransition and beacon chain wiring gain BuilderBidFetcher + StakedBuilderClientProvider; module dependency rules allow :builder from statetransition.

Reviewed by Cursor Bugbot for commit fb6c723. Bugbot is set up for automated code reviews on this repo. Configure here.

@StefanBratanov
StefanBratanov marked this pull request as ready for review September 1, 2026 13:53

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit db761d6. Configure here.

.min(BID_BY_VALUE_DESCENDING);

final Optional<SignedExecutionPayloadBid> bestBuilderBid =
builderBids.stream().filter(isBuilderAllowedPredicate).min(BID_BY_VALUE_DESCENDING);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Builder bids skip parent matching

High Severity

selectBestRemoteBid filters P2P bids by parent root and parent hash, but builder bids only go through isBuilderAllowed. That skip assumes fetching already validated them, yet getBuilderBids does not. A mismatched builder bid can win on value and be included in the produced block, which peers will reject.

Additional Locations (1)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit db761d6. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is covered in #11194

@StefanBratanov
StefanBratanov force-pushed the builder_bids_block_production branch 3 times, most recently from a114ece to 387d588 Compare September 3, 2026 07:55
@StefanBratanov
StefanBratanov force-pushed the builder_bids_block_production branch 2 times, most recently from 47f4c9d to aa989bd Compare September 4, 2026 10:14
@StefanBratanov
StefanBratanov force-pushed the builder_bids_block_production branch from ae9c449 to fb6c723 Compare September 4, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Staked Builder API

1 participant