From 2ce2ec9b62697892a2033d9fe374057d42f4aab5 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Thu, 13 Jan 2022 03:08:38 +0000 Subject: [PATCH] Remove penalty for attesting to unknown head (#2903) ## Issue Addressed - Resolves https://github.com/sigp/lighthouse/issues/2902 ## Proposed Changes As documented in https://github.com/sigp/lighthouse/issues/2902, there are some cases where we will score peers very harshly for sending attestations to an unknown head. This PR removes the penalty when an attestation for an unknown head is received, queued for block look-up, then popped from the queue without the head block being known. This prevents peers from being penalized for an unknown block when that peer was never actually asked for the block. Peer penalties should still be applied to the peers who *do* get the request for the block and fail to respond with a valid block. As such, peers who send us attestations to non-existent heads should eventually be booted. ## Additional Info - [ ] Need to confirm that a timeout for a bbroot request will incur a penalty. --- .../src/beacon_processor/worker/gossip_methods.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs b/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs index 2b6ac02b6..9ece18d02 100644 --- a/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs +++ b/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs @@ -1532,12 +1532,9 @@ impl Worker { } } else { // We shouldn't make any further attempts to process this attestation. - // Downscore the peer. - self.gossip_penalize_peer( - peer_id, - PeerAction::LowToleranceError, - "attn_unknown_head", - ); + // + // Don't downscore the peer since it's not clear if we requested this head + // block from them or not. self.propagate_validation_result( message_id, peer_id,