> For the complete documentation index, see [llms.txt](https://xorion-chain.gitbook.io/xorion-chain-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xorion-chain.gitbook.io/xorion-chain-docs/the-xorion/validator-node.md).

# Validator Node

**Validators** participate in consensus and block production.&#x20;

{% hint style="info" %}
**Note:** You need sufficient stake and nomination to become an active validator.
{% endhint %}

**Validator Setup Process:**

1. **Generate Session Keys Locally (Recommended):**

   **Important:** The Xorion network requires three session keys in this specific order:

   * **BABE** (Sr25519) - for block authoring
   * **GRANDPA** (Ed25519) - for finality gadget
   * **Authority Discovery** (Sr25519) - for peer discovery

```
# Generate keys locally in the required order
# 1. BABE key (Sr25519)
./target/release/xorion-node key generate --scheme Sr25519 --keystore-path ./validator-keystore --key-type babe

# 2. GRANDPA key (Ed25519)
./target/release/xorion-node key generate --scheme Ed25519 --keystore-path ./validator-keystore --key-type gran

# 3. Authority Discovery key (Sr25519)
./target/release/xorion-node key generate --scheme Sr25519 --keystore-path ./validator-keystore --key-type audi
```

Alternative: Generate via RPC:

```
curl -H "Content-Type: application/json" \
     -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' \
     http://localhost:9944
```

{% hint style="info" %}
**Note:** When using RPC generation, the returned hex string contains all three keys concatenated in the correct order (BABE, GRANDPA, and the Authority Discovery).
{% endhint %}

2. **Generate Node Key**

```
./target/release/xorion-node key generate-node-key --file node-key
```

Use the generated `node-key` file and `validator-keystore` to start the validator node.

```
./target/release/xorion-node \
  --chain xorion-spec.json \
  --base-path ./xorion-validator \
  --validator \
  --name "YourValidatorName" \
  --blocks-pruning 10000 \
  --state-pruning 10000 \
  --node-key-file ./node-key \
  --keystore-path ./validator-keystore \
  --public-addr /ip4/YOUR_PUBLIC_IP/tcp/30334
```

3. **Bond Your Tokens:**

* Go to [Network](https://scan.xorion.network/#/staking) > Staking > Account Actions
* Click "+ Stash" to start the bonding process
* Choose your **Stash account** (holds the funds to be bonded)
* Select your **Controller account** (can be the same as stash or different)
* Choose **Reward destination**:
  * **Stash account (increase amount at stake)**: Rewards compound automatically
  * **Controller account**: Rewards go to the controller, not staked automatically
  * **Specified payment account**: Send rewards to any account you choose
* Enter the amount to bond (leave some for transaction fees)
* Submit the bonding transaction

4. **Set Session Keys:**

* After bonding, you'll see options to either "Session Key" or "Nominate"
* Click **"Session Key"**
* Enter the session keys (the hex string from step 1)
* Submit the transaction and wait for confirmation

5. **Start Validating:**

* Once session keys are set correctly, the **"Validate"** option will appear
* Click "Validate"
* Set your **validator preferences**:
  * **Reward commission**: Percentage you keep from nominator rewards (0-100%)
  * **Blocked nominators**: Option to block specific nominators
* Submit the validated transaction
* Your validator will be active in the next era if you have enough stake

{% hint style="info" %}
**Important Notes:**

* Your bonded funds will be **locked** for the unbonding period (typically 28 days)
* You need a minimum stake to be in the active validator set
* Session keys should be kept secure and backed up safely
  {% endhint %}

**Security Setup For Validators:**

```
# Validator node (private, no RPC)
./target/release/xorion-node \
  --chain xorion-spec.json \
  --base-path ./xorion-validator \
  --validator \
  --name "YourValidatorName" \
  --node-key-file ./node-key \
  --keystore-path ./validator-keystore \ 
  --reserved-only \
  --reserved-nodes /ip4/SENTRY_IP/tcp/30333/p2p/SENTRY_PEER_ID
```

For more information, visit the [Xorion Network Connection Guide](https://github.com/XORIONCHAIN/xorion-main?tab=readme-ov-file#xorion-network-connection-guide).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xorion-chain.gitbook.io/xorion-chain-docs/the-xorion/validator-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
