Dal_common.AttestationsEncoding/decoding of the DAL content included in attestation operations. For protocols >= 025, these functions use the RPCs decode_dal_attestation and encode_dal_attestation to perform encoding/decoding. For pre-025 protocols, the simple bitset format is handled locally.
val encode_for_one_lag :
Protocol.t ->
Endpoint.t ->
?lag_index:int ->
Parameters.t ->
bool array ->
string Lwt.tencode_for_one_lag protocol endpoint ?lag_index dal_parameters slot_array encodes an array of Booleans into a DAL attestation bitset string. For protocols >= 025, uses the encode_dal_attestation RPC via endpoint. ?lag_index defaults to the last position in the attestation_lags list.
val encode : Protocol.t -> Endpoint.t -> bool array array -> string Lwt.tencode protocol endpoint attestations_per_lag encodes attestations for multiple lag indices. For protocols >= 025, uses the encode_dal_attestation RPC via endpoint.
val decode :
Protocol.t ->
Endpoint.t ->
Parameters.t ->
string ->
bool array array Lwt.tdecode protocol endpoint parameters str decodes a DAL attestation bitset string. For protocols >= 025, uses the decode_dal_attestation RPC via endpoint. Returns an array of size number_of_lags, where each element is a bool array of size number_of_slots.