---
# System prepended metadata

title: 'Spawn polkadot/kusama [-local] runtimes with zombienet'
tags: [zombienet]

---

# Spawn polkadot/kusama [-local] runtimes with zombienet

Since the movement of the polkadot/kusama runtimes to the [fellowship repo] the node from the [polkadot-sdk] can not be used to generate the _chain-spec_ (of this runtimes) anymore. But, you can still using zombienet to spawn ephemeral networks using those runtimes with a few changes in the network definition file and using the  new [chain-spec-generator] from the [fellowship repo].

## Steps [zombienet v1](https://github.com/paritytech/zombienet)

#### Compile the chain-spec-generator
- Clone the [fellowship repo]
- Compile the new tool
    
    ```bash
    cargo build --release --features fast-runtime -p chain-spec-generator
     ```
     
*Note*: We are using `--features fast-runtime` to compile the runtime with smaller epoch time.


#### Change configuration to use the `chain_spec_command` field

The `chain_spec_command` field allow to set the command that zombienet will be use for generate the plain chain-spec and then the _raw_ version. As example of how to set it:
```toml
[relaychain]
default_command = "./bin/polkadot"
default_args = [ "-lparachain=debug", "-lxcm=trace" ]
chain = "kusama-local"
chain_spec_command = "./bin/chain-spec-generator {% raw %} {{chainName}} {% endraw %}"

    [[relaychain.nodes]]
    name = "alice"

    [[relaychain.nodes]]
    name = "bob"

    [[relaychain.nodes]]
    name = "charlie"

    [[relaychain.nodes]]
    name = "dave"

[[parachains]]
id = 1000
chain = "asset-hub-kusama-local"
chain_spec_command = "./bin/chain-spec-generator {% raw %} {{chainName}} {% endraw %}"

    [[parachains.collators]]
    name = "collator1"
    command = "./bin/polkadot-parachain"
    args = [ "-lxcm=debug" ]
```

**Notes**: 


- In this example all the binaries are in the `bin` directory and we are using a relative path to the them.

- The expresion `{% raw %} {{chainName}} {% endraw %}` is part of the internal templating language that zombienet use, and the `{{chainName}}` will be replaced with the correct name at runtime.
    


     





[fellowship repo]:(https://github.com/polkadot-fellows/runtimes/)
[polkadot-sdk]:(https://github.com/paritytech/polkadot-sdk)
[chain-spec-generator]:(https://github.com/polkadot-fellows/runtimes/tree/main/chain-spec-generator)
