Module Raw_context.Dal

val committee_level_of : t -> attested_level:Raw_level_repr.t -> lag:int -> Raw_level_repr.t option

committee_level_of ctxt ~attested_level ~lag computes the shard assignment level, aka as committee level, for the slots published at attested_level - lag, referred to as published_level.

The committee level for a given published_level is defined as published_level + attestation_lag - 1.

It returns None if published_level is negative.

val slot_accountability : t -> Dal_attestations_repr.Accountability.t

slot_accountability ctxt returns the current DAL slot accountability tracker from ctxt.

The accountability structure keeps track of which shards have been attested by which delegates for each slot index, allowing the protocol to determine whether a slot has received enough attestations to be considered available.

val record_slot_accountability : t -> Dal_attestations_repr.Accountability.t -> t

record_slot_accountability ctxt accountability stores the given accountability state in ctxt and returns the updated context.

val slot_fee_market : t -> Dal_slot_repr.Slot_market.t

slot_fee_market ctxt returns the current DAL slot fee market tracker from ctxt.

The tracker registers slot candidates during block application.

val record_slot_fee_market : t -> Dal_slot_repr.Slot_market.t -> t

record_slot_fee_market ctxt slot_fee_market returns the context updated with the the given slot_fee_market.

val record_attestation : t -> tb_slot:Slot_repr.t -> Dal_attestations_repr.t -> t

record_attestation ctxt ~tb_slot attestation records that the delegate with Tenderbake slot tb_slot emitted attestation.

attestations returns the recorded attestations

val get_accountability : t -> Dal_attestations_repr.Accountability.t

get_accountability ctxt returns the current block's accountability data, which contains the attestation information accumulated during this block.

val assert_feature_enabled : t -> unit Tezos_protocol_environment_alpha.Error_monad.tzresult
val only_if_feature_enabled : t -> default:(t -> 'a) -> (t -> 'a) -> 'a
val assert_incentives_enabled : t -> unit Tezos_protocol_environment_alpha.Error_monad.tzresult
val only_if_incentives_enabled : t -> default:(t -> 'a) -> (t -> 'a) -> 'a
val assert_dynamic_lag_enabled : t -> unit Tezos_protocol_environment_alpha.Error_monad.tzresult
val only_if_dynamic_lag_enabled : t -> default:(t -> 'a) -> (t -> 'a) -> 'a