Launch
In this section we discuss using pendulum-launch to launch a parachain.
The following command details how pendulum-launch is used. The --config
option can be used to set the path of a config file. The --log
option can be used to set an alternate logging directory.
pendulum-launch help
As an example, we might want to launch our parachain as follows ./bin/pendulum-launch --config ./launch-local.json --log ./tmp/local
in order to provide an alternate config and log directory.
Launching a local Pendulum chain
Prerequisites
To launch a local parachain you have to run a multitude of commands.
First, build the parachain-collator binary. From the root directory of your parachain (in this case pendulum) run:
The next steps assume that you are in the root directory of the pendulum-launch repository.
Next, use pendulum-launch to generate the chain specs.
With the chain spec, we can now export the genesis data.
To run our setup we also need to have the binary of the polkadot relay chain. If you don't want to compile it yourself you can download it from the releases page. Make sure you download the relay chain that works for the version of your parachain (i.e. if your parachain uses polkadot-v0.9.17
dependencies, you should also download the corresponding relay chain).
Launch the parachain
Now that we have all the prerequisites we need for running our Pendulum chain, we can use pendulum-launch to simultaneously run our relay-chain collators as well as our parachain validator.
You can find the settings of both collators and validators in the pendulum-launch/config/pendulum-launch.json
file. Check if the paths to the binaries are correct for your local setup. From the root directory of the pendulum-launch repository, run:
Now you just need to register your parachain in the polkadot.js explorer, as is described here. For genesisHead
use the pendulum-launch/specs/local-chain-state
file and for validationCode
use the pendulum-launch/specs/local-chain-wasm
file.
You should see your parachain producing blocks after the onboarding is completed.
Last updated