Module Mavryk_validation.External_validation

type parameters = {
  1. context_root : string;
  2. protocol_root : string;
  3. genesis : Mavryk_base.TzPervasives.Genesis.t;
  4. readonly : bool;
  5. data_dir : string;
  6. sandbox_parameters : Mavryk_base.TzPervasives.Data_encoding.json option;
  7. user_activated_upgrades : Mavryk_base.TzPervasives.User_activated.upgrades;
  8. user_activated_protocol_overrides : Mavryk_base.TzPervasives.User_activated.protocol_overrides;
  9. operation_metadata_size_limit : Mavryk_shell_services.Shell_limits.operation_metadata_size_limit;
  10. dal_config : Mavryk_crypto_dal.Cryptobox.Config.t;
  11. internal_events : Mavryk_base.Internal_event_config.t;
}
type never = |
type _ request =
  1. | Apply : {
    1. chain_id : Mavryk_base.TzPervasives.Chain_id.t;
    2. block_header : Mavryk_base.TzPervasives.Block_header.t;
    3. predecessor_block_header : Mavryk_base.TzPervasives.Block_header.t;
    4. predecessor_block_metadata_hash : Mavryk_base.TzPervasives.Block_metadata_hash.t option;
    5. predecessor_ops_metadata_hash : Mavryk_base.TzPervasives.Operation_metadata_list_list_hash.t option;
    6. predecessor_resulting_context_hash : Mavryk_base.TzPervasives.Context_hash.t;
    7. operations : Block_validation.operation list list;
    8. max_operations_ttl : int;
    9. should_precheck : bool;
    10. simulate : bool;
    } -> Block_validation.result request
  2. | Preapply : {
    1. chain_id : Mavryk_base.TzPervasives.Chain_id.t;
    2. timestamp : Mavryk_base.TzPervasives.Time.Protocol.t;
    3. protocol_data : bytes;
    4. live_blocks : Mavryk_base.TzPervasives.Block_hash.Set.t;
    5. live_operations : Mavryk_base.TzPervasives.Operation_hash.Set.t;
    6. predecessor_shell_header : Mavryk_base.TzPervasives.Block_header.shell_header;
    7. predecessor_hash : Mavryk_base.TzPervasives.Block_hash.t;
    8. predecessor_max_operations_ttl : int;
    9. predecessor_block_metadata_hash : Mavryk_base.TzPervasives.Block_metadata_hash.t option;
    10. predecessor_ops_metadata_hash : Mavryk_base.TzPervasives.Operation_metadata_list_list_hash.t option;
    11. predecessor_resulting_context_hash : Mavryk_base.TzPervasives.Context_hash.t;
    12. 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
  3. | Precheck : {
    1. chain_id : Mavryk_base.TzPervasives.Chain_id.t;
    2. predecessor_block_header : Mavryk_base.TzPervasives.Block_header.t;
    3. predecessor_block_hash : Mavryk_base.TzPervasives.Block_hash.t;
    4. predecessor_resulting_context_hash : Mavryk_base.TzPervasives.Context_hash.t;
    5. header : Mavryk_base.TzPervasives.Block_header.t;
    6. operations : Block_validation.operation list list;
    7. hash : Mavryk_base.TzPervasives.Block_hash.t;
    } -> unit request
  4. | Commit_genesis : {
    1. chain_id : Mavryk_base.TzPervasives.Chain_id.t;
    } -> Mavryk_base.TzPervasives.Context_hash.t request
  5. | Fork_test_chain : {
    1. chain_id : Mavryk_base.TzPervasives.Chain_id.t;
    2. context_hash : Mavryk_base.TzPervasives.Context_hash.t;
    3. forked_header : Mavryk_base.TzPervasives.Block_header.t;
    } -> Mavryk_base.TzPervasives.Block_header.t request
  6. | Context_garbage_collection : {
    1. context_hash : Mavryk_base.TzPervasives.Context_hash.t;
    2. gc_lockfile_path : string;
    } -> unit request
  7. | Context_split : unit request
  8. | Terminate : never request
  9. | Reconfigure_event_logging : Mavryk_base_unix.Internal_event_unix.Configuration.t -> unit request
val request_pp : Stdlib.Format.formatter -> 'a request -> unit
val parameters_encoding : parameters Mavryk_base.TzPervasives.Data_encoding.t
type packed_request =
  1. | Erequest : _ request -> packed_request
val request_encoding : packed_request Mavryk_base.TzPervasives.Data_encoding.t
val result_encoding : 'a request -> 'a Mavryk_base.TzPervasives.Data_encoding.t
val send : Lwt_io.output_channel -> 'a Mavryk_base.TzPervasives.Data_encoding.t -> 'a -> unit Lwt.t
val recv : Lwt_io.input_channel -> 'a Mavryk_base.TzPervasives.Data_encoding.t -> 'a Lwt.t
val recv_result : Lwt_io.input_channel -> 'a Mavryk_base.TzPervasives.Data_encoding.t -> 'a Mavryk_base.TzPervasives.tzresult Lwt.t
val socket_path_prefix : string

The prefix for the validation socket filename.

Do not use it directly except for documentation purposes; use socket_path instead.

val socket_path : socket_dir:string -> pid:int -> string

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