# Axon Mainnet Validator Workflow

## Network constants

- Cosmos chain ID: `axon_8210-1`
- EVM chain ID: `8210`
- Public wallet RPC: `https://mainnet-rpc.axonchain.ai/`
- Bootstrap peer: `e47ec82a1d08a371e3c235e6554496be2f114eae@mainnet-node.axonchain.ai:26656`
- Genesis file: `https://raw.githubusercontent.com/axon-chain/axon/main/docs/mainnet/genesis.json`
- Bootstrap peers file: `https://raw.githubusercontent.com/axon-chain/axon/main/docs/mainnet/bootstrap_peers.txt`

## Preferred working directory

Use `/opt/axon-node` for bare metal and containerized installs.

## Current chain-verified Agent economics

These values were validated against the current `agent` module parameters on mainnet:

- Minimum Agent registration stake: `100 AXON`
- Agent registration burn: `20 AXON`
- Heartbeat interval: `100` blocks
- Reward split: `20% proposer`, `55% validator pool`, `25% reputation pool`

Implication:

- A plain validator can earn validator-side rewards.
- An Agent validator can additionally participate in Agent-side reward paths, but this is not a guaranteed fixed bonus. Eligibility depends on registration, heartbeat freshness, stake, reputation, and current chain logic.

## Bootstrap the validator workspace

```bash
mkdir -p /opt/axon-node
cd /opt/axon-node

curl -fsSLo start_validator_node.sh https://raw.githubusercontent.com/axon-chain/axon/main/scripts/start_validator_node.sh
curl -fsSLo start_sync_node.sh https://raw.githubusercontent.com/axon-chain/axon/main/scripts/start_sync_node.sh
curl -fsSLo genesis.json https://raw.githubusercontent.com/axon-chain/axon/main/docs/mainnet/genesis.json
curl -fsSLo bootstrap_peers.txt https://raw.githubusercontent.com/axon-chain/axon/main/docs/mainnet/bootstrap_peers.txt
chmod 0755 start_validator_node.sh start_sync_node.sh
printf 'replace-with-a-strong-passphrase\n' > keyring.pass
chmod 0600 keyring.pass
```

## Optional: pre-download `axond`

For Linux AMD64:

```bash
curl -fsSLo axond https://github.com/axon-chain/axon/releases/latest/download/axond_linux_amd64
curl -fsSLo axond.sha256 https://github.com/axon-chain/axon/releases/latest/download/axond_linux_amd64.sha256
echo "$(cat axond.sha256)  axond" | sha256sum -c -
chmod 0755 axond
```

Adjust the release asset URL for a different platform if needed.

## Initialize the validator account

```bash
cd /opt/axon-node
KEYRING_PASSWORD_FILE=/opt/axon-node/keyring.pass ./start_validator_node.sh init
```

What this creates:

- `data/validator.address`
- `data/validator.valoper`
- `data/validator.consensus_pubkey.json`
- `data/peer_info.txt`

The mnemonic is only printed once when a new account is generated.

## Start the node

```bash
cd /opt/axon-node
KEYRING_PASSWORD_FILE=/opt/axon-node/keyring.pass ./start_validator_node.sh start
```

Default ports:

- P2P: `26656`
- CometBFT RPC: `26657`
- JSON-RPC: `8545`
- JSON-RPC WS: `8546`
- REST API: `1317`
- gRPC: `9090`

If a Docker deployment remaps ports, use the remapped host ports instead of the defaults. For example, a local deployment may expose:

- CometBFT RPC: `27657`
- REST API: `11317`
- P2P: `27656`

## Verify sync before any validator transaction

```bash
curl -s http://127.0.0.1:26657/status | jq '.result.sync_info'
```

Wait until:

- latest block height is moving
- peer count is non-zero
- `catching_up` becomes `false`

Do not submit `create-validator` before `catching_up=false`.

## Fund the validator account

Read the address from `data/validator.address` and transfer AXON to it.

Example:

```bash
cat /opt/axon-node/data/validator.address
```

## Submit `create-validator`

Use a non-zero gas price. Current safe default:

- `GAS_PRICES=1000000000aaxon`

Command:

```bash
cd /opt/axon-node
KEYRING_PASSWORD_FILE=/opt/axon-node/keyring.pass \
COMETBFT_RPC=http://127.0.0.1:26657 \
GAS_PRICES=1000000000aaxon \
./start_validator_node.sh create-validator
```

Notes:

- The official script default self-bond is `100 AXON` unless `VALIDATOR_STAKE` is overridden.
- The node must already be running locally when you point `COMETBFT_RPC` at `http://127.0.0.1:26657`.

## Verify validator status

Query the transaction if needed:

```bash
curl -s http://127.0.0.1:1317/cosmos/tx/v1beta1/txs/<TX_HASH>
```

Query the validator:

```bash
axond query staking validator "$(cat /opt/axon-node/data/validator.valoper)" \
  --node http://127.0.0.1:26657 \
  --output json
```

Useful success indicators:

- validator exists on chain
- validator has tokens bonded
- status is `BOND_STATUS_BONDED` or the expected waiting-state for the network

## Become an Agent validator

Prerequisites:

- the validator already exists on chain
- the validator is not jailed
- the validator account still has enough liquid AXON for:
  - `100 AXON` Agent stake
  - gas fees

Check the current Agent module parameters:

```bash
axond query agent params \
  --node http://127.0.0.1:26657 \
  --output json
```

Check the validator is bonded:

```bash
axond query staking validator "$(cat /opt/axon-node/data/validator.valoper)" \
  --node http://127.0.0.1:26657 \
  --output json
```

Register the same validator account as an Agent:

```bash
printf '%s\n' "$(cat /opt/axon-node/keyring.pass)" | \
axond tx agent register "validator,mining,heartbeat" "axon-validator" "100000000000000000000aaxon" \
  --from validator \
  --keyring-backend file \
  --home /opt/axon-node/data/node \
  --chain-id axon_8210-1 \
  --node http://127.0.0.1:26657 \
  --gas auto \
  --gas-adjustment 1.5 \
  --gas-prices 1000000000aaxon \
  -y
```

Verify the Agent record exists:

```bash
axond query agent agent "$(cat /opt/axon-node/data/validator.address)" \
  --node http://127.0.0.1:26657 \
  --output json
```

Expected indicators:

- `status` is `AGENT_STATUS_ONLINE`
- `stake_amount` is `100000000000000000000aaxon`
- `burned_at_register` is `20000000000000000000aaxon`

## Keep the Agent online

If the account is registered as an Agent, it must keep heartbeats fresh.

Manual heartbeat:

```bash
printf '%s\n' "$(cat /opt/axon-node/keyring.pass)" | \
axond tx agent heartbeat \
  --from validator \
  --keyring-backend file \
  --home /opt/axon-node/data/node \
  --chain-id axon_8210-1 \
  --node http://127.0.0.1:26657 \
  --gas auto \
  --gas-adjustment 1.5 \
  --gas-prices 1000000000aaxon \
  -y
```

The repository also ships an official Agent heartbeat daemon under `tools/agent-daemon/` for sidecar-style operation.

## Ongoing operations

- Logs: `tail -f /opt/axon-node/data/node.log`
- Sync info: `curl -s http://127.0.0.1:26657/status | jq '.result.sync_info'`
- Validator address: `cat /opt/axon-node/data/validator.valoper`
- Bootstrap peers should stay aligned with the official repository
- Set `P2P_EXTERNAL_ADDRESS=host:26656` only on a public inbound validator
