Lower tolerance of stale blobs on gossip (#5935)

* Lower tolerance of stale blobs on gossip

* Drop to debug
This commit is contained in:
Michael Sproul
2024-06-19 15:02:31 +10:00
committed by GitHub
parent 806c3ce9e9
commit adb3f865ef

View File

@@ -700,7 +700,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
"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<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
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<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
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,
);
}
}
}
}