From 3bb8e0d962b83823e24c395c6ebbe1c858559a73 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Thu, 13 Feb 2020 11:17:19 -0700 Subject: [PATCH] cleanup attester slashing conditon code snippet Co-Authored-By: Diederik Loerakker --- specs/phase0/p2p-interface.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/phase0/p2p-interface.md b/specs/phase0/p2p-interface.md index 54db92539..7ad8759d3 100644 --- a/specs/phase0/p2p-interface.md +++ b/specs/phase0/p2p-interface.md @@ -274,7 +274,7 @@ Additional global topics are used to propagate lower frequency validator message - The proposer slashing is the first valid proposer slashing received for the proposer with index `proposer_slashing.index`. - All of the conditions within `process_proposer_slashing` pass validation. - `attester_slashing` - This topic is used solely for propagating attester slashings to proposers on the network. Attester slashings are sent in their entirety. Clients who receive an attester slashing on this topic MUST validate the conditions within `process_attester_slashing` before forwarding it across the network. - - At least one index in the intersection of the attesting indices of each attestation has not yet been seen in any prior `attester_slashing` (i.e. `any((set(attestation_1.attesting_indices).intersection(attestation_2.attesting_indices)).difference(prior_seen_attester_slashed_indices))`). + - At least one index in the intersection of the attesting indices of each attestation has not yet been seen in any prior `attester_slashing` (i.e. `attester_slashed_indices = set(attestation_1.attesting_indices).intersection(attestation_2.attesting_indices)`, verify if `any(attester_slashed_indices.difference(prior_seen_attester_slashed_indices))`). - All of the conditions within `process_attester_slashing` pass validation.