Module Store.Slots

A store of slots, indexed by slot id.

type t

get_file_layout slot_id returns a function to be used as the file_layout of the Key_value_store for the given slot_id in the root directory. This function might fail if there is no layout registered for the given slot_id.

val add_slot : t -> bytes -> Tezos_dal_node_services.Types.slot_id -> (unit, [> Errors.other ]) Stdlib.result Lwt.t

add_slot store slot_content slot_id adds a mapping from the given slot id to the given slot content.

val find_slot : t -> Tezos_dal_node_services.Types.slot_id -> (bytes, [> Errors.other | Errors.not_found ]) Stdlib.result Lwt.t

find_slot store slot_id returns the slot associated to some slot id or Error `Not_found if no slot is associated.

val add_file_layout : int32 -> Tezos_crypto_dal.Cryptobox.parameters -> unit

add_file_layout adds a new file layout that will be used starting at the given level. This aims to be called when a new protocol is activated, introducing a new layout related to DAL protocol parameters changes.