Personalize Command Examples 

Fill in your details below. The command examples on this page will update automatically. Your data can be saved locally in your browser for your next visit.

The public name of your node/validator.
Your 16-character Keybase.io identity ID.
The URL of your validator's website.
A short sentence describing your validator.
The local name of your wallet in the keyring.
Your public address for receiving funds.
Your validator's operator address for staking.
The Go language version to install.
Initial amount to delegate.
The pruning strategy.
Blocks to keep.
Pruning interval.

General Chain Information

Basic Information

Chain Name: stratos
Chain ID: stratos-1
Network Type: Mainnet
Status: Live
Bech32 Prefix: st
Website: https://www.thestratos.org

Binary & Versions

Binary Name: stchaind
Node Home: $HOME/.stchaind
Chain Registry Version: v0.11.2
Chain Registry Compatible Versions: v0.11.2
Repository: GitHub

SDK & Consensus

SDK Version: N/A
Consensus Engine: Cometbft
Consensus Version: N/A

Token & Fees

Token Symbol:
Base Denom:
Min Gas Price: 1000000000wei

Raw Chain Registry Data

Complete JSON data from the chain registry (for developers).

Show JSON Data
{
    "$schema": "../chain.schema.json",
    "chain_name": "stratos",
    "status": "live",
    "network_type": "mainnet",
    "website": "https://www.thestratos.org",
    "pretty_name": "Stratos",
    "chain_type": "cosmos",
    "chain_id": "stratos-1",
    "bech32_prefix": "st",
    "daemon_name": "stchaind",
    "node_home": "$HOME/.stchaind",
    "key_algos": [
        "ethsecp256k1"
    ],
    "extra_codecs": [],
    "slip44": 606,
    "fees": {
        "fee_tokens": [
            {
                "denom": "wei",
                "low_gas_price": 1000000000,
                "average_gas_price": 1200000000,
                "high_gas_price": 1600000000
            }
        ]
    },
    "description": "STOS coin is the native token for the Stratos Blockchain. Stratos is a pioneering decentralized infrastructure service provider, revolutionizing AI and DePIN with advanced decentralized solutions in storage, computing, databases, and blockchain services. We empower Web 3.0 developpers and dApps through our scalable, reliable, and high-performance networks.",
    "codebase": {
        "git_repo": "https://github.com/stratosnet/stratos-chain",
        "recommended_version": "v0.11.2",
        "compatible_versions": [
            "v0.11.2"
        ],
        "genesis": {
            "genesis_url": "https://raw.githubusercontent.com/stratosnet/mainnet/main/genesis/genesis.json"
        }
    },
    "logo_URIs": {
        "png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/stratos/images/stratos.png",
        "svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/stratos/images/stratos.svg"
    },
    "peers": {
        "seeds": [
            {
                "id": "cdbd7ce27584e699d9b9e6d72a1551666c750e4d",
                "address": "35.86.41.142:26656",
                "provider": "thestratos.org"
            },
            {
                "id": "ce225e67f7a383b50c91aeb902a86dd3ecb70d65",
                "address": "34.84.212.13:26656",
                "provider": "thestratos.org"
            },
            {
                "id": "8542cd7e6bf9d260fef543bc49e59be5a3fa9074",
                "address": "seed.publicnode.com:26656",
                "provider": "Allnodes \u26a1\ufe0f Nodes & Staking"
            }
        ],
        "persistent_peers": [
            {
                "id": "8a57d4701e87096c9bf151c376aafa97f9f516c7",
                "address": "78.46.174.39:25656",
                "provider": "[NODERS]TEAM"
            }
        ]
    },
    "apis": {
        "rpc": [
            {
                "address": "https://rpc.thestratos.org",
                "provider": "thestratos.org"
            },
            {
                "address": "http://stratos.rpc.nodersteam.com:26657",
                "provider": "[NODERS]TEAM"
            },
            {
                "address": "https://stratos-rpc.noders.services:443",
                "provider": "[NODERS]TEAM"
            },
            {
                "address": "https://rpc.stratos.nodestake.org",
                "provider": "NodeStake"
            }
        ],
        "rest": [
            {
                "address": "https://rest.thestratos.org",
                "provider": "thestratos.org"
            },
            {
                "address": "https://stratos-api.noders.services:443",
                "provider": "[NODERS]TEAM"
            },
            {
                "address": "https://api.stratos.nodestake.org",
                "provider": "NodeStake"
            }
        ],
        "grpc": [
            {
                "address": "https://grpc.thestratos.org",
                "provider": "thestratos.org"
            },
            {
                "address": "https://grpc.stratos.nodestake.org",
                "provider": "NodeStake"
            },
            {
                "address": "stratos.grpc.nodersteam.com:9090",
                "provider": "[NODERS]TEAM"
            },
            {
                "address": "stratos-grpc.noders.services:29090",
                "provider": "[NODERS]TEAM"
            }
        ],
        "evm-http-jsonrpc": [
            {
                "address": "https://web3-rpc.thestratos.org",
                "provider": "thestratos.org"
            },
            {
                "address": "https://jsonrpc.stratos.nodestake.org",
                "provider": "NodeStake"
            },
            {
                "address": "https://stratos-jsonrpc.noders.services",
                "provider": "[NODERS]TEAM"
            }
        ]
    },
    "explorers": [
        {
            "kind": "bigdipper",
            "url": "https://explorer.thestratos.org",
            "tx_page": "https://explorer.thestratos.org/transactions/${txHash}",
            "account_page": "https://explorer.thestratos.org/accounts/${accountAddress}"
        },
        {
            "kind": "blockscout",
            "url": "https://web3-explorer.thestratos.org",
            "tx_page": "https://web3-explorer.thestratos.org/tx/${txHash}",
            "account_page": "https://web3-explorer.thestratos.org/address/${accountAddress}"
        },
        {
            "kind": "NodeStake",
            "url": "https://explorer.nodestake.org/stratos",
            "tx_page": "https://explorer.nodestake.org/stratos/tx/${txHash}",
            "account_page": "https://explorer.nodestake.org/stratos/accounts/${accountAddress}"
        },
        {
            "kind": "staking-explorer.com",
            "url": "https://staking-explorer.com/explorer/stratos",
            "tx_page": "https://staking-explorer.com/transaction.php?chain=stratos&tx=${txHash}",
            "account_page": "https://staking-explorer.com/account.php?chain=stratos&addr=${accountAddress}"
        },
        {
            "kind": "TC Network",
            "url": "https://explorer.tcnetwork.io/stratos",
            "tx_page": "https://explorer.tcnetwork.io/stratos/transaction/${txHash}",
            "account_page": "https://explorer.tcnetwork.io/stratos/account/${accountAddress}"
        }
    ],
    "images": [
        {
            "png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/stratos/images/stratos.png",
            "svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/stratos/images/stratos.svg"
        }
    ],
    "staking": {
        "staking_tokens": []
    },
    "abs_meta": {
        "slug": "stratos-stratos-1"
    },
    "abs_services": [],
    "official_services_from_blockchain": [],
    "social": []
}

Complete Node Installation Guide for Stratos

Follow these comprehensive steps to install and configure your Stratos node.

Update System

Always start by updating your system to ensure you have the latest security patches and packages.

sudo apt update && sudo apt upgrade -y

Install Dependencies

Install essential packages required for building and running Cosmos SDK nodes.

sudo apt install git curl wget tar lz4 unzip jq build-essential pkg-config clang bsdmainutils make ncdu -y

Install Go

Go is the programming language for Cosmos SDK blockchains. For best results, please refer to the official documentation of the blockchain for the exact required version. You can check the latest Go versions on their download page.

Note: Go is not required to run the node (the binary file). Its only purpose is to build (compile) the binary from the source code.
cd $HOME
version="1.25.5"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile

Verify Go Installation

Check that Go is correctly installed. The command below should output a version number.

go version

About Go (Golang)

Go is a statically typed, compiled programming language designed at Google. It is known for its simplicity, efficiency, and strong support for concurrent programming, making it an ideal choice for high-performance network services like blockchain nodes.

Key Features:

  • Concurrency: Go's goroutines and channels make it easy to write highly concurrent and parallel programs.
  • Performance: As a compiled language, Go applications are fast and have a low memory footprint.
  • Simplicity: It has a clean and minimalistic syntax, making it easy to learn and maintain.
  • Standard Library: A rich standard library provides robust tools for networking, cryptography, and more.

Why is it used in Cosmos SDK?

The Cosmos SDK is built entirely in Go. Its performance and concurrency features are critical for handling the demands of a decentralized network, processing transactions, and achieving consensus efficiently.

Tip: Always ensure you are using the recommended version of Go for the specific blockchain you are installing to avoid compilation issues.

Clone Repository

Clone the official Stratos repository from GitHub.

cd $HOME
git clone https://github.com/stratosnet/stratos-chain.git
cd stratos-chain

Checkout Version

Warning: Live Version Unavailable

The following version v0.11.2 is a fallback from the Chain Registry and may be outdated. We strongly recommend verifying the correct version yourself using the method below before proceeding.

How to Find the Current Live Version

Since we couldn't automatically verify the live version, you can do it yourself with one of the methods below. Choose a healthy RPC from the "Endpoints" tab to use in the examples.

Method 1: With a Web Browser (Easy)

Paste the RPC address into your browser's address bar and add /abci_info to the end. For example:

https://some-rpc.com/abci_info

Method 2: With the Command Line (Advanced)

Use the following curl command in your terminal. It performs an HTTP GET request and filters the JSON to get the version.

curl -s -X GET "RPC_URL/abci_info" | jq -r .result.response.version

In both cases, look for the "version" field in the JSON response. This is the version you should use for the installation steps below.

git checkout v0.11.2

Build Binary

Compile the binary from source. This may take several minutes.

make install

Verify Installation

This command will confirm the version you have installed.

stchaind version

What is a Binary?

A binary is the executable program that runs the blockchain node. It's the result of compiling the human-readable source code (written in Go) into machine code that the server can execute directly.

Why Compile from Source?

  • Security: Compiling yourself ensures the code hasn't been tampered with and comes directly from the official repository.
  • Compatibility: It guarantees the binary is optimized for your specific server architecture.
  • Trust: It's a core principle of decentralization—don't trust, verify. Building from source is part of that verification.

Version Importance

Using the correct, recommended version is critical. Mismatched versions can lead to consensus failures, inability to sync with the network, or security vulnerabilities.

Tip: The make install command often runs a series of build scripts defined by the developers to ensure the binary is compiled with the correct settings and dependencies.

Set Moniker

Define your moniker (node name). This name will appear in block explorers. Do not use spaces.

MONIKER="__MONIKER__"

