fix just/finality

This commit is contained in:
Danny Ryan 2018-12-05 14:07:41 -06:00
parent e894a2dc18
commit 1ccb1074c5
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 4 additions and 4 deletions

View File

@ -1425,11 +1425,11 @@ If `state.slot % POW_RECEIPT_ROOT_VOTING_PERIOD == 0`:
* Set `state.justification_bitfield |= 2` and `state.justified_slot = s - EPOCH_LENGTH` if `3 * previous_epoch_boundary_attesting_balance >= 2 * total_balance`. * Set `state.justification_bitfield |= 2` and `state.justified_slot = s - EPOCH_LENGTH` if `3 * previous_epoch_boundary_attesting_balance >= 2 * total_balance`.
* Set `state.justification_bitfield |= 1` and `state.justified_slot = s` if `3 * this_epoch_boundary_attesting_balance >= 2 * total_balance`. * Set `state.justification_bitfield |= 1` and `state.justified_slot = s` if `3 * this_epoch_boundary_attesting_balance >= 2 * total_balance`.
# Finalization ### Finalization
* Set `state.finalized_slot = state.justified_slot - EPOCH_LENGTH` if `state.justified_slot == s and state.justification_bitfield % 4 == 3`. * Set `state.finalized_slot = state.previous_justified_slot` if `state.previous_justified_slot == s - 1 * EPOCH_LENGTH and state.justification_bitfield % 4 == 3`.
* Set `state.finalized_slot = state.justified_slot - EPOCH_LENGTH` if `state.justified_slot == s - EPOCH_LENGTH and state.justification_bitfield % 8 == 7`. * Set `state.finalized_slot = state.previous_justified_slot` if `state.previous_justified_slot == s - 2 * EPOCH_LENGTH and state.justification_bitfield % 8 == 7`.
* Set `state.finalized_slot = state.justified_slot - EPOCH_LENGTH` if `state.justified_slot == s - 2 * EPOCH_LENGTH and state.justification_bitfield % 16 in (15, 14)`. * Set `state.finalized_slot = state.previous_justified_slot` if `state.previous_justified_slot == s - 3 * EPOCH_LENGTH and state.justification_bitfield % 16 in (15, 14)`.
### Crosslinks ### Crosslinks