Kava Testnet 4000 Guide

Kevin Davis
4 min readJan 31, 2020

--

The time for Kava’s first CDP testnet has arrived! We’re very excited to begin the journey towards making cross-chain DeFi a reality and are thrilled to have our wonderful validator community on board. This article will provide instructions for submitting a gentx for validators who are interested in participating.

What to Expect

The goal of this testnet is primarily to test the end-to-end CDP functionality in the wild. This includes identifying bugs or additional features that should be implemented, as well as testing governance features such as adding and removing assets, and tuning parameters such as the stability fee and liquidation penalty. By getting validators familiar with governance workflows, together we can start building the tools and interfaces needed for validators to properly manage the system and for users to keep up to date with governance changes.

Additionally, this testnet serves as a testing ground for organizations that are interested in building user interfaces for Kava’s DeFi platform. If have expertise in building interfaces for Cosmos/DeFi, we would strongly suggest you checkout the Kava Grants program.

Finally, all assets in this testnet will be created endogenously, so we won’t be testing cross-chain pegs just yet. We hope to have an updated testnet with external assets in the coming weeks and will keep you updated on the timeline. In addition to testing pegged assets, future testnets will feature bug bounties and prizes for executing attacks on the system.

Server Setup 🛠

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

  • Ubuntu 18.04 OS
  • 2 CPUs
  • 4GB RAM
  • 48GB SSD
  • Allow incoming connections on ports 26656
  • Static IP address (Elastic IP for AWS, floating IP for DigitalOcean, etc)
# 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.13.7.linux-amd64.tar.gz
sudo tar -xvf go1.13.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.13.7 linux/amd64

Installing Kava

If you have a previous version of kava installed, make sure to remove it and shut down the old kvd process.

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

To verify the version

kvd version --long

Create your validator

# Replace <your-moniker> with the publicly viewable name you want for your validator.kvd init --chain-id kava-testnet-4000 <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 🧬

# 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/4000/.
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 February 4, 2020 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.

The testnet will launch at February 5, 2020 at 14:00 UTC. This will not be a decentralized launch, so it is not strictly necessary to have your validator ready at launch.

Note: The CDP system requires a great deal more active governance than the Cosmos Hub or Kava’s current mainnet. For the first testnet, Kava Labs will control a majority of stake, as we will use this testnet to refine, document, and improve the governance process. We encourage validators to participate in governance, in order to familiarize your organization with how it will function and provide feedback. Future incentivized testnets will involve a more realistic distribution of stake and allow use to test the incentive-compatibility of Kava’s governance procedures.

--

--

Kevin Davis

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