Module Tezos_dal_node_lib.Configuration_file

type neighbor = {
  1. addr : string;
  2. port : int;
}
type history_mode =
  1. | Rolling of {
    1. blocks : [ `Auto | `Some of int ];
    }
    (*

    Rolling {block = `Some n} keeps the shards for about n blocks. Rolling {block = `Auto} infers the number of blocks depending on the L1 parametric constants and the profile.

    *)
  2. | Full
    (*

    Full keeps the shards forever

    *)

The history mode decides for how long shards are kept in the store.

type experimental_features = unit

Configuration settings for experimental features, with no backward compatibility guarantees.

type t = {
  1. data_dir : string;
    (*

    The path to the DAL node data directory.

    *)
  2. rpc_addr : Tezos_base.TzPervasives.P2p_point.Id.t;
    (*

    The TCP address the DAL node's RPC server listens to.

    *)
  3. listen_addr : Tezos_base.TzPervasives.P2p_point.Id.t;
    (*

    The TCP address bound by the DAL node.

    *)
  4. public_addr : Tezos_base.TzPervasives.P2p_point.Id.t;
    (*

    The TCP address at which this instance can be reached.

    *)
  5. peers : string list;
    (*

    The list of P2P peers to connect to at startup, in addition to the list given by L1 node's configuration parameter dal_config.bootstrap_peers.

    *)
  6. expected_pow : float;
    (*

    The expected PoW difficulty level for the peers' identity.

    *)
  7. endpoint : Uri.t;
    (*

    The endpoint of a Tezos L1 node.

    *)
  8. slots_backup_uris : Uri.t list;
    (*

    Backup URIs to fetch slot data if missing and unrecoverable from shards.

    *)
  9. trust_slots_backup_uris : bool;
    (*

    Whether to trust the data downlaoded from the provided HTTP backup URIs.

    *)
  10. metrics_addr : Tezos_base.TzPervasives.P2p_point.Id.t option;
    (*

    The TCP address of the node's server used to export metrics.

    *)
  11. profile : Profile_manager.unresolved_profile;
    (*

    The profiles determining the topics of interest.

    *)
  12. history_mode : history_mode;
  13. version : int;
    (*

    The version of the configuration.

    *)
  14. service_name : string;
    (*

    Name of the service provided by this node.

    *)
  15. service_namespace : string;
    (*

    Namespace for the service.

    *)
  16. experimental_features : experimental_features;
    (*

    Experimental features.

    *)
  17. fetch_trusted_setup : bool;
    (*

    Should the trusted setup be downloaded if not found or has invalid hash.

    *)
  18. verbose : bool;
    (*

    Whether to emit detailed events for frequently received control messages from remote peers.

    *)
  19. ignore_l1_config_peers : bool;
    (*

    Ignore the boot(strap) peers provided by L1.

    *)
  20. disable_amplification : bool;
    (*

    Disable amplification.

    *)
}
val default : t

default is the default configuration.

val default_metrics_port : int

default_metrics_port is the default network port opened for metrics

val store_path : t -> string

store_path config returns a path for the store

val default_config_file : string -> string

default_config_file data_dir constructs a default configuration file path from a data dir.

val save : config_file:string -> t -> unit Tezos_base.TzPervasives.tzresult Lwt.t

save config writes config file in config.data_dir

val load : config_file:string -> t Tezos_base.TzPervasives.tzresult Lwt.t
val identity_file : t -> string

identity_file config returns the absolute path to the "identity.json" file of the DAL node, based on the configuration config.

val peers_file : t -> string

peers_file config returns the absolute path to the "peers.json" file of the DAL node, based on the configuration config.

val legacy_network_name : string