Nodes

guruGuru
search

OKP4 - Setup Guide

Stuck? AsktelegramNodes Guru telegram community

Install

Use our script for a quick installation:

wget -q -O okp4.sh https://api.nodes.guru/okp4.sh && chmod +x okp4.sh && sudo /bin/bash okp4.sh

Set a name for your node and wait for the installation to complete. After that execute the following command:

source $HOME/.bash_profile

Create a wallet, don’t forget to save the mnemonic.

okp4d keys add wallet


Get tokens in the faucet.
After full synchronization, check the balance, if everything is okay go to the next step.

okp4d q bank balances YOUR_WALLET_ADDRESS


Also you can check balance in the explorer.
Create a validator:

okp4d tx staking create-validator \
--amount=1000000uknow \
--pubkey=$(okp4d tendermint show-validator) \
--moniker="$OKP4_NODENAME" \
--chain-id=okp4-nemeton \
--commission-rate="0.01" \
--commission-max-rate="0.10" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1000000" \
--fees=1000uknow \
--from=wallet \
-y

Additional

You can check the node logs with the command:

journalctl -u okp4d -f

Restart node:

systemctl restart okp4d

Check your node status:

curl localhost:26657/status

Check node synchronization, if results false – node is synchronized

curl -s localhost:26657/status | jq .result.sync_info.catching_up

Get your valoper address:

okp4d keys show wallet --bech val -a

Bond more tokens (if you want increase your validator stake you should bond more to your valoper address):

okp4d tx staking delegate YOUR_VALOPER_ADDRESS 10000000uknow --from wallet --chain-id okp4-nemeton --fees 5000uknow

Active validators list:

okp4d query staking validators --limit 2000 -o json | jq -r '.validators[] | select(.status=="BOND_STATUS_BONDED") | [.operator_address, .status, (.tokens|tonumber / pow(10; 6)), .description.moniker] | @csv' | column -t -s"," | sort -k3 -n -r

Inactive validators list:

okp4d query staking validators --limit 2000 -o json | jq -r '.validators[] | select(.status=="BOND_STATUS_UNBONDED") | [.operator_address, .status, (.tokens|tonumber / pow(10; 6)), .description.moniker] | @csv' | column -t -s"," | sort -k3 -n -r

Remove node:

systemctl stop okp4d
systemctl disable okp4d
rm -rf $(which okp4d) ~/.okp4d ~/okp4d