Skip to content

Commit

Permalink
ignore too early / too late attestations instead of penalizing them (#…
Browse files Browse the repository at this point in the history
…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`)
  • Loading branch information
blacktemplar committed Sep 11, 2020
1 parent 810de2f commit 7f1b936
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions beacon_node/network/src/beacon_processor/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,12 +562,18 @@ impl<T: BeaconChainTypes> Worker<T> {
*
* 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 => {
/*
Expand Down

0 comments on commit 7f1b936

Please sign in to comment.