Skip to content

Rewrite get_header relay communication to support SSZ and JSON#467

Open
JasonVranek wants to merge 1 commit into
pr/ssz-corefrom
pr/ssz-routes
Open

Rewrite get_header relay communication to support SSZ and JSON#467
JasonVranek wants to merge 1 commit into
pr/ssz-corefrom
pr/ssz-routes

Conversation

@JasonVranek
Copy link
Copy Markdown
Collaborator

Summary

Rewrites get_header relay communication to support both SSZ and JSON content negotiation.

What's in this PR

  • SSZ and JSON encoding/decoding for relay get_header responses
  • Content-Type and Eth-Consensus-Version header parsing on relay responses
  • Accept header forwarding to relays with q-value ordering
  • MIME parameter tolerance on relay response Content-Type
  • Fork-aware response decoding for all supported forks
  • Updated mock relay and mock validator with SSZ support
  • Dynamic port allocation in tests via get_free_listener (eliminates flaky CI from port collisions)
  • Get_header integration tests covering both encodings
  • Per-fork JSON fixture files for test data

Review notes

The route handler always takes the standard validation path in this PR. Configurable validation modes come in PR 4.

The test infrastructure changes (mock relay SSZ support, dynamic ports) are shared by both get_header and submit_block tests.

Part 2 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

content negotiation. Includes:

- SSZ and JSON encoding/decoding for relay get_header responses
- Content-Type and Eth-Consensus-Version header parsing
- Accept header forwarding to relays with q-value ordering
- MIME parameter tolerance on relay response Content-Type
- Fork-aware SSZ bid value extraction for all supported forks
- Mock relay and validator SSZ support in test infrastructure
- get_header integration tests for both encodings
- Dynamic port allocation in tests via get_free_listener
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