Context_wrapper.MakeContext
module P : Duo_context_sig.CONTEXT_PARAM
include Duo_context_sig.CONTEXT
include module type of Duo_context_sig.Abstract_types
Because we want to avoid a mismatch between a duo_context module instance and a duo_context value, we do not want the user to be able to craft values of these types.
For instance, Duo_context_lib.Duo_context
and Duo_context_lib.Duo_context_memory
share the same internal type representation, but we want to prevent the user to be able to use a Duo_context_lib.Duo_context.tree
with functions from Duo_context_lib.Duo_context_memory
.
With this type abstraction, Duo_context_lib.Duo_context.tree
and Duo_context_lib.Duo_context_memory.tree
types will be made incompatible.
module Tree : sig ... end
module Proof = Tezos_context_sigs.Context.Proof_types
val add_protocol : t -> Tezos_base.TzPervasives.Protocol_hash.t -> t Lwt.t
val equal_config :
Tezos_context_sigs.Config.t ->
Tezos_context_sigs.Config.t ->
bool
val list :
t ->
?offset:int ->
?length:int ->
key ->
(string * tree) Tezos_base.TzPervasives.trace Lwt.t
val fold :
?depth:Tezos_context_sigs.Context.depth ->
t ->
key ->
order:[ `Sorted | `Undefined ] ->
init:'a ->
f:(key -> tree -> 'a -> 'a Lwt.t) ->
'a Lwt.t
val config : t -> Tezos_context_sigs.Config.t
val get_protocol : t -> Tezos_base.TzPervasives.Protocol_hash.t Lwt.t
val fork_test_chain :
t ->
protocol:Tezos_base.TzPervasives.Protocol_hash.t ->
expiration:Tezos_base.TzPervasives.Time.Protocol.t ->
t Lwt.t
val set_hash_version :
t ->
Tezos_base.TzPervasives.Context_hash.version ->
t Tezos_base.TzPervasives.tzresult Lwt.t
val get_hash_version : t -> Tezos_base.TzPervasives.Context_hash.version
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 ])
Stdlib.result
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 ])
Stdlib.result
Lwt.t
val gc : index -> Tezos_base.TzPervasives.Context_hash.t -> unit Lwt.t
val wait_gc_completion : index -> unit Lwt.t
val is_gc_allowed : index -> bool
val split : index -> unit Lwt.t
val sync : index -> unit Lwt.t
val exists : index -> Tezos_base.TzPervasives.Context_hash.t -> bool Lwt.t
val close : index -> unit Lwt.t
val compute_testchain_chain_id :
Tezos_base.TzPervasives.Block_hash.t ->
Tezos_base.TzPervasives.Chain_id.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 hash :
time:Tezos_base.TzPervasives.Time.Protocol.t ->
?message:string ->
t ->
Tezos_base.TzPervasives.Context_hash.t
val commit_test_chain_genesis :
t ->
Tezos_base.TzPervasives.Block_header.t ->
Tezos_base.TzPervasives.Block_header.t Lwt.t
val get_test_chain : t -> Tezos_base.TzPervasives.Test_chain_status.t Lwt.t
val add_test_chain :
t ->
Tezos_base.TzPervasives.Test_chain_status.t ->
t Lwt.t
val commit :
time:Tezos_base.TzPervasives.Time.Protocol.t ->
?message:string ->
t ->
Tezos_base.TzPervasives.Context_hash.t Lwt.t
val commit_genesis :
index ->
chain_id:Tezos_base.TzPervasives.Chain_id.t ->
time:Tezos_base.TzPervasives.Time.Protocol.t ->
protocol:Tezos_base.TzPervasives.Protocol_hash.t ->
Tezos_base.TzPervasives.Context_hash.t Tezos_base.TzPervasives.tzresult Lwt.t
val compute_testchain_genesis :
Tezos_base.TzPervasives.Block_hash.t ->
Tezos_base.TzPervasives.Block_hash.t
val export_snapshot :
index ->
Tezos_base.TzPervasives.Context_hash.t ->
path:string ->
unit Lwt.t
val merkle_tree :
t ->
Proof.merkle_leaf_kind ->
key ->
Tezos_context_sigs.Context.Proof_types.merkle_tree Lwt.t
val merkle_tree_v2 :
t ->
Proof.merkle_leaf_kind ->
key ->
Proof.tree Proof.t Lwt.t
val checkout :
index ->
Tezos_base.TzPervasives.Context_hash.t ->
t option Lwt.t
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
type index_1 = P.index_1
type index_2 = P.index_2