Revise EE peer penalites (#3485)
## Issue Addressed NA ## Proposed Changes Don't penalize peers for errors that might be caused by an honest optimistic node. ## Additional Info NA
This commit is contained in:
parent
a0605c4ee6
commit
043fa2153e
@ -349,13 +349,27 @@ impl ExecutionPayloadError {
|
||||
// always forced to consider here whether or not to penalize a peer when
|
||||
// we add a new error condition.
|
||||
match self {
|
||||
// The peer has nothing to do with this error, do not penalize them.
|
||||
ExecutionPayloadError::NoExecutionConnection => false,
|
||||
// The peer has nothing to do with this error, do not penalize them.
|
||||
ExecutionPayloadError::RequestFailed(_) => false,
|
||||
ExecutionPayloadError::RejectedByExecutionEngine { .. } => true,
|
||||
// An honest optimistic node may propagate blocks which are rejected by an EE, do not
|
||||
// penalize them.
|
||||
ExecutionPayloadError::RejectedByExecutionEngine { .. } => false,
|
||||
// This is a trivial gossip validation condition, there is no reason for an honest peer
|
||||
// to propagate a block with an invalid payload time stamp.
|
||||
ExecutionPayloadError::InvalidPayloadTimestamp { .. } => true,
|
||||
ExecutionPayloadError::InvalidTerminalPoWBlock { .. } => true,
|
||||
ExecutionPayloadError::InvalidActivationEpoch { .. } => true,
|
||||
ExecutionPayloadError::InvalidTerminalBlockHash { .. } => true,
|
||||
// An honest optimistic node may propagate blocks with an invalid terminal PoW block, we
|
||||
// should not penalized them.
|
||||
ExecutionPayloadError::InvalidTerminalPoWBlock { .. } => false,
|
||||
// This condition is checked *after* gossip propagation, therefore penalizing gossip
|
||||
// peers for this block would be unfair. There may be an argument to penalize RPC
|
||||
// blocks, since even an optimistic node shouldn't verify this block. We will remove the
|
||||
// penalties for all block imports to keep things simple.
|
||||
ExecutionPayloadError::InvalidActivationEpoch { .. } => false,
|
||||
// As per `Self::InvalidActivationEpoch`.
|
||||
ExecutionPayloadError::InvalidTerminalBlockHash { .. } => false,
|
||||
// Do not penalize the peer since it's not their fault that *we're* optimistic.
|
||||
ExecutionPayloadError::UnverifiedNonOptimisticCandidate => false,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user