How to build collator node from source
What is a collator
Collator is part of the Robonomics parachain. This nodes type creates new blocks for 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 collator on the related Polkadot wiki page
In the Robonomics parachain every collator get rewards (0.000380520 XRT) for every block it built, if this block was sealed to the chain.
Also collator get 50% transactions fees from this block.
Building process
Ensure you have Rust and the support software installed. The Rust installer will ask you about current installation options, you should choose the 1) Proceed with installation (default)
option.
curl https://sh.rustup.rs -sSf | sh
# on Windows download and run rustup-init.exe
# from https://rustup.rs instead
source $HOME/.cargo/env
Install the required nightly toolchain and wasm target.
Next commands actual for Robonomics v2.6.0:
rustup install nightly-2022-08-05
rustup default nightly-2022-08-05
rustup target add wasm32-unknown-unknown --toolchain nightly-2022-08-05
You will also need to install the following packages:
- Linux:
sudo apt install cmake git clang libclang-dev
- Mac:
brew install cmake pkg-config git llvm
- Windows (PowerShell):
# Install git https://git-scm.com/download/win
# Install LLVM
# Download and install the Pre Build Windows binaries
# of LLVM from http://releases.llvm.org/download.html
Now you can install the robonomics node from git source.
cargo install --force --git https://github.com/airalab/robonomics --tag v2.6.0 robonomics-node
After this command the compiled robonomics binary will be in ~/.cargo/bin
directory.
The next step is how to launch the collator node. You can read about it in the “How to launch the Robonomics collator” article.
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.