Mainnet
Cosmos

Installation Guide
Node CLI
Public Endpoint
State Sync
Snapshot
Custom Explorers
Decentralization Maps
Installation Guide
Installation Guide
Node CLI
Public Endpoint
State Sync
Snapshot
Custom Explorers
Decentralization Maps
How To Install Full Node Cosmoshub Mainnet
Setting up vars
Your Nodename (validator) that will shows in explorer
NODENAME=<Your_Nodename_Moniker>
Save variables to system
echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile
if [ ! $WALLET ]; then
echo "export WALLET=wallet" >> $HOME/.bash_profile
fi
echo "export COSMOS_CHAIN_ID=cosmoshub-4" >> $HOME/.bash_profile
source $HOME/.bash_profile
Update packages
sudo apt update && sudo apt upgrade -y
Install dependencies
sudo apt install curl build-essential git wget jq make gcc tmux net-tools ccze -y
Install go
if ! [ -x "$(command -v go)" ]; then
ver="1.23.5"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
source ~/.bash_profile
fi
Download and build binaries
cd $HOME
rm -rf cosmos
git clone https://github.com/cosmos/gaia cosmos
cd cosmos
git checkout v25.1.0
make install
Config app
gaiad config chain-id $COSMOS_CHAIN_ID
Init app
gaiad init $NODENAME --chain-id $COSMOS_CHAIN_ID
Download configuration
curl -o ~/.gaia/config/addrbook.toml https://snapshot.konsortech.xyz/mainnet/cosmos/addrbook.json
curl -o ~/.gaia/config/genesis.json https://snapshot.konsortech.xyz/mainnet/cosmos/genesis.json
Disable indexing
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.gaia/config/config.toml
Set minimum gas price
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0aislm"|g' $HOME/.gaia/config/app.toml
Create service
sudo tee /etc/systemd/system/gaiad.service > /dev/null << EOF
[Unit]
Description=Cosmoshub Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which gaiad) start
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF
Register and start service
sudo systemctl daemon-reload
sudo systemctl enable gaiad
sudo systemctl restart gaiad && sudo journalctl -u gaiad -f -o cat
CLI Command
Create wallet
To create new wallet you can use command below. Don’t forget to save the mnemonic
gaiad keys add $WALLET
To recover your wallet using seed phrase
gaiad keys add $WALLET --recover
Show your wallet list
gaiad keys list
Save wallet info
Add wallet and validator address into variables
COSMOS_WALLET_ADDRESS=$(gaiad keys show $WALLET -a)
COSMOS_VALOPER_ADDRESS=$(gaiad keys show $WALLET --bech val -a)
echo 'export COSMOS_WALLET_ADDRESS='${COSMOS_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export COSMOS_VALOPER_ADDRESS='${COSMOS_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile
Fund your wallet
In order to create validator first you need to fund your wallet with discord faucet.
N/A
Create validator
check your wallet balance:
gaiad query bank balances $COSMOS_WALLET_ADDRESS
To create your validator run command below
gaiad tx staking create-validator \
--amount 1000000uatom \
--from $WALLET \
--commission-max-change-rate "0.01" \
--commission-max-rate "0.2" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--pubkey $(gaiad tendermint show-validator) \
--moniker $NODENAME \
--chain-id $COSMOS_CHAIN_ID
Check your validator key
[[ $(gaiad q staking validator $COSMOS_VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(gaiad status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Get list of validators
gaiad q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Usefull commands
Service management
Check logs
journalctl -fu gaiad -o cat
Start service
sudo systemctl start gaiad
Stop service
sudo systemctl stop gaiad
Restart service
sudo systemctl restart gaiad
Node info
Synchronization info
gaiad status 2>&1 | jq .SyncInfo
Validator info
gaiad status 2>&1 | jq .ValidatorInfo
Node info
gaiad status 2>&1 | jq .NodeInfo
Show node id
gaiad tendermint show-node-id
Wallet operations
List of wallets
gaiad keys list
Recover wallet
gaiad keys add $WALLET --recover
Delete wallet
gaiad keys delete $WALLET
Get wallet balance
gaiad query bank balances $COSMOS_WALLET_ADDRESS
Transfer funds
gaiad tx bank send $COSMOS_WALLET_ADDRESS <TO_COSMOS_WALLET_ADDRESS> 1000000uatom
Voting
gaiad tx gov vote 1 yes --from $WALLET --chain-id=$COSMOS_CHAIN_ID
Staking, Delegation and Rewards
Delegate stake
gaiad tx staking delegate $COSMOS_VALOPER_ADDRESS 1000000uatom --from=$WALLET --chain-id=$COSMOS_CHAIN_ID --gas=auto
Redelegate stake from validator to another validator
gaiad tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 1000000uatom --from=$WALLET --chain-id=$COSMOS_CHAIN_ID --gas=auto
Withdraw all rewards
gaiad tx distribution withdraw-all-rewards --from=$WALLET --chain-id=$COSMOS_CHAIN_ID --gas=auto
Withdraw rewards with commision
gaiad tx distribution withdraw-rewards $COSMOS_VALOPER_ADDRESS --from=$WALLET --commission --chain-id=$COSMOS_CHAIN_ID
Validator management
Edit validator
gaiad tx staking edit-validator \
--moniker=$NODENAME \
--identity=<your_keybase_id> \
--website="<your_website>" \
--details="<your_validator_description>" \
--chain-id=$COSMOS_CHAIN_ID \
--from=$WALLET
Unjail validator
gaiad tx slashing unjail \
--broadcast-mode=block \
--from=$WALLET \
--chain-id=$COSMOS_CHAIN_ID \
--gas=auto
Public Endpoint
RPC
https://mainnet-cosmoshub-rpc.konsortech.xyz
API
https://mainnet-cosmoshub-api.konsortech.xyz
gRPC
mainnet-cosmoshub.konsortech.xyz:31656
Peers
0fff197f9443df283ea1c633dbd55028a2de0d21@mainnet-cosmoshub.konsortech.xyz:31656
Seed
816c99295ba7ad34455c465b9f79f9ed230eb39e@mainnet-seed.konsortech.xyz:31265
Addrbook
https://snapshot.konsortech.xyz/mainnet/cosmos/addrbook.json
Genesis File
https://snapshot.konsortech.xyz/mainnet/cosmos/genesis.json
Statesync
sudo systemctl stop gaiad
cp $HOME/.gaia/data/priv_validator_state.json $HOME/.gaia/priv_validator_state.json.backup
gaiad tendermint unsafe-reset-all --home $HOME/.gaia --keep-addr-book
SNAP_RPC="https://mainnet-cosmoshub-rpc.konsortech.xyz:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.gaia/config/config.toml
mv $HOME/.gaia/priv_validator_state.json.backup $HOME/.gaia/data/priv_validator_state.json
sudo systemctl restart gaiad && journalctl -fu gaiad -o cat
Snapshot
sudo systemctl stop gaiad
cp $HOME/.gaia/data/priv_validator_state.json $HOME/.gaia/priv_validator_state.json.backup
rm -rf $HOME/.gaia/data
SNAP_NAME=$(curl -s https://snapshot.konsortech.xyz/mainnet/cosmos/ | egrep -o ">cosmos-snapshot.*\.tar.lz4" | tr -d ">")
curl https://snapshot.konsortech.xyz/mainnet/cosmos/${SNAP_NAME} | lz4 -dc - | tar -xf - -C $HOME/.gaia
mv $HOME/.gaia/priv_validator_state.json.backup $HOME/.gaia/data/priv_validator_state.json
sudo systemctl restart gaiad && journalctl -u gaiad -f --no-hostname -o cat