Useful Commands for Bitway Mainnet
This page collects common bitwayd commands for operating a Bitway mainnet node.
Environment Variables
export CHAIN_ID="bitway-1"
export GAS_PRICE="0.001uside"
export GAS_ADJUSTMENT="1.4"
export DAEMON_HOME="$HOME/.bitwayd"
export RPC_PORT="26657"
export P2P_PORT="26656"
export WALLET_NAME="your_wallet_name"
Node Commands
Check Node Status
curl -s http://127.0.0.1:$RPC_PORT/status | jq .
bitwayd status 2>&1 | jq .
bitwayd status 2>&1 | jq .SyncInfo.catching_up
Check Peers
ss -anp | grep $P2P_PORT
curl -sS http://127.0.0.1:$RPC_PORT/net_info \
| jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' \
| awk -F ':' '{print $1":"$(NF)}'
Show Your Node ID
echo "$(bitwayd tendermint show-node-id)@$(curl -s ifconfig.me):26656"
Wallet Commands
Create or Recover Wallet
bitwayd keys add $WALLET_NAME
bitwayd keys add $WALLET_NAME --recover
bitwayd keys list
Query Balance
bitwayd q bank balances $(bitwayd keys show $WALLET_NAME -a)
Validator Commands
Edit Validator Metadata
bitwayd tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$NODE_NAME" \
--identity "KEYBASE_ID" \
--details "Bitway validator" \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas auto \
--gas-adjustment $GAS_ADJUSTMENT \
--gas-prices $GAS_PRICE
Query Validator
bitwayd q staking validator $(bitwayd keys show $WALLET_NAME --bech val -a)
bitwayd q slashing signing-info $(bitwayd tendermint show-validator)
Unjail Validator
bitwayd tx slashing unjail \
--chain-id $CHAIN_ID \
--gas-adjustment $GAS_ADJUSTMENT \
--gas auto \
--gas-prices $GAS_PRICE \
--from $WALLET_NAME
Query Active Validators
bitwayd q staking validators -oj --limit=6000 \
| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \
| jq -r '.operator_address + " " + .voting_power + " " + .description.moniker' \
| sort -gr | nl
Token Management
Delegate
VALOPER_ADDRESS=$(bitwayd keys show $WALLET_NAME --bech val -a)
AMOUNT=1000000uside
bitwayd tx staking delegate $VALOPER_ADDRESS $AMOUNT \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas-adjustment $GAS_ADJUSTMENT \
--gas auto \
--gas-prices $GAS_PRICE \
-y
Send Tokens
TO_ADDRESS="bitway..."
AMOUNT=1000000uside
bitwayd tx bank send $WALLET_NAME $TO_ADDRESS $AMOUNT \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas-adjustment $GAS_ADJUSTMENT \
--gas auto \
--gas-prices $GAS_PRICE \
-y
Withdraw Rewards
bitwayd tx distribution withdraw-all-rewards \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas-adjustment $GAS_ADJUSTMENT \
--gas auto \
--gas-prices $GAS_PRICE \
-y
Withdraw Validator Commission
bitwayd tx distribution withdraw-rewards $(bitwayd keys show $WALLET_NAME --bech val -a) \
--commission \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas-adjustment $GAS_ADJUSTMENT \
--gas auto \
--gas-prices $GAS_PRICE \
-y
Governance
Query Proposal
bitwayd query gov proposal <proposal_id>
Vote
bitwayd tx gov vote <proposal_id> yes \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas-adjustment $GAS_ADJUSTMENT \
--gas auto \
--gas-prices $GAS_PRICE \
-y
Maintenance
Reset Node Data
bitwayd tendermint unsafe-reset-all --keep-addr-book --home $DAEMON_HOME
Service Management
sudo systemctl status bitwayd.service
sudo systemctl restart bitwayd.service
journalctl -u bitwayd.service -f -o cat
journalctl -u bitwayd.service --since "1 hour ago"
Quick Reference
| Command | Description |
|---|---|
bitwayd status | Check node sync status |
bitwayd keys list | List wallets |
bitwayd q bank balances <address> | Query account balance |
bitwayd q staking validators | List validators |
bitwayd q gov proposals | List governance proposals |
systemctl status bitwayd.service | Check service status |
journalctl -u bitwayd.service -f | Follow service logs |
warning
Never share private keys, mnemonic phrases, or validator key material.