Initialize Node

Initialize your node with the chain-id stratos-1. This creates the default configuration directory at $HOME/.stchaind.

stchaind init $MONIKER --chain-id stratos-1

Download Genesis File

The genesis file is the "birth certificate" of the blockchain, defining the initial state of the network.

curl -Ls https://raw.githubusercontent.com/stratosnet/mainnet/main/genesis/genesis.json > $HOME/.stchaind/config/genesis.json

Configure Network Settings

Add seeds/peers to help your node discover other participants on the network.

SEEDS="cdbd7ce27584e699d9b9e6d72a1551666c750e4d@35.86.41.142:26656,ce225e67f7a383b50c91aeb902a86dd3ecb70d65@34.84.212.13:26656,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656"
PEERS="8a57d4701e87096c9bf151c376aafa97f9f516c7@78.46.174.39:25656"
sed -i -e "s|^seeds *=.*|seeds = \"$SEEDS\"|" \
       -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" \
       $HOME/.stchaind/config/config.toml

Set Minimum Gas Price

Configure the minimum gas price to prevent spam transactions.

sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"1000000000wei\"|" $HOME/.stchaind/config/app.toml

Configuration Explained

This stage sets up the foundational files that define your node's identity, security, and connection to the network.

Key Files Modified:

  • genesis.json: Contains the initial validator set, account balances, and chain parameters. Every node must have the identical genesis file to join the same network.
  • config.toml: Tendermint config. Governs networking (P2P ports, seeds, peers).
  • app.toml: Application config. Manages settings like gas prices, pruning, and API servers.

Seeds vs. Peers

Seeds are nodes that provide a list of other peers on the network. Your node connects to a seed, gets the list, and then disconnects.

Persistent Peers are nodes your node will always try to maintain a connection with, ensuring stable, long-term connectivity.

Tip: You can set default values for your command-line client (like chain-id and keyring) using stchaind config .... This is useful for convenience but doesn't affect the node service itself.

Pruning Settings

Configure pruning to manage disk space. Select a strategy from the form above to see the corresponding command.

PRUNING="custom"
PRUNING_KEEP_RECENT="__PRUNING_KEEP_RECENT__"
PRUNING_INTERVAL="__PRUNING_INTERVAL__"
sed -i -e 's|^pruning *=.*|pruning = "'$PRUNING'"|' \
       -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "'$PRUNING_KEEP_RECENT'"|' \
       -e 's|^pruning-interval *=.*|pruning-interval = "'$PRUNING_INTERVAL'"|' \
       $HOME/.stchaind/config/app.toml

Indexer Settings

Disable the transaction indexer to save resources, or enable it if you need to query transaction history.

# To disable the indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.stchaind/config/config.toml

# To enable the indexer
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.stchaind/config/config.toml

Custom Ports Configuration

Change default ports if you're running multiple nodes on the same machine. Example uses prefix '16'.

PORT_PREFIX=__PORT_PREFIX__
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${PORT_PREFIX}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${PORT_PREFIX}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${PORT_PREFIX}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${PORT_PREFIX}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${PORT_PREFIX}660\"%" $HOME/.stchaind/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${PORT_PREFIX}317\"%; s%^address = \":8080\"%address = \":${PORT_PREFIX}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${PORT_PREFIX}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${PORT_PREFIX}091\"%; s%^address = \"0.0.0.0:8545\"%address = \"0.0.0.0:${PORT_PREFIX}545\"%; s%^ws-address = \"0.0.0.0:8546\"%ws-address = \"0.0.0.0:${PORT_PREFIX}546\"%" $HOME/.stchaind/config/app.toml

Advanced Settings Explained

These settings help you optimize your node for specific use cases, such as reducing hardware costs or running multiple nodes.

What is Pruning?

Pruning is the process of deleting old blockchain data to save disk space. A full, unpruned archive node can take up terabytes of space. Pruning keeps your node lightweight.

  • Default: A safe balance for most users.
  • Nothing: Creates an archive node (requires huge disk space).
  • Everything: Aggressive pruning, minimum disk space.

What is the Indexer?

The indexer catalogues all transactions, allowing you to query them. Disabling it is a major performance boost.

  • Disable (`null`): Recommended for validators who don't need to query transaction history. Saves significant CPU and disk resources.
  • Enable (`kv`): Required for public RPC endpoints, block explorers, or if you need to look up historical transaction data.
Tip: If you're not sure, start with the default settings. You can always adjust the configuration later by stopping the node, editing the files, and restarting.

Create Systemd Service File

Create a service file to tell the system how to run the node. This ensures it can run in the background and restart automatically.

sudo tee /etc/systemd/system/stchaind.service > /dev/null <<EOF
[Unit]
Description=Stratos Node
After=network.target

[Service]
Type=simple
User=$USER
ExecStart=$(which stchaind) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Manage the Service

Enable the service to start on boot and then start it manually. Use the other commands to check status or view logs.

# Enable service to start automatically on boot
sudo systemctl enable stchaind
# Reload the systemd daemon to recognize the new service
sudo systemctl daemon-reload

# Start the node service
sudo systemctl start stchaind
# View Only logs in real-time
journalctl -u stchaind -f --no-hostname -o cat

# Start the node service + logs in real-time
sudo systemctl start stchaind && sudo journalctl -u stchaind -f --no-hostname -o cat
Important: If you plan to use a Snapshot or State Sync to speed up synchronization, do not start the service until after that process is complete.

What is Systemd?

systemd is the standard service manager in modern Linux. It's responsible for starting, stopping, and monitoring background processes (daemons), like your blockchain node.

Why Use a Service?

  • Automation: Automatically starts your node when the server boots.
  • Resilience: Automatically restarts the node if it crashes.
  • Management: Provides simple commands (start, stop, status) to manage the process.
  • Logging: Centralizes log collection, which you can view with journalctl.

Common Commands

sudo systemctl stop stchaind
sudo systemctl start stchaind
sudo systemctl restart stchaind
sudo systemctl status stchaind

Production Tip: Using a systemd service is essential for any production validator to ensure maximum uptime.

Step 1: Create or Recover Wallet

Create a new wallet to store your tokens or recover an existing one using your mnemonic phrase.

# Create a new wallet
stchaind keys add __WALLET_NAME__

# Recover an existing wallet
stchaind keys add __WALLET_NAME__ --recover

Step 2: Synchronize your node

Now is the time to synchronize !

You have two options available: Snapshot or State Sync. Please follow the link above to complete the process, then return to this page

Before creating a validator, ensure your node is fully synchronized with the network. The result of this command must be false.

stchaind status 2>&1 | jq .SyncInfo.catching_up
Crucial: Do not proceed to the next step until catching_up is false.
Creating a validator while unsynced will result in your validator being "jailed" (inactivated and penalized).

Step 3: Create Validator

Once your wallet is funded and your node is fully synced, run this command to put your validator on the blockchain.

stchaind tx staking create-validator \
--amount="__DELEGATION_AMOUNT__" \
--pubkey=$(stchaind tendermint show-validator) \
--moniker="__MONIKER__" \
--identity="__KEYBASE_ID__" \
--website="__WEBSITE__" \
--details="__DETAILS__" \
--from=__WALLET_NAME__ \
--chain-id="stratos-1" \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1" \
--gas-prices="1000000000wei" \
--gas-adjustment=1.5 \
--gas=auto \
-y

Wallet & Validator Concepts

This is the final and most critical step, where you transition from running a simple node to actively participating in the network's consensus.

Your Wallet

The wallet you create holds the keys to your funds. The mnemonic phrase (12 or 24 words) is the master key to this wallet. Losing it means losing access to your funds forever.

The Validator

A validator is a special type of node that proposes and votes on new blocks. By staking tokens, validators earn rewards for securing the network. They also risk losing a portion of their stake (slashing) if they misbehave (e.g., go offline for too long).

Synchronization is Key

A node must be fully caught up with the latest block before it can become a validator. If it's still syncing, it cannot participate in consensus and will be jailed by the network as a protective measure.

Security Alert: Never store your mnemonic phrase on the same server as your node or in any online location. Write it down and keep it in a secure, offline place.

Cosmos SDK Commands Reference

Comprehensive command reference for Stratos node operators and validators.

Check Balance

Query the balance of a wallet address.

stchaind q bank balances __WALLET_ADDRESS__

Check Sync Status

Verify if your node is synchronized. Must return false when synced.

stchaind status 2>&1 | jq .SyncInfo.catching_up

View Logs

Monitor your node's logs in real-time.

journalctl -u stchaind -f --no-hostname -o cat

Restart Service

Restart your node service.

sudo systemctl restart stchaind

Vote on Proposal

Vote YES on a governance proposal.

stchaind tx gov vote 1 yes --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Unjail Validator

Unjail your validator after downtime.

stchaind tx slashing unjail --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Withdraw All Rewards

Claim all staking rewards from all validators.

stchaind tx distribution withdraw-all-rewards --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Send Tokens

Transfer tokens to another address.

stchaind tx bank send __WALLET_ADDRESS__ __RECIPIENT_ADDRESS__ __DELEGATION_AMOUNT__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Operator's Common Workflow

These commands represent the daily toolkit for node operators. They cover three main activities:

1. Node Monitoring

Keeping your node healthy is the top priority. You'll constantly use these commands to check its status: Check Sync Status ensures you're connected, View Logs helps you spot errors, and Restart Service is the first step to resolving many issues.

2. Validator Duties

As a validator, your core responsibilities are participating in governance (Vote on Proposal), maintaining uptime (Unjail Validator after downtime), and managing your earnings (Withdraw All Rewards).

3. Wallet Management

These are the fundamental commands for handling funds: Check Balance to view your assets and Send Tokens to transfer them.

Pro Tip: Many successful validators automate routine tasks. Setting up monitoring alerts for your node's status and scripts to automatically withdraw and compound rewards can save significant time and improve efficiency.

Create New Wallet

Create a new wallet. Save the mnemonic securely!

stchaind keys add __WALLET_NAME__

Recover Wallet

Restore a wallet from mnemonic phrase.

stchaind keys add __WALLET_NAME__ --recover

Create Multisig Wallet

Create a multisig wallet requiring multiple signatures.

stchaind keys add multisig_name --multisig key1,key2,key3 --multisig-threshold 2

List All Wallets

Show all wallets stored in keyring.

stchaind keys list

Show Wallet Address

Display the address of a wallet.

stchaind keys show __WALLET_NAME__ -a

Show Validator Address

Display the validator operator address.

stchaind keys show __WALLET_NAME__ --bech val -a

Show Public Key

Display the public key of a wallet.

stchaind keys show __WALLET_NAME__ -p

Export Private Key

