Services
  • π₯𝐞𝐬𝐧𝐒𝐀 | 𝐔𝐓𝐒𝐀
  • 🌐Cosmos WIKI
    • πŸ”§Creating / Editing a Validator
    • πŸ“¨Cosmos / governance
    • πŸ› οΈUseful commands
    • πŸ”¨Changing ports in the Cosmos ecosystem
    • 🌁IBC (HERMES)
    • βš’οΈNode-exporter + Grafana + Prometheus + Alertmanager
    • βš’οΈTenderDuty v2 - monitoring and alerting
  • Mainnet
    • Arkeo
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Atomone
      • πŸ’»Installation
      • ⌚State sync
      • ⌚Snapshots
      • πŸ“¬Updates
    • Aura
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Dora Factory
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Dymension
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Genesis L1
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Gitopia
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Jackal
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Konstellation
      • πŸ’»Installation
      • ⌚Snapshot
      • πŸ“¬Updates
    • Nibiru
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
      • πŸ“¬Price feeder (βœ”οΈOracle)
    • Provenance
      • πŸ’»Installation
      • πŸ“¬Updates
    • Teritori
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Quicksilver
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Uptick
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Source protocol
      • πŸ’»Installation
      • πŸ“¬Updates
    • Zenrock
      • πŸ’»Installation
      • πŸ’»Sidecar (βœ”οΈOracle)
      • πŸ’»Create a validator
      • ⌚State sync
      • ⌚Snapshot
      • πŸ“¬Updates
  • TESTNET
    • Atomone
      • πŸ’»Installation
      • πŸ“¬Updates
    • Airchains
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Aura
      • πŸ’»Installation
      • πŸ“¬Updates
    • Arkeo
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
      • πŸ“¬Providers
    • AXON PROTOCOL
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Dora Factory
      • πŸ’»Installation
      • πŸ“¬Updates
    • Dymension
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Empeiria
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Galactica
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Jackal
      • πŸ’»Installation
      • πŸ“¬Updates
    • Kira
      • πŸ’»Installation
    • PRYSM
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Source protocol
      • πŸ’»Installation
      • πŸ“¬Updates
    • Story Protocol
      • πŸ’»Installation
      • πŸ’»Create a validator
      • ⌚State sync
      • ⌚Snapshot
      • πŸ“¬Updates
    • Tellor
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
      • πŸ“¬Data Reporter (βœ”οΈOracle)
    • Quicksilver
      • πŸ’»Installation
      • πŸ“¬Updates
    • Warden Protocol
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
      • πŸ“¬Oracle
    • XRPL EVM
      • πŸ’»Installation
      • ⌚State sync
      • ⌚Snapshots
      • πŸ“¬Updates
    • Zenrock
      • πŸ’»Installation
      • πŸ’»Sidecar (βœ”οΈInstall)
      • πŸ’»βœ”οΈconfig.yaml
      • πŸ’»βœ”οΈeigen_operator_config.yaml
      • πŸ’»Create a validator
      • πŸ“¬Updates
  • OTHER PROJECTS
    • Avail mainnet
      • πŸ’»Installation
      • ⌚Snapshot
      • πŸ“¬Validator migration
    • Avail testnet
      • πŸ’»Installation
      • ⌚Snapshot
      • πŸ“¬Validator migration
    • Kusama
      • πŸ’»Decentralized nodes
      • πŸ’»Installation
      • ⌚Snapshot
      • βš™οΈValidator setup
      • βš™οΈValidator migration
      • πŸ› οΈCrunch bot
    • Polkadot
      • πŸ’»Decentralized nodes
      • πŸ’»Installation
      • ⌚Snapshot
      • βš™οΈValidator setup
      • βš™οΈValidator migration
      • πŸ› οΈCrunch bot
    • Tangle Network
      • πŸ’»Installation
      • πŸ“¬Validator migration
    • UOMI (GPU)
      • πŸ’»Installation
      • ⌚Snapshot
      • πŸ“¬Validator migration
  • ARCHIVE
    • Entrypoint
      • πŸ’»Installation
      • ⌚State sync
      • πŸ“¬Updates
    • Celestia
      • πŸ’»Consensus Node
      • πŸ–₯️Bridge node (Shwap)
      • πŸ–₯️Full node (Shwap)
      • πŸ–₯️Light node (Shwap)
      • ⌚Snapshots
      • ⌚State Sync [consensus node]
      • πŸ”ŽAnalysis of the Bridge Node
    • Celestia-testnet
      • πŸ’»Consensus Node
      • πŸ–₯️Bridge node (Shwap)
      • πŸ–₯️Full node (Shwap)
      • πŸ–₯️Light node (Shwap)
      • ⌚Snapshots
      • ⌚State Sync [consensus node]
      • πŸ”ŽAnalysis of the Bridge Node
    • Native [migration to SUI]
      • πŸ’»Installation
      • ⌚Snapshots
      • ⌚State sync
      • πŸ“¬Updates
    • Nubit
      • πŸ’»Light node
      • πŸ“¬Full Node
    • Lava network
      • πŸ’»Installation
      • ⌚State sync
      • ⌚Snapshot
      • πŸ“¬Updates
      • ⌚Providers
    • Lava network
      • πŸ’»Installation
      • ⌚State sync
      • ⌚Snapshot
      • πŸ“¬Updates
      • ⌚Providers
    • XAI
      • πŸ’»Installation
    • Ojo
      • πŸ’»Installation
      • ⌚State sync
      • ⌚Snapshot
      • πŸ“¬Updates
      • πŸ“¬Price feeder (βœ”οΈOracle)
