Running a Validator or RPC Node
Last updated
Last updated
This guide will instruct you how to set up a CLV validator node on CLV networks (Testnet/Sakura/Mainnet).
Running a validator is a serious thing, you have a lot of responsibility for the staked tokens of you and nominators. You take the risk of losing your staked tokens, as a slash might happen if your validator node is not properly configured. Please make sure you or your team have the necessary knowledge to run a validator node.
Polkadot Wiki has an awesome introduction of running a validator node on the Polkadot network. As a member of the Polkadot ecosystem, CLV follows the similar process to run and set up a validator node. We may skip some basics steps in this tutorial.
CPU - Recent released high-end CPU, e.g., Intel Core i7-10700/AMD Ryzen 7 5800X or above
Memory - 32 GB for Testnet, 64 GB for Sakura and Mainnet.
Storage - 300 GB SSD, Storage usage could increase by time, you might need to increase the capacity as the chain data grows.
OS: Linux, Debian/Ubuntu LTS distributions are recommended.
We'll use docker and docker-compose to run the validator in this guide. You need to install docker and docker-compose firstly. Please follow the installation guide in the docs.
Below ports need to be exposed:
30333 - The p2p port of the chain
Create the config and data directories using the below command:
sudo mkdir -p /opt/data/
sudo mkdir -p /opt/compose/
# secure the data access
sudo chmod 0700 /opt/data
sudo chmod 0700 /opt/compose
Currently, we only have CLV Testnet (iris) and CLV Mainnet (ivy) launched. CLV Testnet opens for validators to join. CLV Mainnet operates in the POA mode and maintained by 6 nodes belongs to CLV foundation.
Validator Configuration for CLV Mainnet will be updated later once it's ready for staking and validators can join.
Create /opt/compose/docker-compose.yaml
and set the content as below:
version: "3.8"
services:
clover-validator:
image: "cloverio/clover-ivy:0.1.23"
restart: always
command:
- /opt/clover/bin/clover
- --chain
- /opt/specs/clover-ivy.json
- --base-path
- /opt/chaindata
- --validator
- --name
- πclover-validatornode
- --port
- "30333"
- --ws-port
- "9944"
- --rpc-port
- "9933"
- --rpc-cors=all
- --execution
- wasm
- --wasm-execution
- compiled
ports:
- "30333:30333"
- "9933:9933"
- "9944:9944"
volumes:
- /opt/data/clover:/opt/chaindata
Use below command to bring up the validator node:
cd /opt/compose # goto the compose file directory
docker-compose up # bring up the validator node in the foreground
## check whether the node starts up normally
## Ctrl-C stop the node
docker-compose up -d # start the validator node in the daemon mode.
You need to check the node logs using docker-compose logs
command. Wait until the node is synced and the block numbers syncs with the latest number on the chain.
Checkout Staking documentation.
Checkout Polkadot Session Keys documentation.
Checkout Polkadot Validate documentation.
Below are several docker compose file templates for ClV networks.
version: "3.8"
services:
clover-rpc:
image: 'cloverio/clover-ivy:0.1.23'
restart: always
environment:
ARGS: "--base-path /opt/chaindata --chain /opt/specs/clover-ivy.json --port 30333 --ws-port 9944 --rpc-port 9933 --pruning archive --name ivy-a-rpc4 --rpc-cors=all --ws-max-connections 5000 --ws-external --rpc-external --wasm-execution compiled"
ports:
- "9933:9933"
- "9944:9944"
- "30333:30333"
- "9615:9615"
volumes:
- /opt/data/chains/ivy:/opt/chaindata
- /opt/data/config:/opt/config