@@ -167,10 +167,10 @@ def get_new_recent_block_hashes(old_block_hashes: Sequence[Hash32],
167
167
168
168
169
169
#
170
- # Get shards_and_committees or indices
170
+ # Get shards_committees or indices
171
171
#
172
172
@to_tuple
173
- def get_shards_and_committees_for_slot (
173
+ def get_shards_committees_for_slot (
174
174
crystallized_state : 'CrystallizedState' ,
175
175
slot : int ,
176
176
epoch_length : int ) -> Iterable [ShardCommittee ]:
@@ -204,13 +204,13 @@ def get_attestation_indices(crystallized_state: 'CrystallizedState',
204
204
"""
205
205
shard_id = attestation .shard_id
206
206
207
- shards_and_committees_for_slot = get_shards_and_committees_for_slot (
207
+ shards_committees_for_slot = get_shards_committees_for_slot (
208
208
crystallized_state ,
209
209
attestation .slot ,
210
210
epoch_length ,
211
211
)
212
212
213
- for shard_committee in shards_and_committees_for_slot :
213
+ for shard_committee in shards_committees_for_slot :
214
214
if shard_committee .shard_id == shard_id :
215
215
yield from shard_committee .committee
216
216
@@ -229,7 +229,7 @@ def get_active_validator_indices(validators: Sequence['ValidatorRecord']) -> Tup
229
229
# Shuffling
230
230
#
231
231
@to_tuple
232
- def _get_shards_and_committees_for_shard_indices (
232
+ def _get_shards_committees_for_shard_indices (
233
233
shard_indices : Sequence [Sequence [int ]],
234
234
start_shard : int ,
235
235
total_validator_count : int ,
@@ -311,7 +311,7 @@ def get_new_shuffling(*,
311
311
# Split the shuffled list into committees_per_slot pieces
312
312
shard_indices = split (slot_indices , committees_per_slot )
313
313
start_shard = crosslinking_start_shard + index * committees_per_slot
314
- yield _get_shards_and_committees_for_shard_indices (
314
+ yield _get_shards_committees_for_shard_indices (
315
315
shard_indices ,
316
316
start_shard ,
317
317
active_validators_size ,
@@ -325,7 +325,7 @@ def get_new_shuffling(*,
325
325
def get_block_committees_info (parent_block : 'BaseBeaconBlock' ,
326
326
crystallized_state : 'CrystallizedState' ,
327
327
epoch_length : int ) -> BlockCommitteesInfo :
328
- shards_and_committees = get_shards_and_committees_for_slot (
328
+ shards_committees = get_shards_committees_for_slot (
329
329
crystallized_state ,
330
330
parent_block .slot_number ,
331
331
epoch_length ,
@@ -337,9 +337,9 @@ def get_block_committees_info(parent_block: 'BaseBeaconBlock',
337
337
# `proposer_index_in_committee` th attester in `shard_committee`
338
338
# is the proposer of the parent block.
339
339
try :
340
- shard_committee = shards_and_committees [0 ]
340
+ shard_committee = shards_committees [0 ]
341
341
except IndexError :
342
- raise ValueError ("shards_and_committees should not be empty." )
342
+ raise ValueError ("shards_committees should not be empty." )
343
343
344
344
proposer_committee_size = len (shard_committee .committee )
345
345
if proposer_committee_size <= 0 :
@@ -360,5 +360,5 @@ def get_block_committees_info(parent_block: 'BaseBeaconBlock',
360
360
proposer_index_in_committee = proposer_index_in_committee ,
361
361
proposer_shard_id = shard_committee .shard_id ,
362
362
proposer_committee_size = proposer_committee_size ,
363
- shards_and_committees = shards_and_committees ,
363
+ shards_committees = shards_committees ,
364
364
)
0 commit comments