From b7376aea5ca8b3c772f4b69f193724ea2a881106 Mon Sep 17 00:00:00 2001 From: Justin Date: Sun, 10 Mar 2019 13:49:37 +0100 Subject: [PATCH] Disallow duplicate voluntary exits Stricter processing of voluntary exits to remove an edge case --- specs/core/0_beacon-chain.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index c88155f77..4979eb91a 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -2460,7 +2460,9 @@ def process_exit(state: BeaconState, exit: VoluntaryExit) -> None: """ validator = state.validator_registry[exit.validator_index] # Verify the validator has not yet exited - assert validator.exit_epoch > get_delayed_activation_exit_epoch(get_current_epoch(state)) + assert validator.exit_epoch == FAR_FUTURE_EPOCH + # Verify the validator has not initiated an exit + assert validator.initiated_exit is False # Exits must specify an epoch when they become valid; they are not valid before then assert get_current_epoch(state) >= exit.epoch # Verify signature