package octez-l2-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tree
type repo
type nonrec 'a index = ('a, repo) index
val impl_name : string
val equality_witness : (repo, tree) equality_witness
type nonrec 'a t = ('a, repo, tree) t
val load : cache_size:int -> 'a Store_sigs.mode -> 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 size of the Context Backend in use (for instance, the LRU cache size of Irmin (100_000 by default at irmin-pack/config.ml)

val index : 'a t -> 'a index

index context is the repository of the context context.

val close : _ index -> unit Lwt.t

close ctxt closes the context index ctxt.

val readonly : [> `Read ] index -> [ `Read ] index

readonly index returns a read-only version of the index.

val checkout : 'a index -> hash -> 'a t option Lwt.t

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.

val empty : 'a index -> 'a t

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

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 is_gc_finished : [> `Write ] index -> bool

is_gc_finished index returns true if a GC is finished (or idle) and false if a GC is running for index.

val split : _ index -> unit

split ctxt splits the current context in order to chunk the file if the backend supports it. 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.

val export_snapshot : _ index -> hash -> path:string -> unit Tezos_base.TzPervasives.tzresult Lwt.t

export_snapshot index context_hash ~path exports the context corresponding to context_hash, if found in index, into the given folder path.

module PVMState : sig ... end

State of the PVM that this rollup node deals with

module Internal_for_tests : sig ... end
OCaml

Innovation. Community. Security.