From 2545d1d053fad250a5a07f39450110aa981b98bc Mon Sep 17 00:00:00 2001 From: tersec Date: Mon, 29 Aug 2022 10:01:32 +0000 Subject: [PATCH] remove incorrect block gossip validation condition (#4044) * remove incorrect block gossip validation condition * clarify explanation --- beacon_chain/gossip_processing/gossip_validation.nim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/beacon_chain/gossip_processing/gossip_validation.nim b/beacon_chain/gossip_processing/gossip_validation.nim index a89ced7af..a6c22d9fa 100644 --- a/beacon_chain/gossip_processing/gossip_validation.nim +++ b/beacon_chain/gossip_processing/gossip_validation.nim @@ -210,12 +210,12 @@ template validateBeaconBlockBellatrix( quarantine[].addUnviable(signed_beacon_block.root) return errReject("BeaconBlock: mismatched execution payload timestamp") - if signed_beacon_block.message.parent_root in dag.optimisticRoots: - # Definitely don't mark this as unviable. - # [REJECT] The block's parent (defined by `block.parent_root`) passes all - # validation (excluding execution node verification of the - # `block.body.execution_payload`). - return errReject("BeaconBlock: execution payload would build on optimistic parent") + # The condition: + # [REJECT] The block's parent (defined by `block.parent_root`) passes all + # validation (excluding execution node verification of the + # `block.body.execution_payload`). + # cannot occur here, because Nimbus's optimistic sync waits for either + # `ACCEPTED` or `SYNCING` from the EL to get this far. # https://github.com/ethereum/consensus-specs/blob/v1.1.9/specs/phase0/p2p-interface.md#beacon_block # https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/bellatrix/p2p-interface.md#beacon_block