Mavryk_context_disk.Context
The context of a mavryk node. Persisted to disk.
type Mavryk_base.TzPervasives.error +=
val equal_config :
Mavryk_context_sigs.Config.t ->
Mavryk_context_sigs.Config.t ->
bool
val config : t -> Mavryk_context_sigs.Config.t
module Proof : sig ... end
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 ])
Stdlib.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 ])
Stdlib.result
Lwt.t
type context = t
val init :
?patch_context:(context -> context Mavryk_base.TzPervasives.tzresult Lwt.t) ->
?readonly:bool ->
?index_log_size:int ->
string ->
index Lwt.t
val close : index -> unit Lwt.t
val compute_testchain_chain_id :
Mavryk_base.TzPervasives.Block_hash.t ->
Mavryk_base.TzPervasives.Chain_id.t
val compute_testchain_genesis :
Mavryk_base.TzPervasives.Block_hash.t ->
Mavryk_base.TzPervasives.Block_hash.t
val is_empty : t -> bool
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 commit_test_chain_genesis :
context ->
Mavryk_base.TzPervasives.Block_header.t ->
Mavryk_base.TzPervasives.Block_header.t Lwt.t
val to_memory_tree :
t ->
string list ->
Mavryk_context_memory.Context.tree option Lwt.t
val merkle_tree :
t ->
Mavryk_context_sigs__Context.Proof_types.merkle_leaf_kind ->
key ->
Mavryk_context_sigs__Context.Proof_types.merkle_node
Mavryk_base.TzPervasives.String.Map.t
Lwt.t
val merkle_tree_v2 :
t ->
Mavryk_context_sigs__Context.Proof_types.merkle_leaf_kind ->
key ->
Proof.tree Proof.t Lwt.t
val exists : index -> Mavryk_base.TzPervasives.Context_hash.t -> bool Lwt.t
val checkout :
index ->
Mavryk_base.TzPervasives.Context_hash.t ->
context option Lwt.t
val checkout_exn :
index ->
Mavryk_base.TzPervasives.Context_hash.t ->
context Lwt.t
val hash :
time:Mavryk_base.TzPervasives.Time.Protocol.t ->
?message:string ->
t ->
Mavryk_base.TzPervasives.Context_hash.t
val commit :
time:Mavryk_base.TzPervasives.Time.Protocol.t ->
?message:string ->
context ->
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 export_snapshot :
index ->
Mavryk_base.TzPervasives.Context_hash.t ->
path:string ->
unit Lwt.t
val set_head :
index ->
Mavryk_crypto.Hashed.Chain_id.t ->
Mavryk_base.TzPervasives.Context_hash.t ->
unit Lwt.t
val set_master : index -> Mavryk_base.TzPervasives.Context_hash.t -> unit Lwt.t
val get_hash_version :
context ->
Mavryk_base.TzPervasives.Context_hash.Version.t
val set_hash_version :
context ->
Mavryk_base.TzPervasives.Context_hash.Version.t ->
context Mavryk_base.TzPervasives.tzresult Lwt.t
val get_protocol : context -> Mavryk_base.TzPervasives.Protocol_hash.t Lwt.t
val add_protocol :
context ->
Mavryk_base.TzPervasives.Protocol_hash.t ->
context Lwt.t
val get_test_chain :
context ->
Mavryk_base.TzPervasives.Test_chain_status.t Lwt.t
val add_test_chain :
context ->
Mavryk_base.TzPervasives.Test_chain_status.t ->
context Lwt.t
val fork_test_chain :
context ->
protocol:Mavryk_base.TzPervasives.Protocol_hash.t ->
expiration:Mavryk_base.TzPervasives.Time.Protocol.t ->
context Lwt.t
val clear_test_chain :
index ->
Mavryk_base.TzPervasives.Chain_id.t ->
unit Lwt.t
val find_predecessor_block_metadata_hash :
context ->
Mavryk_base.TzPervasives.Block_metadata_hash.t option Lwt.t
val add_predecessor_block_metadata_hash :
context ->
Mavryk_base.TzPervasives.Block_metadata_hash.t ->
context Lwt.t
val find_predecessor_ops_metadata_hash :
context ->
Mavryk_base.TzPervasives.Operation_metadata_list_list_hash.t option Lwt.t
val add_predecessor_ops_metadata_hash :
context ->
Mavryk_base.TzPervasives.Operation_metadata_list_list_hash.t ->
context Lwt.t
val sync : index -> unit Lwt.t
val restore_context :
index ->
expected_context_hash:Mavryk_base.TzPervasives.Context_hash.t ->
nb_context_elements:int ->
fd:Lwt_unix.file_descr ->
in_memory:bool ->
progress_display_mode:Mavryk_stdlib_unix.Animation.progress_display_mode ->
unit Mavryk_base.TzPervasives.tzresult Lwt.t
module Checks : sig ... end