Skip to content
Validators
Support external chains
Kava

Kava

This guide presents you the Kava Node setup for both Testnet and Mainnet, as well as the integration with Axelar Network.

Prerequisites

Install Go

# First remove existing old Go installation
sudo rm -rf /usr/local/go
 
# Download and verify go
curl -O https://dl.google.com/go/go1.18.7.linux-amd64.tar.gz
sha256sum --check <<EOF
6c967efc22152ce3124fc35cdf50fc686870120c5fd2107234d05d450a6105d8  $HOME/go1.18.7.linux-amd64.tar.gz
EOF
 
# install
sudo tar -xvf go1.18.7.linux-amd64.tar.gz
sudo mv go /usr/local
 
# Update environment variables to include go
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
 
# Verify that Go is installed:
go version

Install Kava

git clone https://github.com/Kava-Labs/kava
cd kava
git checkout v0.19.0
make install
 
# verify versions
kava version --long

Initialize Kava Node and create necessary toml files

Initialize Kava

kava init [your_moniker_name] --chain-id kava_2222-10
kava tendermint unsafe-reset-all --home $HOME/.kava
cd $HOME/.kava/config
rm genesis.json

Download Genesis File

wget https://kava-genesis-files.s3.us-east-1.amazonaws.com/kava_2222-10/genesis.json

Edit your config.toml file and add the following persistent peers.

persistent_peers = "2a15d9c39eea97b4cf00480b45d4ea32a2e173d0@94.130.78.22:26656,5a933891627e8bde0c4bd0b43c9f99b706e520a2@141.95.99.214:11656,ab3064c37d406245fa2d6e6109395518e8ac8a4c@95.111.255.148:26656,41d88639239c55fd37279d24df507238e1c417ea@85.237.192.104:26656,b23050c89f8cb2f4099688b2bcd60f49b15f41d1@95.214.53.217:26656,d5db8898d40054c07442f3364b32f7fac2752f5e@188.34.178.92:26656,fc34d9a3aff6026a3dbd531a96a50680df61dd91@50.116.3.21:26656,50e4cad7d5e28f7b6495168f92e12bf810e293fd@142.132.152.187:10856,6885971cdb724fa93034fb9e6a11113a6f555d2a@15.235.53.92:11656,7b5a2b519cb5a7d70f0fc5842829d4cce1262585@65.108.121.153:26656,51cfccb07d5a45efdf98d005159c01f0656751ad@54.165.27.59:26656,f7c894901f450b92614fd051d10854d168ec30b5@65.21.94.20:10856,7393ed21b6dc516fcc0ad33c4fe42bdd295d2795@18.206.217.244:26656,508d7ec33c7f3c9c479ca9b845cadbbefee670f7@162.55.133.237:21656,d68410115d7681196651e7fece9e4cafc0456856@3.0.206.176:26656,4cfdd459466cfd492d66b7a5fe26cde96e35d735@182.48.203.7:26656,63ec88e98fc267fb82fa62a51ca5c0a2c115d749@51.38.53.4:27656,ebc272824924ea1a27ea3183dd0b9ba713494f83@185.16.39.172:26656,4efe3caf3b8c0ca197d40756f3bb1bd6081bf18d@51.210.220.20:36656,c124ce0b508e8b9ed1c5b6957f362225659b5343@136.243.248.185:26656,82588f011491c6100d922d133f52fc23460b9231@95.217.91.233:26656,8b5c4a890c8ae7efbbe3360af71be1c3c3a9e12e@121.78.241.68:46656,ce203135031ab08fc0ddff5bd13806e25f21b91d@3.115.125.121:26656,dcd6026ebe5586ed0e94751090f8290b5997666b@5.189.165.172:26656,bc61c26018f65e54232b7e9e99bf7599dffeb78b@13.56.56.180:26656"

 seeds = "b334e291ac361f9a1cf253d290047700b488b679@52.2.147.96:26656"

Add minium gas prices into app.toml

minimum-gas-prices = "0.025ukava;1000000000akava"

Do the rest of the port configuration as desired; The EVM configuration and ports can be found in the app.toml under ection "EVM Configuration"

Pruning configuration

To allow validators to retrieve and verify cross chain messages from users, the state of the network needs to be kept around at the block height. While most cross-chain messages will be picked up right away, some might not be due to various reasons (insufficient gas, off-chain services were down etc.). So, we require validators to keep 1 month of Kava chain history to support this. Please use the following pruning config for your node.

pruning="custom"
pruning_keep_recent="410000"
pruning_keep_every="0"
pruning_interval="1000"
 
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.kava/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.kava/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.kava/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.kava/config/app.toml

State sync script

https://kava-mainnet.chainode.tech:443
# create state sync script
nano statesync.sh

Add the content below and change the RPC var for desired network

#!/bin/bash
 
RPC="https://kava-testnet.chainode.tech:443"
 
LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$RPC/block?height=$BLOCK_HEIGHT" |