package octez-node-config

  1. Overview
  2. Docs
type Tezos_base.TzPervasives.error +=
  1. | Invalid_data_dir of {
    1. data_dir : string;
    2. msg : string option;
    }

Errors related to checks related to the data dir.

type Tezos_base.TzPervasives.error +=
  1. | Could_not_read_data_dir_version of string

Default file names to store the information about the node's network identity, peers and configuration.

val default_identity_file_name : string
val default_config_file_name : string
val default_peers_file_name : string
type ensure_mode =
  1. | Exists
  2. | Is_bare
  3. | Is_compatible

Defines the properties that must be satisfied by the call to ensure_data_dir.

Depending of the given mode, it will:

  • Exists: ensures that the directory exists, if not, creates a fresh directory by creating it and writing a version file.
  • Is_bare: ensures that, if the directory exists, it contains no other file than:
  • the version file;
  • the identity file;
  • the configuration file;
  • the peer list file; Otherwise, creates an fresh directory.
  • Is_compatible: similar to Exists but, additionally, will check the version compatibility.
val ensure_data_dir : ?mode:ensure_mode -> Tezos_base.Genesis.t -> string -> unit Tezos_base.TzPervasives.tzresult Lwt.t

ensure_data_dir ~mode genesis data_dir ensures that a directory is valid with regards to the given mode. See ensure_mode for the mode's properties. By default, the mode is set to Is_compatible.

val upgrade_data_dir : data_dir:string -> Tezos_base.Genesis.t -> chain_name:Tezos_base.Distributed_db_version.Name.t -> sandbox_parameters: (string * Tezos_base.TzPervasives.Data_encoding.json) option -> unit Tezos_base.TzPervasives.tzresult Lwt.t

Upgrade data directory from an older version.

upgrade_data_dir dir genesis ~chain_name ~sandbox_parameters checks if an upgrade of the given data directory dir is available. If the data directory is upgradable then the upgrade is performed. Otherwise, nothing is done.

val store_dir : string -> string

store_dir dir is a directory within dir that the node uses for its store. In order for store_dir dir to be valid, dir must be a valid directory name.

val context_dir : string -> string

context_dir dir is a directory within dir that the node uses for its context. In order for context_dir dir to be valid, dir must be a valid directory name.

val protocol_dir : string -> string

protocol_dir dir is a directory within dir that the node uses for its protocol. In order for protocol_dir dir to be valid, dir must be a valid directory name.

val lock_file : string -> string

lock_file dir is a file within dir that the node uses for its lock. In order for lock_file dir to be valid, dir must be a valid directory name.

val upgrade_status : string -> unit Tezos_base.TzPervasives.tzresult Lwt.t
OCaml

Innovation. Community. Security.