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.
module Tezedge = Octez_rust_tezos_context.Rust_tezedge_gen
type patch_context = t -> t Tezos_base.TzPervasives.tzresult Lwt.t
type tree = Tezedge.tree
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_tree : t -> string list -> Tezedge.tree -> t Lwt.t
module Tree : sig ... end
val get_protocol : t -> Tezos_base.TzPervasives.Protocol_hash.t Lwt.t
module Proof = Tezos_context_sigs.Context.Proof_types
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 init : ?patch_context:patch_context -> string -> index
val raw_commit :
time:Tezos_base.TzPervasives.Time.Protocol.t ->
?message:string ->
t ->
bytes
val commit :
time:Tezos_base.TzPervasives.Time.Protocol.t ->
?message:string ->
t ->
Tezos_base.TzPervasives.Context_hash.t Lwt.t
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 hash :
time:Tezos_base.TzPervasives.Time.Protocol.t ->
?message:string ->
t ->
Tezos_base.TzPervasives.Context_hash.t
val commit_genesis :
index ->
chain_id:'a ->
time:Tezos_base.TzPervasives.Time.Protocol.t ->
protocol:Tezos_base.TzPervasives.Protocol_hash.t ->
(Tezos_base.TzPervasives.Context_hash.t, Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.t
val exists : index -> 'a -> bool
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 compute_testchain_genesis :
Tezos_base.TzPervasives.Block_hash.t ->
Tezos_base.TzPervasives.Block_hash.t
val compute_testchain_chain_id :
Tezos_base.TzPervasives.Block_hash.t ->
Tezos_base.TzPervasives.Chain_id.t
val export_snapshot : index -> 'a -> path:string -> unit