> For the complete documentation index, see [llms.txt](https://solana-boot.manystake.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solana-boot.manystake.com/node-transition-hot-swap.md).

# Node Transition (Hot Swap)

Transition from a voting validator to another validator without downtime.

## How to run node transition&#x20;

We offer a script called `node-transition.sh` that enables you to relocate your voting validator to a different machine without experiencing any downtime. This script is integrated into the solana home directory via our ansible playbook installation process

{% hint style="info" %}
Take time to read the script to fully understand how it works before running it.
{% endhint %}

<details>

<summary>Initial Setup</summary>

#### Copying the Public SSH Key of solana user into the remote host <a href="#copying-your-public-key-manually" id="copying-your-public-key-manually"></a>

Before running the script, you must be able to ssh between your nodes with the Solana user.\
The content of your `id_rsa.pub` file will have to be added to a file  `~/.ssh/authorized_keys` on your remote machine somehow.

#### Define remote host IP in node-transition.sh

```bash
#!/bin/bash

# Define here the IP of the node to transition the voting operation
TRANSITIONAL_NODE_IP=
...
```

#### Validator keypair setup

Each validator must have alternative identities that can be used when they are not actively voting. You can create these fictitious identities on each of your validators as follows:

```bash
solana-keygen new -s --no-bip39-passphrase -o unfunded-validator-keypair.json
```

Assuming that you have executed the init\_validator.sh script on both nodes, the unfunded-validator-keypair.json file should already exist.

Your real validator-keypair.json have to be named `funded-validator-keypair.json` and copied on each node.

Create a symlink `validator-keypair.json` pointing to `funded-validator-keypair.json` your primary node.

```
ln -sf /home/solana/.secrets/funded-validator-keypair.json validator-keypair.json
```

Create a symlink validator-keypair.json pointing to `unfunded-validator-keypair.json` your secondary node.

```
ln -sf /home/solana/.secrets/unfunded-validator-keypair.json validator-keypair.json
```

#### Modifying your solana-validator.service&#x20;

The identity flag and authorized voter flags should be modified on **both** validators.

```bash
...
--identity /home/solana/.secrets/validator-keypair.json \
--vote-account /home/solana/.secrets/vote-account-keypair.json \
--authorized-voter /home/solana/.secrets/funded-validator-keypair.json \
...
```

Assuming that you have executed the init\_validator.sh script on both nodes, the unfunded-validator-keypair.json file should already exist.

</details>

<details>

<summary>Start your nodes</summary>

Your primary and secondary nodes should be running.

The primary node is voting and `validator-keypair.json` point to `funded-validator-keypair.json`

The secondary node is started, as catches up with the network but it is not voting and `validator-keypair.json` point to `unfunded-validator-keypair.json`&#x20;

You can check that the second is not voting by tailing the log file. You should see `Unable to vote.`

```log
[2023-03-21T22:52:26.226528450Z INFO  solana_core::replay_stage] Vote account node_pubkey mismatch: FnpP7TK6F2hZFVnqSUJagZefwRJ4fmnb1StS1NokpLZM (expected: DCbiSAQwvSrWkDhiqTfcTUWacY4jxDZWG1s1GSPQ5TwZ).  Unable to vote
```

</details>

<details>

<summary>Run node-transition.sh on primary to switch to secondary node</summary>

At this stage, you can run the script and observe your logs on both nodes.

```
./node-transition.sh
```

</details>

{% hint style="danger" %}
Jito Labs is currently developing a solution to make Jito Solana Software compatible with Node Transition, but it is not fully compatible yet. In the meantime, you can use the Stock Solana software to run your Solana secondary (Hot Spare) node.
{% endhint %}
