Useful commands

Service operations ⚙️

Check logs

sudo journalctl -u saod -f

Start service

sudo systemctl start saod

Stop service

sudo systemctl stop saod

Restart service

sudo systemctl restart saod

Check service status

sudo systemctl status saod

Reload services

sudo systemctl daemon-reload

Enable Service

sudo systemctl enable saod

Disable Service

sudo systemctl disable saod

Sync info

saod status 2>&1 | jq .SyncInfo

Node info

saod status 2>&1 | jq .NodeInfo

Your node peer

echo $(saod tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.sao/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')

Key management

Add New Wallet

saod keys add $WALLET

Restore executing wallet

saod keys add $WALLET --recover

List All Wallets

saod keys list

Delete wallet

saod keys delete $WALLET

Check Balance

saod q bank balances $(mantrachaind keys show $WALLET -a)

Export Key (save to wallet.backup)

saod keys export $WALLET

Import Key (restore from wallet.backup)

saod keys import $WALLET wallet.backup

Validator operations

Create New Validator

saod tx staking create-validator \
  --amount=1000000usct \
  --pubkey=$(saod tendermint show-validator) \
  --chain-id=sao-20230629 \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.20" \
  --min-self-delegation=1 \
  --from mykey \
  --moniker="*YourMonikerName*" \
  --gas="2000000" \
  --gas-prices="0.0025usct" \
  --yes

Edit Existing Validator

saod tx staking edit-validator \
--commission-rate 0.10 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxx" \
--from $WALLET \
--chain-id sao-20230629 \
--gas auto --gas-adjustment 1.5 \
-y

Validator info

saod status 2>&1 | jq .ValidatorInfo

Validator Details

saod q staking validator $(saod keys show $WALLET --bech val -a)

Jailing info

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

Unjail validator

saod tx slashing unjail --from $WALLET --chain-id sao-20230629 --gas auto --gas-adjustment 1.5 -y

Active Validators List

saod 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

Check Validator key

[[ $(saod q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(mantrachaind status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"

Signing info

saod q slashing signing-info $(mantrachaind tendermint show-validator)

Delete Node

sudo systemctl stop saod
sudo systemctl disable saod
sudo rm -rf /etc/systemd/system/saod.service
sudo rm $(which saod)
sudo rm -rf $HOME/.sao
sed -i "/SAO_/d" $HOME/.bash_profile

Last updated