Tezos_dal_node_lib.Attestable_slotsval is_attestable_slot_with_traps :
Store.Shards.t ->
Q.t ->
Tezos_crypto.Signature.public_key_hash ->
int Tezos_base.TzPervasives.trace ->
Tezos_dal_node_services.Types.slot_id ->
(bool, [> Errors.not_found | Errors.other ]) Stdlib.result Lwt.tis_attestable_slot_with_traps shards_store traps_fraction pkh assigned_shard_indexes slot_id checks whether the slot identified by slot_id is attestable for delegate pkh with respect to the traps mechanism.
The function iterates over the delegate’s assigned_shard_indexes, reads each corresponding stored shard share from shards_store, and evaluates Trap.share_is_trap on it using traps_fraction.
val published_just_before_migration :
Node_context.t ->
published_level:int32 ->
bool Tezos_base.TzPervasives.tzresultLet M = migration level (last block of the old protocol). This function attempts to determine whether ~published_level is included in `M - lag + 1 .. M` (inclusively), where lag is the lag at ~published_level. In this case, the corresponding attested levels would fall in the new protocol.
val attested_just_after_migration :
Node_context.t ->
attested_level:int32 ->
bool Tezos_base.TzPervasives.tzresultLet M = migration level (last block of the old protocol). This function attempts to determine whether ~attested_level is included in `M + 1 .. M + lag` (inclusively), where lag is the lag at ~attested_level. In this case, the corresponding attested levels would fall in the old protocol.
val may_notify_attestable_slot_or_trap :
Node_context.t ->
slot_id:Tezos_dal_node_services.Types.slot_id ->
unit Tezos_base.TzPervasives.tzresult Lwt.tmay_notify_attestable_slot_or_trap ctxt ~slot_id checks, for each subscribed pkh, whether all shards assigned to pkh at the attestation level corresponding to ~slot_id are available; if so, it emits an event to that pkh’s stream.
val may_notify_not_in_committee :
Node_context.t ->
Committee_cache.committee ->
attestation_level:int32 ->
unitmay_notify_not_in_committee ctxt committee ~attestation_level checks, for each subscribed pkh, whether the delegate is in the committee for ~attestation_level. If so, it emits an event to that pkh's stream.
val subscribe :
Node_context.t ->
pkh:Tezos_crypto.Signature.public_key_hash ->
Tezos_dal_node_services.Types.Attestable_event.t
Resto_directory.Answer.stream
Lwt.tsubscribe ctxt ~pkh opens a Resto_directory.Answer stream that yields Types.Attestable_event.t values. The stream only emits items produced after subscription.