Install polkadot-launch.
## Manual
git clone https://github.com/paritytech/polkadot-launch.git
cd polkadot-launch
yarn global add file:$(pwd)
## Automatic
yarn global add polkadot-launch
Compile and install polkadot.
git clone [email protected]:paritytech/polkadot.git
cd polkadot
git checkout release-v0.9.16
cargo build --release
sudo cp ./target/release/polkadot /usr/local/bin/
Compile and install the parachain.
git clone [email protected]:interlay/interbtc.git
cd interbtc
cargo build --release --bin interbtc-parachain --features rococo-native
sudo cp ./target/release/interbtc-parachain /usr/local/bin/
Run polkadot-launch. We provide two configurations: one to start a single parachain, and one that sets up two parachains that can be used for testing xcm communication.
polkadot-launch ./docs/rococo-local-xcm.json
# or..
polkadot-launch ./docs/rococo-local.json
Compile and install polkadot as above.
# Generate chain spec
polkadot build-spec --chain rococo-local --disable-default-bootnode --raw > rococo-local.json
# Run 1st validator
polkadot --chain rococo-local.json --alice --tmp --discover-local
# Run 2nd validator
polkadot --chain rococo-local.json --bob --tmp --discover-local --port 30334
Compile and install the parachain as above.
# Export the chain spec
interbtc-parachain build-spec --chain rococo-local-2000 --raw > rococo-spec.json
# Export genesis state (using reserved paraid)
interbtc-parachain export-genesis-state --chain rococo-spec.json > genesis-state
# Export genesis wasm
interbtc-parachain export-genesis-wasm --chain rococo-spec.json > genesis-wasm
# Run parachain collator
interbtc-parachain \
--alice \
--collator \
--force-authoring \
--chain=rococo-spec.json \
--port 40335 \
--ws-port 9946 \
--discover-local \
--tmp \
--execution wasm \
-- \
--execution wasm \
--chain rococo-local.json \
--port 30335 \
--discover-local
To register the parachain, you can use the Polkadot JS Apps UI.
Before sending messages between parachains you must first establish a channel.
Add the types to the developer settings if the app fails to decode any responses.
By default the lease period of the parachain is a bit more than 1 day. For a longer running test network, we want to have longer lease periods otherwise the parachain is demoted to a parathread after 1 day.
Use sudo to extend the lease period: