do not mix in epoch to seed in get_shuffling. add epoch to generate_seed

This commit is contained in:
Danny Ryan 2019-02-01 21:02:09 -08:00
parent 6a9c756191
commit 8d82ee8ce7
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 2 additions and 2 deletions

View File

@ -778,7 +778,6 @@ def get_shuffling(seed: Bytes32,
committees_per_epoch = get_epoch_committee_count(len(active_validator_indices))
# Shuffle
seed = xor(seed, int_to_bytes32(epoch))
shuffled_active_validator_indices = shuffle(active_validator_indices, seed)
# Split the shuffled list into committees_per_epoch pieces
@ -942,7 +941,8 @@ def generate_seed(state: BeaconState,
"""
return hash(
get_randao_mix(state, epoch - SEED_LOOKAHEAD) +
get_active_index_root(state, epoch)
get_active_index_root(state, epoch) +
int_to_bytes32(epoch)
)
```