Rewrite submit_block relay communication to support SSZ and JSON#468
Open
JasonVranek wants to merge 1 commit into
Open
Rewrite submit_block relay communication to support SSZ and JSON#468JasonVranek wants to merge 1 commit into
JasonVranek wants to merge 1 commit into
Conversation
content negotiation. Includes: - SSZ-first request encoding with JSON fallback on 406/415 - Content-Type and Eth-Consensus-Version header handling - Fork-aware SSZ decoding for relay responses - MIME parameter tolerance on relay response Content-Type - v2 to v1 fallback forwards payload to BN (prevents silent block loss) - V2 fallback metric counter - Comprehensive submit_block integration tests for both encodings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites submit_block relay communication to support SSZ and JSON content negotiation.
What's in this PR
V2_FALLBACK_TO_V1metric counter for observabilityReview notes
The v2→v1 fallback behavior is an intentional change from the previous code which silently discarded the v1 payload. The beacon node needs the unblinded execution payload to broadcast the block (returning an empty 202 on fallback would cause silent block loss).
Part 3 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