Skip to content

Commit 2c7c48a

Browse files
authored
Merge pull request #751 from ethereum/JustinDrake-patch-8
Disallow duplicate voluntary exits
2 parents 236c43b + d425ea2 commit 2c7c48a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

specs/core/0_beacon-chain.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,14 +2453,16 @@ Verify that `len(block.body.voluntary_exits) <= MAX_VOLUNTARY_EXITS`.
24532453
For each `exit` in `block.body.voluntary_exits`, run the following function:
24542454

24552455
```python
2456-
def process_exit(state: BeaconState, exit: VoluntaryExit) -> None:
2456+
def process_voluntary_exit(state: BeaconState, exit: VoluntaryExit) -> None:
24572457
"""
24582458
Process ``VoluntaryExit`` transaction.
24592459
Note that this function mutates ``state``.
24602460
"""
24612461
validator = state.validator_registry[exit.validator_index]
24622462
# Verify the validator has not yet exited
2463-
assert validator.exit_epoch > get_delayed_activation_exit_epoch(get_current_epoch(state))
2463+
assert validator.exit_epoch == FAR_FUTURE_EPOCH
2464+
# Verify the validator has not initiated an exit
2465+
assert validator.initiated_exit is False
24642466
# Exits must specify an epoch when they become valid; they are not valid before then
24652467
assert get_current_epoch(state) >= exit.epoch
24662468
# Verify signature

0 commit comments

Comments
 (0)