package octez-smart-rollup-node-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type +'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.

Read/write store t.

Read only store t.

val version : Store_version.t

Version supported by this code.

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 readonly : _ t -> ro

readonly store returns a read-only version of store.

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 wait_gc_completion : 'a t -> unit Lwt.t

wait_gc_completion store returns a blocking thread if a GC run is currently ongoing.

OCaml

Innovation. Community. Security.