Skip to content

Convert produceBlockV4 to POST and round-trip Eth-Builder-Url (Gloas builder API 4/5) - #9806

Open
ethDreamer wants to merge 1 commit into
stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5dfrom
stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f
Open

Convert produceBlockV4 to POST and round-trip Eth-Builder-Url (Gloas builder API 4/5)#9806
ethDreamer wants to merge 1 commit into
stack/ethDreamer/gloas-builder-api-stacked/add-gloas-bid-selection-block-prod-bid-gossip--eccaee5dfrom
stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f

Conversation

@ethDreamer

Copy link
Copy Markdown
Member

Fourth PR of the Gloas builder API stack (beacon-APIs #630):

  • convert /eth/v4/validator/blocks/{slot} to POST with an optional
    BuilderConfig body (min_bid, builder_boost_factor, direct builders)
  • add POST /eth/v1/validator/builder_preferences for forwarding signed
    builder preferences
  • set Eth-Builder-Url on produceBlockV4 responses when a direct-builder bid
    wins, accept it on POST /eth/v2/beacon/blocks, and forward the signed
    block to that builder

The validator client still uses the legacy GET methods at this point; it
migrates in the final PR of this stack.

Depends-On: #9805

@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 force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from c6cb1f0 to 0ad508e Compare August 13, 2026 23:39
@ethDreamer

ethDreamer commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

Revision history

# Type Changes Reason Date
1 initial c6cb1f0 2026-08-13 23:38 UTC
2 content c6cb1f0 → 0ad508e catch up to Aug 10 beacon-APIs #630: require Eth-Consensus-Version on POST v4; 400 on zero-length url/auth-data in bodies; negative tests 2026-08-13 23:38 UTC
3 rebase 0ad508e → 1541fc9 (rebase only) 2026-08-14 00:03 UTC
4 content 1541fc9 → b75cd14 rebase on unstable (#8907 SSZ responses): resolved import conflict in http_api validator/mod.rs 2026-08-14 18:25 UTC
5 rebase b75cd14 → d763878 (rebase only) 2026-08-17 16:52 UTC
6 rebase d763878 → 510daa9 (rebase only) 2026-08-18 17:51 UTC
7 rebase 510daa9 → 9ffd62f (rebase only) 2026-08-19 19:31 UTC
8 content 9ffd62f → d6bc23f review response: 400 on oversize preferences body (4096-entry bound); rename fallout in tests 2026-08-19 21:57 UTC
9 rebase d6bc23f → f979c15 (rebase only) 2026-08-20 17:50 UTC
10 rebase f979c15 → f9c9f6b (rebase only) 2026-08-20 21:41 UTC
11 rebase f9c9f6b → 275486f (rebase only) 2026-08-20 23:35 UTC
12 rebase 275486f → b659f44 (rebase only) 2026-08-21 14:14 UTC
13 rebase b659f44 → d1b834f (rebase only) 2026-08-24 18:03 UTC

@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from 0ad508e to 1541fc9 Compare August 14, 2026 00:03
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from 1541fc9 to b75cd14 Compare August 14, 2026 18:25
@chong-he
chong-he self-requested a review August 17, 2026 06:44
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from b75cd14 to d763878 Compare August 17, 2026 16:52
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from d763878 to 510daa9 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/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from 510daa9 to 9ffd62f Compare August 19, 2026 19:31
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch 2 times, most recently from d6bc23f to f979c15 Compare August 20, 2026 17:50
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from f979c15 to f9c9f6b Compare August 20, 2026 21:41
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from f9c9f6b to 275486f Compare August 20, 2026 23:35

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

Looks good, just some nits. I also notice the comment (beacon-APIs #630) is mentioned too many times, would be good to clean them up

Comment on lines +858 to +859
// Accepts the `BuilderPreferenceEntry` list as either JSON or SSZ, selected by the request's
// `Content-Type` (`application/octet-stream` => SSZ, otherwise JSON). A required

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.

Nit: comment like this maybe is not necessary?

Comment on lines +533 to +544
.and_then(|content_type: Option<String>, body: Bytes| async move {
let builder_config: BuilderConfig = if content_type.as_deref()
== Some(SSZ_CONTENT_TYPE_HEADER)
{
BuilderConfig::from_ssz_bytes(&body).map_err(|e| {
warp_utils::reject::custom_bad_request(format!("invalid SSZ: {e:?}"))
})?
} else {
serde_json::from_slice(&body).map_err(|e| {
warp_utils::reject::custom_deserialize_error(format!("{e:?}"))
})?
};

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.

Both endpoints in this PR combines the request body of JSON and SSZ into one funciton, which is fine. The default is still JSON because if the header is not specified as application/octet-stream, then it goes to the else branch.

Just want to point out that I see in Lighthouse code base it is usually separate the JSON and SSZ request body into 2 functions, for example:

  • pub fn post_validator_proposer_preferences accepts the JSON request body
  • pub fn post_validator_proposer_preferences_ssz accepts the SSZ request body

@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from 275486f to b659f44 Compare August 21, 2026 14:15
…builder API 4/5)

Fourth PR of the Gloas builder API stack (beacon-APIs #630):

- convert `/eth/v4/validator/blocks/{slot}` to POST with an optional
  `BuilderConfig` body (min_bid, builder_boost_factor, direct builders)
- add `POST /eth/v1/validator/builder_preferences` for forwarding signed
  builder preferences
- set `Eth-Builder-Url` on produceBlockV4 responses when a direct-builder bid
  wins, accept it on `POST /eth/v2/beacon/blocks`, and forward the signed
  block to that builder

The validator client still uses the legacy GET methods at this point; it
migrates in the final PR of this stack.

Change-Id: I0ad30b8f36ad9b588ea1a0398220f92c9597bb95
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/convert-produceblockv4-post-round-trip-eth--0ad30b8f branch from b659f44 to d1b834f Compare August 24, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants