You can add the parachains to the paras
field in your chain-spec. For doing this you can follow this steps:
- Create the chain-spec in plain text
`polkadot build-spec --chain rococo-local --disable-default-bootnode
rococo-local-plain.json`
(I will use rococo-local as chain)
- Edit this file and add your
para
into paras
field, with this format
paras: [
[ <para_id>, [<para_head>,<para_wasm>, true]
]
Where:
para_id
: is your parachain id.
para_head
: you can get it running polkadot-parachain export-genesis-state
para_wasm
: you can get it running polkadot-parachain export-genesis-wasm
And the last param (true
) is to set the as parachain.
You need then to get the raw
file from your edited plain file
polkadot build-spec --chain ./rococo-local-plain.json --disable-default-bootnode --raw > ./rococo-local-raw.json
Then you can start your relay-chain nodes using this chain-spec (rococo-local-raw.json
).
You need to start a collator of your parachain, using this chain-spec for the relay-chain and you can use one of the dev accounts for the collator. For example --alice
You can follow this tutorial to get the step-by-step instructions.
Also, this could be handled easily by zombienet and get your network running in one of the available providers (native, podman or kubernetes). Please, let me know if you have questions about zombienet and I can help you.