Skip to content

perf(pbs): always request SSZ from relays on get_header - #481

Open
JasonVranek wants to merge 3 commits into
mainfrom
pr/get-header-always-ssz
Open

perf(pbs): always request SSZ from relays on get_header#481
JasonVranek wants to merge 3 commits into
mainfrom
pr/get-header-always-ssz

Conversation

@JasonVranek

Copy link
Copy Markdown
Collaborator

PBS decodes and validates every relay bid and the route re-encodes the winning bid to the beacon node's Accept regardless, so the relay->PBS wire format never changes what the BN receives. Always request SSZ (JSON fallback) instead of mirroring the caller's format: SSZ is smaller on the wire and faster to decode, which matters across N relay bids on the proposal critical path. Mirrors the same change already made to submit_block.

@JasonVranek
JasonVranek force-pushed the pr/ssz-submit-block branch from 7939e87 to a374d82 Compare July 24, 2026 21:58
Base automatically changed from pr/ssz-submit-block to main July 24, 2026 22:07
@JasonVranek
JasonVranek requested a review from a team July 24, 2026 22:07
PBS decodes and validates every relay bid and the route re-encodes the winning
bid to the beacon node's Accept regardless, so the relay->PBS wire format never
changes what the BN receives. Always request SSZ (JSON fallback) instead of
mirroring the caller's format: SSZ is smaller on the wire and faster to decode,
which matters across N relay bids on the proposal critical path. Mirrors the
same change already made to submit_block.

Adds a test asserting the relay receives an SSZ-first Accept regardless of the
BN's preference (the mock relay now records the Accept it was sent), and updates
the now-stale build_outbound_accept doc comment.
@JasonVranek
JasonVranek force-pushed the pr/get-header-always-ssz branch from 8de071f to ca8f3db Compare July 27, 2026 16:12
Comment thread crates/pbs/src/mev_boost/get_header.rs Outdated
Comment thread crates/common/src/wire.rs Outdated
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