Module Tezos_context_tezedge.Context

This module implements the signature of src/lib_protocol_environment/environment_context_intf.ml. Most functions are in Lwt because it needs to follow the module's signature, but we could remove most of it and just wrap it where it's purely necessary.

type patch_context = t -> t Tezos_base.TzPervasives.tzresult Lwt.t
and extra_payload = {
  1. patch_context : patch_context option;
  2. base_path : string;
}
and index = {
  1. index : Tezedge.index;
  2. extra : extra_payload;
}
and t = {
  1. context : Tezedge.context;
  2. extra : extra_payload;
}
type key = string list
val data_key : string list -> string list
type value = bytes
type tree = Tezedge.tree
val equal_config : 'a -> 'b -> 'c
val mem_tree : t -> string list -> bool Lwt.t
val find_raw : t -> string list -> bytes option
val find : t -> string list -> bytes option Lwt.t
val find_tree : t -> string list -> Tezedge.tree option Lwt.t
val list : t -> ?offset:int -> ?length:int -> string list -> (string * Tezedge.tree) list Lwt.t
val length : t -> string list -> int Lwt.t
val add_raw : t -> key -> value -> t Lwt.t
val add : t -> key -> value -> t Lwt.t
val add_tree : t -> string list -> Tezedge.tree -> t Lwt.t
val remove_raw : t -> string list -> t Lwt.t
val remove : t -> string list -> t Lwt.t
val config : 'a -> 'b
module Tree : sig ... end
val protocol_key : string list
val test_chain_key : string list
val predecessor_block_metadata_hash_key : string list
val predecessor_ops_metadata_hash_key : string list
val get_protocol : t -> Tezos_base.TzPervasives.Protocol_hash.t Lwt.t
val set_hash_version : 'a -> 'b -> 'c
val get_hash_version : 'a -> 'b
val verify_tree_proof : 'a -> 'b -> 'c
val verify_stream_proof : 'a -> 'b -> 'c
val fold : ?depth:[< `Eq of int | `Ge of int | `Gt of int | `Le of int | `Lt of int ] -> t -> string list -> order:[< `Sorted | `Undefined ] -> init:'a -> f:(string list -> Tezedge.tree -> 'a -> 'a Lwt.t) -> 'a Lwt.t
val mem : t -> string list -> bool Lwt.t
val index : t -> index
val init : ?patch_context:patch_context -> string -> index
val raw_commit : time:Tezos_base.TzPervasives.Time.Protocol.t -> ?message:string -> t -> bytes
val add_protocol : t -> Tezos_base.TzPervasives.Protocol_hash.t -> t Lwt.t
val add_test_chain : t -> Tezos_base.TzPervasives.Test_chain_status.t -> t Lwt.t
val fork_test_chain : t -> protocol:Tezos_crypto.Hashed.Protocol_hash.t -> expiration:Tezos_base.Time.Protocol.t -> t Lwt.t
val exists : index -> 'a -> bool
val checkout : index -> 'a -> t option
val checkout_exn : index -> Tezos_base.TzPervasives.Context_hash.t -> t Lwt.t
val set_protocol : t -> Tezos_base.TzPervasives.Protocol_hash.t -> t Lwt.t
val get_test_chain : t -> Tezos_base.TzPervasives.Test_chain_status.t Lwt.t
val add_predecessor_block_metadata_hash : t -> Tezos_base.TzPervasives.Block_metadata_hash.t -> t Lwt.t
val add_predecessor_ops_metadata_hash : t -> Tezos_base.TzPervasives.Operation_metadata_list_list_hash.t -> t Lwt.t
val commit_test_chain_genesis : 'a -> 'b -> 'c
val merkle_tree_v2 : 'a -> 'b -> 'c -> 'd
val export_snapshot : index -> 'a -> path:string -> unit