Fix peer down-scoring behaviour when gossip blobs/columns are received after getBlobs or reconstruction (#6686)

* Fix peer disconnection when gossip blobs/columns are received after they are recieved from the EL or available via column reconstruction.
This commit is contained in:
Jimmy Chen
2024-12-16 16:44:14 +11:00
committed by GitHub
parent 1c5be34def
commit 847c8019c7

View File

@@ -710,8 +710,19 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
MessageAcceptance::Reject,
);
}
GossipDataColumnError::PriorKnown { .. } => {
// Data column is available via either the EL or reconstruction.
// Do not penalise the peer.
// Gossip filter should filter any duplicates received after this.
debug!(
self.log,
"Received already available column sidecar. Ignoring the column sidecar";
"slot" => %slot,
"block_root" => %block_root,
"index" => %index,
)
}
GossipDataColumnError::FutureSlot { .. }
| GossipDataColumnError::PriorKnown { .. }
| GossipDataColumnError::PastFinalizedSlot { .. } => {
debug!(
self.log,
@@ -852,7 +863,18 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
MessageAcceptance::Reject,
);
}
GossipBlobError::FutureSlot { .. } | GossipBlobError::RepeatBlob { .. } => {
GossipBlobError::RepeatBlob { .. } => {
// We may have received the blob from the EL. Do not penalise the peer.
// Gossip filter should filter any duplicates received after this.
debug!(
self.log,
"Received already available blob sidecar. Ignoring the blob sidecar";
"slot" => %slot,
"root" => %root,
"index" => %index,
)
}
GossipBlobError::FutureSlot { .. } => {
debug!(
self.log,
"Could not verify blob sidecar for gossip. Ignoring the blob sidecar";