Mavryk_raw_protocol_001_PtAtLas.Dal_attestation_repr
Slot attestation representation for the data-availability layer.
For the data-availability layer, the layer 1 provides a list of slots at every level (see Dal_slot_repr
). Slots are not posted directly onto L1 blocks. Stakeholders, called attesters in this context, can commit on the availability of the data (via attestation operations, see https://gitlab.com/tezos/tezos/-/issues/3115).
The slot is uniformly split into shards. Each attester commits, for every slot, on the availability of all shards they are assigned to.
This module encapsulates the representation of this commitment that aims to be provided with attestation operations. To avoid overloading the network, this representation should be compact.
type t = private Bitset.t
type operation = {
attestation : t;
The bitset of slots that are attested to be available.
*)level : Raw_level_repr.t;
Similar to Operation_repr.consensus_content.level
. It is the level at which the operation is valid in the mempool. It is the predecessor at the level of the block that contains it. It should be equal to the attested slot's published level plus the DAL attestation lag minus one. Whenever there is a need to disambiguate, one should use "attestation level" for the level inside the operation and "attested level" for the level of the block. We have:
attestation_level + 1 = attested_level
published_level + attestation_lag = attested_level
slot : Slot_repr.t;
Similar to Operation_repr.consensus_content.slot
. It is the attester's first consensus slot at level
.
}
The shape of Dal attestation operations injected by delegates.
val encoding : t Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
val empty : t
empty
returns an empty slot_attestation
which commits that every slot are unavailable.
val is_attested : t -> Dal_slot_index_repr.t -> bool
is_attested slot_attestation ~index
returns true
if the slot_attestation
commits that the slot at index
is available.
val commit : t -> Dal_slot_index_repr.t -> t
commit slot_attestation index
commits into slot_attestation
that the slot index
is available.
val occupied_size_in_bits : t -> int
occupied_size_in_bits slot_attestation
returns the size in bits of an attestation.
val expected_size_in_bits : max_index:Dal_slot_index_repr.t -> int
expected_size_in_bits ~max_index
returns the expected size (in bits) of an attestation considering the maximum index for a slot is max_index
.
val number_of_attested_slots : t -> int
number_of_attested_slots slot_attestation
returns the number of attested slots in an attestation.
module Shard_map :
Mavryk_protocol_environment_001_PtAtLas.Map.S with type key = shard_index
module Accountability : sig ... end
This module is used to record the shard attestations.