Welcome to the Kazeki Testnet

Réda Berrehili
Ki Foundation
Published in
5 min readApr 2, 2020

Be part of the first batch of validators joining the testnet and participating to the dawn of a new asset of value.

Kazeki: The energy of wind

The Ki Chain is a Cosmos based chain, secured by validators with a dPoS / tendermint based protocol. This article is set to provide a step-by-step tutorial for initiating a validator on the Ki Chain Testnet. The testnet will run for 30 days before the official launch of the Mainnet. So get ready before the official act!

All the code is available on our Github repository.

⚙️ Recommended configuration

To participate in this Testnet you must have a server with the minimum following specifications:

- Ubuntu 18.04 OS
- 2 CPUs (recommended 4CPUs)
- 4GB RAM
- 40GB SSD (recommended 80GB SSD)

You must allow incoming connections on ports 26656 and have a static IP address.

👣 Follow the step by step tutorial

To join the Kichain network, you need first to install ki-tools. You can do it by following the following dedicated tutorial.

1️⃣ . Install Golang

To install Go, visit the Go download page and copy the link of the latest Go release for Linux systems:

https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz

Downloading and unzip the archive file as follows:

wget https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.13.5.linux-amd64.tar.gz

Finally, export the Go paths like so:

GOPATH=/usr/local/go
PATH=$GOPATH/bin:$PATH
mkdir -p $HOME/go/bin
echo "export PATH=$PATH:$(go env GOPATH)/bin" >> ~/.bash_profile
source ~/.bash_profile

To test the Go installation, use the version command to check the downloaded version as follows :

go version

This should output :

go version go1.13.5 linux/amd64

2️⃣ . Install ki-tools

Start by clone this repository. If you are here, you most likely have git installed already, otherwise just run:

sudo apt install git

And now you can clone the repository as follows:

git clone https://github.com/KiFoundation/ki-tools.git

If your are starting with a clean ubuntu install you might need to install the build-essential package:

sudo apt update
sudo apt install build-essential

Before proceeding, make sure to switch to the testnet branch which contains the Testnet tools.

cd ki-tools
git checkout testnet

Finally, you can install the tools as follows:

make install

To test the installation, check the downloaded version as follows :

kid version --long

🚀 Deploy a Kichain node

Now that you have the ki-tools installed you can deploy and run a Kichain node. To do so:

  • Check the current version of the genesis file here.
  • And follow the dedicated tutorial hereunder.

You will first need a couple of basic tools such as curl and vim (or whatever tools that can replace them). Go ahead and install them :

sudo apt install vim
sudo apt install curl

Once done, create a folder to contain your node information:

export NODE_ROOT= <location of your choice>
mkdir -p $NODE_ROOT/kid $NODE_ROOT/kicli $NODE_ROOT/kilogs
cd $NODE_ROOT

Initiate the needed configuration files using the unsafe-reset-allcommand:

kid unsafe-reset-all --home ./kid

Copy the genesis file to the ./kid/config/ folder:

curl https://raw.githubusercontent.com/KiFoundation/ki-networks/v0.1/Testnet/KiChain-t-1/genesis.json > ./kid/config/genesis.json

Once done, you need to give a name to your node and indicate the seed server to which it should connect to join the network. All of this can be done in the config.toml that can be found in the ./kid/config/ directory. Change the default moniker to whatever you want (the default name is the machine name). Then provide in in the field persistent_peers the address of one of the following persistent peers.

persistent_peers="58bda4854b4264cc1ae0f52d89922d6ba4725791@94.23.3.107:26656,d3eec56d5d3330773e6be0bb89bf93f1ebd09b8d@10.30.4.160:26656"

Now that the node is configured, you can start it.

kid start --home ./kid/ &> ./kilogs/ki-node.log &

This command will start the block synchronisation process where your node retrieves the current state of the blockchain from the other nodes. The process output is redirected to the ki-node.loglog file. It can be visualised as follows:

tail -f kilogs/ki-node.log

and it looks like this:

I[2020-02-12|08:52:14.376] Executed block            module=state height=1 validTxs=0 invalidTxs=0
I[2020-02-12|08:52:14.393] Committed state module=state height=1 txs=0 appHash=HASHHASHASH...
I[2020-02-12|08:52:14.442] Executed block module=state height=2 validTxs=0 invalidTxs=0
I[2020-02-12|08:52:14.449] Committed state module=state height=2 txs=0 appHash=HASHHASHASH...
I[2020-02-12|08:52:14.474] Executed block module=state height=3 validTxs=0 invalidTxs=0
I[2020-02-12|08:52:14.481] Committed state module=state height=3 txs=0 appHash=HASHHASHASH...
I[2020-02-12|08:52:14.507] Executed block module=state height=4 validTxs=0 invalidTxs=0
I[2020-02-12|08:52:14.514] Committed state module=state height=4 txs=0 appHash=HASHHASHASH...
I[2020-02-12|08:52:14.539] Executed block module=state height=5 validTxs=0 invalidTxs=0
I[2020-02-12|08:52:14.547] Committed state module=state height=5 txs=0 appHash=HASHHASHASH...
I[2020-02-12|08:52:14.572] Executed block module=state height=6 validTxs=0 invalidTxs=0
I[2020-02-12|08:52:14.579] Committed state module=state height=6 txs=0 appHash=HASHHASHASH...
...

Note : You will need to wait for the end of the synchronisation process before proceeding to the validator creation.

The previous steps will start the node in a relay mode. That is, it is relaying transactions and blocks, but note validating new blocks. To enable the validation process, you need to create and declare your own validator. Start by create your validator wallet by generating a new key pair as follows (Here we call it wallet-1 but you can call it whatever you want):

kicli keys add wallet-1 --home ./kicli/

Enter your password twice and then save the generated addresses, keys and passphrase.

🤑 Get some tokens

To join the Kazeki testnet, you can ask some tokens from our #faucet or simply join our Slack Ecosystem.

Make the TKIs rain in your wallet baby!

🏆 Initiate your validator

Now that your wallet has a positive balance, you can create your validator through a staking transaction:

kicli tx staking create-validator \
--commission-max-change-rate=0.1 \
--commission-max-rate=0.1 \
--commission-rate=0.1 \
--min-self-delegation=1 \
--amount=100000000tki \
--pubkey `kid tendermint show-validator --home ./kid/` \
--moniker=<YOUR VALIDATOR NAME> \
--chain-id=KiChain-t-1 \
--from=wallet-1 \
--home ./kicli/

To know more about the various possible configurations and on editing your validator, please refer to the dedicated documentation. Once this transaction has passed, and if the bonded amount is sufficient to be in the active validator list, your validator will automatically start validating new blocks.

🛠 Available tools

We have developed many tools to help manage your tokens, delegation and transactions.

The explorer is available on : https://testnet.blockchain.ki/

And the testnet-only wallet is available on : https://wallet-testnet.blockchain.ki/

(please do not import production wallets on this online wallet for security reasons)

These tools code is also available on the repositories below:

👛 https://github.com/KiFoundation/ki-web-wallet

🔎 https://github.com/KiFoundation/ki-explorer

--

--

Réda Berrehili
Ki Foundation

Computer Scientist & Entrepreneur. Founder & CEO @ Ki Foundation. Co-Founder & CTO @ Squarebreak (Acquired by Accorhotels).