Configuration Parameters
This page describes available configuration parameters.
Root-Level
chain_id
required
Chain ID that must be included in each transaction. Used to prevent replay attacks.
- ENV:
CHAIN_ID
- Type: String
chain_id = "00000000-0000-0000-0000-000000000000"
CHAIN_ID="00000000-0000-0000-0000-000000000000"
public_key
required
Public key of the peer.
- ENV:
PUBLIC_KEY
- Type: String
public_key = "ed0120FAFCB2B27444221717F6FCBF900D5BE95273B1B0904B08C736B32A19F16AC1F9"
PUBLIC_KEY="ed0120FAFCB2B27444221717F6FCBF900D5BE95273B1B0904B08C736B32A19F16AC1F9"
private_key
required
Private key of the peer.
- ENV:
PRIVATE_KEY
- Type: String
private_key = "8026208F4C15E5D664DA3F13778801D23D4E89B76E94C1B94B389544168B6CB894F84F"
PRIVATE_KEY="8026208F4C15E5D664DA3F13778801D23D4E89B76E94C1B94B389544168B6CB894F84F"
Genesis
genesis.file
File path[1] to the SCALE-encoded genesis block.
Must be paired with --submit-genesis
CLI parameter.
- ENV:
GENESIS
- Type: String, file path[1:1]
[genesis]
file = "./genesis.scale"
GENESIS="./genesis.scale"
genesis.public_key
required
Public key of the genesis key pair.
- ENV:
GENESIS_PUBLIC_KEY
- Type: String, public key multihash
[genesis]
public_key = "ed01208BA62848CF767D72E7F7F4B9D2D7BA07FEE33760F79ABE5597A51520E292A0CB"
GENESIS_PUBLIC_KEY="ed01208BA62848CF767D72E7F7F4B9D2D7BA07FEE33760F79ABE5597A51520E292A0CB"
Network
network.address
required
Address for p2p communication for consensus (sumeragi) and block synchronization (block_sync) purposes
- ENV:
P2P_ADDRESS
- Type: String, socket address (host/IPv4/IPv6 + port)
[network]
address = "0.0.0.0:1337"
P2P_ADDRESS="0.0.0.0:1337"
network.public_address
required
Peer-to-peer address (external, as seen by other peers).
Will be gossiped to connected peers so that they can gossip it to other peers.
- ENV:
P2P_PUBLIC_ADDRESS
- Type: String, socket address (host/IPv4/IPv6 + port)
[network]
public_address = "0.0.0.0:5000"
P2P_PUBLIC_ADDRESS="0.0.0.0:5000"
network.block_gossip_size
The amount of blocks that can be sent in a single synchronization message.
- Type: Number
- Default:
500
[network]
block_gossip_size = 256
network.block_gossip_period_ms
The time interval between requests to peers for the most recent block.
More frequent gossiping shortens the time to sync, but can overload the network.
- Type: Number (of milliseconds)
- Default:
10_000
(10 seconds)
[network]
block_gossip_period_ms = 1_000
network.transaction_gossip_size
Max number of transactions in a gossip batch message.
Smaller size leads to longer time to synchronise, but useful if you have high packet loss.
- Type: Number
- Default:
500
[network]
transaction_gossip_size = 256
network.transaction_gossip_period_ms
Period of gossiping pending transaction between peers.
More frequent gossiping shortens the time to sync, but can overload the network.
- Type: Number (of milliseconds)
- Default:
1_000
(1 second)
[network]
transaction_gossip_period_ms = 5_000
network.idle_timeout_ms
Duration of time after which connection with peer is terminated if peer is idle.
- Type: Number (of milliseconds)
- Default:
60_000
(60 seconds)
[network]
idle_timeout_ms = 60_000
Torii
torii.address
required
Address on which Torii Endpoints will be accessible.
- ENV:
API_ADDRESS
- Type: String, socket address (host/IPv4/IPv6 + port)
[torii]
address = "0.0.0.0:8080"
API_ADDRESS="0.0.0.0:8080"
torii.max_content_len
The maximum number of bytes in a raw request body accepted by the Transaction Endpoint.
This limit is used to prevent DOS attacks.
- Type: Number (of bytes)
- Default:
16_777_216
(16 MiB, )
[torii]
max_content_len = 16_777_216
torii.query_idle_time_ms
The time a query can remain in the store if unaccessed.
- Type: Number (of milliseconds)
- Default:
10_000
(10 seconds)
[torii]
query_idle_time_ms = 10_000
torii.query_store_capacity
The upper limit of the number of live queries.
- Type: Number
- Default:
128
[torii]
query_store_capacity = 128
torii.query_store_capacity_per_user
The upper limit of the number of live queries for a single user.
- Type: Number
- Default:
128
[torii]
query_store_capacity_per_user = 128
Sumeragi
sumeragi.trusted_peers
List of predefined trusted peers.
- ENV:
TRUSTED_PEERS
- Type: Array of records with
address
andpublic_key
fields.
[[sumeragi.trusted_peers]]
address = "localhost:1338"
public_key = "ed012067C02E340AADD553BCF7DB28DD1F3BE8BE3D7581A2BAD81580AEE5CC75FEBD45"
[[sumeragi.trusted_peers]]
address = "localhost:1339"
public_key = "ed0120236808A6D4C12C91CA19E54686C2B8F5F3A786278E3824B4571EF234DEC8683B"
[[sumeragi.trusted_peers]]
address = "localhost:1340"
public_key = "ed0120FAFCB2B27444221717F6FCBF900D5BE95273B1B0904B08C736B32A19F16AC1F9"
# Alternative syntax
[sumeragi]
trusted_peers = [
{ address = "localhost:1338", public_key = "ed012067C02E340AADD553BCF7DB28DD1F3BE8BE3D7581A2BAD81580AEE5CC75FEBD45" },
{ address = "localhost:1339", public_key = "ed0120236808A6D4C12C91CA19E54686C2B8F5F3A786278E3824B4571EF234DEC8683B" },
{ address = "localhost:1340", public_key = "ed0120FAFCB2B27444221717F6FCBF900D5BE95273B1B0904B08C736B32A19F16AC1F9" },
]
# as JSON
TRUSTED_PEERS='[{"address":"irohad2:1339","public_key":"ed01204EE2FCD53E1730AF142D1E23951198678295047F9314B4006B0CB61850B1DB10"},{"address":"irohad1:1338","public_key":"ed01209897952D14BDFAEA780087C38FF3EB800CB20B882748FC95A575ADB9CD2CB21D"},{"address":"irohad3:1340","public_key":"ed0120CACF3A84B8DC8710CE9D6B968EE95EC7EE4C93C85858F026F3B4417F569592CE"}]'
sumeragi.debug.force_soft_fork
debug
TODO
- Type: Boolean
- Default:
false
[sumeragi.debug]
force_soft_fork = true
Logger
logger.level
Logging verbosity.
Choose the level that best suits your use case. Refer to Stack Overflow for additional details on how to use different log levels.
- ENV:
LOG_LEVEL
- Type: String, possible values:
TRACE
: All events, including low-level operations.DEBUG
: Debug-level messages, useful for diagnostics.INFO
: General informational messages.WARN
: Warnings that indicate potential issues.ERROR
: Errors that disrupt normal function but allow continued operation.
- Default:
INFO
[logger]
level = "INFO"
LOG_LEVEL="INFO"
logger.format
Logs format.
- ENV:
LOG_FORMAT
- Type: String, possible values: (TODO: describe)
full
compact
pretty
json
- Default:
full
[logger]
format = "json"
LOG_FORMAT="json"
Kura
kura.blocks_in_memory
At most N last blocks will be stored in memory.
Older blocks will be dropped from memory and loaded from the disk if they are needed.
- ENV:
KURA_BLOCKS_IN_MEMORY
- Type: Number
- Default:
128
[kura]
blocks_in_memory = 256
KURA_BLOCKS_IN_MEMORY=256
kura.init_mode
Kura initialisation mode
- ENV:
KURA_INIT_MODE
- Type: String, possible values:
strict
: strict validation of all blocksfast
: Fast initialisation with only basic checks
- Default:
strict
[kura]
init_mode = "fast"
KURA_INIT_MODE="fast"
kura.store_dir
Path[1:2] to the existing block store folder or path to create new folder.
- ENV:
KURA_STORE_DIR
- Type: String, file path[1:3]
- Default:
./storage
(see also:snapshot.store_dir
)
[kura]
store_dir = "/path/to/storage"
KURA_STORE_DIR="/path/to/storage"
kura.debug.output_new_blocks
debug
Flag to enable printing new blocks to console.
- ENV:
KURA_DEBUG_OUTPUT_NEW_BLOCKS
- Type: Boolean
- Default:
false
[kura.debug]
output_new_blocks = true
KURA_DEBUG_OUTPUT_NEW_BLOCKS=true
Queue
queue.capacity
The upper limit of the number of transactions waiting in the queue.
- Type: Number
- Default:
65_536
[queue]
capacity = 1_048_576
queue.capacity_per_user
The upper limit of the number of transactions waiting in the queue for a single user.
Use this option to apply throttling.
- Type: Number
- Default: 65_536
[queue]
capacity_per_user = 1_048_576
queue.transaction_time_to_live_ms
The transaction will be dropped after this time if it is still in the queue.
- Type: Number (of milliseconds)
- Default:
86_400_000
(24 hours)
[queue]
transaction_time_to_live_ms = 43_200_000
Snapshot
This module is responsible for reading and writing snapshots of the World State View.
TODO: explain the purpose of snapshots, file formats, etc
Wipe Snapshots
In case if something is wrong with the snapshots system, and you want to start from a blank page (in terms of snapshots), you could remove the directory specified by snapshot.store_dir
.
snapshot.mode
The mode the Snapshot system functions in.
- ENV:
SNAPSHOT_MODE
- Type: String, possible values:
read_write
: Iroha creates snapshots with a period specified bysnapshot.create_every_ms
. On startup, Iroha reads an existing snapshot (if any) and verifies that it is up-to-date with the blocks storage.readonly
: Similar toread_write
but Iroha doesn't create any snapshots.disabled
: Iroha neither creates new snapshots nor reads an existing one on startup.
- Default:
read_write
[snapshot]
mode = "readonly"
SNAPSHOT_MODE="readonly"
snapshot.create_every_ms
Frequency of snapshots.
- Type: Number (of milliseconds)
- Default:
600_000
(10 minutes)
[snapshot]
create_every_ms = 60_000
snapshot.store_dir
Directory where to store snapshots.
- ENV:
SNAPSHOT_STORE_DIR
- Type: String, file path[1:4]
- Default:
./storage/snapshot
(see also:kura.store_dir
)
[snapshot]
store_dir = "/path/to/storage"
SNAPSHOT_STORE_DIR="/path/to/storage"
Telemetry
TODO
name
and url
must be paired.
All telemetry
section is optional.
telemetry.name
The node's name to be displayed on the telemetry.
- Type: String
[telemetry]
name = "iroha"
telemetry.url
The url of the telemetry. TODO update example value
- Type: String
[telemetry]
url = "ws://substrate.telemetry.iroha"
telemetry.min_retry_period_ms
The minimum period of time to wait before reconnecting.
- Type: Number (of milliseconds)
- Default:
1_000
(1 second)
[telemetry]
min_retry_period_ms = 5_000
telemetry.max_retry_delay_exponent
The maximum exponent of 2 that is used for increasing delay between reconnections.
- Type: Number
- Default:
4
[telemetry]
max_retry_delay_exponent = 4
dev_telemetry.out_file
The filepath to write dev-telemetry to
- Type: String, file path[1:5]
[dev_telemetry]
out_file = "/path/to/file.json"