Skip to content

Commit

Permalink
Remove penalty for attesting to unknown head (sigp#2903)
Browse files Browse the repository at this point in the history
## Issue Addressed

- Resolves sigp#2902

## Proposed Changes

As documented in sigp#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.
  • Loading branch information
paulhauner committed Jan 13, 2022
1 parent f13e9c3 commit 2ce2ec9
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1532,12 +1532,9 @@ impl<T: BeaconChainTypes> Worker<T> {
}
} 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,
Expand Down

0 comments on commit 2ce2ec9

Please sign in to comment.