Skip to content

Add SSZ types, content negotiation, and encoding helpers#466

Open
JasonVranek wants to merge 1 commit into
mainfrom
pr/ssz-core
Open

Add SSZ types, content negotiation, and encoding helpers#466
JasonVranek wants to merge 1 commit into
mainfrom
pr/ssz-core

Conversation

@JasonVranek
Copy link
Copy Markdown
Collaborator

Summary

Introduces the types and helpers needed for SSZ support in the PBS pipeline. No behavior changes, just plumbing the follow-up PRs build on.

What's in this PR

  • EncodingType enum with FromStr/Display, including MIME parameter tolerance (RFC 7231 §3.1.1.1)
  • AcceptedEncodings with q-value-aware Accept header parsing (RFC 9110 §12.5.1)
  • Content-type and consensus-version header helpers
  • SSZ bid value extraction from SignedBuilderBid for all supported forks (Bellatrix through Fulu)
  • deserialize_body and parse_response_encoding_and_fork helpers
  • Per-fork type aliases for BuilderBid and ExecutionPayloadHeader
  • SszValueError, PbsError::GeneralRequest, PbsClientError::DecodeError/RelayError
  • New workspace deps: headers-accept, mediatype
  • Comprehensive unit tests for all new types and helpers

Review notes

Part 1 of 4: SSZ types → get_header → submit_block → validation bypassing

Attribution

This work builds on the SSZ builder flow originally implemented by @eserilev
in #252 and ported to the current codebase by @jclapis in #403.

Co-authored-by: Eitan Seri-Levi eserilev@ucsc.edu
Co-authored-by: Joe Clapis jclapis@outlook.com

Introduce EncodingType, AcceptedEncodings, and content negotiation
primitives for SSZ support in the PBS pipeline. Includes:

- EncodingType enum with FromStr/Display and MIME param tolerance
- AcceptedEncodings with q-value aware Accept header parsing
- SSZ bid value extraction from SignedBuilderBid by fork
- deserialize_body and parse_response_encoding_and_fork helpers
- Per-fork type aliases for BuilderBid and ExecutionPayloadHeader
- SszValueError, PbsError::GeneralRequest, PbsClientError variants
- Comprehensive unit tests for all new types and helpers
- New deps: headers-accept, mediatype
@JasonVranek JasonVranek requested a review from a team May 20, 2026 00:04
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.

1 participant