πŸ’‘ Useful commands

βš™οΈ Service Commands

Check Logs

sudo journalctl -u nibid -f -o cat

Start service

sudo systemctl start nibid

Stop service

sudo systemctl stop nibid

Restart service

sudo systmctl restart nibid

Check status

sudo systemctl status nibid

Enable Service

sudo systemctl enable nibid

Reload service

sudo systemctl daemon-reload

Disable service

sudo systemctl disable nibid

Check synchronization status

nibid status | jq | grep "catching_up"

If "true" - not synchronized // "false" - synchronized

Check the latest block of your validator

nibid status | jq '.SyncInfo.latest_block_height // .sync_info.latest_block_height'

View the ports used node

ss -tulpn | grep nibid

βš™οΈ Key Command

Create new wallet

nibid keys add wallet

Recovery wallet

nibid keys add wallet --recover

List all wallet

nibid keys list

Delete wallet

nibid keys delete wallet

Export wallet

nibid  keys export wallet

Import wallet

nibid keys import wallet wallet.backup 

Check wallet balance

nibid q bank balances $(nibid keys show wallet -a) 

βš™οΈ Validator Commands

Create validator

nibid tx staking create-validator \
  --amount 1000000unibi \
  --commission-max-change-rate "0.05" \
  --commission-max-rate "0.10" \
  --commission-rate "0.05" \
  --min-self-delegation "1" \
  --pubkey=$(nibid tendermint show-validator) \
  --moniker '' \ #Validator name, displayed in explorers. 
  --website "" \ #Your website is available, or leave the field blank
  --identity "" \ #Use your KeyBase ID. If you don't have one, leave it empty.
  --details "" \ #Any details about your validator.
  --security-contact="" \
  --chain-id cataclysm-1 \
  --from wallet #Wallet name, as specified during creation, or typically 'wallet'.

You can leave the text after # unchanged - it's a commented hint that won't affect validator creation.

β—½ Replace the following values with your own: WALLET - usually it's 'wallet', or your wallet's name. MONIKER - any convenient name for your validator, displayed in the explorer. IDENTITY - validator's avatar, displayed in the explorer. Create a KeyBase ID following the instructions or leave it empty, and it will default to a standard one. DETAILS - details about your validator, also displayed in the explorer.

Replace all necessary values indicated above with the $ sign to successfully create your validator. β—½ Example: lavad tx staking create-validator \

nibid tx staking create-validator \
  --amount 1000000unibi \
  --commission-max-change-rate "0.05" \
  --commission-max-rate "0.10" \
  --commission-rate "0.05" \
  --min-self-delegation "1" \
  --pubkey=$(nibid tendermint show-validator) \
  --moniker 'Oliver' \ 
  --website "mywebsite@gmail.com" \ 
  --identity "" \ 
  --details "A reliable validator for your network." \ 
  --chain-id cataclysm-1 \
  --from wallet 

Update validator information

nibid tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "$NEW_DETAILS" \
--from $WALLET \
--chain-id cataclysm-1 \
--commission-max-change-rate "0.05" \
--commission-max-rate "0.10" \
--commission-rate "0.05" \
-y

Validator details

nibid q staking validator $(nibid keys show wallet --bech val -a)

Jailing info

nibid q staking validator $(nibid keys show wallet --bech val -a) | grep -E "jailed"

If "true" - your validator is jailed // "false" - your validator is not jailed

Jail reason

nibid q slashing signing-info $(nibid tendermint show-validator)

Unjail command

nibid tx slashing unjail \
--chain-id cataclysm-1 \
--fees 5000unibi \
--from wallet \ # Or another wallet name
-y 

Information about delegation at your validator

nibid q staking validator $(nibid keys show wallet --bech val -a) | grep -E "tokens"

Active Validators list

nibid q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl

Inactive Validator list

nibid q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED" or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl 

Signing Info

nibid query slashing signing-info $(nibid tendermint show-validator) 

βš™οΈ Tokens Commands

Delegate to yourself

nibid tx staking delegate $(nibid keys show wallet --bech val -a) 1000000unibi --from wallet --chain-id cataclysm-1 --fees 5000unibi -y

Delegate to another validator

nibid tx staking delegate <TO_VALOPER_ADDRESS> 1000000unibi --from wallet --chain-id cataclysm-1 --fees 5000unibi -y

Redelegate your stake to other validator

nibid tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000unibi --from wallet --chain-id cataclysm-1 --fees 5000unibi -y

Unbond stake

