Namada Protocol Mainnet Commands
This page provides useful commands for managing your Namada validator and interacting with the network. Replace the placeholder values with your actual configuration.
Environment Variables
Set up these variables for easier command execution:
# Network configuration
export CHAIN_ID="namada.5f5de2dd1b88cba30586420"
export NODE_RPC="http://127.0.0.1:26657"
# Your aliases and addresses (replace with your actual values)
export VALIDATOR_ALIAS="your-validator-alias" # Your validator alias
export WALLET_ALIAS="your-wallet-alias" # Your wallet alias
export EMAIL="[email protected]" # Your contact email
export WEBSITE="https://your-website.com" # Your website
export DISCORD_HANDLE="your-discord" # Your Discord handle
# Your addresses (get these from your actual setup)
export VALIDATOR_ADDRESS="tnam1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # Your validator address
export WALLET_ADDRESS="tnam1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # Your wallet address
export PUBLIC_KEY="tpknam1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # Your public key
info
Important: Replace all placeholder values with your actual validator alias, wallet alias, addresses, and other configuration details.
Wallet Management
Wallet Operations
# Find wallet information
namada wallet find --alias $WALLET_ALIAS
# List all addresses
namadaw list --addr
# Check wallet balance
namadac balance --node $NODE_RPC --owner $WALLET_ALIAS
# Generate new wallet (if needed)
namadaw gen --alias $WALLET_ALIAS
Key Management
# List all keys
namadaw list
# Find specific wallet details
namadaw find --alias $WALLET_ALIAS
# Export wallet (backup)
namadaw export --alias $WALLET_ALIAS
Validator Operations
Validator Setup
# Initialize validator
namadac init-validator \
--alias $VALIDATOR_ALIAS \
--account-keys $WALLET_ALIAS \
--signing-keys $WALLET_ALIAS \
--commission-rate 0.05 \
--max-commission-rate-change 0.01 \
--email $EMAIL \
--node $NODE_RPC
# Find validator by tendermint address
namadac find-validator --node $NODE_RPC \
--tm-address=$(curl -s localhost:26657/status | jq -r .result.validator_info.address)
# Find validator by namada address
namadac find-validator --tm-address=$VALIDATOR_ADDRESS
Validator Metadata
# Update validator metadata
namadac change-metadata \
--validator $VALIDATOR_ADDRESS \
--memo $PUBLIC_KEY \
--website $WEBSITE \
--description "Your validator description here" \
--email $EMAIL \
--discord-handle $DISCORD_HANDLE \
--signing-keys $WALLET_ALIAS
# Check validator state
namadac validator-state --node $NODE_RPC --validator $VALIDATOR_ADDRESS
Staking Operations
Bonding and Delegation
# Bond tokens to your validator
namadac bond \
--node $NODE_RPC \
--memo $PUBLIC_KEY \
--source $WALLET_ALIAS \
--validator $VALIDATOR_ALIAS \
--amount 10000
# Delegate to another validator
namadac bond \
--node $NODE_RPC \
--memo $PUBLIC_KEY \
--source $WALLET_ALIAS \
--validator OTHER_VALIDATOR_ADDRESS \
--amount 1000
# Check bonds
namadac bonds --node $NODE_RPC --owner $WALLET_ALIAS
namadac bonds --validator $VALIDATOR_ALIAS --node $NODE_RPC
Redelegation and Unbonding
# Redelegate between validators
namadac redelegate \
--owner $WALLET_ALIAS \
--source-validator SOURCE_VALIDATOR_ADDRESS \
--destination-validator $VALIDATOR_ADDRESS \
--amount 12000 \
--memo $PUBLIC_KEY \
--node $NODE_RPC
# Unbond tokens
namadac unbond \
--memo $PUBLIC_KEY \
--source $WALLET_ALIAS \
--validator $VALIDATOR_ADDRESS \
--amount 1000 \
--node $NODE_RPC
# Withdraw unbonded tokens
namadac withdraw \
--memo $PUBLIC_KEY \
--source $WALLET_ALIAS \
--validator $VALIDATOR_ADDRESS \
--node $NODE_RPC
Governance
Voting on Proposals
# Vote on a proposal (replace PROPOSAL_ID with actual ID)
namadac vote-proposal \
--proposal-id PROPOSAL_ID \
--vote yay \
--address $WALLET_ALIAS \
--node $NODE_RPC \
--memo $PUBLIC_KEY
# Vote as validator
namadac vote-proposal \
--proposal-id PROPOSAL_ID \
--vote yay \
--address $VALIDATOR_ALIAS \
--memo $PUBLIC_KEY \
--node $NODE_RPC
# Query proposal votes
namadac query-proposal-votes \
--node $NODE_RPC \
--proposal-id PROPOSAL_ID \
--voter $WALLET_ALIAS
Proposal Information
# List all proposals
namadac query-proposals --node $NODE_RPC
# Query specific proposal
namadac query-proposal --node $NODE_RPC --proposal-id PROPOSAL_ID
# Check voting power
namadac voting-power --node $NODE_RPC --validator $VALIDATOR_ADDRESS
Network Information
Chain Status
# Get current epoch
namadac epoch --node $NODE_RPC
# Check node status
curl -s localhost:26657/status | jq -r .
# Get chain info
namadac status --node $NODE_RPC
# Check sync status
curl -s localhost:26657/status | jq .result.sync_info.catching_up
Network Statistics
# Get validator set
namadac validator-set --node $NODE_RPC
# Check consensus state
namadac consensus-state --node $NODE_RPC
# Get network info
curl -s localhost:26657/net_info | jq .
Transactions
Token Transfers
# Transfer tokens
namadac transfer \
--source $WALLET_ALIAS \
--target TARGET_ADDRESS \
--token naan \
--amount 10000 \
--node $NODE_RPC
# Transfer to validator
namadac transfer \
--source $WALLET_ALIAS \
--target $VALIDATOR_ALIAS \
--token naan \
--amount 10000 \
--node $NODE_RPC
Shielded Transfers
# Shield tokens (transparent to shielded)
namadac shield \
--source $WALLET_ALIAS \
--target SHIELDED_ADDRESS \
--token naan \
--amount 1000 \
--node $NODE_RPC
# Unshield tokens (shielded to transparent)
namadac unshield \
--source SHIELDED_ADDRESS \
--target $WALLET_ALIAS \
--token naan \
--amount 1000 \
--node $NODE_RPC
# Shielded transfer
namadac transfer \
--source SHIELDED_SOURCE \
--target SHIELDED_TARGET \
--token naan \
--amount 1000 \
--node $NODE_RPC
Node Management
Service Operations
# Check service status
systemctl status namadad
# Start/stop/restart service
systemctl start namadad
systemctl stop namadad
systemctl restart namadad
# Check logs
journalctl -u namadad -f
journalctl -u namadad --since "1 hour ago"
journalctl -u namadad -n 100
Node Monitoring
# Check node connectivity
curl -s localhost:26657/status
# Monitor sync progress
journalctl -u namadad -f | grep -i sync
# Check validator signing
journalctl -u namadad -f | grep -i "signed"
# Monitor consensus participation
journalctl -u namadad -f | grep -i "commit"
Useful Queries
Account Information
# Check account balance
namadac balance --node $NODE_RPC --owner $WALLET_ALIAS
# Check all balances
namadac balance --node $NODE_RPC --owner $WALLET_ALIAS --token all
# Check validator rewards
namadac rewards --node $NODE_RPC --validator $VALIDATOR_ADDRESS
# Check commission
namadac commission --node $NODE_RPC --validator $VALIDATOR_ADDRESS
Staking Information
# Check validator info
namadac validator-info --node $NODE_RPC --validator $VALIDATOR_ADDRESS
# Check delegation
namadac bonds --node $NODE_RPC --owner $WALLET_ALIAS
# Check unbonding
namadac unbonds --node $NODE_RPC --owner $WALLET_ALIAS
# Check slashes
namadac slashes --node $NODE_RPC --validator $VALIDATOR_ADDRESS
Automation Scripts
Voting Script
# Create a voting script (vote.sh)
#!/bin/bash
PROPOSAL_ID=$1
VOTER_ADDRESS=$2
PUBLIC_KEY=$3
RPC_URL=$4
namadac vote-proposal \
--proposal-id $PROPOSAL_ID \
--vote yay \
--address $VOTER_ADDRESS \
--memo $PUBLIC_KEY \
--node $RPC_URL
# Usage: bash vote.sh PROPOSAL_ID $WALLET_ADDRESS $PUBLIC_KEY $NODE_RPC
Monitoring Script
# Create a monitoring script (monitor.sh)
#!/bin/bash
echo "=== Validator Status ==="
namadac validator-state --validator $VALIDATOR_ADDRESS --node $NODE_RPC
echo "=== Current Epoch ==="
namadac epoch --node $NODE_RPC
echo "=== Balance ==="
namadac balance --owner $WALLET_ALIAS --node $NODE_RPC
echo "=== Bonds ==="
namadac bonds --validator $VALIDATOR_ALIAS --node $NODE_RPC
Quick Reference
Essential Commands
Command | Purpose |
---|---|
namadac epoch | Check current epoch |
namadac validator-state --validator $VALIDATOR_ADDRESS | Check validator status |
namadac balance --owner $WALLET_ALIAS | Check wallet balance |
namadac bonds --validator $VALIDATOR_ALIAS | Check validator bonds |
systemctl status namadad | Check node service status |
Common Parameters
Parameter | Description | Example |
---|---|---|
--node | RPC endpoint | http://127.0.0.1:26657 |
--chain-id | Chain identifier | namada.5f5de2dd1b88cba30586420 |
--memo | Transaction memo | Your public key |
--amount | Token amount | 10000 |
info
These commands are for the Namada mainnet. Always double-check addresses and amounts before executing transactions.
tip
Best Practices:
- Always use your actual aliases and addresses
- Keep your memo (public key) consistent for tracking
- Monitor your validator regularly for optimal performance
- Participate in governance to help secure the network