Merge branch 'unstable' of https://github.com/sigp/lighthouse into electra_attestation_changes

This commit is contained in:
realbigsean
2024-06-20 09:36:56 -04:00
31 changed files with 310 additions and 329 deletions

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,
);
}
}
}
}