Prepare the parachain Collator
Prepare the parachain collator
With the local relay chain running and the raw chain specification for the parachain template updated, you are ready to start the parachain collator node and export information about its runtime and genesis state.
Export the WebAssembly runtime for the parachain. (We continue to use Magnet as an example for this session.)
The relay chain needs the parachain-specific runtime validation logic to validate parachain blocks. You can export the WebAssembly runtime for a parachain collator node by running the following command:
Generate a parachain genesis state.
To register a parachain, the relay chain needs to know the genesis state of the parachain. You can export the entire genesis state—hex-encoded—to a file by running the following command:
You should note that the runtime and state you export must be for the genesis block. You can't connect a parachain with any previous state to a relay chain. All parachains must start from block 0 on the relay chain.
Start the collator node:
Last updated