From b78458bbb2ae16e3b49fb691f262b0f2160e21fd Mon Sep 17 00:00:00 2001 From: Akhila Raju Date: Mon, 7 Jan 2019 13:06:44 -0500 Subject: [PATCH 1/2] Removes naming conflict in get_shuffling. The variable name 'slot' in the for-loop in 'get_shuffling' conflicts with the get_shuffling argument name 'slot'. Renames 'slot' in for-loop to 'slot_num'. --- specs/core/0_beacon-chain.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index a88d8c3c5..3d61898e4 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -885,11 +885,11 @@ def get_shuffling(seed: Hash32, validators_per_slot = split(shuffled_active_validator_indices, EPOCH_LENGTH) output = [] - for slot, slot_indices in enumerate(validators_per_slot): + for slot_num, slot_indices in enumerate(validators_per_slot): # Split the shuffled list into committees_per_slot pieces shard_indices = split(slot_indices, committees_per_slot) - shard_id_start = crosslinking_start_shard + slot * committees_per_slot + shard_id_start = crosslinking_start_shard + slot_num * committees_per_slot shard_committees = [ ShardCommittee( From 609082c1af546ae5e5b953117122e0345b784dc8 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Tue, 8 Jan 2019 09:57:15 -0700 Subject: [PATCH 2/2] change slot_num to slot_position --- specs/core/0_beacon-chain.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 3d61898e4..17e683e2a 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -885,11 +885,11 @@ def get_shuffling(seed: Hash32, validators_per_slot = split(shuffled_active_validator_indices, EPOCH_LENGTH) output = [] - for slot_num, slot_indices in enumerate(validators_per_slot): + for slot_position, slot_indices in enumerate(validators_per_slot): # Split the shuffled list into committees_per_slot pieces shard_indices = split(slot_indices, committees_per_slot) - shard_id_start = crosslinking_start_shard + slot_num * committees_per_slot + shard_id_start = crosslinking_start_shard + slot_position * committees_per_slot shard_committees = [ ShardCommittee(