move validator_set_last_changed to the validator set change section
This commit is contained in:
parent
236ac26867
commit
189d44f5a5
|
@ -803,6 +803,7 @@ def change_validators(validators: List[ValidatorRecord]) -> None:
|
|||
# STUB: withdraw to shard chain
|
||||
```
|
||||
|
||||
* Set `crystallized_state.validator_set_change_slot = crystallized_state.last_state_recalculation_slot`
|
||||
* For all `c` in `crystallized_state.crosslinks`, set `c.recently_changed = False`
|
||||
* Set `shard_and_committee_for_slots[:CYCLE_LENGTH] = shard_and_committee_for_slots[CYCLE_LENGTH:]`
|
||||
* Let `next_start_shard = (shard_and_committee_for_slots[-1][-1].shard + 1) % SHARD_COUNT`
|
||||
|
@ -811,12 +812,11 @@ def change_validators(validators: List[ValidatorRecord]) -> None:
|
|||
#### Finally...
|
||||
|
||||
* Remove all attestation records older than slot `crystallized_state.last_state_recalculation_slot`
|
||||
* Set `crystallized_state.validator_set_change_slot = crystallized_state.last_state_recalculation_slot`
|
||||
* For any validator with index `v` with balance less than `MIN_ONLINE_DEPOSIT_SIZE` and status `ACTIVE`, run `exit_validator(v, crystallized_state, penalize=False, current_slot=block.slot)`
|
||||
* Set `crystallized_state.last_state_recalculation_slot += CYCLE_LENGTH`
|
||||
* Empty the `active_state.pending_specials` list
|
||||
* For any validator with index `v` with balance less than `MIN_ONLINE_DEPOSIT_SIZE` and status `ACTIVE`, run `exit_validator(v, crystallized_state, penalize=False, current_slot=block.slot)`
|
||||
* Set `active_state.recent_block_hashes = active_state.recent_block_hashes[CYCLE_LENGTH:]`
|
||||
* If a validator set change did _not_ occur during this state recalculation, set `shard_and_committee_for_slots[:CYCLE_LENGTH] = shard_and_committee_for_slots[CYCLE_LENGTH:]`
|
||||
* Set `crystallized_state.last_state_recalculation_slot += CYCLE_LENGTH`
|
||||
|
||||
For any validator that was added or removed from the active validator list during this state recalculation:
|
||||
|
||||
|
|
Loading…
Reference in New Issue