Skip to content

Decouple builder request auth from the dial URL - #17373

Merged
terencechain merged 3 commits into
developfrom
builder-entries-wire
Aug 19, 2026
Merged

Decouple builder request auth from the dial URL#17373
terencechain merged 3 commits into
developfrom
builder-entries-wire

Conversation

@terencechain

Copy link
Copy Markdown
Collaborator
  • Replace builder_request_auths on BlockRequest with a BuilderConfig carrying resolved BuilderEntrys (url, auth, builder_pubkeys, max_execution_payment, min_bid, builder_boost_factor), shaped to beacon-APIs#630
  • Request auths now sign the entry's auth data (default: the UTF-8 bytes of its url) instead of the URL string, so the signed identity is decoupled from the HTTP dial target and a sidecar/proxy can front a builder
  • The beacon node routes bid requests by entry url and forwards the auth byte-for-byte; entries may share a url with distinct auth data, one request per entry
  • SubmitBuilderPreferencesRequest carries the dial url separately from the opaque auth data
  • The validator client resolves entries at propose time and signs on cache miss, so proposals no longer depend on a prior preference push
  • Per-entry limits ride the wire but are not yet enforced; the beacon still applies the pushed per-pubkey max_execution_payment (enforcement is the next PR in the stack)

Second of the stack replacing #17124, on top of #17372.

@github-project-automation github-project-automation Bot moved this to Unassigned in Gloas Aug 18, 2026
Base automatically changed from request-auth-spec-alignment to develop August 18, 2026 19:44
urls = append(urls, url)
id := entryIdentity{url: e.GetUrl(), data: string(e.GetAuth().GetMessage().GetData())}
if seen[id] {
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if the boost faster/builder pubkeys min bid are different this will just take the first one and drop, is it worth adding a debug log for this or is first seen fine?

return
}
bid, err := c.GetExecutionPayloadBid(ctx, slot, parentHash, parentRoot, proposerPubkey, byURL[url])
bid, err := c.GetExecutionPayloadBid(ctx, slot, parentHash, parentRoot, proposerPubkey, e.GetAuth())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't believe we do any validation on the auth like on slot, if they end up differing we would get a 400 error

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The beacon deliberately doesn't introspect the auth: the spec requires forwarding message and signature byte for byte, and the data/slot inside are the builder's to verify against what it agreed with the validator

@@ -45,4 +45,30 @@ message BuilderPreferencesRequest {
message SubmitBuilderPreferencesRequest {
bytes proposer_pubkey = 1;
BuilderPreferencesRequest request = 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should change this to match 630 and have it as builder preferences entry + have it batched, right now

we can then change
func (v *validator) submitBuilderPreferenceRequests(ctx context.Context, reqs []*ethpb.SubmitBuilderPreferencesRequest) {
for _, req := range reqs {
if _, err := v.validatorClient.SubmitBuilderPreferences(ctx, req); err != nil {
log.WithError(err).Warn("Failed to submit builder preferences")
}
}
}

to match 630

"github.com/OffchainLabs/prysm/v7/consensus-types/primitives.Gwei"
];
uint64 builder_boost_factor = 2;
repeated BuilderEntry builders = 3;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

small nit shouldn't this be builder_entries or entries?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It mirrors beacon-APIs 630, BuilderConfig.builders is the spec field name, so I keep it for 1:1 mapping with the REST

func (v *validator) signRequestAuthCached(ctx context.Context, km keymanager.IKeymanager, pk pubkey, relay string, slot primitives.Slot) (*ethpb.SignedRequestAuth, error) {
key := requestAuthKey{pk: pk, slot: slot, relay: relay}
func (v *validator) signRequestAuthCached(ctx context.Context, km keymanager.IKeymanager, pk pubkey, authData []byte, slot primitives.Slot) (*ethpb.SignedRequestAuth, error) {
key := requestAuthKey{pk: pk, slot: slot, data: string(authData)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is data: string(authData) ok or does it need to be like a hex

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it's fine. A Go string is just an immutable byte container. Hex would be an extra allocation for the same uniqueness

Preferences: &ethpb.BuilderPreferences{MaxExecutionPayment: e.MaxExecutionPayment},
Auth: e.Auth,
}
if err := vs.BlockBuilder.SubmitBuilderPreferences(ctx, pubkey, e.Url, breq); err != nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since these are unique urls, maybe we should be spinning up these in their own go routines and submitting that way one doesn't block others? not sure if there are any bad tradeoffs though, as a thought.

@james-prysm james-prysm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@terencechain
terencechain added this pull request to the merge queue Aug 19, 2026
Merged via the queue into develop with commit 0a5c83f Aug 19, 2026
33 of 34 checks passed
@terencechain
terencechain deleted the builder-entries-wire branch August 19, 2026 15:16
@github-project-automation github-project-automation Bot moved this from Unassigned to Done in Gloas Aug 19, 2026
pull Bot pushed a commit to wsnchristopher/prysm that referenced this pull request Aug 21, 2026
…7374)

- Builder-API bids are checked against their own entry's max execution
payment, min bid, boost factor, and builder pubkeys
- P2P bids use the config-level min bid and boost, payments are trusted
only from entries naming the builder key
- Removes the per-pubkey `maxExecutionPayments` map, the preferences
push now sends each builder its own cap

Last of the stack replacing OffchainLabs#17124, on top of OffchainLabs#17373.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants