You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7939e87
Browse filesBrowse the repository at this point in the historyBrowse files
fix(pbs): correct submit_block v2 content negotiation and fail loud on v1-only relays
Content negotiation (Builder API):
- Missing Accept defaults the response to JSON instead of inheriting the request
Content-Type; request and response encodings are independent.
- v2 succeeds with an empty 202 and has no body to negotiate, so it skips Accept
entirely -- a bad Accept no longer 406s a v2 submission before it reaches a relay.
- An unrecognized request Content-Type returns 415 instead of 400.
- Always request SSZ from the relay (JSON fallback) rather than mirroring the caller's
format: PBS decodes and re-validates the payload and the route re-encodes to the BN's
Accept regardless, so SSZ is the fastest wire format on the relay hop.
Fail loud on v1-only relays:
- Drop the v2->v1 fallback. It returned the relay's v1 payload as a 200 body, but a v2
caller (Lighthouse, Prysm) requires exactly 202 and never reads the body, so the block
was silently dropped. PBS cannot publish the payload itself, so a relay that 404s v2
now fails loud (RELAY_V2_UNSUPPORTED) and other relays still get a chance.
0 commit comments