Gloas checkpoint sync + range sync envelope wiring#72
Open
dapplion wants to merge 7 commits into
Open
Conversation
…lidation - Download execution payload envelope from checkpoint server during Gloas checkpoint sync - Store envelope in DB (invariant 5 compliance) - Patch in-memory state latest_block_hash in load_parent for Full->Pending fallback - Fix proto_array is_genesis to distinguish checkpoint sync from actual genesis (slot != 0) - Handle missing previous_state_root during checkpoint sync (Bug 1 fix) - Add weak_subjectivity_state envelope parameter Tested: zero block rejections, head advances ~100 slots from checkpoint. Remaining: range sync needs PayloadEnvelopesByRange; Prysm Goodbye:Fault peer issue.
- Implement payload_lookup_request() (previously stubbed as NoRequestNeeded) - Add PayloadEnvelopesByRoot RPC request/response handling - Route envelope responses through router -> sync manager -> block lookups - Add envelope processing via verify_envelope_for_gossip + import - Add SinglePayloadEnvelope variant to SyncRequestId and BlockProcessType - Wire PayloadRequest state machine transitions (Downloaded -> Processing -> Done) Based on sigp#9039 by @eserilev, adapted for three-stream lookup model from gloas-lookup-sync-fixes.
- status.rs: Use state's finalized checkpoint in status message when fork choice's finalized epoch exceeds the state's (happens during checkpoint sync where anchor_epoch = state.current_epoch()). Prevents advertising a finalized_epoch ahead of the network consensus. - builder.rs: Fix --ignore-ws-check to actually skip the WS period error. Previously the flag only added a warning but still returned the error.
Prysm's peer store has 22 peer IDs from our IP (85.10.201.236), exceeding its CollocationLimit=5 anti-Sybil check. This is NOT an IP ban — it triggers `isfromBadIP` in handshake.go which sends Goodbye:Fault before any status processing. Confirmed by testing with genesis finalized (epoch 0) and different status versions (V1/V2) — all rejected identically. Only solution is a fresh IP or Prysm peer store reset.
Range sync now downloads execution payload envelopes alongside blocks and data columns. Envelopes are stored in the DB before block processing so that load_parent can find them for Full state transitions. Tested against local Kurtosis ePBS devnet (2 Prysm + 2 Geth nodes): - Checkpoint sync at slot 576, then range sync imported blocks - PayloadEnvelopesByRange requests sent to Prysm peers successfully - Most blocks import correctly with envelopes
When load_parent needs the Full state but only has the Pending state (checkpoint sync / range sync), apply process_execution_payload_envelope to correctly derive the Full state. Previously only latest_block_hash was patched, missing deposits, withdrawals, builder payments, and execution availability updates. Tested: zero StateRootMismatch errors syncing 117 epochs on local kurtosis ePBS devnet.
Load Pending state at the parent's slot (not advanced to child's slot)
before applying the envelope. Then advance to the child's slot after
envelope processing. Previously the state was advanced first, causing
SlotMismatch { envelope_slot: N, parent_state_slot: N+1 }.
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
Makes Lighthouse checkpoint sync and range sync work with ePBS/Gloas by downloading and applying execution payload envelopes.
Changes
process_execution_payload_envelopeTest results (local Kurtosis ePBS devnet, 2 Prysm + 2 Geth, 4s slots)
StateRootMismatcherrorsKnown issues
CollocationLimit=5blocks connections from IPs with >5 stored peer IDs (use--p2p-colocation-whitelist=0.0.0.0/0)