Mavryk_context_ops.Context_ops
module Environment_context = Mavryk_protocol_environment.Context
module Memory_context = Mavryk_protocol_environment.Memory_context
type index =
| Disk_index of Mavryk_context.Context.index
| Memory_index of Mavryk_context_memory.Context.index
Values of type index
are used to checkout
contexts specified by their hash.
val index : Environment_context.t -> index
val mem : Environment_context.t -> Mavryk_context.Context.key -> bool Lwt.t
val mem_tree :
Environment_context.t ->
Mavryk_context.Context.key ->
bool Lwt.t
val find :
Environment_context.t ->
Mavryk_context.Context.key ->
Mavryk_context.Context.value option Lwt.t
val add :
Environment_context.t ->
Mavryk_context.Context.key ->
Mavryk_context.Context.value ->
Mavryk_protocol_environment.Context.t Lwt.t
val fold_value :
?depth:[ `Eq of int | `Le of int | `Lt of int | `Ge of int | `Gt of int ] ->
Environment_context.t ->
Mavryk_context.Context.key ->
order:[ `Sorted | `Undefined ] ->
init:'a ->
f:
(Mavryk_context.Context.key ->
(unit -> Mavryk_context_disk.Context.value option Lwt.t) ->
'b ->
'c Lwt.t) ->
'c Lwt.t
val add_protocol :
Environment_context.t ->
Mavryk_base.TzPervasives.Protocol_hash.t ->
Mavryk_protocol_environment.Context.t Lwt.t
val get_protocol :
Environment_context.t ->
Mavryk_base.TzPervasives.Protocol_hash.t Lwt.t
val add_predecessor_block_metadata_hash :
Environment_context.t ->
Mavryk_base.TzPervasives.Block_metadata_hash.t ->
Mavryk_protocol_environment.Context.t Lwt.t
val add_predecessor_ops_metadata_hash :
Environment_context.t ->
Mavryk_base.TzPervasives.Operation_metadata_list_list_hash.t ->
Mavryk_protocol_environment.Context.t Lwt.t
val hash :
time:Mavryk_base.TzPervasives.Time.Protocol.t ->
?message:string ->
Environment_context.t ->
Mavryk_base.TzPervasives.Context_hash.t
val get_test_chain :
Environment_context.t ->
Mavryk_base.TzPervasives.Test_chain_status.t Lwt.t
val add_test_chain :
Environment_context.t ->
Mavryk_base.TzPervasives.Test_chain_status.t ->
Mavryk_protocol_environment.Context.t Lwt.t
val fork_test_chain :
Environment_context.t ->
protocol:Mavryk_base.TzPervasives.Protocol_hash.t ->
expiration:Mavryk_base.TzPervasives.Time.Protocol.t ->
Mavryk_protocol_environment.Context.t Lwt.t
val commit :
time:Mavryk_base.TzPervasives.Time.Protocol.t ->
?message:string ->
Environment_context.t ->
Mavryk_base.TzPervasives.Context_hash.t Lwt.t
val gc : index -> Mavryk_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 commit_test_chain_genesis :
Environment_context.t ->
Mavryk_base.TzPervasives.Block_header.t ->
Mavryk_base.TzPervasives.Block_header.t Lwt.t
val compute_testchain_genesis :
Environment_context.t ->
Mavryk_base.TzPervasives.Block_hash.t ->
Mavryk_base.TzPervasives.Block_hash.t
val merkle_tree :
Environment_context.t ->
Mavryk_context_sigs__Context.Proof_types.merkle_leaf_kind ->
Mavryk_context.Context.key ->
Mavryk_context_sigs__Context.Proof_types.merkle_node
Mavryk_base.TzPervasives.String.Map.t
Lwt.t
val merkle_tree_v2 :
Environment_context.t ->
Mavryk_context_sigs__Context.Proof_types.merkle_leaf_kind ->
Mavryk_context.Context.key ->
Mavryk_context.Context.Proof.tree Mavryk_context.Context.Proof.t Lwt.t
val commit_genesis :
index ->
chain_id:Mavryk_base.TzPervasives.Chain_id.t ->
time:Mavryk_base.TzPervasives.Time.Protocol.t ->
protocol:Mavryk_base.TzPervasives.Protocol_hash.t ->
Mavryk_base.TzPervasives.Context_hash.t Mavryk_base.TzPervasives.tzresult
Lwt.t
val checkout :
index ->
Mavryk_base.TzPervasives.Context_hash.t ->
Mavryk_protocol_environment.Context.t option Lwt.t
val checkout_exn :
index ->
Mavryk_base.TzPervasives.Context_hash.t ->
Mavryk_protocol_environment.Context.t Lwt.t
val exists : index -> Mavryk_base.TzPervasives.Context_hash.t -> bool Lwt.t
val close : index -> unit Lwt.t