Tezos_dal_node_lib.Attestable_slotsval is_slot_attestable_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_slot_attestable_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 subscribe :
Node_context.t ->
pkh:Tezos_crypto.Signature.public_key_hash ->
Tezos_dal_node_services.Types.slot_id Resto_directory.Answer.streamsubscribe ctxt ~pkh opens a Resto_directory.Answer stream that yields Types.slot_id values whenever a slot becomes attestable for ~pkh. The stream only emits items produced after subscription.
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 :
Node_context.t ->
slot_id:Tezos_dal_node_services.Types.slot_id ->
unit Tezos_base.TzPervasives.tzresult Lwt.tmay_notify 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 ~slot_id to that pkh’s stream.