Skip to content

Commit

Permalink
Cannot exit until 2048 epochs (#675 item 21)
Browse files Browse the repository at this point in the history
See #675 item 21
  • Loading branch information
vbuterin committed Mar 8, 2019
1 parent 8e08e74 commit fbbb363
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ Code snippets appearing in `this style` are to be interpreted as Python code.
| `EPOCHS_PER_ETH1_VOTING_PERIOD` | `2**4` (= 16) | epochs | ~1.7 hours |
| `SLOTS_PER_HISTORICAL_ROOT` | `2**13` (= 8,192) | slots | ~13 hours |
| `MIN_VALIDATOR_WITHDRAWABILITY_DELAY` | `2**8` (= 256) | epochs | ~27 hours |
| `PERSISTENT_COMMITTEE_PERIOD` | `2**11` (= 2,048) | epochs | 9 days |

### State list lengths

Expand Down Expand Up @@ -1915,6 +1916,8 @@ def process_exit(state: BeaconState, exit: VoluntaryExit) -> None:
assert validator.exit_epoch > get_delayed_activation_exit_epoch(get_current_epoch(state))
# 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 get_current_epoch(state) - validator.activation_epoch >= PERSISTENT_COMMITTEE_PERIOD
# Verify signature
assert bls_verify(
pubkey=validator.pubkey,
Expand Down

0 comments on commit fbbb363

Please sign in to comment.