Module Tezt_tezos.Dal_common

module Cryptobox = Tezos_crypto_dal.Cryptobox
module Parameters : sig ... end
module Slot_availability : sig ... end

Decoding of the slot availability bitset used in block metadata. It currently has the same behaviour as the Attestations module.

module IntMap : Stdlib.Map.S with type key = int
val collect_slot_availabilities : Node.t -> attested_levels:int list -> string option IntMap.t Lwt.t

collect_slot_availabilities node ~attested_levels collect DAL attestation metadata for a list of ~attested_levels. Returns an IntMap mapping each attested level to its optional dal_attestation value.

val to_attested_levels : protocol:Protocol.t -> dal_parameters:Parameters.t -> published_level:int -> (int * int * Parameters.t * Protocol.t) list

Maps each lag to (attested_level, lag_index, dal_params, protocol).

val is_slot_attested : published_level:int -> slot_index:int -> to_attested_levels: (published_level:int -> (int * int * Parameters.t * Protocol.t) list) -> string option IntMap.t -> bool

is_slot_attested ~published_level ~slot_index ~to_attested_levels slot_availabilities checks if a slot published at ~published_level with ~slot_index was attested at any valid attestation level.

Uses to_attested_levels ~published_level to compute all possible (attested_level, lag_index, dal_params, protocol) tuples where the slot could have been attested. For each tuple:

  • attested_level: The level at which to check for the attestation
  • lag_index: Which lag position to check at that level (since each lag position corresponds to a different published level)
  • dal_params: DAL parameters at attested_level
  • protocol: Protocol at attested_level

The slot_availabilities map should contain metadata for all relevant levels (typically obtained via collect_slot_availabilities).

Returns wether the slot is found attested at ANY of the checked (level, lag_index) pairs.

val is_slot_attested_in_bitset : protocol:Protocol.t -> dal_parameters:Parameters.t -> attested_level:int -> published_level:int -> slot_index:int -> dal_attestation:string -> bool

is_slot_attested_in_bitset ~protocol ~dal_parameters ~attested_level ~published_level ~slot_index ~dal_attestation checks if a delegate's ~dal_attestation at attested_level is attested for slot_index from published_level.

module Attestations : sig ... end

Encoding/decoding of the DAL content included in attestation operations.

module Helpers : sig ... end
module RPC : sig ... end
module Commitment : sig ... end
module Committee : sig ... end
module Check : sig ... end