Mavryk_validation.External_validation
type parameters = {
context_root : string;
protocol_root : string;
genesis : Mavryk_base.TzPervasives.Genesis.t;
readonly : bool;
data_dir : string;
sandbox_parameters : Mavryk_base.TzPervasives.Data_encoding.json option;
user_activated_upgrades : Mavryk_base.TzPervasives.User_activated.upgrades;
user_activated_protocol_overrides : Mavryk_base.TzPervasives.User_activated.protocol_overrides;
operation_metadata_size_limit : Mavryk_shell_services.Shell_limits.operation_metadata_size_limit;
dal_config : Mavryk_crypto_dal.Cryptobox.Config.t;
internal_events : Mavryk_base.Internal_event_config.t;
}
type _ request =
| Apply : {
chain_id : Mavryk_base.TzPervasives.Chain_id.t;
block_header : Mavryk_base.TzPervasives.Block_header.t;
predecessor_block_header : Mavryk_base.TzPervasives.Block_header.t;
predecessor_block_metadata_hash : Mavryk_base.TzPervasives.Block_metadata_hash.t
option;
predecessor_ops_metadata_hash : Mavryk_base.TzPervasives.Operation_metadata_list_list_hash.t
option;
predecessor_resulting_context_hash : Mavryk_base.TzPervasives.Context_hash.t;
operations : Block_validation.operation list list;
max_operations_ttl : int;
should_precheck : bool;
simulate : bool;
} -> Block_validation.result request
| Preapply : {
chain_id : Mavryk_base.TzPervasives.Chain_id.t;
timestamp : Mavryk_base.TzPervasives.Time.Protocol.t;
protocol_data : bytes;
live_blocks : Mavryk_base.TzPervasives.Block_hash.Set.t;
live_operations : Mavryk_base.TzPervasives.Operation_hash.Set.t;
predecessor_shell_header : Mavryk_base.TzPervasives.Block_header.shell_header;
predecessor_hash : Mavryk_base.TzPervasives.Block_hash.t;
predecessor_max_operations_ttl : int;
predecessor_block_metadata_hash : Mavryk_base.TzPervasives.Block_metadata_hash.t
option;
predecessor_ops_metadata_hash : Mavryk_base.TzPervasives.Operation_metadata_list_list_hash.t
option;
predecessor_resulting_context_hash : Mavryk_base.TzPervasives.Context_hash.t;
operations : Block_validation.operation list list;
} -> (Mavryk_base.TzPervasives.Block_header.shell_header
* Mavryk_base.TzPervasives.error Mavryk_shell_services.Preapply_result.t
list)
request
| Precheck : {
chain_id : Mavryk_base.TzPervasives.Chain_id.t;
predecessor_block_header : Mavryk_base.TzPervasives.Block_header.t;
predecessor_block_hash : Mavryk_base.TzPervasives.Block_hash.t;
predecessor_resulting_context_hash : Mavryk_base.TzPervasives.Context_hash.t;
header : Mavryk_base.TzPervasives.Block_header.t;
operations : Block_validation.operation list list;
hash : Mavryk_base.TzPervasives.Block_hash.t;
} -> unit request
| Commit_genesis : {
chain_id : Mavryk_base.TzPervasives.Chain_id.t;
} -> Mavryk_base.TzPervasives.Context_hash.t request
| Fork_test_chain : {
chain_id : Mavryk_base.TzPervasives.Chain_id.t;
context_hash : Mavryk_base.TzPervasives.Context_hash.t;
forked_header : Mavryk_base.TzPervasives.Block_header.t;
} -> Mavryk_base.TzPervasives.Block_header.t request
| Context_garbage_collection : {
context_hash : Mavryk_base.TzPervasives.Context_hash.t;
gc_lockfile_path : string;
} -> unit request
| Context_split : unit request
| Terminate : never request
| Reconfigure_event_logging : Mavryk_base_unix.Internal_event_unix.Configuration.t ->
unit
request
val request_pp : Stdlib.Format.formatter -> 'a request -> unit
val magic : Mavryk_base.TzPervasives.Bytes.t
val parameters_encoding : parameters Mavryk_base.TzPervasives.Data_encoding.t
val request_encoding : packed_request Mavryk_base.TzPervasives.Data_encoding.t
val result_encoding : 'a request -> 'a Mavryk_base.TzPervasives.Data_encoding.t
val recv_result :
Lwt_io.input_channel ->
'a Mavryk_base.TzPervasives.Data_encoding.t ->
'a Mavryk_base.TzPervasives.tzresult Lwt.t
The prefix for the validation socket filename.
Do not use it directly except for documentation purposes; use socket_path
instead.
Get the validation socket path.
socket_dir
is the directory where the file should be put. pid
is the process ID of the validator process.
val create_socket_listen :
canceler:Lwt_canceler.t ->
max_requests:int ->
socket_path:string ->
Lwt_unix.file_descr Mavryk_base.TzPervasives.tzresult Lwt.t
val create_socket_connect :
canceler:Lwt_canceler.t ->
socket_path:string ->
Lwt_unix.file_descr Mavryk_base.TzPervasives.tzresult Lwt.t