diff --git a/beacon_node/network/src/network_beacon_processor/gossip_methods.rs b/beacon_node/network/src/network_beacon_processor/gossip_methods.rs index 29e43b18c2..2668a14dc5 100644 --- a/beacon_node/network/src/network_beacon_processor/gossip_methods.rs +++ b/beacon_node/network/src/network_beacon_processor/gossip_methods.rs @@ -732,6 +732,13 @@ impl NetworkBeaconProcessor { %unknown_block_root, "Unknown block root for column" ); + // Data columns are only propagated once the block has been seen for both Fulu + // and Gloas. `UnknownBlockHashFromAttestation` declares that `peer_id` has + // imported `unknown_block_root`. + self.send_sync_message(SyncMessage::UnknownBlockHashFromAttestation( + peer_id, + unknown_block_root, + )); self.propagate_validation_result( message_id.clone(), peer_id, @@ -1076,10 +1083,9 @@ impl NetworkBeaconProcessor { %unknown_block_root, "Unknown block root for partial column" ); - // TODO(gloas): wire this into proper lookup sync. Sending - // `UnknownBlockHashFromAttestation` here is a Fulu-shaped fallback that - // mixes column processing with the attestation lookup path and is not - // the right primitive for Gloas column lookups. + // Data columns are only propagated once the block has been seen for both Fulu + // and Gloas. `UnknownBlockHashFromAttestation` declares that `peer_id` has + // imported `unknown_block_root`. self.send_sync_message(SyncMessage::UnknownBlockHashFromAttestation( peer_id, unknown_block_root, @@ -2714,14 +2720,10 @@ impl NetworkBeaconProcessor { if allow_reprocess { // We don't know the block, get the sync manager to handle the block lookup, and // send the attestation to be scheduled for re-processing. - self.sync_tx - .send(SyncMessage::UnknownBlockHashFromAttestation( - peer_id, - *beacon_block_root, - )) - .unwrap_or_else(|_| { - warn!(msg = "UnknownBlockHash", "Failed to send to sync service") - }); + self.send_sync_message(SyncMessage::UnknownBlockHashFromAttestation( + peer_id, + *beacon_block_root, + )); let msg = match failed_att { FailedAtt::Aggregate { attestation, @@ -3994,13 +3996,17 @@ impl NetworkBeaconProcessor { | PayloadAttestationError::PriorPayloadAttestationMessageKnown { .. } => { self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Ignore); } - PayloadAttestationError::UnknownHeadBlock { .. } => { + PayloadAttestationError::UnknownHeadBlock { beacon_block_root } => { debug!( %peer_id, %message_slot, "Payload attestation references unknown block" ); self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Ignore); + self.send_sync_message(SyncMessage::UnknownBlockHashFromAttestation( + peer_id, + *beacon_block_root, + )) } PayloadAttestationError::NotInPTC { .. } => { self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Reject); diff --git a/beacon_node/network/src/sync/block_lookups/mod.rs b/beacon_node/network/src/sync/block_lookups/mod.rs index 5ab942abf7..f522adf1ba 100644 --- a/beacon_node/network/src/sync/block_lookups/mod.rs +++ b/beacon_node/network/src/sync/block_lookups/mod.rs @@ -523,9 +523,9 @@ impl BlockLookups { cx, ); } - // Then if this lookup happens to have only empty children we can remove it now. We - // must make sure that no other lookup is awaiting this one, and that no requests - // are on-going. + // Then if this lookup had only empty children, and no children now, we can remove + // it. We must make sure that no other lookup is awaiting this one, and that no + // requests are on-going. if !lookup_is_awaiting_event && !self.has_any_awaiting_children(block_root) { Ok(LookupResult::Completed) } else {