Export private key in hex format. Use with extreme caution!

stchaind keys export __WALLET_NAME__ --unarmored-hex --unsafe

Delete Wallet

Permanently delete a wallet from keyring.

stchaind keys delete __WALLET_NAME__

Key Management Concepts

These commands interact with the keyring, a secure database for your private keys.

The Mnemonic is Your Master Key

When you create a wallet, you get a 12 or 24-word mnemonic phrase. This is the only backup of your private key. Never store it on your server. If you lose it, you lose your funds forever.

What is the Keyring?

The keyring is the storage backend for your keys. By default (--keyring-backend test), it's a simple, unencrypted file, which is convenient for testing but not secure for production. For validators, using the os backend is highly recommended as it leverages the server's secure credential storage.

Bech32 Address Types

A single key pair has multiple address representations, identified by their "bech32" prefix. The command show --bech val demonstrates this by converting the standard address into its validator operator (valoper) equivalent.

Security Warning: The export and delete commands are extremely dangerous. export will expose your private key on the screen. Use these commands with extreme caution.

Send Tokens

Transfer tokens between addresses.

stchaind tx bank send __WALLET_ADDRESS__ __RECIPIENT_ADDRESS__ __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Send with Fee Granter

Send tokens using a fee grant.

stchaind tx bank send __WALLET_ADDRESS__ RECIPIENT __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --fee-account __GRANTER_ADDRESS__ --chain-id stratos-1 -y

Query Balance

Check the balance of an address.

stchaind query bank balances __WALLET_ADDRESS__

Query Spendable Balances

Check balances available for spending (excluding locked tokens).

stchaind query bank spendable-balances __WALLET_ADDRESS__

Query Total Supply

View the total token supply of the chain.

stchaind query bank total

Query Supply by Denom

Check total supply of a specific denomination.

stchaind query bank total --denom 

The "Bank" Module

The Bank module is the core of any Cosmos SDK chain, responsible for all token transfers and balance tracking.

Transactions (tx) vs. Queries (query)

tx commands, like tx bank send, are write operations. They change the state of the blockchain, require a signature from a private key, and consume gas (fees).

query commands, like query bank balances, are read-only operations. They do not change the state, require no signature, and are free to use.

What is Fee Grant?

Fee Grant is a feature allowing one account to pay for another account's transaction fees. This is useful for onboarding new users who may not have tokens to pay for their first transactions. Learn more in the Feegrant tab .

Total Supply vs. Balance

Total Supply refers to the total amount of a token that exists on the entire blockchain. Balance refers to the amount of a token held by a single, specific address.

Create Validator

Create your validator. Only do this when fully synced!

stchaind tx staking create-validator \
--amount=__DELEGATION_AMOUNT__ \
--pubkey=$(stchaind tendermint show-validator) \
--moniker="__MONIKER__" \
--identity="__KEYBASE_ID__" \
--website="__WEBSITE__" \
--details="__DETAILS__" \
--chain-id=stratos-1 \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--from=__WALLET_NAME__ \
--gas-prices=1000000000wei \
--gas-adjustment=1.5 \
--gas=auto \
-y

Edit Validator

Update validator information.

stchaind tx staking edit-validator \
--new-moniker="NEW_MONIKER" \
--identity=YOUR_KEYBASE_ID \
--details="New description" \
--chain-id=stratos-1 \
--commission-rate=0.1 \
--from=__WALLET_NAME__ \
--gas-prices=1000000000wei \
-y

Delegate Tokens

Delegate tokens to a validator.

stchaind tx staking delegate __VALOPER_ADDRESS__ __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Unbond Tokens

Unbond (unstake) tokens from a validator.

stchaind tx staking unbond __VALOPER_ADDRESS__ __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Redelegate Tokens

Move delegation from one validator to another.

stchaind tx staking redelegate SRC_VALOPER DST_VALOPER __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

List All Validators

Show all validators on the network.

stchaind query staking validators

Query Validator Info

Get detailed information about a specific validator.

stchaind query staking validator __VALOPER_ADDRESS__

List Active Validators (Sorted)

Show bonded validators sorted by voting power.

stchaind 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

Query Validator Signing Info

Check your validator's signing information and missed blocks.

stchaind query slashing signing-info $(stchaind tendermint show-validator)

Proof-of-Stake Concepts

The Staking module is the heart of the Proof-of-Stake consensus. It manages validators, delegations, and the overall security of the network.

Validators vs. Delegators

Validators operate the nodes that run the blockchain. They are responsible for proposing and voting on new blocks.

Delegators are token holders who "stake" their tokens to a validator. They share in the staking rewards and help secure the network without running a node themselves.

The Delegation Lifecycle

  • Delegate: Lock your tokens to a validator to start earning rewards.
  • Redelegate: Instantly move your staked tokens from one validator to another without waiting for the unbonding period.
  • Unbond: Start the process of unstaking your tokens. This initiates an "unbonding period" (e.g., 21 days) during which your tokens earn no rewards and cannot be transferred.
Crucial: Before running create-validator, you MUST be fully synced. Check with stchaind status. Creating a validator while unsynced will get you jailed.

Withdraw Rewards from Validator

Claim rewards from a specific validator.

stchaind tx distribution withdraw-rewards __VALOPER_ADDRESS__ --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Withdraw Rewards + Commission

Claim rewards and commission (for validators).

stchaind tx distribution withdraw-rewards __VALOPER_ADDRESS__ --from __WALLET_NAME__ --commission --chain-id stratos-1 --gas-prices 1000000000wei -y

Withdraw All Rewards

Claim all staking rewards from all validators at once.

stchaind tx distribution withdraw-all-rewards --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Query Rewards

Check pending rewards for an address.

stchaind query distribution rewards __WALLET_ADDRESS__

Query Commission

Check validator commission earnings.

stchaind query distribution commission __VALOPER_ADDRESS__

Query Community Pool

View the community pool balance.

stchaind query distribution community-pool

Change Withdraw Address

Set a different address to receive rewards.

stchaind tx distribution set-withdraw-addr NEW_ADDRESS --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

How Rewards Work

The "Distribution" module handles the allocation of staking rewards from two main sources: block inflation and transaction fees.

Sources of Rewards

  • Block Inflation: New tokens created by the protocol with each block to incentivize validators and delegators for securing the network.
  • Transaction Fees: Fees paid by users for every transaction, which are distributed to the validators who include those transactions in a block.

Withdraw vs. Compound

Rewards accumulate but are not automatically added to your stake. You must manually claim them using a withdraw command. To maximize your earnings, you can "compound" by withdrawing your rewards and then delegating them back to a validator.

The Community Pool

A portion of all rewards is sent to the Community Pool, a treasury that can be used to fund projects and initiatives that benefit the ecosystem. Spending from this pool is controlled by governance.

Tip: Automating the process of withdrawing and re-delegating rewards (compounding) is a common strategy to maximize staking returns over the long term.

Submit Text Proposal

Create a governance proposal (legacy format).

stchaind tx gov submit-proposal \
--title="Your Proposal Title" \
--description="Detailed description of your proposal" \
--type="Text" \
--deposit=__DELEGATION_AMOUNT__ \
--from __WALLET_NAME__ \
--chain-id stratos-1 \
--gas-prices 1000000000wei \
-y

Deposit on Proposal

Add deposit to reach minimum deposit for voting period.

stchaind tx gov deposit 1 __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Vote YES

Vote in favor of a proposal.

stchaind tx gov vote 1 yes --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Vote NO

Vote against a proposal.

stchaind tx gov vote 1 no --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Vote NO_WITH_VETO

Vote against with veto (burns deposit if >33.4% vote this way).

stchaind tx gov vote 1 no_with_veto --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Vote ABSTAIN

Abstain from voting (counts toward quorum but not toward yes/no).

stchaind tx gov vote 1 abstain --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

List All Proposals

Show all governance proposals.

stchaind query gov proposals

Query Proposal Details

Get detailed information about a specific proposal.

stchaind query gov proposal 1

Query Votes

See all votes on a proposal.

stchaind query gov votes 1

Query Tally

View current vote tally for a proposal.

stchaind query gov tally 1

On-Chain Governance

The Governance module is the blockchain's democratic system, allowing staked token holders to decide the future of the protocol.

The Proposal Lifecycle

  1. Deposit Period: A proposal is submitted. It must collect a minimum deposit (min_deposit) from the community to enter the voting period.
  2. Voting Period: Once the deposit is met, a voting window (e.g., 14 days) opens. Only staked tokens can vote, and voting power is proportional to the amount staked.
  3. Tallying: For a proposal to pass, it must meet quorum (minimum participation) and a threshold of "Yes" votes.

The 4 Voting Options

  • Yes: You approve the proposal.
  • No: You disapprove the proposal.
  • NoWithVeto: A powerful "No". If the Veto threshold (e.g., 33.4%) is reached, the proposal is rejected and the depositors lose their funds (they are burned). This prevents spam or harmful proposals.
  • Abstain: You contribute to the voting quorum but do not influence the Yes/No outcome.
Who Can Vote? Your voting power is determined by your staked tokens, including those delegated to validators. Validators vote with their entire stake, but delegators can override their validator's vote if they choose to vote themselves.

Unjail Validator

Unjail your validator after being jailed for downtime.

stchaind tx slashing unjail --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Query Signing Info

Check validator signing information and jail status.

stchaind query slashing signing-info $(stchaind tendermint show-validator)

Query All Signing Infos

List signing info for all validators.

stchaind query slashing signing-infos

Query Slashing Params

View slashing parameters (downtime threshold, slash fractions, etc.).

stchaind query slashing params

Slashing & Jailing Explained

The Slashing module is the enforcement mechanism of Proof-of-Stake, punishing validators for misbehavior to ensure network security.

Jailing vs. Slashing

Jailing: A temporary penalty, typically for being offline (downtime). The validator is removed from the active set and earns no rewards. They must send an unjail transaction to become active again.

Slashing: A severe, permanent penalty for serious offenses like double-signing. A percentage of the validator's (and their delegators') stake is destroyed.

Common Offenses

  • Downtime: Missing too many blocks in a row. This leads to jailing.
  • Double Signing: Signing two different blocks at the same height. This is the most serious offense and leads to slashing.
Note on unjail: This command can only be submitted after the validator's minimum jailing period has passed. It's used to signal that the validator is back online and ready to participate in consensus.

Grant Basic Allowance

Grant fee allowance to another address to pay for their transactions.

stchaind tx feegrant grant __GRANTER_ADDRESS__ GRANTEE_ADDRESS --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Grant with Spending Limit

Grant allowance with a maximum spending limit.

stchaind tx feegrant grant GRANTER GRANTEE --spend-limit __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Revoke Allowance

Revoke a previously granted fee allowance.

stchaind tx feegrant revoke GRANTER GRANTEE --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Query Allowance

Check if an allowance exists between granter and grantee.

stchaind query feegrant grant GRANTER GRANTEE

Query All Allowances (Grantee)

List all allowances granted to a grantee.

stchaind query feegrant grants-by-grantee GRANTEE_ADDRESS

What is Feegrant?

Feegrant is a module that allows one account (the "granter") to pay the transaction fees for another account (the "grantee").

Key Roles

  • Granter: The account that pays the fees.
  • Grantee: The account whose fees are being paid.

Common Use Cases

Onboarding Users: A project can grant a small fee allowance to new users, allowing them to start using the application without needing to acquire tokens first.

Automated Services: A user can grant a fee allowance to a "bot" account to perform automated tasks like compounding staking rewards on their behalf.

Security Tip: Always use the --spend-limit flag when creating a feegrant. This ensures the grantee cannot drain the granter's wallet by broadcasting an unlimited number of transactions.

Grant Generic Authorization

Grant authorization to execute transactions on your behalf.

stchaind tx authz grant GRANTEE_ADDRESS generic --msg-type /cosmos.bank.v1beta1.MsgSend --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Grant Send Authorization

Allow grantee to send tokens on your behalf.

stchaind tx authz grant GRANTEE send --spend-limit __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Grant Delegate Authorization

Allow grantee to delegate tokens on your behalf.

stchaind tx authz grant GRANTEE delegate --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Execute Authorized Transaction

Execute a transaction using granted authorization.

stchaind tx authz exec tx.json --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Revoke Authorization

Revoke a previously granted authorization.

stchaind tx authz revoke GRANTEE /cosmos.bank.v1beta1.MsgSend --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Query Grants

List all authorizations for a granter/grantee pair.

stchaind query authz grants GRANTER GRANTEE

What is Authz?

The "Authorization" (Authz) module allows one account (the "granter") to grant another account (the "grantee") the permission to execute specific transactions on its behalf.

Authz vs. Feegrant

Feegrant: "I will pay the gas fees for your transactions."

Authz: "You can execute transactions as if you were me, using my funds and permissions."

Common Use Case: Hot & Cold Wallets

A secure "cold" wallet holding a large amount of tokens can grant authorization to a "hot" wallet (used for daily operations) to perform only specific actions, like staking or voting. The hot wallet can't transfer the funds, minimizing risk if it's compromised.

Security Warning: Granting authorizations, especially generic ones, is a powerful and potentially risky action. Always restrict grants to the specific message types (--msg-type) that are absolutely necessary.

Create Group

Create a group for multi-party governance.

stchaind tx group create-group ADMIN_ADDRESS "metadata" members.json --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Create Group Policy

Create a decision policy for the group.

stchaind tx group create-group-policy ADMIN GROUP_ID "metadata" policy.json --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Submit Group Proposal

Submit a proposal for group voting.

stchaind tx group submit-proposal GROUP_POLICY_ADDRESS proposers.json "metadata" proposal.json --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Vote on Group Proposal

Cast your vote on a group proposal.

stchaind tx group vote PROPOSAL_ID VOTER yes "metadata" --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Execute Group Proposal

Execute a passed group proposal.

stchaind tx group exec PROPOSAL_ID --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

On-Chain Multisig & DAOs

The "Group" module is a powerful tool for creating and managing on-chain multi-signature accounts and Decentralized Autonomous Organizations (DAOs).

Key Concepts

  • Group: A collection of member accounts, each with a defined voting weight.
  • Group Policy: The rules of the group, defining the voting threshold required to pass a proposal (e.g., "more than 50% of the total weight must vote YES").
  • Proposal: An on-chain action (like a `MsgSend` transaction) that members of the group can vote on.

Main Use Case: Flexible Multisig

This module allows you to create a shared treasury where, for example, 3 out of 5 members must approve any spending. Unlike traditional multisigs, the group's membership and policies can be updated over time through its own proposal system, offering much greater flexibility.

Note on JSON Files: The commands for this module require local JSON files (members.json, policy.json) to define the complex parameters for group creation and proposals.

Create Vesting Account

Create a continuous vesting account.

stchaind tx vesting create-vesting-account TO_ADDRESS __DELEGATION_AMOUNT__ END_TIME --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Create Delayed Vesting Account

Create an account with delayed vesting (cliff).

stchaind tx vesting create-delayed-vesting-account TO_ADDRESS __DELEGATION_AMOUNT__ END_TIME --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Create Periodic Vesting Account

Create an account with periodic vesting schedule.

stchaind tx vesting create-periodic-vesting-account TO_ADDRESS START_TIME periods.json --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

What is Vesting?

Vesting is a process of locking tokens and releasing them over a predetermined schedule. It's a key tool for managing a project's tokenomics.

Primary Use Case

Vesting is commonly used to distribute tokens to team members and early investors. It prevents large token holders from selling all their tokens at once, ensuring long-term alignment with the project's success.

Vesting Types

  • Continuous: Tokens unlock linearly over time.
  • Delayed (Cliff): All tokens unlock at once on a specific date.
  • Periodic: Tokens unlock in portions at regular intervals.
Staking Vested Tokens: Tokens in a vesting account can be staked to a validator. This allows the account holder to earn staking rewards even while the tokens are locked and not yet transferable.

Query Current Upgrade Plan

Check if there's a scheduled upgrade.

stchaind query upgrade plan

Query Applied Upgrades

List all upgrades that have been applied.

stchaind query upgrade applied

Query Module Versions

Check versions of all modules.

stchaind query upgrade module_versions

On-Chain Upgrades

The Upgrade module facilitates on-chain coordination of software upgrades. The blockchain itself dictates the exact moment of the upgrade via a governance proposal.

The Upgrade Process

  1. A governance proposal defines an upgrade name and a target block height.
  2. If passed, validators have until that block height to place the new binary in the correct location.
  3. The chain automatically halts at the target block.
  4. Validators restart their nodes with the new binary, and the chain resumes.

The Role of Cosmovisor

While this module provides the on-chain signal, the Cosmovisor tool automates the server-side process (stopping the node, switching binaries, and restarting). It is the standard tool for managing upgrades.

For Operators: The query upgrade plan command is essential. It allows you to see upcoming upgrades and prepare your node well in advance.

Submit Evidence

Submit evidence of misbehavior.

stchaind tx evidence EVIDENCE_FILE --from __WALLET_NAME__ --chain-id stratos-1 --gas-prices 1000000000wei -y

Query All Evidence

List all submitted evidence.

stchaind query evidence

What is the Evidence Module?

The Evidence module provides a way to punish validators for serious offenses (like double-signing) that are discovered after the fact.

How it Works

Normally, misbehavior is caught and punished by the consensus mechanism in real-time. However, this module acts as a "safety net". If a validator commits a serious offense and then unbonds before being punished, anyone can submit evidence of that past offense to the chain.

The Consequence

If the submitted evidence is valid, the validator is retroactively slashed, ensuring that no one can escape the consequences of threatening the network's integrity.

For Operators: This is a highly specialized module. Most node operators will never need to interact with it directly.

Add Genesis Account

Add an account to the genesis file during chain initialization.

stchaind add-genesis-account __WALLET_ADDRESS__ __DELEGATION_AMOUNT__

Create Gentx

Create a genesis transaction for an initial validator.

stchaind gentx __WALLET_NAME__ __DELEGATION_AMOUNT__ --chain-id stratos-1

Collect Gentxs

Collect all genesis transactions to create the final genesis file.

stchaind collect-gentxs

Validate Genesis

Validate the final genesis file before launch.

stchaind validate-genesis

Export State

Export the current chain state to a new genesis file.

stchaind export > exported_genesis.json

Blockchain Launch Commands

These commands are used exclusively for the coordinated launch of a new blockchain, often called a "genesis ceremony".

The Launch Process

  1. Each initial validator creates their "genesis transaction" using gentx and sends it to a coordinator.
  2. The coordinator gathers all these transactions and uses collect-gentxs to merge them into the final genesis.json file.
  3. Everyone uses validate-genesis to confirm the final file is correct before starting their nodes.

What is `export` for?

The export command is different. It takes a snapshot of an existing blockchain's state at a certain height and creates a new genesis file from it. This is useful for chain upgrades or for creating a new testnet based on a mainnet state.

Warning: Do not use these commands on a live, running network unless you are participating in its launch or a coordinated upgrade. They are for chain initialization, not daily operation.

Query Account

Get account information.

stchaind query account __WALLET_ADDRESS__

Query Transaction

Look up a transaction by hash.

stchaind query tx TX_HASH

Search Transactions by Events

Find transactions matching specific events.

stchaind query txs --events 'message.sender=__WALLET_ADDRESS__'

Query Block

Get block information at specific height.

stchaind query block 1000

Encode Transaction

Encode a transaction to Amino binary format.

stchaind tx encode tx.json

Decode Transaction

Decode a transaction from Amino binary format.

stchaind tx decode ENCODED_TX

General Blockchain Interaction

These are fundamental commands for reading data from the blockchain and handling raw transaction data.

Finding On-Chain Information

query tx [hash] is the command-line equivalent of a block explorer, allowing you to verify transaction details.

query txs --events is a powerful search tool. It lets you find past transactions based on attributes, like all transfers from a specific address. Note: This requires the node's indexer to be enabled .

Offline & Advanced Signing

The encode and decode commands are advanced tools for offline signing. The typical workflow is:

  1. Create a transaction as a JSON file.
  2. encode it into a binary string.
  3. Transfer this string to a secure, offline machine for signing.
  4. Broadcast the signed transaction from an online machine.

Start Node

Start the node daemon in the foreground (for debugging).

stchaind start

Query Node Status

Get comprehensive node status information.

stchaind status

Check Sync Status

Verify if node is fully synchronized.

stchaind status 2>&1 | jq .SyncInfo.catching_up

Show Validator Public Key

Display the validator consensus public key.

stchaind tendermint show-validator

Show Node ID

Display the node's unique identifier.

stchaind tendermint show-node-id

Show Validator Address

Display validator consensus address.

stchaind tendermint show-address

Check Binary Version

Display the binary version.

stchaind version

Stop Service

Stop the node service.

sudo systemctl stop stchaind

View Logs

Monitor node logs in real-time.

journalctl -u stchaind -f --no-hostname -o cat

Managing the Node Process

These commands allow you to interact directly with the node's process, check its health, and retrieve its network identities.

start vs. systemctl start

stchaind start runs the node in the foreground, attached to your terminal. It's useful for debugging but will stop if you close your session.

