Module Pvm.Irmin_context

type rw_index = [ `Read | `Write ] index

Read/write index.

type ro_index = [ `Read ] index

Read only index.

type 'a t = {
  1. index : 'a index;
  2. tree : tree;
} constraint 'a = [< `Read | `Write Read ]
type rw = [ `Read | `Write ] t

Read/write context t.

type hash

A context hash is the hash produced when the data of the context is committed to disk, i.e. the commit hash.

val load : cache_size:int -> ?async_domain:bool -> 'a Tezos_layer2_store.Access_mode.t -> string -> 'a index Tezos_base.TzPervasives.tzresult Lwt.t

load 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 reload : ro_index -> unit
val commit : ?message:string -> [> `Write ] t -> hash Lwt.t

commit ?message context commits content of the context context on disk, and return the commit hash.

val checkout_exn : 'a index -> hash -> 'a t Lwt.t
val empty : 'a index -> 'a t

empty ctxt is the context with an empty content for the repository ctxt.

val split : _ index -> unit

split 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.

val gc : [> `Write ] index -> ?callback:(unit -> unit Lwt.t) -> hash -> unit Lwt.t

gc index ?callback hash removes all data older than hash from disk. If passed, callback will be executed when garbage collection finishes.

val wait_gc_completion : [> `Write ] index -> unit Lwt.t

wait_gc_completion index will return a blocking thread if a GC run is currently ongoing.

module PVMState : sig ... end

State of the PVM that the EVM node handles