How to launch the Robonomics collator
Currently the Robonomics network is primarily maintained by the initial developers, but anyone can support the project. Every additional full node of the blockchain helps it to become more sustainable and fault tolerant. Robonomics node binaries are available in release assets or it can be built from source.
What is a collator
A Collator is part of the Robonomics parachain. This type of node creates new blocks for the Robonomics chain.
Collators maintain parachains by collecting parachain transactions from users and producing state transition proofs for Relay Chain validators. In other words, collators maintain parachains by aggregating parachain transactions into parachain block candidates and producing state transition proofs for validators based on those blocks.
You can learn more about collators on the related Polkadot wiki page
In the Robonomics parachain every collator gets rewards of (0.001598184 XRT) for every block that the collator builds (rewards occur when blocks are sealed to the chain).
Also the collator that builds the block gets 50% of transactions fees contained within the block they create.
Requirements
It is recommended that you launch a collator using the standard hardware requirements for Polkadot validators:
- x86-64 compatible.
- Intel Ice Lake, or newer (Xeon or Core series); AMD Zen3, or newer (EPYC or Ryzen).
- 4 physical cores @ 3.4GHz.
- Simultaneous multithreading disabled (Hyper-Threading on Intel, SMT on AMD).
- Storage - An NVMe SSD of 1 TB (As it should be reasonably sized to deal with blockchain growth).
- Memory - 32 GB DDR4 ECC
In this article we use next specifications:
- 4 vCPU
- 700 GB of NVMe space for collator’s databases. The ability to expand this disk space is required.
- 8GB RAM
Important information
We use some variables in these instructions, and you’ll need to replace the values for your own in all the commands:
- %NODE_NAME% is the node name. Example: my-robonomics-kusama-collator
- %BASE_PATH% is the path to mounted volume. Example: /mnt/HC_Volume_16056435/
- %POLKADOT_ACCOUNT_ADDRESS% is the account address in the Polkadot ecosystem in SS58 format. Example: 4Gp3QpacQhp4ZReGhJ47pzExQiwoNPgqTWYqEQca9XAvrYsu
Note that you need to include –state-cache-size=0 in the collator’s service launch. This parameter is important for the stability of the collator.
You can see more info in the related issue on github.
First time easily launch a Robonomics collator
You can easily launch a collator directly in the command line to check for errors.
After doing this it is strongly recommended to launch the Robonomics collator as a service (watch next step).
root@robokusama-collator-screencast:~# robonomics \
--parachain-id=2048 \
--name="%NODE_NAME%" \
--validator \
--lighthouse-account="%POLKADOT_ACCOUNT_ADDRESS%" \
--telemetry-url="wss://telemetry.parachain.robonomics.network/submit/ 0" \
--base-path="%BASE_PATH%" \
--state-cache-size=0 \
-- \
--database=RocksDb
Launch the Robonomics collator as a service
Create the user for the service with home directory
root@robokusama-collator-screencast:~# useradd -m robonomics
Download, extract and move the Robonomics binary to the /usr/local/bin/ directory. You need to replace $ROBONOMICS_VERSION with the current version of Robonomics in the commands in this section. You can find the current version on the Releases page of the Robonomics repository on github.
root@robokusama-collator-screencast:~# wget https://github.com/airalab/robonomics/releases/download/v$ROBONOMICS_VERSION/robonomics-$ROBONOMICS_VERSION-x86_64-unknown-linux-gnu.tar.gz root@robokusama-collator-screencast:~# tar -xf robonomics-$ROBONOMICS_VERSION-x86_64-unknown-linux-gnu.tar.gz root@robokusama-collator-screencast:~# mv robonomics /usr/local/bin/
Create the systemd service file named robonomics.service:
root@robokusama-collator-screencast:~# nano /etc/systemd/system/robonomics.service
And add the following lines in the service file:
[Unit] Description=robonomics After=network.target [Service] User=robonomics Group=robonomics Type=simple Restart=on-failure ExecStart=/usr/local/bin/robonomics \ --parachain-id=2048 \ --name="%NODE_NAME%" \ --validator \ --lighthouse-account="%POLKADOT_ACCOUNT_ADDRESS%" \ --telemetry-url="wss://telemetry.parachain.robonomics.network/submit/ 0" \ --base-path="%BASE_PATH%" \ --state-cache-size=0 \ --execution=Wasm \ -- \ --database=RocksDb \ --execution=Wasm [Install] WantedBy=multi-user.target
root@robokusama-collator-screencast:~# chown -R robonomics:robonomics %BASE_PATH%
Save this file, then enable and start the service:
root@robokusama-collator-screencast:~# systemctl enable robonomics.service root@robokusama-collator-screencast:~# systemctl start robonomics.service
Telemetry url: https://telemetry.parachain.robonomics.network/#/Robonomics
Collators logs can be monitored with: journalctl -u robonomics.service -f
Once the Robonomics collator is launched it will begin to sync with the Kusama Relay Chain, this can take a considerable amount of time, depending on your network speed and system specifications, so we recommend to download a Kusama snapshot.
Speeding up the sync process using a Kusama snapshot
We recommend to do this immediately after you’ve created and started the Robonomics service. You can find more info about snapshots and usage instructions on the following page: https://ksm-rocksdb.polkashots.io/
Instructions:
Stop the Robonomics service and remove the current Kusama database directory:
root@robokusama-collator-screencast:~# systemctl stop robonomics.service root@robokusama-collator-screencast:~# rm -rf %BASE_PATH%/polkadot/chains/ksmcc3/db/
Download the actual snapshot and extract it:
root@robokusama-collator-screencast:~# wget https://ksm-rocksdb.polkashots.io/snapshot -O kusama.RocksDb.tar.lz4 root@robokusama-collator-screencast:~# lz4 -c -d kusama.RocksDb.tar.lz4 | tar -x -C %BASE_PATH%/polkadot/chains/ksmcc3
You can remove the downloaded archive after succesful unpacking:
root@robokusama-collator-screencast:~# rm -v kusama.RocksDb.tar.lz4
Setting the right ownership for the database folder:
root@robokusama-collator-screencast:~# chown -R robonomics:robonomics %BASE_PATH%/polkadot/chains/ksmcc3
Start the Robonomics service again:
root@robokusama-collator-screencast:~# systemctl start robonomics.service
Check service logs:
root@robokusama-collator-screencast:~# journalctl -u robonomics.service -f
Troubleshooting
Error: “State Database error: Too many sibling blocks inserted”
For fix this error you can just launch your collator in archive mode:
First, need to stop the Robonomics service:
root@robokusama-collator-screencast:~# systemctl stop robonomics.service
Then add the parameter
--state-pruning=archive
to the parachain part of the service file. Example of the edited service file:[Unit] Description=robonomics After=network.target [Service] User=robonomics Group=robonomics Type=simple Restart=on-failure ExecStart=/usr/local/bin/robonomics \ --parachain-id=2048 \ --name="%NODE_NAME%" \ --validator \ --lighthouse-account="%POLKADOT_ACCOUNT_ADDRESS%" \ --telemetry-url="wss://telemetry.parachain.robonomics.network/submit/ 0" \ --base-path="%BASE_PATH%" \ --state-cache-size=0 \ --execution=Wasm \ --state-pruning=archive \ -- \ --database=RocksDb \ --execution=Wasm [Install] WantedBy=multi-user.target
Reload the systemd manager configuration:
root@robokusama-collator-screencast:~# systemctl daemon-reload
Remove the exists parachain database:
root@robokusama-collator-screencast:~# rm -rf %BASE_PATH%/chains/robonomics/db/
Start the robonomics service:
root@robokusama-collator-screencast:~# systemctl start robonomics.service
After that need to wait for the synchronization of the parahain database.
Error: “cannot create module: compilation settings are not compatible with the native host”
This error related to the virtualization parameters. Need to use “host-model” type of the emulated processor. You can set up this on the virtualisation host.
But, if you catch this error on any hosting, you need to ask the technical support about this problem only.
Couldn't complete
It was hard
It was ok
It was easy
Make a contribution
Robonomics wiki is open source. See something that's wrong or unclear? Submit a pull request.