March 2, 2023

Installing the KYVE node in the KAON-1 test network !!!

KYVE, the Web3 data lake solution, is a protocol that enables data providers to standardize, validate, and permanently store blockchain data streams. By leveraging permanent data storage solutions like Arweave, KYVE’s Cosmos SDK chain creates permanent backups and ensures the scalability, immutability, and availability of these resources over time.

minimum recommended hardware configuration :

  • 4 cores (modern CPU's)
  • 8Gb of
  • RAM200Gb of disk space
  • 10Mbps permanent internet connection

updating the server:

sudo apt update && sudo apt upgrade -y

install the necessary utilities:

sudo apt install curl build-essential git wget jq make gcc tmux chrony -y

specify the name of your validator, which will be visible in the explorer:

NODENAME=<NAME_VALIDATOR>

saving and importing variables :

echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile
if [ ! $WALLET ]; then
	echo "export WALLET=wallet" >> $HOME/.bash_profile
fi
echo "export KYVE_CHAIN_ID=kaon-1" >> $HOME/.bash_profile
source $HOME/.bash_profile

installing GO:

ver="1.19.1" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version

clone and assemble the binary file:

cd $HOME
wget https://github.com/KYVENetwork/chain/releases/download/v1.0.0-rc1/kyved_linux_amd64.tar.gz
tar -xvzf kyved_linux_amd64.tar.gz
sudo chmod +x kyved && sudo mv ./kyved /usr/local/bin/kyved
sudo rm -rf kyved_linux_amd64.tar.gz

initializing the application:

kyved init $NODENAME --chain-id $KYVE_CHAIN_ID

download the genesis file:

curl https://raw.githubusercontent.com/KYVENetwork/networks/main/kaon-1/genesis.json > ~/.kyve/config/genesis.json

adding peers:

SEEDS=""
PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:34156,[email protected]:12656,[email protected]:13656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:38656,[email protected]:26656,[email protected]:13656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:44656,[email protected]:32656"; \
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.kyve/config/config.toml

setting up pruning:

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

we set the minimum gas price:

sed -i 's/minimum-gas-prices = "0tkyve"/minimum-gas-prices = "0.0001tkyve"/g' $HOME/.kyve/config/app.toml

if necessary, disable indexing (indexer = "null"):

cd ~
nano $HOME/.kyve/config/config.toml
ctrl O, enter, ctrrl X

resetting the chain data:

kyved tendermint unsafe-reset-all --home $HOME/.kyve

creating a service file:

sudo tee /etc/systemd/system/kyved.service > /dev/null <<EOF
[Unit]
Description=kyve
After=network-online.target

[Service]
User=$USER
ExecStart=/usr/local/bin/kyved start 
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

launching the service file:

sudo systemctl daemon-reload
sudo systemctl enable kyved
sudo systemctl restart kyved && sudo journalctl -u kyved -f -o cat

after the synchronization is complete, load the variables into the system:

source $HOME/.bash_profile

creating or restoring a wallet:

kyved keys add $WALLET 
kyved keys add $WALLET --recover

we save the information, enter the commands in turn, enter your password in 1 and 2:

KYVE_WALLET_ADDRESS=$(kyved keys show $WALLET -a)

KYVE_VALOPER_ADDRESS=$(kyved keys show $WALLET --bech val -a)

echo 'export KYVE_WALLET_ADDRESS='${KYVE_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export KYVE_VALOPER_ADDRESS='${KYVE_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile

creating a validator:

kyved tx staking create-validator \
  --amount 1000000000tkyve \
  --from $WALLET \
  --commission-max-change-rate "0.01" \
  --commission-max-rate "0.2" \
  --commission-rate "0.05" \
  --min-self-delegation "1" \
  --pubkey  $(kyved tendermint show-validator) \
  --moniker $NODENAME \
  --identity=<keybase_id> \
  --website="<website>" \
  --details="<validator_description>" \
  --chain-id $KYVE_CHAIN_ID \
  --fees=1100000tkyve \
  --gas=auto -y

delete node:

sudo systemctl stop kyved
sudo systemctl disable kyved
sudo rm /etc/systemd/system/kyve* -rf
sudo rm $(which kyved) -rf
sudo rm $HOME/.kyve* -rf
sudo rm $HOME/kyve -rf
sed -i '/KYVE_/d' ~/.bash_profile