-
Notifications
You must be signed in to change notification settings - Fork 363
Closed
Labels
Description
New inclusion list committee assignment
A validator may be a member of the new Inclusion List Committee (ILC) for a given slot. To check for ILC assignments the validator uses the helper get_inclusion_committee_assignment(state, epoch, validator_index) where epoch <= next_epoch.
Inclusion list committee selection is only stable within the context of the current and next epoch.
def get_inclusion_committee_assignment(
state: BeaconState,
epoch: Epoch,
validator_index: ValidatorIndex) -> Optional[Slot]:
"""
Returns the slot during the requested epoch in which the validator with index ``validator_index``
is a member of the ILC. Returns None if no assignment is found.
"""
next_epoch = Epoch(get_current_epoch(state) + 1)
assert epoch <= next_epoch
start_slot = compute_start_slot_at_epoch(epoch)
for slot in range(start_slot, start_slot + SLOTS_PER_EPOCH):
if validator_index in get_inclusion_list_committee(state, Slot(slot)):
return Slot(slot)
return NoneReactions are currently unavailable