Skip to main content

Useful Commands for Side Protocol Testnet

This page provides a comprehensive collection of useful commands for managing your Side Protocol node on the testnet. These commands are organized by category for easy reference.

Node Commands

Check Node Status

# Set RPC port
RPC_PORT=26657

# Check node status
curl -s 127.0.0.1:$RPC_PORT/status | jq .

# Check P2P connection status
P2P_PORT=26656 && ss -anp | grep $P2P_PORT

# Get node sync info
sided status 2>&1 | jq .

# Get live peers
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 self peer
echo $(sided tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.side/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')

Wallet Commands

Create/Recovery Wallet

# Set wallet name
WALLET_NAME=wallet_name

# Create new wallet
sided keys add $WALLET_NAME

# Recover wallet from mnemonic
sided keys add $WALLET_NAME --recover

Query Balance

# Query wallet balance
sided q bank balances $(sided keys show $WALLET_NAME -a)

Validator Commands

Update Validator Information

WALLET_NAME=wallet_name

sided tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "KEYBASE_ID" \
--details "side protocol" \
--from $WALLET_NAME \
--chain-id sidechain-testnet-6 \
--gas auto \
--gas-adjustment 1.4 \
--gas-prices 0.005uside

Query Jail Reason

# Query signing info
sided q slashing signing-info $(sided tendermint show-validator)

Unjail Validator

WALLET_NAME=wallet_name

sided tx slashing unjail \
--chain-id sidechain-testnet-6 \
--gas-adjustment 1.4 --gas auto --gas-prices 0.005uside \
--from $WALLET_NAME

Query Validator

WALLET_NAME=wallet_name

# Query validator information
sided q staking validator $(sided keys show $WALLET_NAME --bech val -a)

# Query signing info
sided q staking signing-info $(sided tendermint show-validator)

Query Active Validators

LIMIT=6000

sided q staking validators -oj --limit=$LIMIT | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '.operator_address + " " + .voting_power + " " + .description.moniker' | sort -gr | nl

Token Management

Delegate Token

# Set variables
VALOPER_ADDRESS=$(sided keys show wallet --bech val -a)
AMOUNT=1000000uside
WALLET_NAME=wallet_name
CHAIN_ID=sidechain-testnet-6
GAS_PRICE=0.005uside

# Delegate tokens
sided tx staking delegate \
$VALOPER_ADDRESS $AMOUNT \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices $GAS_PRICE \
-y

Send Token To Another Address

# Set variables
FROM_WALLET=wallet_name
TO_ADDRESS=address
AMOUNT=1000000uside
CHAIN_ID=sidechain-testnet-6
GAS_PRICE=0.005uside

# Send tokens
sided tx bank send $FROM_WALLET $TO_ADDRESS $AMOUNT \
--from $FROM_WALLET \
--chain-id $CHAIN_ID \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices $GAS_PRICE \
-y

Withdraw Rewards From All Delegated Validators

WALLET_NAME=wallet_name
CHAIN_ID=sidechain-testnet-6
GAS_PRICE=0.005uside

sided tx distribution withdraw-all-rewards \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices $GAS_PRICE \
-y

Withdraw Commission From Your Validator

WALLET_NAME=wallet_name
CHAIN_ID=sidechain-testnet-6
GAS_PRICE=0.005uside

sided tx distribution withdraw-rewards $(sided keys show wallet --bech val -a) \
--commission \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices $GAS_PRICE \
-y

Governance

Query Proposal by ID

# Query proposal details
sided query gov proposal <proposal_id>

Vote on Proposal

WALLET_NAME=wallet_name
CHAIN_ID=sidechain-testnet-6

# Vote options: yes, no, no_with_veto, abstain
sided tx gov vote <proposal_id> yes|no|no_with_veto|abstain \
--from $WALLET_NAME \
--chain-id $CHAIN_ID \
--gas-adjustment 1.4 \
--gas auto \
-y

Maintenance

Reset All Data

DIR=~/.side

# Reset node data (keeps address book)
sided tendermint unsafe-reset-all --keep-addr-book --home $DIR

Service Management

# Check service status
systemctl status sided.service

# Restart service
systemctl restart sided.service

# View logs
journalctl -u sided.service -f -o cat

# View recent logs
journalctl -u sided.service --since "1 hour ago"

Quick Reference

CommandDescription
sided statusCheck node sync status
sided keys listList all wallets
sided q bank balances <address>Query account balance
sided q staking validatorsList all validators
sided q gov proposalsList governance proposals
systemctl status sided.serviceCheck service status
journalctl -u sided.service -fFollow service logs

Environment Variables

Common environment variables for Side Protocol:

# Network configuration
export CHAIN_ID=sidechain-testnet-6
export GAS_PRICE=0.005uside
export GAS_ADJUSTMENT=1.4

# Node configuration
export RPC_PORT=26657
export P2P_PORT=26656
export API_PORT=1317

# Wallet configuration
export WALLET_NAME=your_wallet_name
export VALOPER_ADDRESS=$(sided keys show $WALLET_NAME --bech val -a)

Troubleshooting

Common Issues

  1. Node not syncing: Check network connectivity and peer connections
  2. Transaction failures: Verify gas prices and account balances
  3. Service not starting: Check logs for configuration errors
  4. Permission denied: Ensure proper file permissions

Log Analysis

# View error logs
journalctl -u sided.service -p err

# Search for specific errors
journalctl -u sided.service | grep -i error

# Monitor sync progress
sided status 2>&1 | jq '.SyncInfo'
tip

Always backup your wallet keys and validator configuration before making changes.

warning

Never share your private keys or mnemonic phrases. Keep them secure and offline.

info

For more detailed information about Side Protocol operations, refer to the official documentation.