sudo systemctl start ... runs the node as a background service . This is the correct method for production environments.

A Validator's Three Identities

  • Node ID: The P2P network address. Used by other nodes to find and connect to yours.
  • Validator Public Key: The consensus key. Used to sign blocks and participate in voting.
  • Consensus Address: A shorter address derived from the public key, used for on-chain identification.
Daily Monitoring: The status and journalctl commands are your most important tools for daily health checks of your node.

Unsafe Reset All

Reset blockchain data (keeps node_key and priv_validator_key).

stchaind tendermint unsafe-reset-all --home $HOME/.stchaind

Reset Keeping Addrbook

Reset data but keep addrbook for faster peer discovery.

stchaind tendermint unsafe-reset-all --home $HOME/.stchaind --keep-addr-book

Tendermint Version

Check Tendermint/CometBFT version.

stchaind tendermint version

Show Network Info

Display information about connected peers.

curl -s localhost:26657/net_info | jq

Rollback Last Block

Rollback state to the previous block height (use with caution!).

stchaind rollback

Interacting with the Consensus Engine

These commands interact directly with Tendermint/CometBFT, the underlying consensus and networking engine of the blockchain.

The `unsafe-reset-all` Command

This command deletes all blockchain data from your node. Its primary use is to start fresh before syncing from a snapshot or state sync .

The `rollback` Command

This advanced command reverts the blockchain state by one block. It's a debugging tool and should only be used in emergencies, as improper use can corrupt your node's database.

CRITICAL: Before using unsafe-reset-all on a validator node, ALWAYS back up your priv_validator_key.json file. Failure to do so can lead to permanent loss of your validator.

Debug Address

Convert between address formats.

stchaind debug addr __WALLET_ADDRESS__

Debug Public Key

Convert and display public key information.

stchaind debug pubkey PUBKEY

Backup Validator Key

Backup your validator private key. Keep it secure!

cp $HOME/.stchaind/config/priv_validator_key.json $HOME/.stchaind/priv_validator_key.json.backup

Backup Node Key

Backup your node key.

cp $HOME/.stchaind/config/node_key.json $HOME/.stchaind/node_key.json.backup

Debugging & Key Backups

These commands are for advanced troubleshooting and essential maintenance tasks like backing up critical validator files.

The `debug addr` Command

This utility allows you to convert a given address into all its other Bech32 formats (account, validator, consensus). It's very useful for finding the account address that controls a specific validator.

Critical Validator Files

priv_validator_key.json is the most important file for a validator. It contains the private key used to sign blocks. If you lose this file, you lose your validator. If it is stolen, the attacker can cause you to be slashed for double-signing.

node_key.json contains the key that determines your node's ID on the P2P network. Losing it is less critical, but your node's ID will change.

Security Best Practice: NEVER store backups of your key files on the same server as your node. Keep them in a secure, offline location.

Get Your Peer String

Generate your node's peer connection string.

echo $(stchaind tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.stchaind/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')

Get Peers from RPC

Fetch live peers from the network.

curl -sS https://rpc.thestratos.org/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'

Test RPC Connection

Verify RPC endpoint is responding.

curl -s localhost:26657/status | jq

Configure UFW Firewall

Basic firewall configuration for node.

sudo ufw allow 22/tcp
sudo ufw allow 26656/tcp
sudo ufw enable

Complete Node Removal

Completely remove the node. BACKUP YOUR KEYS FIRST!

sudo systemctl stop stchaindsudo systemctl disable stchaindsudo rm /etc/systemd/system/stchaind.service
sudo systemctl daemon-reload
rm -f $(which stchaind)
rm -rf $HOME/.stchaindrm -rf ~/stratos-chain

Server & Node Utilities

This is a collection of useful scripts and commands for server administration and network management.

Sharing Your Peer Identity

The Get Your Peer String command is a handy script that combines your unique Node ID with your server's public IP to create a connection string. You can share this with other node operators to help strengthen the P2P network.

Basic Firewall Setup

UFW (Uncomplicated Firewall) is a standard firewall for Ubuntu. The example commands provide a minimal secure setup: it allows SSH access (port 22) for you to manage your server and the default P2P port (26656) for the node to communicate, while blocking everything else.

Destructive Command: The Complete Node Removal script is irreversible. It deletes the service, the binary, and all blockchain data. Before running it, ensure you have backed up your mnemonic phrases and your priv_validator_key.json.
Note: The params module is deprecated in newer SDK versions. These commands may not work on all chains.

Query Params Subspaces

List all parameter subspaces.

stchaind query params subspaces

Query Mint Params

View minting parameters.

stchaind query mint params

Query Inflation

Check current inflation rate.

stchaind query mint inflation

Query Annual Provisions

View annual token provisions.

stchaind query mint annual-provisions

Inflation & Chain Parameters

These commands allow you to inspect the modules responsible for token inflation and global chain parameters.

The "Mint" Module

The Mint module is responsible for creating new tokens in each block, a process known as inflation. These newly minted tokens are then passed to the Distribution module to be paid out as staking rewards.

  • Inflation: The current annual rate at which new tokens are being created.
  • Annual Provisions: The total number of tokens that will be minted over the next year at the current inflation rate.

The (Deprecated) "Params" Module

The params module was a centralized hub for managing all chain parameters. It has been deprecated in modern versions of the Cosmos SDK. Now, each module (e.g., staking, gov) manages its own parameters, which can be modified via specific governance proposals. This is why query params commands may no longer work.

Query Balance via gRPC

Query account balance using gRPC.

grpcurl -plaintext -d '{"address":"__WALLET_ADDRESS__"}' localhost:9090 cosmos.bank.v1beta1.Query/AllBalances

Query Validator via gRPC

Get validator info via gRPC.

grpcurl -plaintext -d '{"validator_addr":"__VALOPER_ADDRESS__"}' localhost:9090 cosmos.staking.v1beta1.Query/Validator

Query Proposals via gRPC

List governance proposals via gRPC.

grpcurl -plaintext localhost:9090 cosmos.gov.v1beta1.Query/Proposals

List gRPC Services

Show all available gRPC services.

grpcurl -plaintext localhost:9090 list

List Service Methods

Show methods for a specific service.

grpcurl -plaintext localhost:9090 list cosmos.bank.v1beta1.Query

What is gRPC?

gRPC is a modern, high-performance framework for making remote procedure calls. It's designed for efficiency and is ideal for developers building applications that require fast and reliable data streams from the blockchain.

gRPC vs. REST

gRPC is generally much faster and more efficient than REST because it uses a binary protocol (Protobuf) instead of text-based JSON. It is the preferred method for high-throughput applications.

The `grpcurl` Tool

grpcurl is a command-line tool that lets you interact with gRPC servers, much like curl does for HTTP APIs. It's an essential tool for testing and debugging gRPC endpoints.

Query Node Info via REST

Get node information using REST API.

curl -s https://rest.thestratos.org/cosmos/base/tendermint/v1beta1/node_info | jq

Query Balances via REST

Check account balances via REST API.

curl -s https://rest.thestratos.org/cosmos/bank/v1beta1/balances/__WALLET_ADDRESS__ | jq

Query Validator via REST

Get validator info via REST API.

curl -s https://rest.thestratos.org/cosmos/staking/v1beta1/validators/__VALOPER_ADDRESS__ | jq

Query Proposals via REST

List governance proposals via REST API.

curl -s https://rest.thestratos.org/cosmos/gov/v1beta1/proposals | jq

Query Supply via REST

Check total token supply via REST API.

curl -s https://rest.thestratos.org/cosmos/bank/v1beta1/supply | jq

What is the REST API?

The REST (or LCD) API provides a simple, standard HTTP interface for querying the blockchain. It's easy to use with tools like curl or directly in a web browser.

REST vs. RPC

The REST API is a user-friendly layer built on top of the node's core functionalities. The RPC interface is lower-level and more complex. For most simple data queries (balances, validators), REST is the easiest method.

Common Clients

Block explorers, wallets, and dashboards are the primary consumers of REST APIs, as it allows them to easily fetch and display on-chain data.

Network Configuration

Configure your node's network connectivity with seeds and persistent peers for Stratos.

What are Persistent Peers?

Persistent peers are nodes that your node will always try to maintain a connection with. Unlike regular peers that come and go, your node will actively attempt to reconnect to persistent peers if the connection is lost. This ensures stable connectivity to the network.

Fetch Live Peers via RPC

Query real-time connected peers directly from a network node using the /net_info RPC endpoint. This returns fresh, currently active peers instead of the static list from Chain Registry.

Important: Most public RPC nodes disable the /net_info endpoint for security reasons (it exposes peer IPs). If the command returns an error or empty result, try another RPC or use your own node with localhost:26657.

Quick Test

First, check if the RPC exposes /net_info:

curl -s https://rpc.thestratos.org/net_info | jq '.result.peers | length'

If it returns a number → the endpoint is available. If null or error → endpoint is blocked.

Get All Connected Peers

Extract the full peer list in id@ip:port format:

curl -s https://rpc.thestratos.org/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":") | last)"'

Using Your Own Node

If you have a running node, use localhost for guaranteed access:

curl -s localhost:26657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":") | last)"'
Tip: Live peers are more reliable than static lists because they represent nodes that are currently online and synced. You can combine them with seeds for optimal connectivity.

Add ALL Persistent Peers (listed below)

This ClI command will Set the persistent peers in your config.toml file.

PEERS="8a57d4701e87096c9bf151c376aafa97f9f516c7@78.46.174.39:25656"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.stchaind/config/config.toml

Available Persistent Peers

Community-provided persistent peers to ensure stable connectivity to the network.

Provider Peer
[NODERS]TEAM
Some information may be outdated if it is not updated in the Cosmos Chain Registry, which is the source of the data displayed here.
Note: After changing persistent peers, restart your node for the changes to take effect: sudo systemctl restart stchaind
When to use persistent peers:
  • For validators requiring stable connections
  • When your node frequently loses peer connections
  • For production nodes that need reliable uptime

Add Custom Peer

You can manually add a specific persistent peer.

CUSTOM_PEER="node_id@ip_address:port"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$CUSTOM_PEER\"|" $HOME/.stchaind/config/config.toml

View Current Peers

Check which persistent peers are configured in your node.

grep "^persistent_peers" $HOME/.stchaind/config/config.toml

Clear Peers

Remove all persistent peers from your configuration.

sed -i -e 's|^persistent_peers *=.*|persistent_peers = ""|' $HOME/.stchaind/config/config.toml
Best Practice: Combine live peers from /net_info with the static list below for optimal connectivity. Live peers are verified online, while static peers provide fallback options.

What are Seeds?

