You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on_inclusion_list is called to import signed_inclusion_list to the fork choice store.
defon_inclusion_list(
store: Store,
state: BeaconState,
signed_inclusion_list: SignedInclusionList,
inclusion_list_committee: Vector[ValidatorIndex, INCLUSION_LIST_COMMITTEE_SIZE]) ->None:
""" Verify the inclusion list and import it into the fork choice store. If there exists more than one inclusion list in the store with the same slot and validator index, add the equivocator to the ``inclusion_list_equivocators`` cache. Otherwise, add the inclusion list to the ``inclusion_lists` cache. """message=signed_inclusion_list.message# Verify inclusion list slot is either from the current or previous slotassertget_current_slot(store) in [message.slot, message.slot+1]
time_into_slot= (store.time-store.genesis_time) %SECONDS_PER_SLOTis_before_attesting_interval=time_into_slot<SECONDS_PER_SLOT//INTERVALS_PER_SLOT# If the inclusion list is from the previous slot, ignore it if already past the attestation deadlineifget_current_slot(store) ==message.slot+1:
assertis_before_attesting_interval# Sanity check that the given `inclusion_list_committee` matches the root in the inclusion listroot=message.inclusion_list_committee_rootasserthash_tree_root(inclusion_list_committee) ==root# Verify inclusion list validator is part of the committeevalidator_index=message.validator_indexassertvalidator_indexininclusion_list_committee# Verify inclusion list signatureassertis_valid_inclusion_list_signature(state, signed_inclusion_list)
is_before_freeze_deadline=get_current_slot(store) ==message.slotandtime_into_slot<VIEW_FREEZE_DEADLINE# Do not process inclusion lists from known equivocatorsifvalidator_indexnotinstore.inclusion_list_equivocators[(message.slot, root)]:
ifvalidator_indexin [il.validator_indexforilinstore.inclusion_lists[(message.slot, root)]]:
validator_inclusion_list= [
ilforilinstore.inclusion_lists[(message.slot, root)]
ifil.validator_index==validator_index
][0]
ifvalidator_inclusion_list!=message:
# We have equivocation evidence for `validator_index`, record it as equivocatorstore.inclusion_list_equivocators[(message.slot, root)].add(validator_index)
# This inclusion list is not an equivocation. Store it if prior to the view freeze deadlineelifis_before_freeze_deadline:
store.inclusion_lists[(message.slot, root)].append(message)
The text was updated successfully, but these errors were encountered:
New
on_inclusion_list
on_inclusion_list
is called to importsigned_inclusion_list
to the fork choice store.The text was updated successfully, but these errors were encountered: