# Connect validator to X1 Mainnet

## Step 1 — Switch RPC to X1 Mainnet

Set your Solana CLI to use the X1 Mainnet endpoint:

```bash
solana config set --url https://rpc.mainnet.x1.xyz
```

***

## Step 2 — Verify Validator Airdrop

Check that your `id.json` or hardware wallet public key has received the validator airdrop:

```bash
solana balance <PUBKEY>
```

Your balance should be **greater than 0**.

***

## Step 3 — Fund Local Keypairs

Send **1 XNT** (or a small amount) to both:

* `id.json` — used to manage startup of the validator
* `identity.json` — your validator identity key

Do this using **Backpack Wallet**.

{% hint style="info" %}
To switch Backpack to Mainnet RPC:\
<https://docs.x1.xyz/build-on-x1/resources>
{% endhint %}

{% hint style="info" %}
To import your hardware wallet in Backpack:\
Wallets → **Add new Solana wallet** → **Hardware wallet**
{% endhint %}

***

## Step 4 — Configure Solana CLI Identity

Make sure you’re operating with the correct signer:

```bash
solana config set -k ~/.config/solana/id.json
```

Check balances:

```bash
solana balance ~/.config/solana/id.json
solana balance ~/.config/solana/identity.json
```

***

## Step 5 — Go to Your Keypair Directory

Navigate to where your keypair files are stored:

```bash
cd ~/.config/solana
```

***

## 6. Create a Vote Account

Create a **vote account** for `vote.json`, and assign your **hardware wallet (Ledger)** as the **withdraw authority**.

***

### 6.1 Get Your Ledger’s Public Key (on Your Local Machine)

On your **local computer**, plug in your **Ledger**, open the **Solana app**, and run:

```bash
solana-keygen pubkey "usb://ledger?key=0/0"
```

Copy the output — this is your **Ledger withdraw authority address**:

```
<LEDGER_PUBKEY>
```

> 💡 You only need the **public key** from your Ledger.\
> The Ledger does **not** need to be connected to your validator server.

***

### 6.2 Create the Vote Account (on Your Validator Server)

Create a vote account for `vote.json`, using your `identity.json` keypair as the signer, and set your Ledger pubkey as the withdraw authority:

```bash
solana create-vote-account vote.json identity.json <LEDGER_PUBKEY> --commission 10
```

* `identity.json` → signs the vote account creation and becomes the validator identity
* `<LEDGER_PUBKEY>` → becomes the withdraw authority
* `--commission 10` → your validator keeps **10%**, and **delegators receive 90%**

***

### 6.3 Verify the Vote Account

Confirm it was successfully created:

```bash
solana vote-account <VOTE_ACCOUNT_PUBKEY>
```

You should see details such as:

* Identity pubkey
* Withdraw authority
* Commission %
* Epoch credits and status

***

## Step 7 — Create a Stake Account

Create a stake account and deposit a small amount (e.g. 0.1 XNT):

```bash
solana create-stake-account stake.json 0.1
```

This initializes `stake.json` using funds from your `id.json`.

***

## Step 8 — Secure Stake Account with Hardware Wallet

Authorize your Ledger hardware wallet as the **withdraw authority**:

```bash
solana stake-authorize stake.json --new-withdraw-authority <HW_WALLET_PUBKEY>
```

Now only your hardware wallet can withdraw or modify the stake account.

***

## Step 9 — Fund Your Stake Account

Send more XNT to your stake account from your hardware wallet using Backpack.

**In Backpack:**

* **From:** your hardware wallet pubkey
* **To:** your `stake.json` pubkey
* **Amount:** the amount you want to stake to your validator

Verify balance:

```bash
solana balance ~/.config/solana/stake.json
```

***

## Step 10 — Delegate Stake

Link your stake account to your vote account:

```bash
solana delegate-stake stake.json vote.json
```

This command delegates your staked XNT to your validator’s vote account.

***

## Step 11 — Check Stake Account Status

View your stake account details:

```bash
solana stake-account stake.json
```

Example output:

```
Balance: 100.1 XNT
Rent Exempt Reserve: 0.00228288 XNT
Delegated Stake: 100.0 XNT
Active Stake: 0 XNT
Activating Stake: 100.0 XNT
Stake activates starting from epoch: 9
Delegated Vote Account Address: <VOTE_PUBKEY>
Stake Authority: <STAKE_AUTHORITY_PUBKEY>
Withdraw Authority: <HW_WALLET_PUBKEY>
```

> The stake will become active starting from the listed epoch once the validator is participating in consensus.

***

## Step 12 — Reset Local Ledger

Before switching to mainnet, clear your old testnet ledger to avoid conflicts:

```bash
rm -rf ~/ledger
```

***

## Step 13 — Update Validator Startup Script for Mainnet

Open your validator startup script:

```bash
nano $HOME/bin/validator.sh
```

Replace its contents with:

```bash
#!/bin/bash
export RUST_LOG=solana_metrics=warn,info

exec tachyon-validator \
  --identity $HOME/.config/solana/identity.json \
  --vote-account $HOME/.config/solana/vote.json \
  --entrypoint entrypoint0.mainnet.x1.xyz:8001 \
  --entrypoint entrypoint1.mainnet.x1.xyz:8001 \
  --entrypoint entrypoint2.mainnet.x1.xyz:8001 \
  --entrypoint entrypoint3.mainnet.x1.xyz:8001 \
  --entrypoint entrypoint4.mainnet.x1.xyz:8001 \
  --known-validator 7ufaUVtQKzGu5tpFtii9Cg8kR4jcpjQSXwsF3oVPSMZA \
  --known-validator 5Rzytnub9yGTFHqSmauFLsAbdXFbehMwPBLiuEgKajUN \
  --known-validator 4V2QkkWce8bwTzvvwPiNRNQ4W433ZsGQi9aWU12Q8uBF \
  --known-validator CkMwg4TM6jaSC5rJALQjvLc51XFY5pJ1H9f1Tmu5Qdxs \
  --known-validator 7J5wJaH55ZYjCCmCMt7Gb3QL6FGFmjz5U8b6NcbzfoTy \
  --only-known-rpc \
  --log $HOME/validator.log \
  --ledger $HOME/ledger \
  --rpc-port 8899 \
  --full-rpc-api \
  --dynamic-port-range 8000-8020 \
  --wal-recovery-mode skip_any_corrupted_record \
  --limit-ledger-size 50000000 \
  --enable-rpc-transaction-history \
  --enable-extended-tx-metadata-storage \
  --rpc-pubsub-enable-block-subscription \
  --full-snapshot-interval-slots 5000 \
  --maximum-incremental-snapshots-to-retain 10 \
  --maximum-full-snapshots-to-retain 50
```

Save and exit the editor.

***

## Step 14 — Start the Validator

From your home directory:

```bash
cd $HOME
nohup $HOME/bin/validator.sh &
```

***

## Step 15 — Monitor Your Validator

Check validator logs:

```bash
tail -f $HOME/validator.log
```

Check catch-up status:

```bash
solana catchup --our-localhost
```

Monitor validator performance:

```bash
tachyon-validator --ledger ./ledger monitor
```


---

# Agent Instructions: 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://docs.x1.xyz/validating/connect-validator-to-x1-mainnet.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.