Seed nodes are bootstrap nodes used for initial peer discovery. When your node starts, it contacts seed nodes to discover other peers on the network. Unlike persistent peers, connections to seed nodes are temporary - once your node has discovered enough peers, it disconnects from the seeds.

Add ALL Seeds (listed below)

This CLI command will set the seeds in your config.toml file.

SEEDS="cdbd7ce27584e699d9b9e6d72a1551666c750e4d@35.86.41.142:26656,ce225e67f7a383b50c91aeb902a86dd3ecb70d65@34.84.212.13:26656,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656"
sed -i -e "s|^seeds *=.*|seeds = \"$SEEDS\"|" $HOME/.stchaind/config/config.toml

Seeds vs Persistent Peers

Understanding the difference between these two connectivity options.

Feature Seeds Persistent Peers
Purpose Initial peer discovery Maintain stable connections
Connection Temporary Permanent
Use Case Fresh node startup Validators, production

Available Seeds

Community-provided seed nodes for network discovery.

Provider Seed
thestratos.org
thestratos.org
Allnodes ⚡️ Nodes & Staking
Some information may be outdated if it is not updated in the Cosmos Chain Registry, which is the source of the data displayed here.
Note: After changing seeds, restart your node for the changes to take effect: sudo systemctl restart stchaind
When to use seeds:
  • When starting a fresh node without any known peers
  • When your node can't find enough peers to connect to
  • For initial network discovery (seeds are temporary connections)

Add Custom Seed

You can manually add a specific seed node.

CUSTOM_SEED="node_id@ip_address:port"
sed -i -e "s|^seeds *=.*|seeds = \"$CUSTOM_SEED\"|" $HOME/.stchaind/config/config.toml

View Current Seeds

Check which seed nodes are configured in your node.

grep "^seeds" $HOME/.stchaind/config/config.toml

Clear Seeds

Remove all seeds from your configuration.

sed -i -e 's|^seeds *=.*|seeds = ""|' $HOME/.stchaind/config/config.toml
Best Practice: Use seeds for initial discovery, then rely on the addrbook and persistent peers for ongoing connectivity. You can disable seeds once your node has discovered enough peers.

Configuration Files

Essential configuration files for your Stratos node.

Download Genesis (using curl)

Download the official genesis file using curl.

curl -Ls https://raw.githubusercontent.com/stratosnet/mainnet/main/genesis/genesis.json > $HOME/.stchaind/config/genesis.json

Download Genesis (using wget)

Alternative method using wget.

wget -O $HOME/.stchaind/config/genesis.json "https://raw.githubusercontent.com/stratosnet/mainnet/main/genesis/genesis.json"

Validate Genesis File

Verify that your genesis file is valid and correctly formatted.

stchaind validate-genesis

Validate Genesis (Modern Syntax)

Alternative validation command for newer SDK versions.

stchaind genesis validate-genesis

What is the Genesis File?

The genesis file contains the initial state of the blockchain. It includes the initial token distribution, validator set, and chain parameters. Every node must have the correct genesis file to connect to the network.

Important: Always validate your genesis file after downloading to ensure it hasn't been corrupted or tampered with.

Backup Your Addrbook

It's a good practice to backup your addrbook periodically, especially if you have good, stable peers.

cp $HOME/.stchaind/config/addrbook.json $HOME/.stchaind/config/addrbook.json.backup

Download directly one Addrbook

Replace by your URL to download the addrbook

curl -Ls YOUR_URL/addrbook.json > $HOME/.stchaind/config/addrbook.json.backup

Reset Addrbook

If you're having peer connection issues, you can reset your addrbook and let your node rebuild it from seeds.

rm $HOME/.stchaind/config/addrbook.json
sudo systemctl restart stchaind

What is the Addrbook?

The address book (addrbook.json) contains a list of known peers that your node has previously connected to. Using an up-to-date addrbook helps your node quickly find and connect to active peers when starting.

Addrbook URL not configured for this chain. Your node will build its own addrbook as it discovers peers. This process may take longer but is not required.
Note: The addrbook is automatically updated by your node as it discovers and connects to peers. You don't need to manually update it unless you're experiencing connection problems.

Fast Synchronization Methods

Skip syncing from genesis by using one of these fast synchronization methods for Stratos.

Using Snapshot (.lz4 compression)

Same optimized approach with lz4 compression (smaller file size, faster decompression). Download and verify first, then apply.

Step 1 - Prepare temporary directory

mkdir -p $HOME/snapshot_tmp

Step 2 - Check available disk space

df -h $HOME/snapshot_tmp

Step 3 - Set snapshot URL

Set the snapshot download URL. Replace with the latest URL from your snapshot provider.

SNAPSHOT="https://your-snapshot-provider.com/snapshot.lz4"

Step 4 - Download snapshot (node stays online)

wget -c $SNAPSHOT -O $HOME/snapshot_tmp/snapshot.lz4

Step 5 - Verify file size

ls -lah $HOME/snapshot_tmp/snapshot.lz4

Step 6 - Extract and verify content

mkdir -p $HOME/snapshot_tmp/extracted
lz4 -c -d $HOME/snapshot_tmp/snapshot.lz4 | tar -x -C $HOME/snapshot_tmp/extracted/
ls -lah $HOME/snapshot_tmp/extracted/

Step 7 - Backup validator state

cp $HOME/.stchaind/data/priv_validator_state.json $HOME/snapshot_tmp/priv_validator_state.json.backup

Step 8 - Stop node (downtime starts here)

sudo systemctl stop stchaind

Step 9 - Reset data

stchaind tendermint unsafe-reset-all --home $HOME/.stchaind --keep-addr-book

Step 10 - Move snapshot data into place

Check your extracted content from Step 6. Use the appropriate command depending on the snapshot structure.

# If extracted content contains a data/ folder:
mv $HOME/snapshot_tmp/extracted/data/* $HOME/.stchaind/data/

# If extracted content is flat (no data/ subfolder):
# mv $HOME/snapshot_tmp/extracted/* $HOME/.stchaind/data/

Step 11 - Restore validator state and cleanup

mv $HOME/snapshot_tmp/priv_validator_state.json.backup $HOME/.stchaind/data/priv_validator_state.json
rm -rf $HOME/snapshot_tmp

Step 12 - Start node and monitor logs

sudo systemctl start stchaind
sudo journalctl -u stchaind -f --no-hostname -o cat

Check Snapshot Information

Before downloading, check the snapshot's size and block height to ensure it's recent.

curl -sI $SNAPSHOT | grep -i content-length

Verify Snapshot Extraction

After extraction, verify that the data directory contains blockchain data.

ls -lah $HOME/.stchaind/data

What is a Snapshot?

A snapshot is a compressed backup of the blockchain data directory at a specific block height. Using a snapshot allows you to quickly sync your node without downloading the entire blockchain history from genesis.

Advantages: Fast synchronization, reliable, no special configuration needed.
Disadvantages: Large file download (can be several GB), requires disk space during extraction.
No snapshot URL configured for this chain. Check the official documentation or community resources for available snapshots.
Warning: Always backup your priv_validator_state.json before resetting! This file prevents double-signing if you're a validator.
Optimized approach: The commands on this page download and verify the snapshot before stopping your node. This minimizes validator downtime - your node only goes offline at Step 8 when everything is ready.
Disk space: This method temporarily requires extra disk space to hold both the compressed snapshot and the extracted data. Check available space (Step 2) before proceeding. The temporary directory $HOME/snapshot_tmp is cleaned up at Step 11.
Tip: Snapshots are updated regularly (daily or weekly). Always use the most recent snapshot for faster sync times.

Clean Previous State Sync (Optional)

If you've used State Sync before, clean the previous configuration. Recommended to avoid issues when restarting later.

sed -i "/\[statesync\]/, /^enable =/ s/=.*/= false/;\
/^rpc_servers =/ s|=.*|= \"\"|;\
/^trust_height =/ s/=.*/= 0/;\
/^trust_hash =/ s/=.*/= \"\"/" $HOME/.stchaind/config/config.toml

Configure State Sync

Stop your node and configure State Sync parameters.

sudo systemctl stop stchaind
SNAP_RPC="https://rpc.thestratos.org"
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)

Verify Variables

Check that the variables were set correctly. You should see three numbers/hashes.

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

Apply Configuration

Write the State Sync configuration to your config.toml file.

sed -i "/\[statesync\]/, /^enable =/ s/=.*/= true/;\
/^rpc_servers =/ s|=.*|= \"$SNAP_RPC,$SNAP_RPC\"|;\
/^trust_height =/ s/=.*/= $BLOCK_HEIGHT/;\
/^trust_hash =/ s/=.*/= \"$TRUST_HASH\"/" $HOME/.stchaind/config/config.toml

Reset Data and Start

Reset your node's data and start the service. State Sync will begin automatically.

stchaind tendermint unsafe-reset-all --home $HOME/.stchaind --keep-addr-book
sudo systemctl start stchaind
Watch your logs and be patient it can take 5 minutes.... !!

Monitor Logs

Watch the logs. State Sync can take 5-15 minutes. Be patient!

journalctl -u stchaind -f --no-hostname -o cat

Disable State Sync After Sync (Recommended)

Once synced, disable State Sync to prevent issues on next restart.

sed -i "/\[statesync\]/, /^enable =/ s/=.*/= false/;\
/^rpc_servers =/ s|=.*|= \"\"|;\
/^trust_height =/ s/=.*/= 0/;\
/^trust_hash =/ s/=.*/= \"\"/" $HOME/.stchaind/config/config.toml

What is State Sync?

State Sync is a protocol feature that allows a node to rapidly sync by downloading only the current state snapshot from the network, rather than replaying all historical blocks. This is the fastest sync method but requires trusted RPC endpoints.

Advantages: Very fast (minutes instead of hours/days), no large file download.
Disadvantages: Requires trusted RPC servers, you don't have historical blocks, may fail if RPC is unreliable.

Troubleshooting State Sync

  • Verify the RPC server is responding: curl -s https://rpc.thestratos.org/status
  • Try using multiple different RPC servers in the configuration
  • Restart the node and monitor logs carefully
  • As a last resort, use Snapshot instead

This means the trust hash you configured is outdated. Re-run the State Sync configuration commands to get fresh values for LATEST_HEIGHT, BLOCK_HEIGHT, and TRUST_HASH.

  • Ensure jq is installed: sudo apt install jq -y
  • Check the RPC URL is correct and responding
  • Try using a different RPC endpoint
Tip: State Sync is ideal for non-validator nodes or when you need to get online quickly. For archival nodes, use Snapshot instead.

Public Endpoints

Access Stratos network through these public endpoints.

What is RPC?

