Skip to content

Add builder API types, request-auth domain, and eth2 client methods (Gloas builder API 1/5) - #9803

Merged
mergify[bot] merged 1 commit into
unstablefrom
stack/ethDreamer/gloas-builder-api-stacked/add-builder-api-types-req-auth-domain-eth2-client--1df19d46
Aug 20, 2026
Merged

Add builder API types, request-auth domain, and eth2 client methods (Gloas builder API 1/5)#9803
mergify[bot] merged 1 commit into
unstablefrom
stack/ethDreamer/gloas-builder-api-stacked/add-builder-api-types-req-auth-domain-eth2-client--1df19d46

Conversation

@ethDreamer

Copy link
Copy Markdown
Member

First PR of the Gloas builder API stack (builder-specs #165 / beacon-APIs #630):

  • consensus/types: DOMAIN_REQUEST_AUTH application domain and get_request_auth_domain()
  • common/builder_types: new crate with the shared Builder API wire types
  • common/eth2: POST produceBlockV4 methods, builder-preferences methods,
    Eth-Builder-Url header plumbing, and ProduceBlockV4Metadata::builder_url

All changes are additive: the legacy GET v4 block-production methods are kept
alongside the new POST variants until the validator client migrates later in
this stack, then removed in the final 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 builder API types, request-auth domain, and eth2 client methods (Gloas builder API 1/5) #9803 👈
2 Add Gloas Builder API client and adapt execution layer (Gloas builder API 2/5) #9804
3 Add Gloas bid selection, block production, and bid gossip processing (Gloas builder API 3/5) #9805
4 Convert produceBlockV4 to POST and round-trip Eth-Builder-Url (Gloas builder API 4/5) #9806
5 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 088ad76 2026-08-13 23:38 UTC
2 content 088ad76 → 6f6c368 catch up to Aug 10 spec revisions: builder_pubkeys list (was single builder_pubkey), zero-length url/auth-data validation, fork_name param + Eth-Consensus-Version on POST v4 client (hoisted into the … 2026-08-13 23:38 UTC
3 content 6f6c368 → 7e94d7b fix clippy: useless same-type .into() in test helper 2026-08-14 00:03 UTC
4 rebase 7e94d7b → 6e51496 (rebase only) 2026-08-14 18:25 UTC
5 rebase 6e51496 → 3e64b04 (rebase only) 2026-08-17 16:52 UTC
6 rebase 3e64b04 → 8e5b90a (rebase only) 2026-08-18 17:51 UTC
7 rebase 8e5b90a → 766aa4e (rebase only) 2026-08-19 19:31 UTC
8 content 766aa4e → 5609394 review response: rename post_validator_blocks_v4_path (verb was a GET-era fossil), builder_url max-size test + compile-time MaxDataSize invariant, BuilderConfig doc rewrite (fully-resolved / not-defa… 2026-08-19 21:57 UTC
9 rebase 5609394 → d68a341 (rebase only) 2026-08-20 17:50 UTC
10 rebase d68a341 → 885b2f8 (rebase only) 2026-08-20 21:41 UTC

@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-builder-api-types-req-auth-domain-eth2-client--1df19d46 branch from 6f6c368 to 7e94d7b Compare August 14, 2026 00:03
Comment thread common/builder_types/src/builder_preferences_request.rs
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-builder-api-types-req-auth-domain-eth2-client--1df19d46 branch from 7e94d7b to 6e51496 Compare August 14, 2026 18:25
@ethDreamer ethDreamer added the ready-for-review The code is ready for review label Aug 14, 2026
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-builder-api-types-req-auth-domain-eth2-client--1df19d46 branch 2 times, most recently from 3e64b04 to 8e5b90a Compare August 18, 2026 17:51
@ethDreamer

Copy link
Copy Markdown
Member Author
gloas_external_builder_flow

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

Looking good. Mostly nits

Comment thread common/eth2/src/lib.rs Outdated
/// the exact bytes when it verifies. When no value has been agreed out of band, implementations
/// SHOULD default to the UTF-8 bytes of the builder's own advertised URL, exactly as advertised,
/// so proposers with no prior relationship can construct an identical `data` deterministically.
/// A zero-length `data` is invalid.

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.

Is this enforced somewhere else?

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.

It's enforced in the fn validate() on BuilderEntry:

  pub fn validate(&self) -> Result<(), &'static str> {
      if self.url.as_bytes().is_empty() {
          return Err("zero-length builder url");
      }
      if self.auth.message.data.is_empty() {
          return Err("zero-length auth data");
      }
      Ok(())
  }

and the same validate() function is used on BuilderPreferenceEntry and it's enforced in the HTTP API:

for entry in builder_config.builders.iter() {
    entry.validate().map_err(|e| {
        warp_utils::reject::custom_bad_request(format!(
            "invalid builder entry: {e}"
        ))
    })?;
}

and that PR adds a test for the http api at beacon_node/http_api/tests/tests.rs:5107 that explicitly tests the http api rejects it.

Comment thread common/builder_types/src/builder_url.rs
Comment thread common/builder_types/src/builder_config.rs Outdated
Comment thread common/builder_types/src/builder_config.rs Outdated
Comment thread common/builder_types/src/builder_config.rs
Comment thread common/eth2/src/types.rs
Comment thread common/eth2/src/lib.rs Outdated
@eserilev eserilev mentioned this pull request Aug 19, 2026
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-builder-api-types-req-auth-domain-eth2-client--1df19d46 branch 2 times, most recently from 766aa4e to 5609394 Compare August 19, 2026 21:58

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

Looks good

@mergify

mergify Bot commented Aug 20, 2026

Copy link
Copy Markdown

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

@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-builder-api-types-req-auth-domain-eth2-client--1df19d46 branch from 5609394 to d68a341 Compare August 20, 2026 17:50
@mergify

mergify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Some required checks have failed. Could you please take a look @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 20, 2026
…Gloas builder API 1/5)

First PR of the Gloas builder API stack (builder-specs #165 / beacon-APIs #630):

- consensus/types: DOMAIN_REQUEST_AUTH application domain and `get_request_auth_domain()`
- common/builder_types: new crate with the shared Builder API wire types
- common/eth2: POST produceBlockV4 methods, builder-preferences methods,
  `Eth-Builder-Url` header plumbing, and `ProduceBlockV4Metadata::builder_url`

All changes are additive: the legacy GET v4 block-production methods are kept
alongside the new POST variants until the validator client migrates later in
this stack, then removed in the final PR.

Change-Id: I1df19d460b74b0e7387426e79a2e8edc764da837
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/add-builder-api-types-req-auth-domain-eth2-client--1df19d46 branch from d68a341 to 885b2f8 Compare August 20, 2026 21:41
@mergify

mergify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Merge Queue Status

This pull request spent 32 minutes 2 seconds in the queue, including 29 minutes 9 seconds running CI.

Required conditions to merge

@mergify
mergify Bot merged commit 67a247f into unstable Aug 20, 2026
38 checks passed
@mergify mergify Bot removed the queued label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants