Update specs/core/0_beacon-chain.md

Co-Authored-By: vbuterin <v@buterin.com>
This commit is contained in:
Danny Ryan
2018-12-17 13:53:17 -05:00
committed by GitHub
parent 9c620d3853
commit eee26d7b69

View File

@@ -1766,7 +1766,7 @@ num_validators_to_reshuffle = len(active_validator_indices) // SHARD_PERSISTENT_
for i in range(num_validators_to_reshuffle):
# Multiplying i to 2 to ensure we have different input to all the required hashes in the shuffling
# and none of the hashes used for entropy in this loop will be the same
validator_index = active_validator_indices[hash(state.latest_randao_mixes[block.slot % LATEST_BLOCK_ROOTS_LENGTH] + bytes8(i * 2)) % len(active_validator_indices)]
validator_index = active_validator_indices[hash(state.latest_randao_mixes[state.slot % LATEST_BLOCK_ROOTS_LENGTH] + bytes8(i * 2)) % len(active_validator_indices)]
new_shard = hash(state.latest_randao_mixes[block.slot % LATEST_BLOCK_ROOTS_LENGTH] + bytes8(i * 2 + 1)) % SHARD_COUNT
shard_reassignment_record = ShardReassignmentRecord(
validator_index=validator_index,