Environment Variables

ZombieNet SDK uses environment variables for configuration overrides, container images, and CI integration.

Container Images

Override default images for Docker and Kubernetes providers:

VariableDefaultDescription
POLKADOT_IMAGEdocker.io/parity/polkadot:latestRelay chain node image
CUMULUS_IMAGEdocker.io/parity/polkadot-parachain:latestParachain collator image
MALUS_IMAGEdocker.io/paritypr/malus:latestMalus (malicious node) image
COL_IMAGEdocker.io/paritypr/colander:latestColander image

Example:

POLKADOT_IMAGE=docker.io/parity/polkadot:v1.5.0 zombie-cli spawn network.toml

Provider Selection

VariableValuesDefaultDescription
ZOMBIE_PROVIDERnative, k8s, dockerdockerDefault provider when not specified

Example:

ZOMBIE_PROVIDER=native zombie-cli spawn network.toml

Spawn Control

VariableDescription
ZOMBIE_SPAWN_CONCURRENCYOverride spawn concurrency (default: 100). Set to lower values for resource-constrained environments.
ZOMBIE_NODE_SPAWN_TIMEOUT_SECONDSOverride per-node spawn timeout in seconds

Example:

ZOMBIE_SPAWN_CONCURRENCY=10 zombie-cli spawn network.toml

CLI-Specific

VariableCommandDescription
POLKADOT_SDK_PATHreproducePath to local polkadot-sdk workspace (required for reproduce)
RUST_LOGAllLogging level (debug, info, warn, error)

Other

VariableDescription
ZOMBIE_RM_TGZ_AFTER_EXTRACTRemove tgz archives after extraction (used for db snapshot extraction)

TOML Template Replacement

Environment variables can be referenced in TOML configuration files using {{VAR_NAME}} syntax:

[relaychain]
default_image = "{{POLKADOT_IMAGE}}"

[[relaychain.nodes]]
name = "alice"
image = "{{CUSTOM_NODE_IMAGE}}"

Any environment variable can be substituted. If the variable is not set, the placeholder remains unchanged.


Runtime Token Replacement

For dynamic values from running nodes, use {{ZOMBIE:node_name:field}} syntax in node arguments:

[[relaychain.nodes]]
name = "bob"
args = ["--sync-target", "{{ZOMBIE:alice:multiaddr}}"]

Available fields:

FieldAliasesDescription
multiaddrmultiAddressNode's libp2p multiaddress
ws_uriwsUriWebSocket RPC endpoint
prometheus_uriprometheusUriPrometheus metrics endpoint

When using token replacement, spawn concurrency is automatically set to 1 (serial) to ensure dependencies are resolved correctly.