From 7f1b9369056b50087797236553062521e1aab85f Mon Sep 17 00:00:00 2001 From: blacktemplar Date: Fri, 11 Sep 2020 01:43:15 +0000 Subject: [PATCH] ignore too early / too late attestations instead of penalizing them (#1608) ## Issue Addressed NA ## Proposed Changes This ignores attestations that are too early or too late as it is specified in the spec (see https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/specs/phase0/p2p-interface.md#global-topics first subpoint of `beacon_aggregate_and_proof`) --- beacon_node/network/src/beacon_processor/worker.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/beacon_node/network/src/beacon_processor/worker.rs b/beacon_node/network/src/beacon_processor/worker.rs index 672e55da0..6388962e5 100644 --- a/beacon_node/network/src/beacon_processor/worker.rs +++ b/beacon_node/network/src/beacon_processor/worker.rs @@ -562,12 +562,18 @@ impl Worker { * * The peer has published an invalid consensus message, _only_ if we trust our own clock. */ + trace!( + self.log, + "Attestation is not within the last ATTESTATION_PROPAGATION_SLOT_RANGE slots"; + "peer_id" => peer_id.to_string(), + "block" => format!("{}", beacon_block_root), + "type" => format!("{:?}", attestation_type), + ); self.propagate_validation_result( message_id, peer_id.clone(), - MessageAcceptance::Reject, + MessageAcceptance::Ignore, ); - self.penalize_peer(peer_id.clone(), PeerAction::LowToleranceError); } AttnError::InvalidSelectionProof { .. } | AttnError::InvalidSignature => { /*