Robonomics parachain is not a general purpose parachain on Polkadot ecosystem. The target of Robonomics is building economy of machines, the parachain in this scope of aims helps to integrate Polkadot ecosystem with IoT, Smart Cities and Industry 4.0 concepts.
- Docker, please install it.
- Polkadot-launch, please install it (optionally, if you don't want to use docker).
Launch the relay
The relay chain is a core of Polkadot, it provides shared security for all child parachains and implements message passing mechanics for them. Let's launch local instance of Rococo (polkadot testnet) relay chain with two robonomics-based parachains as a childs. I'll use prepared Docker image tag: "winter-school-2" but all source code of examples available in Robonomics GitHub.
docker run -ti --rm --network host robonomics/robonomics:winter-school-2 bash cd polkadot-launch/ ./launch.sh
It could take a time, but be partient. As result you should have three chain instances at ports:
9944- local rococo relay chain.
9988- robonomics parachain with
9989- robonomics parachain with
If you use remote server, you need to create some ssh tunnels on local machine:
ssh -f -N -L 9944:127.0.0.1:9944 root@REMOTE_SERVER_IP ssh -f -N -L 9988:127.0.0.1:9988 root@REMOTE_SERVER_IP ssh -f -N -L 9989:127.0.0.1:9989 root@REMOTE_SERVER_IP
After that, you can use
ws://127.0.0.1:9944 for relay chain,
ws://127.0.0.1:9989 for parachains in https://parachain.robonomics.network/
Some time ago parachains should be registered.
And start to produce blocks.
As next step let's create HRMP channel to pass messages between parachains. I'll use
sudo module call on relay chain page.
When channel created, the XCM calls is available. Let's use
datalogXcm pallet - a XCM version of
datalog pallet in first parachain.
As result message on second parachain will call
datalog pallet and write data on chain.
As result, this example demonstrate how XCM could be used for cross chain usage of standard robonomics pallets.