Skip to content

fix(pbs): derive a proposal's fork from its slot, not the JSON decode - #487

Merged
JasonVranek merged 1 commit into
mainfrom
fix/blinded-block-fork
Aug 11, 2026
Merged

fix(pbs): derive a proposal's fork from its slot, not the JSON decode#487
JasonVranek merged 1 commit into
mainfrom
fix/blinded-block-fork

Conversation

@JasonVranek

Copy link
Copy Markdown
Collaborator

Addresses an issue with the current [unreleased] SSZ code.

While testing on Kurtosis, prysm submitted a blinded block as JSON with Eth-Consensus-Version: fulu. Our JSON decode path ignored that header (only the SSZ path was using it) and fell back to serde's untagged matching. SignedBlindedBeaconBlock is an untagged enum, so it takes the first variant that parses, and an Electra blinded block is field-identical to a Fulu one. So a Fulu block quietly decoded as Electra. We then read the fork straight off that decoded value and told the relay Eth-Consensus-Version: electra. Helix checked the claimed fork against the slot and rejected the submission with "data for an unexpected fork was provided".

So this PR just makes sure we handle the header + JSON case.

Nothing released is affected. This is just for upcoming the SSZ optimizations.

@JasonVranek
JasonVranek requested review from a team, ManuelBilbao and ltitanb August 5, 2026 00:36
@JasonVranek
JasonVranek force-pushed the fix/blinded-block-fork branch from aa4e16f to 4f2afff Compare August 11, 2026 19:53
@JasonVranek
JasonVranek merged commit bd19cc6 into main Aug 11, 2026
5 checks passed
@JasonVranek
JasonVranek deleted the fix/blinded-block-fork branch August 11, 2026 19:57
JasonVranek added a commit that referenced this pull request Aug 11, 2026
Adds the ePBS (gloas) builder-API surface and the strict header rulings,
rebased onto main so it sits on top of the SSZ rewrite (#468) and the
fork-from-slot fix (#487).

ePBS endpoints:
- getExecutionPayloadBid, submitBuilderPreferences, submitSignedBeaconBlock,
  with per-builder routing by SignedRequestAuth.data (no Eth-Builder-Url).
- SSZ-first request/response with JSON fallback; the bid poll ladder honors the
  proposer's timing headers.

Header discipline (builder-specs #165):
- Eth-Consensus-Version required for JSON and SSZ on the request-auth endpoints;
  absent -> MissingVersionHeader, present-but-unsupported -> InvalidVersionHeader,
  both 400. The accepted set is Gloas only; any other fork name is a client bug.
- A relay bid whose response fork is not Gloas on the Gloas-only endpoint is a
  bad relay response: dropped, never forwarded under the wrong fork.

Status + observability:
- zero addressed builders accepting an ePBS submission maps to 500, not 502
  (neither endpoint declares 502); new PbsClientError::NoBuilderResponse.
- decode/accept rejections counted in BEACON_NODE_STATUS via record_client_error;
  dropped relay responses in pbs_relay_invalid_response_total{reason,endpoint,relay_id}.

Legacy PBS, the websocket get_header stream (#483), and the #487 fork fix are
unchanged. Suite green, clippy clean.
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.

4 participants