Skip to content

Remove RequestState trait from block lookup sync#9399

Closed
dapplion wants to merge 7 commits into
sigp:unstablefrom
dapplion:remove-request-state-trait-slim
Closed

Remove RequestState trait from block lookup sync#9399
dapplion wants to merge 7 commits into
sigp:unstablefrom
dapplion:remove-request-state-trait-slim

Conversation

@dapplion
Copy link
Copy Markdown
Collaborator

@dapplion dapplion commented Jun 2, 2026

Typo

dapplion added 6 commits June 1, 2026 18:45
… classification

Combine PR sigp#9327's processing-result classification redesign (BlockProcessingResult
becomes Imported/ParentUnknown/Error with producer-side penalty classification in
network_beacon_processor) with PR sigp#9155's RequestState trait removal (concrete
BlockRequest/DataRequest state machine in single_block_lookup.rs, concrete download/
processing handlers in block_lookups/mod.rs). The common.rs RequestState trait is
deleted. ParentUnknown remains reactive (surfaced from the processing result), as in
unstable. All gloas constructs are stripped.
…move-request-state-trait

# Conflicts:
#	beacon_node/network/src/network_beacon_processor/sync_methods.rs
#	beacon_node/network/src/sync/block_lookups/mod.rs
#	beacon_node/network/src/sync/manager.rs
#	beacon_node/network/src/sync/tests/lookups.rs
- BlockRequest::new: replace todo!() (panicked on every lookup creation)
- continue_requests: add missing break in data Some arm (was an infinite
  loop once block processed; spun at 100% CPU and starved the bound from
  ever returning TooManyAttempts)
- remove dead SingleBlockLookup.failed_processing field (bounding lives in
  the per-state counter, matching unstable)
- lint-full fixes: drop never-looping block-request loop, collapse if into
  a let-chain, remove redundant &/unused PeerGroup import

Still open: expected_blobs>0 gating (TODO(gloas)) — happy_path_unknown_*_parent
tests request columns for blobless blocks.
- Remove diff noise vs unstable: delete NewLookupTrigger (enum + threaded
  params + call sites + log), dead SyncNetworkContext::spec(), unused
  LookupRequestError::InternalError; revert has_peers->has_no_peers; restore
  upstream comments; restore is_for_block ordering.
- BUG-1: gate custody/column request on should_fetch_custody_columns(epoch)
  (DA-window + peer-das), not just block.has_data().
- BUG-2: forward real seen_timestamp to block/column processing (was ZERO).
- Round 2: drop now-dead consensus/types has_data() accessor and the
  needless DownloadResult #[allow(dead_code)].

(BUG-3 not taken: hard-failing on data Imported(false)/MissingComponents
breaks duplicate-fully-imported lookups, which legitimately produce it.)
@dapplion dapplion requested a review from jxs as a code owner June 2, 2026 17:45
Removes gratuitous diff churn vs unstable: the AwaitingParent wrapper struct
(+ Display/from_block/from_root/parent_root) and the Option<AwaitingParent>
field/param forced .map(|a| a.parent_root()) at many call sites and made
neighbouring fns (e.g. is_for_block) show as moved. Adopt upstream's plain
Option<Hash256> + set_awaiting_parent/resolve_awaiting_parent verbatim.
parent_chain.rs is now identical to unstable.
@dapplion
Copy link
Copy Markdown
Collaborator Author

dapplion commented Jun 2, 2026

Closing — duplicate of #9391 (trait removal). Branch and work retained.

@dapplion dapplion closed this Jun 2, 2026
@dapplion
Copy link
Copy Markdown
Collaborator Author

dapplion commented Jun 2, 2026

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