RPC (Remote Procedure Call) endpoints allow you to interact with the blockchain node directly. You can query blockchain state, broadcast transactions, and access Tendermint/CometBFT specific data.

Public RPC Endpoints

Community-provided RPC endpoints, sorted by performance based on the last check.

Provider Endpoint URL Status
thestratos.org
Offline
[NODERS]TEAM
Offline
[NODERS]TEAM
Offline
NodeStake
Offline
Some information may be outdated if it is not updated in the Cosmos Chain Registry, which is the source of the data displayed here.
Common uses:
  • Querying detailed blockchain state
  • Broadcasting transactions (send, stake, vote)
  • Accessing low-level Tendermint/CometBFT data
  • Subscribing to real-time events

Common RPC Queries

Useful RPC queries you can perform.

Get Node Status

curl -s https://rpc.thestratos.org/status | jq

Get Latest Block

curl -s https://rpc.thestratos.org/block | jq

What is REST API?

REST API (also called LCD - Light Client Daemon) provides HTTP endpoints to query the blockchain state. It's easier to use than RPC and returns formatted JSON responses.

Public REST API Endpoints

Community-provided REST API endpoints.

Provider Endpoint URL
thestratos.org
[NODERS]TEAM
NodeStake
Some information may be outdated if it is not updated in the Cosmos Chain Registry, which is the source of the data displayed here.
Common uses:
  • Querying account balances
  • Getting validator information
  • Viewing governance proposals
  • Checking staking rewards

Common REST API Queries

Useful REST API queries you can perform.

Get Node Info

curl -s API_URL/cosmos/base/tendermint/v1beta1/node_info | jq

Get Account Balance

curl -s API_URL/cosmos/bank/v1beta1/balances/YOUR_ADDRESS | jq

Get All Validators

curl -s API_URL/cosmos/staking/v1beta1/validators | jq

Get Governance Proposals

curl -s API_URL/cosmos/gov/v1beta1/proposals | jq

Get Total Supply

curl -s API_URL/cosmos/bank/v1beta1/supply | jq

What is gRPC?

gRPC is a high-performance RPC framework that uses Protocol Buffers. It's faster and more efficient than REST API, but requires specialized tools like grpcurl to interact with it.

Public gRPC Endpoints

Community-provided gRPC endpoints.

Provider Endpoint URL
thestratos.org
NodeStake
[NODERS]TEAM
[NODERS]TEAM
Some information may be outdated if it is not updated in the Cosmos Chain Registry, which is the source of the data displayed here.
Common uses:
  • High-performance blockchain queries
  • Programmatic access via SDKs
  • Building custom blockchain applications
  • Automated monitoring and analytics

Common gRPC Queries

Useful gRPC queries using grpcurl.

List All Services

grpcurl -plaintext GRPC_URL list

List Methods for Bank Service

grpcurl -plaintext GRPC_URL list cosmos.bank.v1beta1.Query

Query Account Balance

grpcurl -plaintext -d '{"address":"YOUR_ADDRESS"}' GRPC_URL cosmos.bank.v1beta1.Query/AllBalances

Install grpcurl

grpcurl is a command-line tool to interact with gRPC servers.

go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest

Query Validator Info

grpcurl -plaintext -d '{"validator_addr":"YOUR_VALOPER"}' GRPC_URL cosmos.staking.v1beta1.Query/Validator

Query All Validators

grpcurl -plaintext GRPC_URL cosmos.staking.v1beta1.Query/Validators
Tip: gRPC endpoints typically run on port 9090. If using a self-hosted node, your endpoint would be localhost:9090

Cosmovisor Setup

Cosmovisor is a process manager for Cosmos SDK blockchains that automates upgrades.

What is Cosmovisor?

Cosmovisor is a process manager that monitors governance proposals and automatically handles chain upgrades. When an upgrade proposal passes, Cosmovisor will automatically switch to the new binary at the specified block height without manual intervention.

Install Cosmovisor Binary

Install the latest version of Cosmovisor using Go.

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

Verify Installation

Check that Cosmovisor is correctly installed.

cosmovisor version

Create Cosmovisor Directory Structure

Set up the required directory structure for Cosmovisor.

mkdir -p $HOME/.stchaind/cosmovisor/genesis/bin
mkdir -p $HOME/.stchaind/cosmovisor/upgrades

Copy Current Binary to Cosmovisor

Copy your current daemon binary to the genesis folder.

cp $(which stchaind) $HOME/.stchaind/cosmovisor/genesis/bin/

Verify Binary in Cosmovisor

Check that the binary is correctly placed.

ls -la $HOME/.stchaind/cosmovisor/genesis/bin/
Benefits:
  • Automatic binary upgrades (no manual intervention)
  • Reduced upgrade downtime for validators
  • Automated backup of old binaries
  • Governance-triggered upgrades
Note: The genesis binary is the current version running on the network. Future upgrades will be added to the upgrades folder.

Create Cosmovisor Systemd Service

Create a systemd service file for Cosmovisor.

sudo tee /etc/systemd/system/stchaind.service > /dev/null <<EOF
[Unit]
Description=Stratos Node (Cosmovisor)
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=3
LimitNOFILE=65535
Environment="DAEMON_NAME=stchaind"
Environment="DAEMON_HOME=$HOME/.stchaind"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=false"

[Install]
WantedBy=multi-user.target
EOF

Enable and Start Service

Enable the service and start your node with Cosmovisor.

sudo systemctl daemon-reload
sudo systemctl enable stchaindsudo systemctl start stchaind

Check Service Status

Verify that the service is running correctly.

sudo systemctl status stchaind

View Logs

Monitor your node's logs in real-time.

journalctl -u stchaind -f --no-hostname -o cat

Environment Variables

Cosmovisor uses environment variables for configuration. These should be set in your systemd service file.

Variable Value Description
DAEMON_NAME stchaind Name of the binary to run
DAEMON_HOME $HOME/.stchaind Location of the node's data directory
DAEMON_ALLOW_DOWNLOAD_BINARIES false Auto-download binaries (not recommended)
DAEMON_RESTART_AFTER_UPGRADE true Auto-restart after upgrade
UNSAFE_SKIP_BACKUP false Skip automatic backup (not recommended)
Important: If you're migrating from a regular systemd service to Cosmovisor, stop your old service first before starting the Cosmovisor service.

Prepare for an Upgrade

When an upgrade proposal is approved, you need to prepare the new binary.

Step 1: Build the New Binary

Clone the repo and checkout the upgrade version tag.

cd $HOME
git clone https://github.com/stratosnet/stratos-chaincd stratos-chaingit checkout UPGRADE_VERSION_TAG
make install

Step 2: Create Upgrade Directory

Create a folder for the upgrade using the exact upgrade name from the proposal.

mkdir -p $HOME/.stchaind/cosmovisor/upgrades/UPGRADE_NAME/bin

Step 3: Copy New Binary

Copy the new binary to the upgrade folder.

cp $(which stchaind) $HOME/.stchaind/cosmovisor/upgrades/UPGRADE_NAME/bin/

Step 4: Verify Binary

Check the version of the new binary.

$HOME/.stchaind/cosmovisor/upgrades/UPGRADE_NAME/bin/stchaind version

Verify Cosmovisor is Ready

Check that Cosmovisor sees the upgrade binary.

ls -la $HOME/.stchaind/cosmovisor/upgrades/

Manual Upgrade (Without Cosmovisor)

If you prefer to upgrade manually without Cosmovisor:

# Stop the service at the upgrade height
sudo systemctl stop stchaind
# Replace the binary
cp NEW_BINARY_PATH $(which stchaind)

# Restart the service
sudo systemctl start stchaind

How Cosmovisor Handles Upgrades

When a governance upgrade proposal passes, Cosmovisor automatically:

  1. Monitors for the upgrade height specified in the proposal
  2. Stops the current binary at the upgrade height
  3. Backs up the current data (if UNSAFE_SKIP_BACKUP=false)
  4. Switches to the new binary in the upgrades folder
  5. Restarts the node with the new binary

Troubleshooting Upgrades

  • Verify the upgrade folder name matches exactly (case-sensitive)
  • Check that the binary is in upgrades/UPGRADE_NAME/bin/
  • Verify the binary is executable: chmod +x BINARY_PATH
  • Check Cosmovisor logs for specific error messages
  • Check logs: journalctl -u stchaind -n 100
  • Verify you're using the correct binary version
  • Ensure the binary was built correctly for your system
  • Check if there are any migration steps required for this upgrade
Cosmovisor creates backups automatically (unless UNSAFE_SKIP_BACKUP=true). To rollback:
sudo systemctl stop stchaind# Restore from backup location
cosmovisor rollback
sudo systemctl start stchaind
Best Practice: Always test upgrades on a testnet node first before upgrading your mainnet validator.

Block Explorers for Stratos.

We verify all explorers at least every 24 hours. Only online explorers are displayed below.

Community Explorers for Stratos.

Block explorers provided by the community, checked every 24 hours.

Explorer URL Status
bigdipper Online
TC Network Online

What is a Block Explorer?

A block explorer is a web application that allows you to browse and search blockchain data. You can use it to:

  • View real-time blockchain statistics (block height, transactions per second, etc.)
  • Search for specific transactions by hash
  • View account balances and transaction history
  • Monitor validator performance and voting power
  • Track governance proposals and votes
  • Analyze network activity and metrics

How to Use a Block Explorer

View Transaction Details

To view a transaction, paste the transaction hash (txhash) in the explorer's search bar. The explorer will show you:

  • Transaction status (success or failed)
  • Block height where the transaction was included
  • Gas used and fees paid
  • Messages included in the transaction
  • Sender and receiver addresses

Check Account Balance

To view an account's balance and history, paste the wallet address in the search bar. You'll see:

  • Current token balance
  • Delegations and staking rewards
  • Transaction history
  • Unbonding tokens

Monitor Validators

Most explorers have a dedicated validators page where you can:

  • View all active validators sorted by voting power
  • Check validator commission rates
  • Monitor validator uptime and missed blocks
  • See which validators have been jailed

Track Governance

The governance section shows all proposals on the network:

  • Active proposals in voting period
  • Proposal details and voting results
  • Your voting history

Upgrade Binary

Commands to upgrade your Stratos node binary to a new version.

Find Active Systemd Services

Search for all systemd service files that use the stchaind binary.

