Skip to content
All services

Mainnet

Althea

Chain ID
Version
Go

Run these after the install guide, which sets $WALLET, $MONIKER and the chain variables.

Keys and wallet

  1. Add a new key

    althea keys add $WALLET
  2. Recover a key

    althea keys add $WALLET --recover
  3. List keys

    althea keys list
  4. Wallet balance

    althea q bank balances $(althea keys show $WALLET -a)

Validator

  1. Create a validator

    cat > $HOME/validator.json << EOF
    {
      "pubkey": $(althea comet show-validator),
      "amount": "1000000000000000000aalthea",
      "moniker": "$MONIKER",
      "identity": "",
      "website": "",
      "security": "",
      "details": "",
      "commission-rate": "0.05",
      "commission-max-rate": "0.20",
      "commission-max-change-rate": "0.05",
      "min-self-delegation": "1"
    }
    EOF
    althea tx staking create-validator $HOME/validator.json --from $WALLET --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y
  2. Edit the validator

    althea tx staking edit-validator --new-moniker "$MONIKER" --identity "" --website "" --details "" --from $WALLET --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y
  3. Unjail

    althea tx slashing unjail --from $WALLET --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y
  4. Validator details

    althea q staking validator $(althea keys show $WALLET --bech val -a)

Tokens

  1. Withdraw all rewards

    althea tx distribution withdraw-all-rewards --from $WALLET --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y
  2. Withdraw commission and rewards

    althea tx distribution withdraw-rewards $(althea keys show $WALLET --bech val -a) --commission --from $WALLET --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y
  3. Delegate to yourself

    althea tx staking delegate $(althea keys show $WALLET --bech val -a) 1000000000000000000aalthea --from $WALLET --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y
  4. Redelegate

    althea tx staking redelegate $(althea keys show $WALLET --bech val -a) <TO_VALOPER> 1000000000000000000aalthea --from $WALLET --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y
  5. Unbond

    althea tx staking unbond $(althea keys show $WALLET --bech val -a) 1000000000000000000aalthea --from $WALLET --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y
  6. Send tokens

    althea tx bank send $WALLET <TO_ADDRESS> 1000000000000000000aalthea --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y

Governance

  1. List proposals

    althea q gov proposals
  2. View a proposal

    althea q gov proposal <ID>
  3. Vote

    althea tx gov vote <ID> yes --from $WALLET --chain-id $ALTHEA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000000aalthea -y
    # yes | no | abstain | no_with_veto

Maintenance

  1. Node status

    althea status 2>&1 | jq
  2. Node peer address

    echo $(althea comet show-node-id)@$(wget -qO- eth0.me):$ALTHEA_PORT656
  3. Live peers

    curl -s localhost:$ALTHEA_PORT657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":") | last)"' | paste -sd,
  4. Check the validator key

    [[ $(althea q staking validator $(althea keys show $WALLET --bech val -a) -o json | jq -r .validator.consensus_pubkey.value) = $(althea comet show-validator | jq -r .key) ]] && echo "match" || echo "MISMATCH"
  5. Reset chain data

    althea comet unsafe-reset-all --keep-addr-book --home $HOME/.althea
  6. Remove the node

    sudo systemctl stop althea
    sudo systemctl disable althea
    sudo rm /etc/systemd/system/althea.service
    sudo systemctl daemon-reload
    rm -rf $HOME/.althea $(which althea)

Service

  1. Service status

    sudo systemctl status althea
  2. Follow logs

    sudo journalctl -fu althea -o cat
  3. Restart

    sudo systemctl restart althea
  4. Stop

    sudo systemctl stop althea
Original guide (GitBook)