CLV Documentations
CLV DOC
CLV DOC
  • Intro to CLV
    • About CLV πŸ€
    • Clover Finance Rebrands to CLV
    • What is CLV Chain?
    • What is CLV Wallet?
    • What is $CLV Token?
    • πŸ“£ CLV Official Channels
    • 🏘 CLV Community Channels
  • Use CLV Chain
    • πŸ“š Beginner’s Guide
      • Setup CLV Wallet
      • Setup Metamask Wallet
      • How to Get $CLV
      • Bridge Other Assets to CLV P-Chain (Parachain)
    • 🌐 Network Details
    • 🏦 Economics
      • Tokenomics
      • Inflation Design
    • πŸ—³οΈGovernance
    • πŸ™‹πŸ» CLV Chain FAQ
    • CLV P-Chain EVM Explorer
    • $CLV Cross-Chain Explorer
    • $CLV Cross-Chain Transfer
  • CLV Validator & Staking
    • What are Nominator & Validator?
    • Stake as a Nominator
    • Running a Validator or RPC Node
    • Staking FAQ
  • Use CLV Wallet
    • πŸ’° Download CLV Wallet
      • Browser Extension (Google Chrome & Brave)
      • Apple iOS (Mobile)
      • Android (Mobile)
      • Web Wallet (Universal)
    • πŸ“± CLV Mobile Wallet
    • πŸ–₯ CLV Extension Wallet
    • πŸ•ΈοΈ CLV Web Wallet
  • CLV Chain Developer Guide
    • Getting Started
    • Using Local Node
      • Using MetaMask
      • Using Remix
      • Using Web3.js
    • Using Testnet
      • Create an account
      • Faucet
      • Run a Testnet Node
      • Connect to Testnet
    • dApp Example
      • Setup dApp project
      • Setup truffle
      • The Counter Contract
      • Deploy Contract
      • Counter Webapp
    • Test Cases
    • Technical Documentations
      • CLV EVM
      • Developers Incentive
      • CLV Accounts Binding
      • Virtual Ethereum Address Binding
      • Query Balance
      • Transaction Finality
      • Web3 Compatibility
        • eth_protocolVersion
        • eth_syncing
        • eth_hashrate
        • eth_coinbase
        • eth_mining
        • eth_chainId
        • eth_gasPrice
        • eth_accounts
        • eth_blockNumber
        • eth_getBalance
        • eth_getStorageAt
        • eth_getBlock
        • eth_getTransactionCount
        • eth_getBlockTransactionCount
        • eth_getBlockUncleCount
        • eth_getCode
        • eth_sendTransaction
        • eth_sendSignedTransaction
        • eth_call
        • eth_estimateGas
        • eth_getTransaction
        • eth_getTransactionByBlockHashAndIndex
        • eth_getTransactionByBlockNumberAndIndex
        • eth_getTransactionReceipt
        • eth_getUncle
        • eth_getLogs
        • eth_getWork
        • eth_submitWork
        • eth_submitHashrate
        • eth_subscribe
        • eth_unsubscribe
        • net_version
        • net_peerCount
        • net_listening
        • web3_clientVersion
        • web3_sha3
      • CLV P-Chain Integration
  • CLV Wallet Developer Guide
    • EVM dApp Integration
    • Substrate dApp Integration
    • Solana dApp Integration
    • Kadena dApp Integration
    • Aptos dApp Integration
    • Web Wallet dApp Integration
    • dApp Interaction Protocol
    • Wallet Integration QA
  • CLV Ecosystem
    • 🏞️ Ecosystem Partners
      • CLV Chain
      • CLV Wallet
    • 🌱 Incentive Programs
      • CLV Ecosystem Grant
      • CLV Wallet Integration Grant
      • CLV Bug Bounty Program
    • Whitelist Assets on Clover P-Chain
    • Bridge assets into CLV P-Chain
  • Assets
    • πŸ”€ Glossary
      • Blockchain (in General)
      • Polkadot
      • Wallet
    • 🎟️ CLV - Polkadot Parachain Auction 2021
      • Parachain Auction Rule Announcement
      • Parachain Winning Reward Announcement
    • πŸ›οΈ Brand Pack
    • πŸ“„ Whitepaper
