Configuration files

Configuration Constraints

While operators have the flexibility to customize certain settings, such as adjusting the size of a cache or specifying an Elasticsearch instance, not all configuration values are open for modification. Critical parameters, like the genesis total supply, must remain unchanged to ensure consistency across the network.

Locating Configuration Files

By default, configuration files are situated in the config directory, typically found near the node's executable. To alter these paths, operators can utilize CLI flags available with the node's binary.

Below, you can find an example of what the configuration files look like for the v0.1.0 node.

β”œβ”€β”€ api.toml
β”œβ”€β”€ config.toml
β”œβ”€β”€ economics.toml
β”œβ”€β”€ enableEpochs.toml
β”œβ”€β”€ enableRounds.toml
β”œβ”€β”€ external.toml
β”œβ”€β”€ gasSchedules
β”‚ β”œβ”€β”€ gasScheduleV1.toml
β”‚ β”œβ”€β”€ gasScheduleV2.toml
β”‚ β”œβ”€β”€ gasScheduleV3.toml
β”‚ β”œβ”€β”€ gasScheduleV4.toml
β”‚ β”œβ”€β”€ gasScheduleV5.toml
β”‚ β”œβ”€β”€ gasScheduleV6.toml
β”‚ └── gasScheduleV7.toml
β”œβ”€β”€ genesisContracts
β”‚ β”œβ”€β”€ delegation.wasm
β”‚ └── dns.wasm
β”œβ”€β”€ genesis.json
β”œβ”€β”€ genesisSmartContracts.json
β”œβ”€β”€ nodesSetup.json
β”œβ”€β”€ p2p.toml
β”œβ”€β”€ prefs.toml
β”œβ”€β”€ ratings.toml
β”œβ”€β”€ systemSmartContractsConfig.toml
β”œβ”€β”€ testKeys
β”‚ β”œβ”€β”€ delegationWalletKey.pem
β”‚ β”œβ”€β”€ dnsWalletKey.pem
β”‚ β”œβ”€β”€ esdtWalletKey.pem
β”‚ └── protocolSustainabilityWalletKey.pem
└── upgradeContracts
    └── dns
        └── v3.0
            β”œβ”€β”€ deploy.json
            └── dns.wasm

Blockchain Configuration Files Overview

This document provides an overview of various configuration files used in a blockchain setup. Each file serves a specific purpose, ranging from system smart contracts settings to peer-to-peer network configurations.


Contains configurable values for System Smart Contracts, including parameters for Staking, ESDT, and Governance.


Holds the parameters used for the nodes' rating mechanism, such as the starting rating and decrease steps.


Stores a set of custom configuration values that should not be replaced from one upgrade to another.


Includes peer-to-peer configurable values, such as the number of peers to connect to.


Maintains all the Genesis nodes' public keys, alongside their wallet addresses.


Specifies the Smart Contracts to be deployed at Genesis time, alongside additional parameters.


Contains all the addresses and their balance/active delegation at the genesis.


Is the directory that contains the WASM contracts deployed at the genesis.


The directory holding the gas consumption configuration to be used for Smart Contract execution, depending on activation epochs specified in enableEpochs.toml under GasSchedule -> GasScheduleByEpochs.


Contains external drivers' configurations, such as Elasticsearch or event notifier.


Lists new features or bug fixes and their activation epoch. (Note: Duplicate with enableEpochs.toml; verify the actual usage in the system.)


Lists new features or bug fixes and their activation epoch.


Contains the economics configuration, such as genesis total supply, inflation per year, developer fees, etc.


Contains the main configuration of the node, including storers & cachers type and size, type of hasher, type of marshaller, etc.


Contains the Rest API endpoints configuration, detailing open or closed endpoints, logging, and so on.

Overriding config.toml values​

As mentioned in the above descriptions, prefs.toml is not overwritten by the installation scripts when performing an upgrade.

However, there are some more custom values that nodes operators use (antiflood disabled or with fewer constraints, db lookup extension, and so on) and they don't want these values to be changed during an upgrade.

For this use-case, release v1.4.x introduces the OverridableConfigTomlValues setting inside prefs.toml that is able to override certain configuration values from config.toml.

Here's how to use it:

   OverridableConfigTomlValues = [
     { Path = "StoragePruning.NumEpochsToKeep", Value = "4" },
     { Path = "MiniBlocksStorage.Cache.Name", Value = "MiniBlocksStorage" }

Therefore, after each upgrade, the node will override these values to the newly provided values. The path points to an entry in config.toml file before setting a new overridable value.

Last updated