package octez-node-config

  1. Overview
  2. Docs

Module Octez_node_config.Config_fileSource

Sourcetype blockchain_network = {
  1. alias : string option;
    (*

    as given to --network, only for built-in networks

    *)
  2. genesis : Tezos_base.Genesis.t;
  3. genesis_parameters : Tezos_base.Genesis.Parameters.t option;
  4. chain_name : chain_name;
  5. old_chain_name : chain_name option;
  6. incompatible_chain_name : chain_name option;
  7. sandboxed_chain_name : chain_name;
  8. user_activated_upgrades : Tezos_base.User_activated.upgrades;
  9. user_activated_protocol_overrides : Tezos_base.User_activated.protocol_overrides;
  10. default_bootstrap_peers : string list;
}
Sourceval builtin_blockchain_networks : (string * blockchain_network) list

List of built-in networks with their alias.

Sourceval blockchain_network_encoding : blockchain_network Tezos_base.TzPervasives.Data_encoding.t

Data encoding for custom blockchain configuration.

Sourcetype t = {
  1. data_dir : string;
  2. disable_config_validation : bool;
  3. p2p : p2p;
  4. rpc : rpc;
  5. log : Tezos_stdlib_unix.Lwt_log_sink_unix.cfg;
  6. internal_events : Tezos_base.Internal_event_config.t;
  7. shell : Tezos_shell_services.Shell_limits.limits;
  8. blockchain_network : blockchain_network;
  9. metrics_addr : string list;
  10. dal : Tezos_crypto_dal.Cryptobox.Config.t;
}
Sourceand p2p = {
  1. expected_pow : float;
  2. bootstrap_peers : string list option;
  3. listen_addr : string option;
  4. advertised_net_port : int option;
  5. discovery_addr : string option;
  6. private_mode : bool;
  7. limits : Tezos_p2p_services.P2p_limits.t;
  8. disable_mempool : bool;
  9. enable_testchain : bool;
  10. reconnection_config : Tezos_p2p_services.Point_reconnection_config.t;
}
Sourceand rpc = {
  1. listen_addrs : string list;
  2. cors_origins : string list;
  3. cors_headers : string list;
  4. tls : tls option;
  5. acl : Tezos_rpc_http_server.RPC_server.Acl.policy;
  6. media_type : Tezos_rpc_http.Media_type.Command_line.t;
}
Sourceand tls = {
  1. cert : string;
  2. key : string;
}
Sourceval data_dir_env_name : string
Sourceval default_data_dir : string
Sourceval default_p2p_port : int
Sourceval default_rpc_port : int
Sourceval default_p2p : p2p
Sourceval default_config : t
Sourceval update : ?disable_config_validation:bool -> ?data_dir:string -> ?min_connections:int -> ?expected_connections:int -> ?max_connections:int -> ?max_download_speed:int -> ?max_upload_speed:int -> ?binary_chunks_size:int -> ?peer_table_size:int -> ?expected_pow:float -> ?bootstrap_peers:string list option -> ?listen_addr:string -> ?advertised_net_port:int -> ?discovery_addr:string -> ?rpc_listen_addrs:string list -> ?allow_all_rpc:Tezos_base.P2p_point.Id.addr_port_id list -> ?media_type:Tezos_rpc_http.Media_type.Command_line.t -> ?metrics_addr:string list -> ?operation_metadata_size_limit: Tezos_shell_services.Shell_limits.operation_metadata_size_limit -> ?private_mode:bool -> ?disable_mempool:bool -> ?disable_mempool_precheck:bool -> ?enable_testchain:bool -> ?cors_origins:string list -> ?cors_headers:string list -> ?rpc_tls:tls -> ?log_output:Tezos_stdlib_unix.Lwt_log_sink_unix.Output.t -> ?synchronisation_threshold:int -> ?history_mode:Tezos_shell_services.History_mode.t -> ?network:blockchain_network -> ?latency:int -> t -> t Tezos_base.TzPervasives.tzresult Lwt.t

Update the given configuration. This is mostly used to apply the CLI arguments to the default config when starting or configuring the node. Arguments to this function roughly reflect the options in Shared_arg.t.

Sourceval to_string : t -> string
Sourceval read : string -> t Tezos_base.TzPervasives.tzresult Lwt.t
Sourceval write : string -> t -> unit Tezos_base.TzPervasives.tzresult Lwt.t

Write configuration file.

Also check whether the directory of the given filename is a data directory.

Sourcetype Tezos_base.TzPervasives.error +=
  1. | Failed_to_parse_address of string * string
Sourceval resolve_listening_addrs : string -> Tezos_base.P2p_point.Id.t list Tezos_base.TzPervasives.tzresult Lwt.t

resolve_listening_addrs listening_addr parses listening_addr and returns a list of points. The default port is default_p2p_port. Fails if the address could not be parsed.

Sourceval resolve_discovery_addrs : string -> (Ipaddr.V4.t * int) list Tezos_base.TzPervasives.tzresult Lwt.t

resolve_discovery_addrs disco_addrs parses disco_addr and returns a list of points. disco_addrs must resolves to Ipv4 addresses otherwise it fails. The default port is default_discovery_port. Fails if the address could not be parsed.

Sourceval resolve_rpc_listening_addrs : string -> Tezos_base.P2p_point.Id.t list Tezos_base.TzPervasives.tzresult Lwt.t

resolve_rpc_listening_addrs rpc_addrs parses rpc_addr and returns a list of points. The default port is default_rpc_port. Fails if the address could not be parsed.

Sourceval resolve_metrics_addrs : ?default_metrics_port:int -> string -> Tezos_base.P2p_point.Id.t list Tezos_base.TzPervasives.tzresult Lwt.t

resolve_metrics_addrs ?default_metrics_port metrics_addr parses metrics_addr and returns a list of points). The default host is "localhost" and the default port is default_metrics_port. Fails if the address could not be parsed.

Sourceval resolve_bootstrap_addrs : string list -> (Tezos_base.P2p_point.Id.t * Tezos_base.P2p_peer.Id.t option) list Tezos_base.TzPervasives.tzresult Lwt.t

resolve_boostrap_addrs bs_addrs parses bs_addrs and returns for each addr a list of points. The default port is default_p2p_port. Fails if the address could not be parsed.

Sourceval encoding : t Tezos_base.TzPervasives.Data_encoding.t
Sourceval bootstrap_peers : t -> string list

Return p2p.bootstrap_peers if not None, network.default_bootstrap_peers otherwise.

OCaml

Innovation. Community. Security.