package octez-smart-rollup-node-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 'a index constraint 'a = [< `Read | `Write Read ]

The type of indexed repository for contexts. The parameter indicates if the index can be written or only read.

type rw_index = [ `Read | `Write ] index

Read/write index.

type ro_index = [ `Read ] index

Read only index.

type tree

The type of trees stored in the context, i.e. the actual data.

type 'a t constraint 'a = [< `Read | `Write Read ]

The type of context with its content.

type rw = [ `Read | `Write ] t

Read/write context t.

type ro = [ `Read ] t

Read-only context t.

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

type commit

The type of commits for the context.

val load : cache_size:int -> 'a Tezos_layer2_store.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 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 raw_commit : ?message:string -> [> `Write ] index -> tree -> commit Lwt.t

raw_commit ?message ctxt tree commits the tree in the context repository ctxt on disk, and return the commit.

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 : '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 is_empty : _ t -> bool

is_empty context returns true iff the context content of context is empty.

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 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 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 Proof (Hash : sig ... end) (Proof_encoding : sig ... end) : sig ... end

Module for generating and verifying proofs for a context

module PVMState : sig ... end

State of the PVM that this rollup node deals with

module Version : sig ... end

Version of the context

module Internal_for_tests : sig ... end
OCaml

Innovation. Community. Security.