Mavryk_layer2_store.Irmin_contexttype 'a raw_index = ('a, repo) Context_sigs.raw_indextype 'a index = ('a, repo) Context_sigs.indexThe type of indexed repository for contexts. The parameter indicates if the index can be written or only read.
type 'a t = ('a, repo, tree) Context_sigs.tThe type of context with its content.
module Tree :
Mavryk_context_sigs.Context.TREE
with type t := rw
and type key := string list
and type value := bytes
and type tree := treeTree provides immutable, in-memory partial mirror of the context, with lazy reads and delayed writes. The trees are Merkle trees that carry the same hash as the part of the context they mirror.
type hash = Mavryk_base.TzPervasives.Context_hash.tA context hash is the hash produced when the data of the context is committed to disk, i.e. the commit hash.
val equality_witness : (repo, tree) Context_sigs.equality_witnessval load :
cache_size:int ->
'a Store_sigs.mode ->
string ->
'a index Mavryk_base.TzPervasives.tzresult Lwt.tload cache_size path initializes from disk a context from path. cache_size allows to change the LRU cache size of Irmin (100_000 by default at irmin-pack/config.ml
val close : _ index -> unit Lwt.tclose ctxt closes the context index ctxt.
readonly index returns a read-only version of the index.
raw_commit ?message ctxt tree commits the tree in the context repository ctxt on disk, and return the commit.
commit ?message context commits content of the context context on disk, and return the commit hash.
checkout ctxt hash checkouts the content that corresponds to the commit hash hash in the repository ctxt and returns the corresponding context. If there is no commit that corresponds to hash, it returns None.
empty ctxt is the context with an empty content for the repository ctxt.
val is_empty : _ t -> boolis_empty context returns true iff the context content of context is empty.
val split : _ index -> unitsplit ctxt creates a new suffix file, also called "chunk", into the Irmin's file hierarchy. This split function is expected to be called after committing a commit that will be a future candidate for a GC target.
gc index ?callback hash removes all data older than hash from disk. If passed, callback will be executed when garbage collection finishes.
val is_gc_finished : [> `Write ] index -> boolis_gc_finished index returns true if a GC is finished (or idle) and false if a GC is running for index.
val wait_gc_completion : [> `Write ] index -> unit Lwt.twait_gc_completion index will return a blocking thread if a GC run is currently ongoing.
val export_snapshot :
_ index ->
hash ->
path:string ->
unit Mavryk_base.TzPervasives.tzresult Lwt.texport_snapshot index context_hash ~path exports the context corresponding to context_hash, if found in index, into the given folder path. As the export uses the GC's behaviour to extract a single commit into a standalone fresh store, it is not possible to export a snapshot while a GC is running. This call will hang until the GC has finished.
Note: there is no associated import_snapshot function as the import consist in copying the exported Irmin store.
module Proof (Hash : sig ... end) (Proof_encoding : sig ... end) : sig ... endModule for generating and verifying proofs for a context
module PVMState : sig ... endState of the PVM that this rollup node deals with
module Internal_for_tests : sig ... end