package tezos-context

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

The context of a tezos node. Persisted to disk.

type Tezos_base.TzPervasives.error +=
  1. | Cannot_create_file of string
  2. | Cannot_open_file of string
  3. | Cannot_find_protocol
  4. | Suspicious_file of int
type index
type t
type key = string list
type value = bytes
type tree
val mem : t -> key -> bool Lwt.t
val mem_tree : t -> key -> bool Lwt.t
val find : t -> key -> value option Lwt.t
val find_tree : t -> key -> tree option Lwt.t
val list : t -> ?offset:int -> ?length:int -> key -> (string * tree) list Lwt.t
val length : t -> key -> int Lwt.t
val add : t -> key -> value -> t Lwt.t
val add_tree : t -> key -> tree -> t Lwt.t
val remove : t -> key -> t Lwt.t
val fold : ?depth:[ `Eq of int | `Le of int | `Lt of int | `Ge of int | `Gt of int ] -> t -> key -> order:[ `Sorted | `Undefined ] -> init:'a -> f:(key -> tree -> 'a -> 'a Lwt.t) -> 'a Lwt.t
module Proof : sig ... end
type node_key
type value_key
type kinded_key = [
  1. | `Node of node_key
  2. | `Value of value_key
]
module Tree : sig ... end
val produce_tree_proof : index -> kinded_key -> (tree -> (tree * 'a) Lwt.t) -> (Proof.tree Proof.t * 'a) Lwt.t
val verify_tree_proof : Proof.tree Proof.t -> (tree -> (tree * 'a) Lwt.t) -> (tree * 'a, [ `Proof_mismatch of string | `Stream_too_long of string | `Stream_too_short of string ]) result Lwt.t
val produce_stream_proof : index -> kinded_key -> (tree -> (tree * 'a) Lwt.t) -> (Proof.stream Proof.t * 'a) Lwt.t
val verify_stream_proof : Proof.stream Proof.t -> (tree -> (tree * 'a) Lwt.t) -> (tree * 'a, [ `Proof_mismatch of string | `Stream_too_long of string | `Stream_too_short of string ]) result Lwt.t
type context = t
val index : context -> index
val init : ?patch_context:(context -> context Tezos_base.TzPervasives.tzresult Lwt.t) -> ?readonly:bool -> ?indexing_strategy:[ `Always | `Minimal ] -> ?index_log_size:int -> string -> index Lwt.t
val close : index -> unit Lwt.t
val empty : index -> t
val is_empty : t -> bool
val to_memory_tree : t -> string list -> Tezos_context_memory.Context.tree option Lwt.t
val merkle_tree : t -> Tezos_context_sigs__Context.Proof_types.merkle_leaf_kind -> key -> Tezos_context_sigs__Context.Proof_types.merkle_node Tezos_base.TzPervasives.String.Map.t Lwt.t
val merkle_tree_v2 : t -> Tezos_context_sigs__Context.Proof_types.merkle_leaf_kind -> key -> Proof.tree Proof.t Lwt.t
val wait_gc_completion : index -> unit Lwt.t
val is_gc_allowed : index -> bool
val split : index -> unit Lwt.t
val export_snapshot : index -> Tezos_base.TzPervasives.Context_hash.t -> path:string -> unit Lwt.t
val remove_test_chain : context -> context Lwt.t
val clear_test_chain : index -> Tezos_base.TzPervasives.Chain_id.t -> unit Lwt.t
val find_predecessor_block_metadata_hash : context -> Tezos_base.TzPervasives.Block_metadata_hash.t option Lwt.t
val add_predecessor_block_metadata_hash : context -> Tezos_base.TzPervasives.Block_metadata_hash.t -> context Lwt.t
val find_predecessor_ops_metadata_hash : context -> Tezos_base.TzPervasives.Operation_metadata_list_list_hash.t option Lwt.t
val sync : index -> unit Lwt.t
val flush : t -> t Lwt.t
val restore_context : index -> expected_context_hash:Tezos_base.TzPervasives.Context_hash.t -> nb_context_elements:int -> fd:Lwt_unix.file_descr -> in_memory:bool -> progress_display_mode:Tezos_stdlib_unix.Animation.progress_display_mode -> unit Tezos_base.TzPervasives.tzresult Lwt.t
module Checks : sig ... end
OCaml

Innovation. Community. Security.