Skip to content

Commit 8b3bc7a

Browse files
committed
define ATTESTATION_PROPAGATION_SLOT_RANGE
1 parent f4a7a6e commit 8b3bc7a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

beacon_chain/eth2_processor.nim

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,13 @@ proc checkForPotentialSelfSlashing(
294294
# Attestations remain valid for 32 slots, so avoid confusing with one's own
295295
# reflections, for a ATTESTATION_PROPAGATION_SLOT_RANGE div SLOTS_PER_EPOCH
296296
# period after the attestation slot. For mainnet this can be one additional
297-
# epoch, and for minimal, four epochs.
298-
const GUARD_EPOCHS = ATTESTATION_PROPAGATION_SLOT_RANGE div SLOTS_PER_EPOCH
297+
# epoch, and for minimal, four epochs. Unlike in the attestation validation
298+
# checks, use the spec version of the constant here.
299+
const
300+
# https://github.com/ethereum/eth2.0-specs/blob/v1.0.0/specs/phase0/p2p-interface.md#configuration
301+
ATTESTATION_PROPAGATION_SLOT_RANGE = 32
302+
303+
GUARD_EPOCHS = ATTESTATION_PROPAGATION_SLOT_RANGE div SLOTS_PER_EPOCH
299304

300305
let epoch = wallSlot.epoch
301306
# Can skip this whole conditional by setting relevant config value to 0

0 commit comments

Comments
 (0)