Skip to content

Lookup tree sync: complete header-known shortcut and component fetch#83

Open
dapplion wants to merge 2 commits into
unstablefrom
tree-sync-fetch-header
Open

Lookup tree sync: complete header-known shortcut and component fetch#83
dapplion wants to merge 2 commits into
unstablefrom
tree-sync-fetch-header

Conversation

@dapplion

@dapplion dapplion commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Builds on e9eb55ca4d ("Lookup tree sync: cache header when awaiting parent"), completing the wiring so lookup sync works end-to-end across phase0/electra/fulu.

Changes

  • Header-known shortcut: when a block is already in hand at creation (gossip UnknownParentBlock), seed it straight into ComponentsDownload and let the beacon processor authoritatively report ParentUnknown, instead of pre-parking on the gossip hint.
  • add_child_components removed: the block component is routed through SingleBlockLookup::new.
  • awaiting_parent gate (wires the previously-dead constructor arg): a peerless gossip child keeps its cached block and is not submitted for processing until the parent resolves — it never enters WaitingForParent, which drops the block, because it has no peers to re-fetch from. WaitingForParent (header-only; block dropped + re-fetched) remains for deep-chain parents, which do have peers.
  • continue_requests control flow: start the block download in FetchingHeader and break out of every terminal state.
  • Peer-das fork gate on data-column requests: pre-fulu blocks no longer issue DataColumnsByRoot (they carry blobs, not columns).
  • Orphaned-response handling: a custody/payload download response that arrives at a lookup which has parked awaiting its parent is ignored, instead of dropping the lookup on BadState (this was killing fulu lookups whose in-flight column request outlived the park).

dapplion added 2 commits June 25, 2026 17:34
- Skip the header-fetch stage when the block is already known at creation
  (gossip `UnknownParentBlock`): seed it into `ComponentsDownload` and let the
  beacon processor determine `ParentUnknown` rather than pre-parking.
- Replace `add_child_components` by routing the block component through
  `SingleBlockLookup::new`.
- Honor `awaiting_parent` at creation as a processing gate: a peerless gossip
  child keeps its cached block and is not submitted for processing until the
  parent resolves, instead of dropping a block it cannot re-fetch.
- Fix `continue_requests` control flow: start the block download in
  `FetchingHeader` and break out of every terminal state.
- Gate data-column requests on the peer-das fork so pre-fulu blocks do not
  request columns.
- Ignore orphaned custody/payload download responses for a lookup that has
  parked awaiting its parent instead of dropping it on `BadState`.
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