package tezos-protocol-016-PtMumbai
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-016-PtMumbai.raw/Tezos_raw_protocol_016_PtMumbai/Dal_slot_storage/index.html
Module Tezos_raw_protocol_016_PtMumbai.Dal_slot_storageSource
Storage management of slots for the data-availability layer.
Overview
This module is an interface for the slot storage for the layer 1.
Depending on the current level of the context and the lag (a constant given by the context), the status of the slot may differ:
- For every level in the interval
current_level; current_level + lag -1the slot isPending. This means a slot header was proposed but was not declared available yet.
- For every level above
current_level + lag, the slot may beconfirmed. For any slot confirmed by the protocol (i.e. indices returned byfinalize_pending_slots), subscribers of the DAL should take into account the corresponding slots.
- For every level below
current_level - lag, there should not be any slot in the storage.
val find_slot_headers :
Raw_context.t ->
Raw_level_repr.t ->
Dal_slot_repr.Header.t list option
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tfind_slot_headers ctxt level returns Some slot_headers where slot_headers are pending slots at level level. None is returned if no slot_header was registered at this level. The function fails if the reading into the context fails.
val finalize_current_slot_headers :
Raw_context.t ->
Raw_context.t Tezos_protocol_environment_016_PtMumbai.Lwt.tfinalize_current_slot_headers ctxt finalizes the current slot headers posted on this block and marks them as pending into the context.
val finalize_pending_slot_headers :
Raw_context.t ->
(Raw_context.t * Dal_attestation_repr.t)
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tfinalize_pending_slot_headers ctxt finalizes pending slot headers which are old enough (i.e. registered at level current_level - lag). All slots marked as available are returned. All the pending slots at current_level - lag level are removed from the context.
val get_slot_headers_history :
Raw_context.t ->
Dal_slot_repr.History.t
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tget_slot_headers_history ctxt returns the current value of slots_history stored in ctxt, or Slots_history.genesis if no value is stored yet.