Powered by GitBook
On this page
  1. CLV Validator & Staking

Running a Validator or RPC Node

PreviousStake as a NominatorNextStaking FAQ

Last updated 2 years ago

This guide will instruct you how to set up a CLV validator node on CLV networks (Testnet/Sakura/Mainnet).

Must Read Before Start…

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.

has an awesome introduction of running a validator node on the . 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.

Hardware Requirements

  • 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.

Prepare Environment

We'll use and to run the validator in this guide. You need to install docker and docker-compose firstly. Please follow the installation guide in the docs.

We're using docker to simplify the setup process. You can use the tools which you're familiar with.

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

You can edit the docker-compose.yaml and include your customizations by updating below arguments:

  • image: the docker image used to launch the node, for CLV mainnet, use cloverio/clover-ivy:0.1.16.For a full list of clover networks please check out the CLV Network List page.

  • --name: The node name of your validator, the name could be found in the telemetry node list.

  • --unsafe-rpc-external: You might need this flag to call the author_rotateKeys api, make sure to remove this flag later on for better security.

  • Ensure enable the --exeuction wasm flag, This is required for all validator nodes.

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.

CLV Foundation provides the RPC services for the public. Sometimes it's necessary to run a self hosted CLV RPC service if the public services can't satisfy your needs.

With a self hosted CLV RPC service you could gain below benefits:

  • Faster access speed - a Self-hosted RPC node could provide better performance

  • Better security - transactions could be sent to to the self-hosted RPC server instead of the public service.

  • Better Availability

CLV is a fully decentralized network, anyone can setup a CLV node by following this tutorial!

