Fix correctness issues in single-block lookup state machine

- add_peer: replace !=-vs-|= typo so Gloas child-peer additions actually
  propagate back through add_peers_to_lookup_and_ancestors and kick
  continue_requests.
- data_peer_group: return the PeerGroup stored in DataRequestState
  Downloaded/Processing instead of todo!(), so InvalidColumn attribution
  in mod.rs no longer panics on a live error path.
- Restore the original `parent_root != ZERO` guard for the parent-known
  check; the genesis block has no real parent so it must fall through to
  processing rather than panic (was todo!()) or be dropped as Failed.
- Wire envelope_is_known_to_fork_choice as a NoRequestNeeded short-
  circuit at the top of payload_lookup_request.
- Rename gload_child_peers -> gloas_child_peers (typo).
- Drop DataDownloadKind, peek_downloaded_peer_group, DataRequest.slot,
  DownloadedData::Blobs.expected_blobs — all dead per the compiler.
- Update test helpers to send UnknownParentSidecarHeader so the lookup
  test suite compiles and runs under the new manager API.

Tests: phase0 79/79, electra 59/59, fulu 59/59.
This commit is contained in:
dapplion
2026-05-19 03:43:11 -06:00
parent 7739c91a3a
commit 2d2fdf3dce
4 changed files with 63 additions and 70 deletions

View File

@@ -1018,7 +1018,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
if let Some(awaiting) = lookup.awaiting_parent() {
let parent_root = awaiting.parent_root();
if let Some((&parent_id, parent_lookup)) = self
if let Some((&parent_id, _)) = self
.single_block_lookups
.iter()
.find(|(_, l)| l.block_root() == parent_root)