diff --git a/beacon_node/beacon_chain/src/inclusion_list_verification.rs b/beacon_node/beacon_chain/src/inclusion_list_verification.rs index f1e6a7189d..13164102dc 100644 --- a/beacon_node/beacon_chain/src/inclusion_list_verification.rs +++ b/beacon_node/beacon_chain/src/inclusion_list_verification.rs @@ -116,6 +116,10 @@ impl GossipVerifiedInclusionList { return Err(GossipInclusionListError::InvalidSignature); } + // TODO(focil): Per spec p2p-interface.md rule 5, the first OR second valid message + // should be allowed (to enable equivocation detection in the cache). Currently this + // rejects any second message, making the cache's equivocation logic dead code. + // See: https://github.com/ethereum/consensus-specs/blob/master/specs/heze/p2p-interface.md#inclusion_list if chain.inclusion_list_seen(signed_il) { return Err(GossipInclusionListError::PriorInclusionListKnown); } diff --git a/consensus/proto_array/src/proto_array.rs b/consensus/proto_array/src/proto_array.rs index 3bb9b3ff98..e6e302b2fa 100644 --- a/consensus/proto_array/src/proto_array.rs +++ b/consensus/proto_array/src/proto_array.rs @@ -1510,9 +1510,14 @@ impl ProtoArray { proto_node: &ProtoNode, proposer_boost_root: Hash256, ) -> Result { - // If the block's inclusion list satisfaction has been recorded as false, - // do not extend the payload. - if self.payload_inclusion_list_satisfaction.get(&fc_node.root) == Some(&false) { + // Per spec: is_payload_inclusion_list_satisfied returns false unless the + // root is in the map AND the value is true. + if !self + .payload_inclusion_list_satisfaction + .get(&fc_node.root) + .copied() + .unwrap_or(false) + { return Ok(false); }