Running a local relaychain network
Below materials are primarily referenced from: https://hackmd.io/@s_iGZLIITG6WjSgnFX0pcg/the-collator-setup-guide
Before setting up a local relaychain network, walk through these materials:
Prepare a local relaychain: https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/
Connect a local parachain: https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/
Getting Started
Make sure they are compiled based on the same release version. If you want to connect the parachain to an already running Relay chain you can skip the Polkadot steps.
NOTE: Our polkadot version for the binaries is v1.14.0
Build Polkadot:
git clone https://github.com/paritytech/polkadot
cd polkadot
cargo build --releaseBuild Parachain:
git clone https://github.com/paritytech/polkadot-sdk-parachain-template
cd polkadot-sdk-parachain-template
cargo build --releaseGenerate chainspec, runtime wasm, genesis state
Chainspec
Plain:
Important: edit the parachain-chainspec.json where necessary. For example; set the correct para-id, protocolid or relay_chain.
The para-id needs to be reserved on the Relay Chain. Check out the "Connect a local Parachain" tutorial and look for the step "Reserve a unique identifier"
Raw:
Runtime wasm
Required to register the Parachain on the Relay Chain. The Relay Chain needs the runtime code to validate blocks.
Genesis state
Required to register the Parachain on the Relay Chain. Both the Relay Chain and the Parachain need to start from the same starting state.
Last updated