Add Gloas bid selection, block production, and bid gossip processing (Gloas builder API 3/5) - #9805
Conversation
|
This pull request is part of a Mergify stack:
|
cfe5775 to
ea4ef14
Compare
Revision history
|
ea4ef14 to
46ee0fa
Compare
1ad80bd to
9b3cb1f
Compare
9b3cb1f to
e71bb39
Compare
e71bb39 to
c3501ac
Compare
c3501ac to
f95e1b9
Compare
f95e1b9 to
bd0b326
Compare
bd0b326 to
12a2374
Compare
12a2374 to
332a33e
Compare
332a33e to
db7f733
Compare
…(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
db7f733 to
1ab6945
Compare
pawanjay176
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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| { |
There was a problem hiding this comment.
@jimmygchen would appreciate your review on this file. Just want to confirm that this makes sense from the builder perspective
|
Tick the box to add this pull request to the merge queue (same as
|
Third PR of the Gloas builder API stack:
executor), gossip-bid refinements, wei-domain bid selection
(
BidCandidate/BidSource), and Gloas block production that assembleslocal, gossip, and direct-builder candidates
new
PayloadBidErrorvariantsBuildersservice when the Gloas fork is scheduledand wire it into the beacon chain
The HTTP API still serves
GETproduceBlockV4 at this point; thePOSTconversion and the
Eth-Builder-Urlround-trip land in the next PR.