Useful commands
List of commands used to manage the validator and node
Wallet interaction
Create Wallet
lavad keys add <WALLET_NAME>
Restore wallet
lavad keys add <WALLET_NAME> --recover
Show all wallets
Delete wallet
lavad keys delete <WALLET_NAME>
Export wallet
lavad keys export <WALLET_NAME>
Import wallet
lavad keys import <WALLET_NAME> <WALLET_NAME>.backup
Show balance
lavad Query <WALLET_NAME> balance
Validator control
Create a validator
lavad tx staking create-validator \
--amount 1000000ulava \
--from <WALLET_NAME> \
--commission-max-change-rate "0.1" \
--commission-max-rate "0.2" \
--commission-rate "0.1" \
--min-self-delegation "1" \
--pubkey $(lavad tendermint show-validator) \
--moniker <YOUR_MONIKER> \
--chain-id lava-testnet-1 \
--identity="<YOUR_KEYBASE_ID>" \
--details="<YOUR_DETAILS>" \
--website="<YOUR_WEBSITE" -y
Edit validator
lavad tx staking edit-validator \
--moniker="<YOUR_MONIKER>" \
--identity="<YOUR_KEYBASE_ID>" \
--details="<YOUR_DETAILS>" \
--website="<YOUR_WEBSITE>"
--chain-id=lava-testnet-1 \
--commission-rate="0.10" \
--from=<WALLET_NAME> \
--fees 100ulava -y
Unjail
lavad tx slashing unjail --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Jail reason
lavad query slashing signing-info $(lavad tendermint show-validator)
Active validators
lavad q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Inactive validators
lavad q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Information about the validator
lavad q staking validator $(lavad keys show <WALLET_NAME> --bech val -a)
Balance management
Withdrawal of all rewards
lavad tx distribution withdraw-all-rewards --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Withdrawal of rewards and commissions
lavad tx distribution withdraw-rewards $(lavad keys show <WALLET_NAME> --bech val -a) --commission --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Self-delegation
lavad tx staking delegate $(lavad keys show <WALLET_NAME> --bech val -a) 1000000ulava --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Delegation to validator
lavad tx staking delegate <TO_VALOPER_ADDRESS> 1000000ulava --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Redelegation to another validator
lavad tx staking redelegate $(lavad keys show <WALLET_NAME> --bech val -a) <TO_VALOPER_ADDRESS> 1000000ulava --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Unbond tokens
lavad tx staking unbond $(lavad keys show <WALLET_NAME> --bech val -a) 1000000ulava --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Sending tokens to a wallet
lavad tx bank send <WALLET_NAME> <TO_<WALLET_ADDRESS> 1000000ulava --from <WALLET_NAME> --fees 100ulava --chain-id lava-testnet-1
Governance
All proposals
lavad query gov proposals
All proposals by ID
lavad query gov proposal 1
Vote "YES"
lavad tx gov vote 1 yes --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Vote "NO"
lavad tx gov vote 1 no --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Vote "Abstain"
lavad tx gov vote 1 abstain --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Vote "NoWithVeto"
lavad tx gov vote 1 nowithveto --from <WALLET_NAME> --chain-id lava-testnet-1 --fees 100ulava -y
Utility
Update ports
CUSTOM_PORT=10
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/.lava/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\"%" $HOME/.lava/config/app.tom
Disable Indexer
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.lava/config/config.toml
Enable Indexer
sed -i 's|^indexer *=.*|indexer = "kv"|' $HOME/.lava/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 = "10"|' $HOME/.lava/config/app.toml
Node support
Validator Info
lavad status 2>&1 | jq .ValidatorInfo
Sync info
lavad status 2>&1 | jq .SyncInfo
Deleting a node
Before deleting a node make sure you save priv_validator_key.json
sudo systemctl stop lavad && \
sudo systemctl disable lavad && \
rm /etc/systemd/system/lavad.service && \
sudo systemctl daemon-reload && \
cd $HOME && \
rm -rf GHFkqmTzpdNLDd6T && \
rm -rf .lava && \
rm -rf $(which lavad)
Service setup
Reload service configuration
sudo systemctl daemon-reload
Enable service
sudo systemctl enable lavad
Disable service
sudo systemctl disable lavad
Start service
sudo systemctl start lavad
Stop service
sudo systemctl stop lavad
Restart service
sudo systemctl restart lavad
Check service status
sudo systemctl status lavad
Check service logs
sudo journalctl -u lavad -f --no-hostname -o cat
Last updated