From 78f47f2069ec753c08dd7b278f7fc073b086cc34 Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 19 Mar 2019 12:23:17 +0000 Subject: [PATCH] Avoid underflow in voluntary exits --- specs/core/0_beacon-chain.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index a631bf2fc..be6a52e68 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -2472,6 +2472,7 @@ def process_voluntary_exit(state: BeaconState, exit: VoluntaryExit) -> None: # Exits must specify an epoch when they become valid; they are not valid before then assert get_current_epoch(state) >= exit.epoch # Must have been in the validator set long enough + assert validator.activation_epoch != FAR_FUTURE_EPOCH assert get_current_epoch(state) - validator.activation_epoch >= PERSISTENT_COMMITTEE_PERIOD # Verify signature assert bls_verify(