package tezos-proxy

  1. Overview
  2. Docs
include module type of Tezos_context_memory.Context

Variant of Tezos_context.Context purely in-memory.

type tree
type index
type t
type key = string list
type value = bytes
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 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 compute_testchain_chain_id : Tezos_crypto.Block_hash.t -> Tezos_crypto.Chain_id.t
val compute_testchain_genesis : Tezos_crypto.Block_hash.t -> Tezos_crypto.Block_hash.t
val is_empty : t -> bool
val to_memory_tree : t -> string list -> 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 exists : index -> Tezos_crypto.Context_hash.t -> bool Lwt.t
val checkout : index -> Tezos_crypto.Context_hash.t -> context option Lwt.t
val sync : index -> unit Lwt.t
val is_gc_allowed : index -> bool
val set_master : index -> Tezos_crypto.Context_hash.t -> unit Lwt.t
val remove_test_chain : context -> context Lwt.t
val clear_test_chain : index -> Tezos_crypto.Chain_id.t -> unit Lwt.t
val find_predecessor_block_metadata_hash : context -> Tezos_crypto.Block_metadata_hash.t option Lwt.t
val add_predecessor_block_metadata_hash : context -> Tezos_crypto.Block_metadata_hash.t -> context Lwt.t
val find_predecessor_ops_metadata_hash : context -> Tezos_crypto.Operation_metadata_list_list_hash.t option Lwt.t
val add_predecessor_ops_metadata_hash : context -> Tezos_crypto.Operation_metadata_list_list_hash.t -> context Lwt.t
val check_protocol_commit_consistency : expected_context_hash:Tezos_crypto.Context_hash.t -> given_protocol_hash:Tezos_crypto.Protocol_hash.t -> author:string -> message:string -> timestamp:Tezos_base.TzPervasives.Time.Protocol.t -> test_chain_status:Tezos_base.TzPervasives.Test_chain_status.t -> predecessor_block_metadata_hash:Tezos_crypto.Block_metadata_hash.t option -> predecessor_ops_metadata_hash: Tezos_crypto.Operation_metadata_list_list_hash.t option -> data_merkle_root:Tezos_crypto.Context_hash.t -> parents_contexts:Tezos_crypto.Context_hash.t list -> bool Lwt.t
exception Context_dangling_hash of string
val shallow_of_tree : Tree.repo -> tree -> tree

shallow_of_tree repo t returns a shallow tree with the same hash as t.

val empty : t

empty is an empty store.