nibid tx staking unbond $(nibid keys show $WALLET --bech val -a) 1000000unibi --from wallet --chain-id cataclysm-1 --fees 5000unibi -y

Send tokens

nibid tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000unibi --fees 300unibi -y

Check wallet balance

nibid q bank balances $(nibid keys show wallet -a)

Transaction details

nibid query tx HASH_TX

Withdraw all rewards

nibid tx distribution withdraw-all-rewards --from $WALLET --chain-id cataclysm-1 --fees 300unibi

Withdraw rewards and commission from your validator

nibid tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id cataclysm-1 --fees 300unibi -y

βš™οΈ Governance

List All Proposals

nibid query gov proposals

View proposal by ID

nibid query gov proposal ID

Vote "YES"

nibid tx gov vote PROPOSAL_ID yes --from wallet --chain-id cataclysm-1 --fees 300unibi -y 

Vote "NO"

nibid  tx gov vote PROPOSAL_ID no --from wallet --chain-id cataclysm-1 --fees 300unibi -y 

Vote "NO_WITH_VETO"

nibid tx gov vote PROPOSAL_ID no_with_veto --from wallet --chain-id cataclysm-1 --fees 300unibi -y 

Vote "ABSTAIN"

nibid tx gov vote PROPOSAL_ID abstain --from wallet --chain-id cataclysm-1 --fees 300unibi -y 

Create new text proposal

nibid tx gov submit-proposal \
--title="Title" \ #Change Title
--description="Description" \
--deposit=1000000unibi \
--type="Text" \   #Change text proposal
--from=wallet \   #Change name wallet
--fees 300unibi
-y 

βš™οΈ Utility

Set Custom Port


# Change CUSTOM_PORT to any other value, or leave it as is.
CUSTOM_PORT=19
sed -i.bak -e "s%^proxy_app = "tcp://127.0.0.1:26658"%proxy_app = "tcp://127.0.0.1:${CUSTOM_PORT}658"%; s%^laddr = "tcp://127.0.0.1:26657"%laddr = "tcp://127.0.0.1:${CUSTOM_PORT}657"%; s%^pprof_laddr = "localhost:6060"%pprof_laddr = "localhost:${CUSTOM_PORT}060"%; s%^laddr = "tcp://0.0.0.0:26656"%laddr = "tcp://0.0.0.0:${CUSTOM_PORT}656"%; s%^prometheus_listen_addr = ":26660"%prometheus_listen_addr = ":${CUSTOM_PORT}660"%" $HOME/.nibid/config/config.toml
sed -i.bak -e "s%^address = "tcp://0.0.0.0:1317"%address = "tcp://0.0.0.0:${CUSTOM_PORT}317"%; s%^address = ":8080"%address = ":${CUSTOM_PORT}080"%; s%^address = "0.0.0.0:9090"%address = "0.0.0.0:${CUSTOM_PORT}090"%; s%^address = "0.0.0.0:9091"%address = "0.0.0.0:${CUSTOM_PORT}091"%; s%^address = "0.0.0.0:8545"%address = "0.0.0.0:${CUSTOM_PORT}545"%; s%^ws-address = "0.0.0.0:8546"%ws-address = "0.0.0.0:${CUSTOM_PORT}546"%" $HOME/.nibid/config/app.toml

Set Indexer

sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.nibid/config/config.toml

Update Pruning

sed -i.bak -e 's|^pruning *=.*|pruning = "custom"|; s|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|; s|^pruning-keep-every *=.*|pruning-keep-every = "0"|; s|^pruning-interval *=.*|pruning-interval = "17"|' $HOME/.nibid/config/app.toml

Reset node

nibid tendermint unsafe-reset-all --home $HOME/.nibid --keep-addr-book

Get denom info

nibid q bank denom-metadata -oj | jq

Get Node Peer

echo $(nibid tendermint show-node-id)'@'$(curl -4 -s ifconfig.me)':'$(cat $HOME/.nibiru/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')

Update server name

 sudo hostnamectl set-hostname server_name

How much SSD use node (currently)

du -sh $HOME/.nibid/

How much RAM use node (currently)

sudo systemctl status nibid | grep "Memory:"

How much CPU use node (currently)

ps -C nibid -o %cpu --no-headers | awk '{print $1"% CPU"}'

Delete node

sudo systemctl stop nibid
sudo systemctl disable nibid
sudo rm -rf /etc/systemd/system/nibid.service
sudo rm $(which nibid)
sudo rm -rf $HOME/.nibiru

Last updated