From adb3f865ef78f3b6169925da1ed5322a3cf8cafb Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Wed, 19 Jun 2024 15:02:31 +1000 Subject: [PATCH] Lower tolerance of stale blobs on gossip (#5935) * Lower tolerance of stale blobs on gossip * Drop to debug --- .../gossip_methods.rs | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) 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 99622bfa30..f178fa56c3 100644 --- a/beacon_node/network/src/network_beacon_processor/gossip_methods.rs +++ b/beacon_node/network/src/network_beacon_processor/gossip_methods.rs @@ -700,7 +700,7 @@ impl NetworkBeaconProcessor { "index" => %index, "commitment" => %commitment, ); - // Prevent recurring behaviour by penalizing the peer slightly. + // Prevent recurring behaviour by penalizing the peer. self.gossip_penalize_peer( peer_id, PeerAction::LowToleranceError, @@ -712,10 +712,8 @@ impl NetworkBeaconProcessor { MessageAcceptance::Reject, ); } - GossipBlobError::FutureSlot { .. } - | GossipBlobError::RepeatBlob { .. } - | GossipBlobError::PastFinalizedSlot { .. } => { - warn!( + GossipBlobError::FutureSlot { .. } | GossipBlobError::RepeatBlob { .. } => { + debug!( self.log, "Could not verify blob sidecar for gossip. Ignoring the blob sidecar"; "error" => ?err, @@ -736,6 +734,30 @@ impl NetworkBeaconProcessor { MessageAcceptance::Ignore, ); } + GossipBlobError::PastFinalizedSlot { .. } => { + debug!( + self.log, + "Could not verify blob sidecar for gossip. Ignoring the blob sidecar"; + "error" => ?err, + "slot" => %slot, + "root" => %root, + "index" => %index, + "commitment" => %commitment, + ); + // Prevent recurring behaviour by penalizing the peer. A low-tolerance + // error is fine because there's no reason for peers to be propagating old + // blobs on gossip, even if their view of finality is lagging. + self.gossip_penalize_peer( + peer_id, + PeerAction::LowToleranceError, + "gossip_blob_low", + ); + self.propagate_validation_result( + message_id, + peer_id, + MessageAcceptance::Ignore, + ); + } } } }