CLI Cheatsheet
This cheatsheet collects commonly used CLI commands for node operators to easily copy and paste. A few conventions we follow:
- Capitalized words indicate placeholders
- Always specify --chain-id and --node flags even when they are unnecessary
- Query CLI command always uses --output json flag and pipes result through jq
Managing keys
Check balance
realio-networkd q bank balances KEY
Create wallet
realio-networkd keys add KEY
Import wallet
realio-networkd keys add KEY --recover
List wallets
realio-networkd keys list
Delete wallet
realio-networkd keys delete KEY
Validators
Create validator
realio-networkd tx staking create-validator \
--amount=1000000000000000000ario \
--pubkey=$(realio-networkd tendermint show-validator) \
--moniker=YOURMONIKER \
--identity=YOUR_KEYBASE_ID \
--details="This is will be display in the blockchain explorer. Write here something about you" \
--chain-id=realionetwork_3301-1 \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--from=KEY \
--gas="auto" \
--gas-adjustment=1.2 \
--gas-prices="0.025ario" \
-y
Edit validator
realio-networkd tx staking edit-validator \
--new-moniker=YOUR_MONIKER \
--identity=YOUR_KEYBASE_ID \
--details="This is will be display in the blockchain explorer. Write here something about you" \
--chain-id=realionetwork_3301-1 \
--commission-rate=0.1 \
--from=KEY \
--gas="auto" \
--gas-adjustment=1.2 \
--gas-prices="0.025ario" \
-y
Unjail validator
realio-networkd tx slashing unjail --chain-id=realionetwork_3301-1 --from KEY --gas="auto" --gas-adjustment=1.2 --gas-prices="0.025ario" -y
Validator info
realio-networkd q staking validator $(realio-networkd keys show KEY --bech val -a)
Governance
Query proposal
realio-networkd query gov proposal PROPOSAL_NUMBER --chain-id=realionetwork_3301-1 --output json | jq
VOTE_OTION: yes, no, no_with_veto and abstain.
Vote proposal
realio-networkd tx gov vote PROPOSAL_NUMBER VOTE_OTION --from KEY --chain-id realionetwork_3301-1
Tokens
Send token
realio-networkd tx bank send WALLET_SENDER WALLET_RECEIVER 1000000000000000000ario --chain-id=realionetwork_3301-1 --gas="auto" --gas-adjustment=1.2 --gas-prices="0.025ario" --gas=auto
Withdraw reward
realio-networkd tx distribution withdraw-all-rewards --from KEY
Withdraw reward and commission
realio-networkd tx distribution withdraw-rewards YOUR_VALIDATOR_NUMBER --from KEY --commission --gas="auto" --gas-adjustment=1.2 --gas-prices="0.025ario" --gas=auto
Config
Use custom port
CUSTOM_PORT=267
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}58\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}57\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}60\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}56\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}66\"%" $HOME/.realio-networkd/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}17\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}80\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}90\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}91\"%" $HOME/.realio-networkd/config/app.toml
Set minimum gas prices
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.01orai\"/" $HOME/.realio-networkd/config/app.toml
Enable prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.realio-networkd/config/config.toml
Reset chain data
realio-networkd tendermint unsafe-reset-all --keep-addr-book --home $HOME/.realio-networkd --keep-addr-book
Pruning config recomended for validator nodes
Disable indexer in config.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.realio-networkd/config/config.toml
Configure pruning in app.toml
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "10"|' \
$HOME/.realio-networkd/config/app.toml