Powered by GitBook
On this page
  • First we set the variables
  • Working with wallets
  • General information
  • Transactions
  • Governance
  • Peers and RPC
  1. Cosmos WIKI

Useful commands

Transactions and curl commands are launched while the node is running

If transactions are not sent with an error account sequence mismatch, expected 18, got 17: incorrect account sequence, then add the -s 18 switch to the command (replace the number with the one waiting for sequence)

First we set the variables

BINARY="canined"
DENOM="ujkl"
FOLDER=".canine"

Working with wallets

# create wallet
$BINARY keys add <name_wallet> --keyring-backend os

# restore wallet
$BINARY keys add <name_wallet> --recover --keyring-backend os

# restore wallet for EVM networks
$BINARY keys add <name_wallet> --recover --coin-type 118 --algo secp256k1

# list wallets
$BINARY keys list

# show account key
$BINARY keys show <name_wallet> --bech acc

# show validator key
$BINARY keys show <name_wallet> --bech val

# show consensus key
$BINARY keys show <name_wallet> --bech cons

# show all supported addresses
$BINARY debug addr <wallet_addr>

# how private key
$BINARY keys export <name_wallet> --unarmored-hex --unsafe

# account request
$BINARY q auth account $($BINARY keys show <name_wallet> -a) -o text

# delete wallet
$BINARY keys delete <name_wallet>

General information

# check blocks
$BINARY status 2>&1 | jq ."SyncInfo"."latest_block_height"

# check logs
journalctl -u $BINARY -f -o cat

# check status
curl localhost:26657/status

# check balance
$BINARY q bank balances <address>

# check the pubkey of the validator
$BINARY tendermint show-validator

# check the validator
$BINARY query staking validator <valoper_address>
$BINARY query staking validators --limit 1000000 -o json | jq '.validators[] | select(.description.moniker=="<name_moniker>")' | jq

# check TX_HASH
$BINARY query tx <TX_HASH>

# network settings
$BINARY q staking params
$BINARY q slashing params

# check how many blocks are skipped by the validator
$BINARY q slashing signing-info $($BINARY tendermint show-validator)

# find out the validator creation transaction (replace your valoper_address)
$BINARY query txs --events='create_validator.validator=<your_valoper_address>' -o=json | jq .txs[0].txhash -r

# view active set
$BINARY q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl

# viewing an inactive set
$BINARY q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl

Transactions

# collect rewards from all validators delegated to (no validator fee)
$BINARY tx distribution withdraw-all-rewards --from <name_wallet> --fees 5000$DENOM -y

# collect rewards from a separate validator or rewards + commission from your own validator
$BINARY tx distribution withdraw-rewards <valoper_address> --from <name_wallet> --fees 5000$DENOM --commission -y

# delegate more to your stake (this is how 1 coin is sent)
$BINARY tx staking delegate <valoper_address> 1000000$DENOM --from <name_wallet> --fees 5000$DENOM -y

# redelegation to another validator
$BINARY tx staking redelegate <src-validator-addr> <dst-validator-addr> 1000000$DENOM --from <name_wallet> --fees 5000$DENOM -y

# unbond 
$BINARY tx staking unbond <addr_valoper> 1000000$DENOM --from <name_wallet> --fees 5000$DENOM -y

# send coins to another address
$BINARY tx bank send <name_wallet> <address> 1000000$DENOM --fees 5000$DENOM -y

# get out of jail
$BINARY tx slashing unjail --from <name_wallet> --fees 5000$DENOM -y

Governance

# list proposals
$BINARY q gov proposals

# see the result of the vote
$BINARY q gov proposals --voter <ADDRESS>

# vote for the proposal
$BINARY tx gov vote 1 yes --from <name_wallet> --fees 555$DENOM

# make a deposit to the proposal
$BINARY tx gov deposit 1 1000000$DENOM --from <name_wallet> --fees 555$DENOM

# create an proposal
$BINARY tx gov submit-proposal --title="Randomly reward" --description="Reward 10 testnet participants who completed more than 3 tasks" --type="Text" --deposit="11000000$DENOM" --from=<name_wallet> --fees 500$DENOM

Peers and RPC

# find out your peer
PORTR=$(grep -A 3 "\[p2p\]" ~/$FOLDER/config/config.toml | egrep -o ":[0-9]+") && \
echo $($BINARY tendermint show-node-id)@$(curl ifconfig.me)$PORTR

# find out RPC port
echo -e "\033[0;32m$(grep -A 3 "\[rpc\]" ~/$FOLDER/config/config.toml | egrep -o ":[0-9]+")\033[0m"

# checking the number of peers
PORT=
curl -s http://localhost:$PORT/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":")[2])"' | wc -l

# list of monikers of connected peers
curl -s http://localhost:$PORT/net_info | jq '.result.peers[].node_info.moniker'

# ΠŸΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° prevotes/precommits
curl -s localhost:$PORT/consensus_state | jq '.result.round_state.height_vote_set[0].prevotes_bit_array' && \
curl -s localhost:$PORT/consensus_state | jq '.result.round_state.height_vote_set[0].precommits_bit_array'

# check prevote of your validator
curl -s localhost:$PORT/consensus_state -s | grep $(curl -s localhost:26657/status | jq -r .result.validator_info.address[:12])
PreviousCosmos / governanceNextChanging ports in the Cosmos ecosystem

Last updated 8 months ago

🌐
πŸ› οΈ