Module Mavkit_node_config.Shared_arg

type net_config
type t = {
  1. disable_config_validation : bool;
  2. data_dir : string option;
    (*

    a directory where the node's configuration and state should be stored

    *)
  3. config_file : string;
    (*

    the config.json file to use

    *)
  4. network : net_config option;
    (*

    the P2P network to connect to

    *)
  5. connections : int option;
  6. max_download_speed : int option;
  7. max_upload_speed : int option;
  8. binary_chunks_size : int option;
  9. peer_table_size : int option;
  10. expected_pow : float option;
  11. peers : string list;
  12. no_bootstrap_peers : bool;
  13. listen_addr : string option;
    (*

    address to listen to connections from peers

    *)
  14. advertised_net_port : int option;
    (*

    port advertised for other peers to connect to

    *)
  15. discovery_addr : string option;
  16. rpc_listen_addrs : string list;
    (*

    a list of addresses to listen to RPC requests on

    *)
  17. external_rpc_listen_addrs : string list;
    (*

    a list of addresses to listen to RPC requests on

    *)
  18. private_mode : bool;
    (*

    enables the private mode, see https://protocol.mavryk.org/user/node-configuration.html#private-node

    *)
  19. disable_p2p_maintenance : bool;
    (*

    If disable_p2p_maintenance is true the p2p layer will not open or close connections by itself. This flag is intended to be used for testing and debugging.

    *)
  20. disable_p2p_swap : bool;
    (*

    If disable_p2p_swap is true the p2p layer will neither initiate a swap of connections with its neighbors nor answer to a swap request. This flag is intended to be used for testing and debugging.

    *)
  21. disable_mempool : bool;
  22. enable_testchain : bool;
  23. cors_origins : string list;
  24. cors_headers : string list;
  25. rpc_tls : Config_file.tls option;
  26. log_output : Mavryk_base_unix.Logs_simple_config.Output.t option;
  27. log_coloring : bool option;
  28. bootstrap_threshold : int option;
  29. history_mode : Mavryk_shell_services.History_mode.t option;
  30. synchronisation_threshold : int option;
  31. latency : int option;
  32. allow_all_rpc : Mavryk_base.P2p_point.Id.addr_port_id list;
    (*

    a list of RPC listening addresses for which a full access should be granted

    *)
  33. media_type : Mavryk_rpc_http.Media_type.Command_line.t;
  34. max_active_rpc_connections : Mavryk_rpc_http_server.RPC_server.Max_active_rpc_connections.t;
  35. metrics_addr : string list;
  36. operation_metadata_size_limit : Mavryk_shell_services.Shell_limits.operation_metadata_size_limit option;
    (*

    maximum operation metadata size allowed to be stored on disk

    *)
}

This record represents a collection of command line arguments given when starting the node.

val process_command : unit Mavryk_base.TzPervasives.tzresult Lwt.t -> unit Cmdliner.Term.ret
module Term : sig ... end
val read_config_file : t -> Config_file.t Mavryk_base.TzPervasives.tzresult Lwt.t
val resolve_data_dir_and_config_file : ?data_dir:string -> ?config_file:string -> unit -> (string * Config_file.t, Mavryk_base.TzPervasives.tztrace) Stdlib.result Lwt.t

Modify a node's network configuration.

This returns cfg modified according to the network argument. Default value for cfg is Config_file.default_config.

val patch_config : ?may_override_network:bool -> ?emit: (unit Mavryk_base.TzPervasives.Internal_event.Simple.t -> unit -> unit Lwt.t) -> ?ignore_bootstrap_peers:bool -> ?cfg:Config_file.t -> t -> (Config_file.t, Mavryk_base.TzPervasives.tztrace) Stdlib.result Lwt.t

Modify a node configuration.

This returns cfg modified according to command-line arguments. Default value for cfg is Config_file.default_config.

may_override_network specifies whether the network parameter is overridden, if already configured. Default value for may_override_network is false.

ignore_bootstrap_peers specifies whether the bootstrap peers, from cfg, are ignored or not. Default value for ignore_bootstrap_peers is false.

val read_and_patch_config_file : ?may_override_network:bool -> ?emit: (unit Mavryk_base.TzPervasives.Internal_event.Simple.t -> unit -> unit Lwt.t) -> ?ignore_bootstrap_peers:bool -> t -> Config_file.t Mavryk_base.TzPervasives.tzresult Lwt.t

read_and_patch_config_file ~may_override_network ~ignore_bootstrap_peers args Read the current config file and modify it accordingly to args.

may_override_network specifies whether the network parameter is overridden, if already configured. ignore_bootstrap_peers specifies whether the bootstrap peers, from the current config file, are ignored or not.

module Manpage : sig ... end