mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-15 09:48:20 +00:00
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:
@@ -1522,7 +1522,12 @@ impl TestRig {
|
||||
}
|
||||
|
||||
fn trigger_unknown_parent_blob(&mut self, peer_id: PeerId, blob: Arc<BlobSidecar<E>>) {
|
||||
self.send_sync_message(SyncMessage::UnknownParentBlob(peer_id, blob));
|
||||
self.send_sync_message(SyncMessage::UnknownParentSidecarHeader {
|
||||
peer_id,
|
||||
block_root: blob.block_root(),
|
||||
parent_root: blob.block_parent_root(),
|
||||
slot: blob.slot(),
|
||||
});
|
||||
}
|
||||
|
||||
fn trigger_unknown_parent_column(
|
||||
@@ -1530,7 +1535,17 @@ impl TestRig {
|
||||
peer_id: PeerId,
|
||||
column: Arc<DataColumnSidecar<E>>,
|
||||
) {
|
||||
self.send_sync_message(SyncMessage::UnknownParentDataColumn(peer_id, column));
|
||||
let DataColumnSidecar::Fulu(col) = column.as_ref() else {
|
||||
panic!(
|
||||
"trigger_unknown_parent_column is Fulu-only; Gloas columns use the partial-column path"
|
||||
);
|
||||
};
|
||||
self.send_sync_message(SyncMessage::UnknownParentSidecarHeader {
|
||||
peer_id,
|
||||
block_root: col.block_root(),
|
||||
parent_root: col.block_parent_root(),
|
||||
slot: col.slot(),
|
||||
});
|
||||
}
|
||||
|
||||
fn trigger_unknown_block_from_attestation(&mut self, block_root: Hash256, peer_id: PeerId) {
|
||||
|
||||
Reference in New Issue
Block a user