Run Validator Node
This is an updated guide on setting up a mainnet validator. Note that this is a minimal guide and does not cover more advanced topics like sentry node architecture and double signing protection. It is strongly recommended that any parties considering validating do additional research. If you have questions, please join the active conversation in the #validators thread of our Discord Channel.
You should select an all-purpose server with at least 8GB of RAM, good connectivity, and a solid state drive with sufficient disk space. Storage requirements are discussed further in the section below. In addition, you’ll need to open port 26656 to connect to the Kava peer-to-peer network. As the usage of the blockchain grows, the server requirements may increase as well, so you should have a plan for updating your server as well.
The monthly storage requirements for a node are as follows. These are estimated values based on experience, but should serve as a good guide.
- An archival node (
pruning = "nothing") grows at a rate of ~100 GB per month
- A fully pruning node (
pruning = "everything") grows at a rate of ~5 GB per month
- A default pruning node (
pruning = “default”) grows at a rate of ~25 GB per month
Kava is built using Go and requires Go version 1.17+. In this example, you will be installing Go on a fresh install of ubuntu 20.04.
# Update ubuntu
sudo apt update
sudo apt upgrade -y
# Install packages necessary to run go and jq for pretty formatting command line outputs
sudo apt install build-essential jq -y
# Install git
sudo apt install git
# Install go
wget https://dl.google.com/go/go1.17.11.linux-amd64.tar.gz (or latest version at https://golang.org/dl/)
sudo tar -xvf go1.17.11.linux-amd64.tar.gz
sudo mv go /usr/local
# Updates environmental variables to include go
cat <<EOF>> ~/.profile
To verify that Go is installed:
# Should return go version go1.17.11 linux/amd64
Install Kava using
git clone. Note that version 0.17.5 is the correct version for mainnet.
git clone https://github.com/kava-labs/kava
git checkout v0.17.5
To verify that kava is installed:
kava version --long
# name: kava
# server_name: kava
# version: 0.17.5
# commit: 5020a6a448d4d8d666de64dfd220da0f47dbcacf
# build_tags: netgo,ledger
# go: go version go1.17.11 linux/amd64
Configuring Your Node
Next, download the correct genesis file and sync your node with the Kava mainnet. To download the genesis file:
# First, initialize kava. Replace <name> with the public name of your node
kava init --chain-id kava_2222-10 <name>
# Download the genesis file
wget https://kava-genesis-files.s3.us-east-1.amazonaws.com/kava_2222-10/genesis.json -O ~/.kava/config/genesis.json
# Verify genesis hash
jq -S -c -M '' $HOME/.kava/config/genesis.json | shasum -a 256
Next, adjust some configurations. To open the config file:
At line 212, add seeds. These are used to connect to the peer-to-peer network:
At line 215, add some persistent peers, which help maintain a connection to the peer-to-peer network
Next, chose how much historical state you want to store. To open the application config file:
In this file, choose between
everything. To reduce hard drive storage, choose
default. To run an archival node, chose
pruning = "default"
In the same file, you will want to set minimum gas prices — setting a minimum prevents spam transactions:
minimum-gas-prices = "0.001ukava;1000000000akava"
Syncing Your Node
To sync your node, you will use systemd, which manages the Kava daemon and automatically restarts it in case of failure. To use systemd, you will create a service file. Be sure to replace
<your_user> with the user on your server:
sudo tee /etc/systemd/system/kavad.service > /dev/null <<'EOF'
To start syncing:
# Start the node
sudo systemctl enable kavad
sudo systemctl start kavad
To check on the status of syncing:
kava status --log_format json | jq '.sync_info'
This will give output like:
The main thing to watch is that the block height is increasing. Once you are caught up with the chain,
catching_up will become false. At that point, you can start using your node to create a validator. If you need to sync using a snapshot, please use https://kava.quicksync.io/
To check the logs of the node:
sudo journalctl -u kavad -f
Creating a Validator
First, create a wallet, which will give you a private key / public key pair for your node.
# Replace <your-key-name> with a name for your key that you will remember
kava keys add <your-key-name>
# To see a list of wallets on your node
kava keys list
Be sure to write down the mnemonic for your wallet and store it securely. Losing your mnemonic could result in the irrecoverable loss of KAVA tokens.
To see the options when creating a validator:
kava tx staking create-validator -h
An example of creating a validator with 50KAVA self-delegation and 10% commission:
# Replace <key_name> with the key you created previously
kava tx staking create-validator \
--pubkey=$(kava tendermint show-validator) \
--moniker="choose moniker" \
--website="optional website for your validator" \
--details="optional details for your validator" \
To check on the status of your validator:
kava status --log_format json | jq '.ValidatorInfo'
After you have completed this guide, your validator should be up and ready to receive delegations. Note that only the top 100 validators by weighted stake (self-delegations + other delegations) are eligible for block rewards. To view the current validator list, checkout one of the Kava block explorers:
If you have questions, please join the active conversation in the #validators thread of the Kava Discord Channel.