Node

Validators, full nodes, and collators share this configuration.

TOML

[[relaychain.nodes]]
name = "alice"
command = "polkadot"
# subcommand = "node"  # Optional: for nested CLI commands
image = "parity/polkadot:latest"
invulnerable = true
bootnode = false
initial_balance = 5000000000000
args = ["-lruntime=debug"]
env = [
    { name = "RUST_LOG", value = "info" }
]

# Networking
rpc_port = 9933
prometheus_port = 9615
p2p_port = 30333
# p2p_cert_hash = "..."  # Optional: libp2p WebRTC cert hash
bootnodes_addresses = ["/ip4/127.0.0.1/tcp/30333/p2p/12D3KooW..."]

# Storage & Keys
db_snapshot = "/path/to/snapshot.tar.gz"
keystore_path = "/path/to/keystore"
keystore_key_types = ["aura", "gran"]
# override_eth_key = "0x..."  # Optional: override EVM session key
node_log_path = "/tmp/alice.log"

# Resources (for container providers)
[relaychain.nodes.resources]
request_memory = "1Gi"
request_cpu = "500m"
limit_memory = "2Gi"
limit_cpu = "1000m"

Builder

#![allow(unused)]
fn main() {
.with_validator(|node| {
    node.with_name("alice")
        .with_command("polkadot")
        .with_image("parity/polkadot:latest")
        .invulnerable(true)
        .with_args(vec!["-lruntime=debug".into()])
        .with_env(vec![("RUST_LOG".into(), "info".into())])
        .with_resources(|r| {
            r.with_request_memory("1Gi").with_limit_memory("2Gi")
        })
})
}

Reference

OptionTypeDefaultDescription
nameStringRequired. Unique node name
commandStringInheritedBinary command to execute
subcommandStringOptional subcommand (e.g., for nested CLI)
imageStringInheritedContainer image
argsArrayCLI arguments
envArrayEnvironment variables as {name, value} pairs
validatorBooleantrueWhether node is a validator/authority
invulnerableBooleantrueAdd to invulnerables set in genesis
bootnodeBooleanfalseWhether node acts as a bootnode
initial_balanceNumber2000000000000Initial account balance (alias: balance)
rpc_portNumberAutoRPC port
prometheus_portNumberAutoPrometheus metrics port
p2p_portNumberAutoP2P networking port
p2p_cert_hashStringlibp2p WebRTC certificate hash
bootnodes_addressesArrayAdditional bootnode addresses
db_snapshotStringDatabase snapshot path/URL
keystore_pathStringCustom keystore directory
keystore_key_typesArrayKey types to generate in keystore (e.g., aura, gran, babe)
chain_spec_key_typesArraySession key types to inject into chain spec genesis
override_eth_keyStringOverride auto-generated EVM session key
node_log_pathStringPath for node log file
resourcesObjectResource limits (see below)

Node Groups

Define multiple nodes with the same configuration. Creates validator-0, validator-1, etc.

TOML

[[relaychain.node_groups]]
name = "validator"
count = 5
command = "polkadot"

Builder

#![allow(unused)]
fn main() {
.with_relaychain(|r| {
    r.with_chain("rococo-local")
        .with_default_command("polkadot")
        .with_node_group(|g| {
            g.with_base_node(|node| {
                node.with_name("validator")
                    .with_args(vec!["-lruntime=debug".into()])
            })
            .with_count(5)
        })
})
}

Resources

For container providers (Docker, Podman, Kubernetes).

[relaychain.default_resources]
request_memory = "1Gi"
request_cpu = "500m"
limit_memory = "2Gi"
limit_cpu = "1000m"

Reference

OptionTypeDescription
request_memoryStringRequested memory (e.g., 512Mi, 1Gi)
request_cpuStringRequested CPU (e.g., 250m, 1)
limit_memoryStringMemory limit
limit_cpuStringCPU limit