Examples

All examples are in crates/examples/.

Run Rust examples with cargo run --example <example_name>.

Spawn from config files with zombie-cli spawn -p <provider> <config-file>.


Basic Network Setup

Start here to understand network configuration patterns.

ExampleDescription
simple_network_exampleMinimal relay chain with two validators using TOML config
small_network_with_defaultOverride default command and image for all nodes
small_network_with_base_dirCustom base directory for node data
small_network_configMinimal programmatic configuration

Parachain Lifecycle

Configure, register, and manage parachains.

ExampleDescription
small_network_with_paraBasic relay + parachain topology
register_paraRegister parachain via extrinsic
add_paraAdd parachain to running network
para_upgradeRuntime upgrade on running parachain
two_paras_same_idHandling duplicate parachain IDs

Node Groups

Scale networks with grouped nodes.

ExampleDescription
big_network_with_group_nodesProgrammatic network with grouped nodes
network_example_with_group_nodesTOML config with group nodes

Advanced Configuration

ExampleDescription
resource_limitsCPU and memory limits for containers
wasm-overrideCustom WASM runtime override
arg_removalRemove default CLI arguments
db_snapshotDatabase snapshots for faster init
docker_db_snapshotDB snapshots in Docker environments
raw_spec_overrideOverride raw chain spec fields

Chain Spec Generation

ExampleDescription
chain_spec_generationDynamic chain spec generation
chain_spec_runtime_kusamaKusama with custom runtime WASM
polkadot_people_wasm_runtimePolkadot + People parachain with custom runtimes
genesis_state_generator_exampleCustom genesis state generator

Keys and Security

ExampleDescription
keystore_key_typesKeystore directories and key type validation
chain_spec_key_typesChain spec session key configuration
evm_parachain_session_keyEVM parachain session keys

Network Utilities

ExampleDescription
from_liveAttach to running network via zombie.json
test_run_scriptRun scripts on nodes

Config Files

Example TOML configs are in crates/examples/examples/configs/:

ConfigDescription
simple.tomlBasic two-validator relay chain
simple-group-nodes.tomlRelay chain with node groups
resource_limits.tomlContainer resource limits
wasm-override.tomlWASM runtime override
arg-removal.tomlCLI argument removal
polkadot-ah-chain-spec-runtime.tomlPolkadot + Asset Hub with custom runtimes