Schema

This is an example configuration file for dolos:

[upstream]
peer_address = "preprod-node.world.dev.cardano.org:30000"
network_magic = 1
is_testnet = true
 
[storage]
path = "data"
 
[genesis]
byron_path = "byron.json"
shelley_path = "shelley.json"
alonzo_path = "alonzo.json"
 
[sync]
pull_batch_size = 100
 
[submit]
prune_height = 200
 
[serve.grpc]
listen_address = "[::]:50051"
 
[serve.ouroboros]
listen_path = "dolos.socket"
magic = 1
 
[relay]
listen_address = "[::]:30031"
magic = 1
 
[mithril]
aggregator = "https://aggregator.release-preprod.api.mithril.network/aggregator"
genesis_key = "5b3...45d" # redacted
 
[logging]
max_level = "INFO"
include_pallas = false
include_grpc = false

Each section of the toml controls a different aspect of Dolos' processes. The rest of this document describes in detail each of these sections.

upstream section

The upstream section defines how to connect to the Ouroboros network to synchronize the chain and to submit transactions.

propertytypeexample
peer_addressstring"preprod-node.world.dev.cardano.org:30000"
network_magicinteger1
is_testnetbooleantrue
  • peer_address: network address of peer node using {host}:{port} syntax.
  • network_magic: the magic number of the network we're connecting to.
  • is_tesnet: flag to indicate if this network is a testent or not.

storage section

The storage section controls how Dolos stores data in the local file system. This includes immutable chain blocks, the write ahead log and the ledger state.

propertytypeexample
pathstring"./data"
wal_sizeinteger1000
  • path: is the root directory where all data will be stored.
  • wal_size: is the max number entries (chain events) to keep in the write-ahead-log.

genesis section

Dolos requires Cardano genesis data to operate. For simplicity sake, we've decided to follow the schema for the existing .json files used by the Haskell node. The genesis section indicates how to locate the different json files with genesis data for each required era. The content of the json files should match the ones used in the Haskell node.

propertytypeexample
byron_pathstring"./byron.json"
shelley_pathstring"./shelley.json"
alonzo_pathstring"./alonzo.json"
  • byron_path: file path to the Byron json genesis file
  • shelley_path: file path to the Shelley json genesis file
  • alonzo_path: file path to the Alonzo json genesis file

sync section

The sync section controls how Dolos synchronizes the chain from upstream peers. This involves fetch a batch of blocks from the upstream node and updating the corresponding local storage.

propertytypeexample
pull_batch_sizeinteger200
keep_historybooleantrue
  • pull_batch_szie: the number of blocks that are fetched per batch.
  • keep_history: flag to indicate wether the block history should be kept.

submit section

The submit section controls how Dolos submit transactions to the network. This involves maintaining a mempool of txs and sharing them with the upstream node.

propertytypeexample
prune_heightinteger60
  • prune_height: the number of stacked blocks since the tx to be considered safe for pruning.

serve.grpc section

The serve.grpc section controls the options for the gRPC endpoint that can be used by clients.

propertytypeexample
listen_addressstring"[::]:50051"
  • listen_address: the local address (IP:PORT) to listen for incoming gRPC connections ([::] represents any IP address).

serve.ouroboros section

The serve.ouroboros section controls the options for the Ouroboros mini-protocols endpoint that can be used by clients.

propertytypeexample
listen_pathstring"dolos.socket"
  • listen_path: the file path for the unix socket that will listen for Ouroboros node-to-client mini-protocols.

relay section

The relay section controls the options for handling inbound connection from other peers through Ouroboros node-to-node miniprotocols.

propertytypeexample
listen_addressstring"[::]:50051"
  • listen_address: the local address (IP:PORT) to listen for incoming Ouroboros connections ([::] represents any IP address).

logging section

The logging section controls the logging options to define the level of details to output.

propertytypeexample
max_leveloption"debug" / "info" / "warn" / "error"
include_pallasoptionwheter to include logs from the Pallas library
include_tonicoptionwheter to include logs from the Tonic library