Generally speaking, there are two kind of RPC nodes:

  • Archive node An archive node keeps all the past blocks data. And client can't query data in any of the past blocks.

  • Full node A full is node is pruned. which means it keeps only a few of the past blocks data (256 by default, which could be adjusted using the --pruning command line arguments.

An archive nodes consumes much more disk spaces it stores more data than a full node. You need to take the decision based on your business model and requirements. E.g. block explorer and historical analysis tools normally requires an archive node to query the full historical data. Wallets on the other hand normally only requires a full node to be able to query the current state(e.g. the balance of an account) and submit transactions to the CLV Network.

  • CPU - Recent released high end cpu, e.g. Intel Core i7-10700/AMD Ryzen 7 5800X or above

  • Memory - 32GB for Testnet, 64GB for Sakura and Mainnet.

  • Storage - 300GB 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.

Prepare Environment

We're using docker to simplify the setup process. You can use the tools which you're familiar with.

Below ports need to be exposed:

  • 30333 - The p2p port of the chain

  • 9933 - The http endpoint of the RPC service

  • 9944 - The websocket endpoint of the RPC service.

You may not expose 9933/9944 ports directly. Instead a reverse proxy server could be setup in front and proxy requests to the rpc backend.

Create the config and data directories using 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.

Rpc Configuration for CLV Mainnet will be updated later.

Create /opt/compose/docker-compose.yaml and set the content as below:

version: "3.8"
services:
  clover-validator:
    image: "cloverio/clover-ivy:0.1.15"
    restart: always
    command:
      - /opt/clover/bin/clover
      - --chain 
      - /opt/specs/clover-preview-iris.json  
      - --base-path 
      - /opt/chaindata
      - --pruning
      - archive
      - --name 
      - πŸ€clover-rpc-node
      - --port 
      - "30333"
      - --ws-port 
      - "9944"
      - --rpc-port 
      - "9933"
      - --rpc-cors=all
      - --ws-max-connections
      - "2000"
      - --ws-external 
      - --rpc-external
      - --execution
      - wasm
    ports:
      - "30333:30333"
      - "9933:9933"
      - "9944:9944"
    volumes:
      - /opt/data/clover:/opt/chaindata

You can edit the docker-compose.yaml and include your customizations by updating below arguments:

  • image: the docker image used to launch the node, for CLV Testnet, use cloverio/clover-iris:0.1.15. For a full list of clover networks please check out the Clover Network List page.

  • --name: The node name of your validator, the name could be found in the telemetry node list

  • --pruning: we're using the archive mode for the pruning argument, which means it will keep all the historical block data. You can provide numeric parameters for it, to let it just keep the provided number of blocks data.

  • --ws-extenral/--rpc-external: it enable the outer access for the RPC service.

  • Enabling --execution wasm will spped up wasm code execution quite a lot, it's recommended for rpc nodes.

Use below command to bring up the validator node:

cd /opt/compose # goto the compose file directory
docker-compose up # bring up the rpc node in the foreground
## check whether the node starts up normally
## Ctrl-C stop the node
docker-compose up -d # start the rpc 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.

You may want to setup a reverse proxy server or load balancer for the RPC service. There're some known tools for you to start with, please checkout:

Docker Compose file templates

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
version: "3.3"
services:
  clover-para-node:
    image: "cloverio/clover-para:polkadot-v0.9.16.1"
    restart: always
    command:
      - /opt/clover/bin/clover
      - --parachain-id
      - "2002"
      - --chain
      -  /opt/specs/clover-para-raw.json
      - --base-path
      - /opt/chaindata
      - --name
      - clover-para-rpc
      - --bootnodes
      - /dns/boot1.para.clover.finance/tcp/40335/ws/p2p/12D3KooWFWYYwimRBexvZokZmNnmSdXcLCz8WmMTHDCAhzm5tLM6
      - /dns/boot2.para.clover.finance/tcp/40335/ws/p2p/12D3KooWSvvxYi9nkyGJ17hEjwmytNRMrSsQtSrGsHzUaLTcUUea
      - --pruning # you can remove the pruning parameter if you don't need a full archive node
      - archive   #
      - --ws-port
      - "9946"
      - --rpc-port
      - "20194"
      - --port
      - "40335"
      - "--rpc-cors=all"
      - --rpc-external
      - --ws-external
      - --execution
      - wasm
      - --ws-max-connections
      - "5000"
      - --
      - --execution
      - wasm
      - --ws-port
      - "10194"
      - --rpc-port
      - "10195"
      - --chain
      - polkadot
      - --port
      - "30335"
    ports:
      - "9946:9946"
      - "20194:20194"
      - "40335:40335"
      - "30335:30335"
    volumes:
      - /data/data/chains/bootnode:/opt/chaindata
      - /data/data/config:/opt/config
    logging:
       driver: "json-file"
       options:
          max-size: "25m"
          max-file: "2"

Firewall Setup

Create Directories

Setup CLV Validator Node

Create the Compose configure file

Bring up the validator node

Bond CLV

Checkout documentation.

Set the session keys

Checkout documentation.

Validate

Checkout documentation.

Links

Types Of CLV RPC Nodes

Hardware requirements

We'll use and to run the validator in this guide. You need to install docker and docker-compose firstly. Please follow the installation guide in the docs.

Firewall Setup

Create Directories

Setup CLV RPC Node

Create the Compose configure file

Bring up the RPC node

Post Setup

- High Performance Load Balancer, Web Server, & Reverse Proxy

- Powerful, enterprise-ready, open source web server with automatic HTTPS written in Go

πŸ›°οΈ
πŸ“
βš™οΈ
πŸ“
πŸš€
πŸ’Ή
πŸ—οΈ
🌠
πŸ”±
πŸ€
πŸ› οΈ
πŸ›°οΈ
πŸ“
βš™οΈ
πŸ“
πŸš€
πŸ“‘
πŸ‘‰
πŸ› οΈ
πŸ”§
Polkadot Wiki
Polkadot network
docker
docker-compose
Docker Install Document
Docker-Compose Install Document
Staking
Polkadot Session Keys
Polkadot Validate
CLV Testnet Apps
CLV Mainnet Apps
docker
docker-compose
Docker Install Document
Docker-Compose Install Document
Nginx
Caddy