Kevin Davis
Jul 26 · 6 min read

This article will provide a guide for joining Kava’s second testnet. This guide replaces the previous guide and hopefully makes the process a bit smoother. As always, you can checkout the code over at GitHub, and if you’re a pro at validating you can probably follow along over there and skip to the tldr at the bottom.

Server Setup 🛠

For this guide, we’ll be using a server with the following specifications:

  • Ubuntu 18.04 OS
  • 2 CPUs
  • 4GB RAM
  • 24GB SSD
  • Allow incoming connections on ports 26656
  • Static IP address (Elastic IP for AWS, floating IP for DigitalOcean, etc)

You can get a server with these specifications on most cloud service providers (AWS, DigitalOcean, Google Cloud Platform, Linode, etc).

After logging into your server, we’ll install security updates and the required packages to run Kava:

# Updates ubuntu
sudo apt update
sudo apt upgrade -y
# Installs packages necessary to run go
sudo apt install build-essential -y
# Installs go
wget https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz
sudo tar -xvf go1.12.7.linux-amd64.tar.gz
sudo mv go /usr/local
# Updates environmental variables to include go
cat <<EOF>> ~/.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 ~/.profile

To verify that go is installed:

go version# Should return go version go1.12.7 linux/amd64

Install Kava 🎆

Note that if you are updating your server from testnet-1.1 to testnet-2000, you can skip to the section ‘Updating From Testnet-1.1 to Testnet-2000’.

git clone https://github.com/Kava-Labs/kava.git
cd kava
git checkout v0.2.0
make install

To verify the version

kvd version --long# name: kava
# servername: kvd
# clientname: kvcli
# version: 0.2.0
# gitcommit: 35829b9f253814dd1ea5d5d2cba306fb9aab14b3
# buildtags: netgo,ledger
# goversion: go version go1.12.7 darwin/amd64

Create your validator

# Replace <your-moniker> with the publicly viewable name you want for your validator.
kvd init --chain-id kava-testnet-2000 <your-moniker>
# Create a wallet for your node. <your-wallet-name> is just a human readable name you can use to remember your wallet. It can be the same or different than your moniker.kvcli keys add <your_wallet_name>

This will spit out your recovery mnemonic. Be sure to back up your mnemonic before proceeding to the next step!

Submit a genesis transaction 🧬

If you are planning on participating in the genesis of the Kava testnet, you can follow along here and create a genesis transaction that you can submit as a pull request before launch. Otherwise, skip to the section about obtaining some coins from the faucet. If you are participating in genesis, it is expected that your validator will be up and available at all times during the testnet. If you can’t commit to this, we recommend joining via the faucet after the testnet is live.

# Create an account with 1000000 kava tokenskvd add-genesis-account $(kvcli keys show <your_wallet_name> -a) 1000000000000ukava# Sign a gentx that creates your validator in the genesis file. Note to pass your public ip to the --ip flag. kvd gentx --name <your_wallet_name> --amount 1000000000000ukava --ip <your-public-ip>

This will write your genesis transaction to $HOME/.kvd/config/gentx/gentx-<gen-tx-hash>.json. This should be the only file in your gentx directory. If you have more than one, delete them and repeat the gentx command above.

To submit the gentx you created, fork the kava-testnets repo.

# Be sure you forked the repo at https://github.com/kava-labs/kava-testnets under your user name first.
cd $HOME
git clone git@github.com:<YOUR-USERNAME>/kava-testnets.git
cd kava-testnets

