Add configurable validation bypassing for get_header and submit_block#469
Open
JasonVranek wants to merge 1 commit into
Open
Add configurable validation bypassing for get_header and submit_block#469JasonVranek wants to merge 1 commit into
JasonVranek wants to merge 1 commit into
Conversation
Introduce HeaderValidationMode and BlockValidationMode to allow operators to trade validation thoroughness for latency: - None: skip decoding and crypto checks, forward raw relay responses - Standard: full validation (default, existing behavior) - Extra: additional parent block checks via RPC (get_header only) Includes CompoundGetHeaderResponse and CompoundSubmitBlockResponse types to handle both full and light processing paths. Updates config, docs, and comprehensive tests for all validation modes.
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
Adds
HeaderValidationModeandBlockValidationModeconfiguration options, allowing operators to trade validation thoroughness for latency.Validation modes
Header (get_header):
none— skip decoding and crypto checks, extract only fork + bid value, forward raw relay response bytes directly to the beacon nodestandard— full structural validation, signature verification, and fork checks (default)extra— standard + parent block validation via execution layer RPC (requiresrpc_url)Block (submit_block):
none— skip decoding and validation, forward raw relay response directlystandard— full validation including block hash and KZG commitment checks (default)What's in this PR
HeaderValidationModeandBlockValidationModeenums in configCompoundGetHeaderResponse/CompoundSubmitBlockResponsetypes handling full vs light processingLightGetHeaderResponse/LightSubmitBlockResponsefor thenonepathBuilderApitrait signatures to use compound response typesReview notes
The
nonemode is designed for operators who fully trust their relay fleet and want minimum latency on the critical path. The response bytes are forwarded without deserialization, so any relay misbehavior (wrong fork, invalid signatures) will not be caught by the sidecar.Part 4 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