@@ -349,13 +349,27 @@ impl ExecutionPayloadError {
349349 // always forced to consider here whether or not to penalize a peer when
350350 // we add a new error condition.
351351 match self {
352+ // The peer has nothing to do with this error, do not penalize them.
352353 ExecutionPayloadError :: NoExecutionConnection => false ,
354+ // The peer has nothing to do with this error, do not penalize them.
353355 ExecutionPayloadError :: RequestFailed ( _) => false ,
354- ExecutionPayloadError :: RejectedByExecutionEngine { .. } => true ,
356+ // An honest optimistic node may propagate blocks which are rejected by an EE, do not
357+ // penalize them.
358+ ExecutionPayloadError :: RejectedByExecutionEngine { .. } => false ,
359+ // This is a trivial gossip validation condition, there is no reason for an honest peer
360+ // to propagate a block with an invalid payload time stamp.
355361 ExecutionPayloadError :: InvalidPayloadTimestamp { .. } => true ,
356- ExecutionPayloadError :: InvalidTerminalPoWBlock { .. } => true ,
357- ExecutionPayloadError :: InvalidActivationEpoch { .. } => true ,
358- ExecutionPayloadError :: InvalidTerminalBlockHash { .. } => true ,
362+ // An honest optimistic node may propagate blocks with an invalid terminal PoW block, we
363+ // should not penalized them.
364+ ExecutionPayloadError :: InvalidTerminalPoWBlock { .. } => false ,
365+ // This condition is checked *after* gossip propagation, therefore penalizing gossip
366+ // peers for this block would be unfair. There may be an argument to penalize RPC
367+ // blocks, since even an optimistic node shouldn't verify this block. We will remove the
368+ // penalties for all block imports to keep things simple.
369+ ExecutionPayloadError :: InvalidActivationEpoch { .. } => false ,
370+ // As per `Self::InvalidActivationEpoch`.
371+ ExecutionPayloadError :: InvalidTerminalBlockHash { .. } => false ,
372+ // Do not penalize the peer since it's not their fault that *we're* optimistic.
359373 ExecutionPayloadError :: UnverifiedNonOptimisticCandidate => false ,
360374 }
361375 }
0 commit comments