Local relay chain setup
Prerequisites
First, clone the polkadot repository:
git clone https://github.com/paritytech/polkadot.gitThen, download the raw raw-local-chainspec.json chain-spec file here and put it in the root of the cloned polkadot repository.
At the time of writing this, the Pendulum parachain is using Polkadot dependencies of version v0.9.29. So for compatibility purposes, you need to check out the respective branch before building the node.
# Checkout correct branch
git checkout release-v0.9.29
# Build polkadot node
cargo build --releaseRunning the relay chain validators
From inside the cloned polkadot repository (after building the node):
Run relay-chain validator 1
./target/release/polkadot \
--alice \
--validator \
--base-path /tmp/relay/alice \
--chain ./raw-local-chainspec.json \
--port 30333 \
--ws-port 9944If you ran this validator before and you would like to start afresh from genesis, then you would need to remove the folder /tmp/relay first (and similarly for the following validator and collator nodes in this tutorial).
Check the logs for the node identity of Alice (see line 4) and copy it to your clipboard
Run relay-chain validator 2 (with copied node ID)
Last updated
Was this helpful?