package octez-l2-libs
val equality_witness : (repo, tree) equality_witness
type hash = Tezos_base.TzPervasives.Context_hash.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)
readonly index
returns a read-only version of the index.
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
.
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.
gc index ?callback hash
removes all data older than hash
from disk. If passed, callback
will be executed when garbage collection finishes.
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