cp $HOME/.kvd/config/gentx/* $HOME/kava-testnets/2000/.
git push

Tip: If you don’t want to set up git from your remote server, you can copy the contents of `$HOME/.kvd/config/gentx/gentx-<gen-tx-hash>.json to your local machine and submit the PR from there.

Now go to the Kava testnets repo and select “New Pull Request.”

Create a pull request for <github-username>/kava-testnets:master against the master branch of the Kava testnets repo.

Please note that all genesis transactions must be submitted by July 30, 2019 at 14:00 UTC. If you don’t submit a genesis transaction, don’t worry! After the testnet is launched, we’ll make a faucet available to easily request testnet tokens.

Launching the testnet 🚀

We will release the genesis file by July 30, 2019 at 16:00 UTC and create a release tagged v0.2 that contains the genesis file. You can read about the genesis file params here.

Validators can download the genesis file and start their node anytime after the genesis file is released. The chain will be set to launch July 31, 2019 at 14:00 UTC.

To start your node after the testnet is released:

# Copy the genesis file to the kvd directory
wget https://raw.githubusercontent.com/Kava-Labs/kava-testnets/master/2000/genesis.json -P ~/.kvd/config
# Create log files for kvd
sudo mkdir -p /var/log/kvd && sudo touch /var/log/kvd/kvd.log && sudo touch /var/log/kvd/kvd_error.log
# create a systemd file to run the kvd daemon
# replace <your_user> where necessary
sudo tee /etc/systemd/system/kvd.service > /dev/null <<'EOF'
[Unit]
Description=Kava daemon
After=network-online.target

[Service]
User=<your_user>
ExecStart=/home/<your_user>/go/bin/kvd start
StandardOutput=file:/var/log/kvd/kvd.log
StandardError=file:/var/log/kvd/kvd_error.log
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF
# Start the node
sudo systemctl enable kvd
sudo systemctl start kvd

To check on the status of the node

kvcli status
sudo journalctl -u kvd -f

To view the logs

# Standard output of kvd
tail -f /var/log/kvd/kvd.log
# Standard error of kvd
tail -f /var/log/kvd/kvd_error.log

Joining the Testnet Via Faucet 🚰

At launch, transactions will not be enabled on testnet 2. Transactions should be enabled via governance around August 3rd, 2019 at 14:00 UTC.

To join the Kava testnet after launch, you can use our faucet. To install the testnet software, follow this guide up to the section titled ’Submitting a genesis transaction’.

To start your node:

# Copy the genesis file to the kvd directory
wget https://raw.githubusercontent.com/Kava-Labs/kava-testnets/master/2000/genesis.json -P ~/.kvd/config
# Create log files for kvd
sudo mkdir -p /var/log/kvd && sudo touch /var/log/kvd/kvd.log && sudo touch /var/log/kvd/kvd_error.log
# create a systemd file to run the kvd daemon
# replace <your_user> where necessary
sudo tee /etc/systemd/system/kvd.service > /dev/null <<'EOF'
[Unit]
Description=Kava daemon
After=network-online.target

[Service]
User=<your_user>
ExecStart=/home/<your_user>/go/bin/kvd start
StandardOutput=file:/var/log/kvd/kvd.log
StandardError=file:/var/log/kvd/kvd_error.log
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF
# Start the node
sudo systemctl enable kvd
sudo systemctl start kvd

To get testnet coins:

# Get the address of your wallet
kvcli keys show -a <your_wallet_name>
# Go to the faucet and paste your address in# Confirm that your account is funded
kvcli q account $(kvcli keys show -a <your_wallet_name>)

To create a validator:

# Set your node to wait for transactions to confirm
kvcli config broadcast-mode block
# Create the validator
# Be sure to replace <your-wallet-name> and <your-moniker>
kvcli tx staking create-validator --amount 10000000000ukava --commission-max-change-rate 0.01 --commission-max-rate 0.2 --commission-rate 0.1 --from <your-wallet-name> —-min-self-delegation 1 --moniker <your-moniker> —-pubkey $(kvd tendermint show-validator)# Confirm that you have voting power (look at the last value in the output. It should show voting power > 0)
kvcli status

Updating From Testnet-1.1 to Testnet-2000

If you are using the same server for testnet-1.1 as testnet-2000, you can follow the following workflow. Some of these steps depend on how you are running kvd, but this should give a sufficient overview.

  1. Stop the running kvd instance and remove . This will take your validator down from testnet-1.1
# It's okay if this command errors
sudo kill -9 $(lsof -ti :26656) && sudo systemctl stop kvd
rm -rf ~/.kv*

2. Update kvd

cd $HOME/kava
git fetch && git checkout v0.2.0
make install
# Verify the version by doing
kvd version --long

3. Create a new validator node

# Replace <your-moniker> with the publicly viewable name you want for your validator.
kvd init --chain-id kava-testnet-2000 <your-moniker>
# Create a wallet for your node. <your-wallet-name> is just a human readable name you can use to remember your wallet. It can be the same or different than your moniker.kvcli keys add <your_wallet_name>

4. Follow the section titled ‘Submitting a Genesis Transaction

TL:DR

  • Kava testnet 2 has chain-id kava-testnet-2000
  • The testnet will launch at 2019–07–31 14:00:00 UTC
  • Genesis transactions should be submitted by 2019–07–30 14:00:00 UTC
  • The coins changed from ukva -> ukava
  • Genesis transactions should be submitted for 1000000000000ukava
  • Submit genesis transactions in this repo
  • Transactions will be turned off at launch and activated via governance proposal.
  • We will be submitting multiple governance proposals during this testnet. You can stay up to date in riot chat.

Kava Labs Blog

This publication features news and articles from the Kava Labs team. Kava Labs is a developer of the Kava blockchain, the first cross-blockchain DeFi platform.

Kevin Davis

Written by

I work on interledger and other cool tech in the blockchain and interoperability space for @kava-labs.

Kava Labs Blog

This publication features news and articles from the Kava Labs team. Kava Labs is a developer of the Kava blockchain, the first cross-blockchain DeFi platform.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade