package octez-smart-rollup-node-lib
include module type of struct include Store_v4 end
include module type of struct include Store_v2 end
include module type of struct include Store_v1 end
include module type of struct include Store_v0 end
module Irmin_store = Octez_smart_rollup_node.Store_v4.Irmin_store
module L2_blocks = Octez_smart_rollup_node.Store_v4.L2_blocks
module Commitments_published_at_level =
Octez_smart_rollup_node.Store_v4.Commitments_published_at_level
Storage mapping commitment hashes to the level when they were published by the rollup node. It only contains hashes of commitments published by this rollup node.
module L2_head = Octez_smart_rollup_node.Store_v4.L2_head
module Last_finalized_level =
Octez_smart_rollup_node.Store_v4.Last_finalized_level
module Levels_to_hashes = Octez_smart_rollup_node.Store_v4.Levels_to_hashes
include Store_sig.S with type 'a store := 'a Store_v0.store
module Dal_pages = Octez_smart_rollup_node.Store_v4.Dal_pages
module Dal_processed_slots =
Octez_smart_rollup_node.Store_v4.Dal_processed_slots
module Dal_slots_statuses = Octez_smart_rollup_node.Store_v4.Dal_slots_statuses
Dal_slots_statuses
is a Store_utils.Nested_map
used to store the attestation status of DAL slots. The values of this storage module have type ``Confirmed | `Unconfirmed
`, depending on whether the content of the slot has been attested on L1 or not. If an entry is not present for a (block_hash, slot_index)
, this means that the corresponding block is not processed yet.
include Store_sig.S with type 'a store := 'a Store_v1.store
module Messages = Octez_smart_rollup_node.Store_v4.Messages
Storage for persisting messages downloaded from the L1 node.
module Inboxes = Octez_smart_rollup_node.Store_v4.Inboxes
Storage for persisting inboxes.
module Commitments = Octez_smart_rollup_node.Store_v4.Commitments
Storage containing commitments and corresponding commitment hashes that the rollup node has knowledge of.
module Lcc = Octez_smart_rollup_node.Store_v4.Lcc
Storage containing the last cemented commitment.
module Lpc = Octez_smart_rollup_node.Store_v4.Lpc
Storage containing a single commitment for the last published commitment.
module Dal_slots_headers = Octez_smart_rollup_node.Store_v4.Dal_slots_headers
Published slot headers per block hash, stored as a list of bindings from Dal_slot_index.t
to Dal.Slot.t
. The encoding function converts this list into a Dal.Slot_index.t
-indexed map.
module Protocols = Octez_smart_rollup_node.Store_v4.Protocols
module Gc_levels = Octez_smart_rollup_node.Store_v4.Gc_levels
Data related to the effects of garbage collection.
module Last_context_split = Octez_smart_rollup_node.Store_v4.Last_context_split
Level at which context was last split.
module History_mode = Octez_smart_rollup_node.Store_v4.History_mode
History mode of the rollup node.
type +'a store = 'a Store_v2.store = {
l2_blocks : 'a L2_blocks.t;
messages : 'a Messages.t;
inboxes : 'a Inboxes.t;
commitments : 'a Commitments.t;
commitments_published_at_level : 'a Commitments_published_at_level.t;
l2_head : 'a L2_head.t;
last_finalized_level : 'a Last_finalized_level.t;
lcc : 'a Lcc.t;
lpc : 'a Lpc.t;
levels_to_hashes : 'a Levels_to_hashes.t;
protocols : 'a Protocols.t;
irmin_store : 'a Irmin_store.t;
gc_levels : 'a Gc_levels.t;
last_context_split_level : 'a Last_context_split.t;
history_mode : 'a History_mode.t;
}
include Store_sig.S with type 'a store := 'a store
type 'a t = [< `Read | `Write Read ] as 'a store
Type of store. The parameter indicates if the store can be written or only read.
type rw = Tezos_layer2_store.Store_sigs.rw t
Read/write store t
.
type ro = Tezos_layer2_store.Store_sigs.ro t
Read only store t
.
val version : Store_version.t
Version supported by this code.
val close : _ t -> unit Tezos_base.TzPervasives.tzresult Lwt.t
close store
closes the store.
val load :
'a Tezos_layer2_store.Store_sigs.mode ->
index_buffer_size:int ->
l2_blocks_cache_size:int ->
string ->
'a store Tezos_base.TzPervasives.tzresult Lwt.t
load mode ~index_buffer_size ~l2_blocks_cache_size directory
loads a store from the data persisted in directory
. If mode
is Store_sigs.Read_only
, then the indexes and irmin store will be opened in readonly mode and only read operations will be permitted. This allows to open a store for read access that is already opened in Store_sigs.Read_write
mode in another process. index_buffer_size
is the maximum cache size in memory before it is flushed to disk. l2_blocks_cache_size
is the number of L2 blocks the rollup node will keep in memory.
val iter_l2_blocks :
?progress:string ->
Metadata.t ->
_ t ->
(Octez_smart_rollup.Sc_rollup_block.t ->
unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
iter_l2_blocks ?progress metadata store f
iterates f
on all L2 blocks reachable from the head, from newest to oldest. If progress
is provided, a progress bar is displayed with the progress messages during the iteration.
val gc : rw -> level:int32 -> unit Tezos_base.TzPervasives.tzresult Lwt.t
gc store ~level
asynchronously garbage collects everything from the store that concerns blocks for levels below level
.
val is_gc_finished : 'a t -> bool
is_gc_finished t
returns true
if there is no GC running.