In October 2024 the team at staking facilities made history as the very first validator to run Frankendancer on mainnet thus pioneering the adoption of Frankendancer and bringing us closer to a future with greater throughput, efficiency and resilience. To support the wider adoption of Frankendancer we have put together this easy to follow guide so that you too may play your part in the optimisation of the Solana network.
Resources:
Official Agave Docs Home | Agave
Official Frankendancer Docs FiredancerFiredancer
Before we begin please ensure that:
Your Key pairs are stored in your Users Home directory, in the folder called keys on both Machines.
First follow the steps described in the official Frankendancer Docs.
From the Docs:
Firedancer must be built from source and currently only supports building and running on Linux.
Firedancer requires a recent Linux kernel, at least v4.18.
This corresponds to Ubuntu 20.04, Fedora 29, Debian 11, or RHEL 8.
Software needed to build FD:
- GCC version 8.5 or higher. Only GCC version 11, 12, and 13 are supported and tested by the Firedancer developers.
- rustup
- clang, git, and make
When the above software is installed on your Server, you can continue with cloning the FD Repo from GitHub:
git clone --recurse-submodules https://github.com/firedancer-io/firedancer.git
cd firedancer
TAG="v0.304.20106"
git checkout tags/"$TAG"
git submodule update
bash deps.sh
make -j fdctl solana
This will clone the Repo recursively with its submodules, checkout the Version you want to build, install needed dependencies and finally, build the fdctl and solana Binary. You can find all releases on the Firedancer GitHub Repo here https://github.com/firedancer-io/firedancer/releases
Replace your desired Release version with “v0.304.20106” in the example.
For the first start of Frankendancer, we recommend that you start it with a newly created Identity Key Pair. This allows you to test whether the Server is able to catch up with the chain or it might suffer from any other issues.
To create a new Key Pair follow these instructions:
# command to create new keypair
/home/solana/firedancer/build/native/gcc/bin/fdctl keys new identity
# which will return this
successfully created keypair in `/home/solana/.firedancer/fd1/identity.json`
When this is complete we can create the Frankendancer configuration File.
I named my config file firedancer-config.toml and placed it in the Home of my solana User.
The appearance of your configuration File will depend on your objective, so we will not share an example config, however you can find all the possible parameters in the firedancer repo here: https://github.com/firedancer-io/firedancer/blob/main/src/app/fdctl/config/default.toml
The important part in the config File is the following:
[consensus]
identity_path = "/home/solana/.firedancer/fd1/identity.json"
vote_account_path = "/home/solana/keys/vote-keypair.json"
authorized_voter_paths = [
"/home/solana/keys/staked-identity-keypair.json",
]
As you can see, for our identity_path, we have used the newly created Key Pair.
The vote_account_path should serve as your actual Vote Keypair while the authorized_voter_paths should act as your actual Identity Keypair. This will prevent your Validator from voting and will enable it to catch up with the Chain.
There are other ways to achieve a non Voting Node that will catch up with the Chain, however the method described above has worked best for us.
Now that you have a Configuration File, you can execute the configure init all command, while pointing it to your configuration file.
sudo /home/solana/firedancer/build/native/gcc/bin/fdctl configure init all --config /home/solana/firedancer-config.toml
After the configure init command has been executed successfully, you are ready to start the Frankendancer Client.
/home/solana/firedancer/build/native/gcc/bin/fdctl run --config /home/solana/firedancer-config.toml
You can start Frankendancer in a screen, however, we recommend that you create a systemd service, this will allow you to control it.
Your Frankendancer systemd File may look like this:
$ cat /etc/systemd/system/firedancer.service
[Unit]
Description=Firedancer
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=5
User=solana
LimitNOFILE=1000000
LogRateLimitIntervalSec=0
ExecStartPre=sudo /home/solana/firedancer/build/native/gcc/bin/fdctl configure init all --config /home/solana/firedancer-config.toml
ExecStart=sudo /home/solana/firedancer/build/native/gcc/bin/fdctl run --config /home/solana/firedancer-config.toml
TimeoutSec=infinity
[Install]
WantedBy=multi-user.target
To activate the changes on the system execute a systemctl daemon-reload after you created your systemd file.
sudo systemctl start firedancer
Observe it booting and watch for any errors that may appear.
# when you run it as systemd service
journalctl -fu firedancer
If you do not run in systemd you need to restart Frankendancer and watch your stdout.
As a default, Frankendancer will also launch a Web interface on its Localhost Port 80. You can use this to monitor the boot process of your Frankendancer.
As it is bound to Localhost, to watch it you need to either change the gui_listen_address parameter in your configuration file, or start a ssh Tunnel to tunnel the remote Port 80 to your Localhost. You can do this with the following command:
ssh -L 8080:127.0.0.1:80 solana@<YOUR-VALIDATORS-IP>
Next replace <YOUR-VALIDATORS-IP> with the actual IP of your Validator. This will allow you to see the Frankendancer Web interface, by visiting the Website *http://localhost:8080/* with your Web browser.
Now you must wait until your Machine has caught up.
The easiest way to check this is by executing:
/home/solana/firedancer/build/native/gcc/bin/solana catchup /home/solana/keys/identity-keypair.json --our-localhost <RPCPORT>
If you use another Number than the default 8899 you must specify the <RPC-PORT>
After a While, this will eventually return you:
<YOUR-IDENTITY-PUBKEY> has caught up
You are now ready to switch from Agave/Jito to your Frankendancer!
At this stage we will exchange the Identity Keypair on your voting Agave/Jito Validator for a newly created one, this is to stop it from voting.
We don’t need to restart the Agave/Jito Validator to exchange the Key Pair, this can be done while the process is running. For Frankendancer, this functionality is not implemented yet.
After this is done, we can replace the newly created Key Pair on the Frankendancer config File with the actual Identity Key Pair and restart it.
First you need to create a new Key Pair to use it as your new Identity Keypair. Once created, store it next to your other Key Pairs.
solana-keygen new --no-bip39-passphrase -o /home/solana/keys/junk-identity.json
# will return
# Wrote new keypair to /home/solana/keys/junk-identity.json
We skip the passphrase, as this Wallet will always stay empty and is replaceable at any time.
At this point we have:
Machine A, that is active Voting
&
Machine B, that is not voting, but is caught up with the Chain.
In the next step we need to stop Machine A from voting and begin voting with Machine B
To begin this process and to start the Frankendancer process with your actual Keys we first need to change the Config File on Machine B.
Simply change the identity_path Line and save the file.
NB: do not restart the Frankendancer yet.
[consensus]
identity_path = "/home/solana/keys/staked-identity-keypair.json"
vote_account_path = "/home/solana/keys/vote-keypair.json"
authorized_voter_paths = [
"/home/solana/keys/staked-identity-keypair.json",
]
To instigate the Switchover we need to change the active Identity Key Pair on Machine A, this will make your Validator delinquent.
Ensure that you are able to execute the following commands right afterwards on Machine B.
Switch Identity Key Pair on Machine A to make it delinquent:
agave-validator set-identity /home/solana/keys/junk-identity.json
Instantly afterwards, execute on Machine B:
sudo systemctl restart firedancer
As you have already changed the Key Pair Path in the previous step, Frankendancer will restart with your actual Key Pairs.
Please note, immediately after the set-identity command and before you do the systemctl restart, you could also copy the tower file from Machine A to Machine B. This will assure that Frankendancer knows when your Agave/Jito Validator voted for the last time. However, If you follow the steps as described, copying the tower file should not be needed, as Frankendancer takes a couple of Minutes before it starts to vote, so we can omit this step.
And that is it, you have successfully transitioned to Frankendancer!
If you need any support, or have any questions please reach out to us at info@stakingfacilities.com we will be happy to help.