diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 05bb37f48..7d26c06f9 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -876,18 +876,21 @@ def get_crosslink_committees_at_slot(state: BeaconState, shuffling_epoch = state.previous_shuffling_epoch shuffling_start_shard = state.previous_shuffling_start_shard elif epoch == next_epoch: - current_committees_per_epoch = get_current_epoch_committee_count(state) - committees_per_epoch = get_next_epoch_committee_count(state) - shuffling_epoch = next_epoch - epochs_since_last_registry_update = current_epoch - state.validator_registry_update_epoch if registry_change: + committees_per_epoch = get_next_epoch_committee_count(state) + shuffling_epoch = next_epoch seed = generate_seed(state, next_epoch) + current_committees_per_epoch = get_current_epoch_committee_count(state) shuffling_start_shard = (state.current_shuffling_start_shard + current_committees_per_epoch) % SHARD_COUNT elif epochs_since_last_registry_update > 1 and is_power_of_two(epochs_since_last_registry_update): + committees_per_epoch = get_next_epoch_committee_count(state) + shuffling_epoch = next_epoch seed = generate_seed(state, next_epoch) shuffling_start_shard = state.current_shuffling_start_shard else: + committees_per_epoch = get_current_epoch_committee_count(state) + shuffling_epoch = state.current_shuffling_epoch seed = state.current_shuffling_seed shuffling_start_shard = state.current_shuffling_start_shard