Installing a KYVE node
Good afternoon, today we will talk about installing a KYVE node
We will assume that you already have a server, if not, you can read other guides about it
After connecting to the server, through the terminal, update it:
Next, download and unpack the archive:
wget https://github.com/KYVENetwork/chain/releases/download/v0.0.1/chain_linux_amd64.tar.gz
tar -xvzf chain_linux_amd64.tar.gz
rm chain_linux_amd64.tar.gz
chmod +x chaind
mv chaind /usr/local/bin/kyved
After that, we set the names of the variables (Leave KYVE_CHAIN unchanged, enter your names in the rest)
KYVE_CHAIN="korellia"
KYVE_MONIKER="YOUR_MONIKER_NAME"
KYVE_WALLET="YOUR_WALLET_NAME"
Add variables to .bash_profile:
echo 'export KYVE_CHAIN='${KYVE_CHAIN} >> $HOME/.bash_profileecho 'export KYVE_MONIKER='${KYVE_MONIKER} >> $HOME/.bash_profileecho 'export KYVE_WALLET='${KYVE_WALLET} >> $HOME/.bash_profilesource $HOME/.bash_profile
We enter the command to initialize:
Download and copy the genesis file:
wget https://github.com/KYVENetwork/chain/releases/download/v0.0.1/genesis.json
seeds="[email protected]:26656,[email protected]:26656"
PEERS="[email protected]:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$seeds\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.kyve/config/config.toml
Let's make a wallet! Don't forget to save the mnemonic!!! it will also ask you to enter a password to access the wallet SAVE or REMEMBER (If you already have a wallet and you just need to restore it, use this command kyved keys add $KYVE_WALLET --recover and enter the mnemonic)
We add the wallet address to the variable for our convenience (for confirmation, we need the password entered earlier)
Add a variable to .bash_profile:
echo 'export KYVE_ADDR='${KYVE_ADDR} >> $HOME/.bash_profilesource $HOME/.bash_profile
tee $HOME/kyved.service > /dev/null <<EOF[Unit]Description=kyveAfter=network.target[Service]Type=simpleUser=$USERExecStart=$(which kyved) startRestart=on-failureRestartSec=10LimitNOFILE=65535[Install]WantedBy=multi-user.targetEOF
Move the service file to the working folder:
sudo systemctl daemon-reload
sudo systemctl enable kyved
sudo systemctl restart kyved
Or we look at the status and wait until the node is synchronized:
Next, you need to update the node to switch to the next chain
wget https://github.com/KYVENetwork/chain/releases/download/v0.1.0/chain_linux_amd64.tar.gz tar -xvzf chain_linux_amd64.tar.gz rm chain_linux_amd64.tar.gz sudo systemctl stop kyved chmod +x chaind mv chaind /usr/local/bin/kyved sudo systemctl start kyved
Or we look at the status and wait until the node is synchronized:
Switching back to the next chain
wget https://github.com/KYVENetwork/chain/releases/download/v0.2.0/chain_linux_amd64.tar.gz tar -xvzf chain_linux_amd64.tar.gz rm chain_linux_amd64.tar.gz sudo systemctl stop kyved chmod +x chaind mv chaind /usr/local/bin/kyved sudo systemctl start kyved
Or we look at the status and wait until the node is synchronized:
Switching back to the next chain
wget https://github.com/KYVENetwork/chain/releases/download/v0.3.0/chain_linux_amd64.tar.gz tar -xvzf chain_linux_amd64.tar.gz rm chain_linux_amd64.tar.gz sudo systemctl stop kyved chmod +x chaind mv chaind /usr/local/bin/kyved sudo systemctl start kyved
After synchronization, we create a validator (in the --amount line, we write in numbers the amount that we want to delegate the letters tkyve do not touch), we also enter the previously entered password (do not forget that the wallet from which you will delegate should have funds):
kyved tx staking create-validator --yes \ --amount 500000000000tkyve \ --moniker $KYVE_MONIKER \ --commission-rate "0.10" \ --commission-max-rate "0.20" \ --commission-max-change-rate "0.01" \ --min-self-delegation "1" \ --pubkey "$(kyved tendermint show-validator)" \ --from $KYVE_WALLET \ --chain-id korellia
We write the address of the validator into a variable (enter the password set earlier)
Add a variable to .bash_profile:
echo 'export KYVE_VALOPER='${KYVE_VALOPER} >> $HOME/.bash_profilesource $HOME/.bash_profile
Checking the status of the validator:
kyved query staking validators --limit 1000 -o json | jq -r '.validators[] | [.operator_address, .status, (.tokens|tonumber / pow(10; 6)), .description.moniker] | @csv' | column -t -s"," | sort -k3 -n -r | nl
How to delegate funds to the validator:
kyved tx staking delegate [VALOPER_ADDRESS] [STAKE_AMOUNT]tkyve --from [your-key-name] --chain-id korellia
Well, if suddenly your node got into jail, then the output is:
kyved tx slashing unjail --chain-id korellia --from [your-key-name]