grep -l "stchaind" /etc/systemd/system/*.service

List All Custom Services

Display all custom service files (not system symlinks) in the systemd directory.

find /etc/systemd/system -maxdepth 1 -type f -name "*.service" -exec basename {} \;

Check Service Status

Verify if the service is currently running before upgrading.

sudo systemctl status stchaind

View Service Configuration

Display the content of your service file to check the binary path.

cat /etc/systemd/system/stchaind.service

Check Version with Commit

Display detailed version info including commit hash. Useful for debugging apphash errors during difficult node startups.

stchaind version --long

Why Find Services First?

Before upgrading, you need to identify which systemd services are using the binary you want to upgrade. This ensures you restart the correct service after the upgrade and avoid downtime on the wrong node.

Tip: If you run multiple nodes on the same server, each may have a different service name (e.g., stchaind, stchaind-validator, stchaind-sentry).
Important: Always note your service name before proceeding with the upgrade. You will need it to restart the node.

Download New Binary

Download the pre-compiled binary from the official release URL.

wget -O $HOME/go/bin/stchaind_new https://YOUR_BINARY_URL

Make Binary Executable

Grant execution permissions to the downloaded binary.

chmod +x $HOME/go/bin/stchaind_new

Verify New Binary Version with Commit

Check that the downloaded binary has the expected version with the right commit before replacing.

$HOME/go/bin/stchaind_new version --long

Replace Binary and Restart

Replace the old binary with the new one and restart the service.

sudo mv $HOME/go/bin/stchaind_new $HOME/go/bin/stchaindsudo systemctl restart stchaind && sudo journalctl -u stchaind -f --no-hostname -o cat

Upgrade Without Compilation

This method is faster as it uses pre-compiled binaries. It's ideal when official releases provide ready-to-use binaries for your architecture (usually linux/amd64).

Where to find binaries: Check the official GitHub releases page for pre-compiled binaries. Look for files ending in _linux_amd64 or similar.
Always verify the version before replacing the active binary. Running version --long on the new binary confirms you downloaded the correct file with the right commit.
Caution: Replace YOUR_BINARY_URL with the actual download URL from the official release page. Never download binaries from untrusted sources.

Navigate to Source Directory

Go to the cloned repository directory.

cd $HOME/stratos-chain

Pull Latest Changes

Fetch the latest code from the remote repository.

git pull

Checkout Target Version

Switch to the specific version tag you want to compile.

git checkout v0.11.2

Compile the Binary

Build the binary from source code.

make build

Verify Compiled Binary Version

Confirm the newly compiled binary has the correct version.

$HOME/stratos-chain/build/stchaind version --long

Replace Binary and Restart

Move the compiled binary to your PATH and restart the service.

sudo mv $HOME/stratos-chain/build/stchaind $HOME/go/bin/stchaindsudo systemctl restart stchaind && sudo journalctl -u stchaind -f --no-hostname -o cat

Compile from Source

Compiling from source ensures you have a binary built specifically for your system. This is the recommended method when pre-compiled binaries are not available or when you need custom build flags.

Prerequisites: Make sure you have Go installed and properly configured. The make build command requires Go and other build dependencies.
Version Tag: Replace v0.11.2 with the target version if different. Check the releases page for available version tags.
Tip: After restarting, the journalctl command will show live logs so you can verify the node is syncing correctly with the new binary.

Check Disk Space

Verify available disk space before compiling. Compilation requires several GB of free space.

df -h $HOME

Check Go Version

Ensure your Go version meets the minimum requirements for compilation.

go version

Check Go Build Cache Size

View the current size of your Go build cache before deciding to clean it.

du -sh $(go env GOCACHE)

Clean Go Build Cache

Free up disk space by cleaning the Go build cache if you're running low on storage.

go clean -cache

Check Memory Usage

Compilation can be memory-intensive. Check available RAM before building.

free -h

Before You Compile

These commands help you verify your system is ready for compilation. Running out of disk space or memory during build can cause failures and leave your system in an inconsistent state.

Recommended: At least 10 GB free disk space and 4 GB RAM for most Cosmos SDK compilations.
Go Version: Most chains require Go 1.21 or higher. Check the repository README for specific requirements.

Troubleshooting Common Issues

A guide to diagnosing and solving the most common errors encountered when running a Cosmos SDK node.

Transaction Errors

Cause: The gas limit provided was too low for the transaction's complexity.

Solution: Use --gas auto and add a buffer with --gas-adjustment 1.5.

Cause: Your node is out of sync or you sent multiple transactions too quickly.

Solution: Wait a moment, or get the correct sequence number from a synced RPC and use the --sequence flag.

Cause: Your wallet can't cover the transaction amount plus the gas fees.

Solution: Check your balance and ensure it's sufficient for both the amount and the fees.

Cause: You submitted the same transaction twice.

Solution: Wait for the first transaction to be included in a block. Check its status on a block explorer.

Cause: You used a shorthand like `1atom` instead of the base denomination `1000000uatom`.

Solution: Always use the smallest unit. Find the "Base Denom" in the Chain Info tab .

Node & Sync Issues

Cause: Your local node is stopped, syncing, or a public RPC is offline.

Solution: Check your service status. If stopped, restart it. If using a public RPC, try another from the Endpoints tab .

Cause: Lack of reliable peers.

Solution: Update `seeds` and `persistent_peers` from the Network tab , then restart your node.

Cause: A software upgrade occurred, and your node is running an old binary.

Solution: Install the new binary and restart. Using Cosmovisor is highly recommended.

Cause: The transaction indexer is likely enabled, or pruning is disabled.

Solution: For validators, disable the indexer. See the Advanced Config tab.

Validator & Server Issues

Cause: Your validator was offline for too long (downtime).

Solution: Ensure your node is synced, then send an `unjail` transaction. See the Slashing tab .

Cause: High server resource usage or poor network connectivity.

Solution: Optimize your node (e.g., disable indexer) and ensure you have stable `persistent_peers`.

Cause: The command requires administrator privileges, or file permissions are incorrect.

Solution: Prefix with sudo, or fix file ownership with sudo chown -R ....

Cause: A firewall is blocking the P2P port (default: 26656).

Solution: Allow incoming TCP connections on the P2P port (e.g., sudo ufw allow 26656/tcp).

Command Flags Reference

Complete reference of commonly used flags for stchaind commands.

Transaction Flags

These flags are used when broadcasting transactions (tx commands).


--from

Name or address of the wallet signing the transaction.

--from my_wallet

--chain-id

The chain ID of the network.

--chain-id stratos-1

--gas-prices

Gas price per unit of gas. Sets the fee for the transaction.

--gas-prices 1000000000wei

--gas

Gas limit. Use 'auto' to estimate automatically.

--gas auto

--gas-adjustment

Multiplier for gas estimation.

--gas-adjustment 1.5

--fees

Alternative to gas-prices. Specify exact fee.

--fees 500utoken

-y, --yes

Skip transaction confirmation prompt.

-y

--broadcast-mode

Broadcast mode: 'sync', 'async', or 'block'.

--broadcast-mode block

--node

Custom RPC node URL to broadcast through.

--node https://rpc.example.com:443

--keyring-backend

Keyring backend: 'os', 'file', 'test'.

--keyring-backend test

--memo

Add a memo/note to the transaction.

--memo "My first transaction"

--dry-run

Simulate the transaction without broadcasting.

--dry-run

--account-number

Manual account number (advanced).

--account-number 123

--sequence

Manual sequence number (advanced).

--sequence 456

--offline

Build transaction in offline mode.

--offline

--generate-only

Generate unsigned tx for later use.

--generate-only > unsigned_tx.json

--sign-mode

Signature mode: direct, amino-json.

--sign-mode direct

--fee-granter

Address that will pay for tx fees.

--fee-granter <address>

--fee-payer

Address that will pay fees.

--fee-payer <address>

--timeout-height

Block height timeout for validity.

--timeout-height 1234567

Common Transaction Examples


Basic Transaction

Minimal required flags for most transactions.

stchaind tx bank send wallet_name recipient_address 1000000utoken \
--from wallet_name \
--chain-id stratos-1 \
--gas-prices 1000000000wei \
-y

Transaction with Auto Gas Estimation

Let the node estimate the required gas automatically.

stchaind tx staking delegate valoper_address 1000000utoken \
--from wallet_name \
--chain-id stratos-1 \
--gas-prices 1000000000wei \
--gas auto \
--gas-adjustment 1.5 \
-y

Transaction with Custom Node

Broadcast through a specific RPC endpoint.

stchaind tx gov vote 1 yes \
--from wallet_name \
--chain-id stratos-1 \
--gas-prices 1000000000wei \
--node https://rpc.example.com:443 \
-y

Generate Unsigned Transaction

Create transaction for signing later (offline signing).

stchaind tx bank send wallet_name recipient 1000000utoken \
--from wallet_name \
--chain-id stratos-1 \
--gas-prices 1000000000wei \
--generate-only > unsigned_tx.json

Query Flags

These flags are used when querying blockchain state (query commands).


--node

RPC node URL to query from.

--node https://rpc.example.com:443

--height

Query state at a specific block height.

--height 1234567

-o, --output

Output format: 'text' or 'json'.

--output json

--limit

Maximum number of results to return.

--limit 100

--page

Page number for paginated results.

--page 2

--count-total

Include total count in paginated response.

--count-total

--offset

Number of results to skip (pagination).

--offset 20

--page-key

Pagination key from previous query.

--page-key "eyJjb2..."

--reverse

Reverse the order of results.

--reverse

--home

Node home directory (if not default).

--home /path/to/.daemon

--chain-id

Chain ID (usually auto-detected).

--chain-id stratos-1

--indent

Indent JSON output for readability.

--indent

Common Query Examples


Basic Query (Text Output)

Default human-readable output format.

stchaind query bank balances your_address

Query with JSON Output

Get machine-readable JSON for scripting or parsing.

stchaind query bank balances your_address -o json

Query with JSON + jq Parsing

Parse JSON output with jq for specific fields.

stchaind query bank balances your_address -o json | jq '.balances[0].amount'

Query at Specific Height

View historical state at a particular block.

stchaind query bank balances your_address --height 1000000

Query with Pagination

Get limited results for large datasets.

stchaind query staking validators --limit 50 --offset 0 -o json

Query from Custom Node

Query a specific RPC endpoint instead of localhost.

stchaind query bank balances your_address --node https://rpc.example.com:443

Advanced Query Techniques


Count Total Results

Include the total count in paginated results.

stchaind query staking validators --count-total -o json | jq '.pagination.total'

Get Only Bonded Validators

Filter validators by status using jq.

stchaind query staking validators -o json | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")'

Sort Validators by Voting Power

Get validators sorted by tokens descending.

stchaind query staking validators -o json | jq '.validators | sort_by(.tokens | tonumber) | reverse | .[0:10]'
Best Practice: Always use -o json when scripting or automating queries. Combine with jq for powerful JSON parsing and filtering.
Tip: Use --help on any command to see all available flags: stchaind query bank balances --help