The relayer is designed to connect to exactly one Validator. We recommend installing it on the same machine as the Validator to ensure they share the same IP.
Before installation, make sure the following tools are installed on your machine:
- Rust
- Git
- Solana CLI (or another way to create a keypair)
Next, please install some Dependencies
sudo apt-get install \
build-essential \
pkg-config \
libudev-dev llvm libclang-dev \
libssl-dev \
protobuf-compiler -yCreate a folder to store your Keys
sudo mkdir -p /etc/relayer/keysCreate a Solana Keypair - this will be used to verify against our Server The Keypair does NOT have to be verified by Jito
solana-keygen new --no-bip39-passphrase --outfile relayer-keypair.jsonMove the keypair to the keys folder
sudo mv relayer-keypair.json /etc/relayer/keys/Now, create a pem key - Solana is using this for verification
sudo openssl genrsa --out /etc/relayer/keys/private.pemsudo openssl rsa --in /etc/relayer/keys/private.pem --pubout --out /etc/relayer/keys/public.pemFor the next step, you have to contact us and send us the following information:
- Public key you just created (run
solana address -k /etc/relayer/keys/relayer-keypair.jsonif you forgot) - Public key of your Validator Identity
After that, we'll send you the following information you need in the next steps:
- Proxy Server Address
- Signing String
In the meantime, you can finish the rest of the installation Clone the repository
git clone https://github.com/Infinitare/os-relayer.gitNavigate into the cloned repository and build the application
cd os-relayer && cargo build --releaseCopy the application
sudo cp target/release/os-relayer /etc/relayer/Move the service file to the systemd folder
sudo cp os-relayer.service /etc/systemd/system/Edit the service file using
sudo nano /etc/systemd/system/os-relayer.serviceHere you have to change the following lines:
- JITO_BLOCKENGINE - fill in the closes Jito Block Engine URL you can find here
- PROXY - you'll get this from us
- SIGNING_STRING - you'll get this from us
opt. changes you may need:
- WEBSOCKET_SERER - if you don't use the default ip / port at your Validator
- RPC_SERVER - if you don't use the default ip / port at your Validator
Save the file (ctrl + s) and exit (ctrl + x). Reload the systemd daemon to apply the changes
sudo systemctl daemon-reloadNow, you can start the Service
sudo systemctl start os-relayer.serviceYou can check if you see any errors using
sudo journalctl -u os-relayer.service -fIf everything works, you can enable the Service to start on boot
sudo systemctl enable os-relayer.serviceAnd make sure you have whitelisted the following Ports in your Firewall
sudo ufw allow 11228
sudo ufw allow 11229If you're running the Relayer on a different Server, you also need to allow the following Ports
sudo ufw allow 11225
sudo ufw allow 11226Lastly, you have to add the following lines to your Startup Script
--block-engine-url "http://127.0.0.1:11225/" \
--relayer-url http://127.0.0.1:11226/ \
You can either restart your Validator or run the following command to apply the changes
agave-validator --ledger /mnt/ledger/ set-block-engine-config --block-engine-url "http://127.0.0.1:11225"
agave-validator --ledger /mnt/ledger/ set-relayer-config --relayer-url http://127.0.0.1:11226To see if everything is working fine, you can check if the Relayer received subscriptions from the Validator
sudo journalctl -u os-relayer.service -n 100000 | grep "Received"If you see any messages and the Blockengine is connected. To check if the Relayer is connected, you can check your Validator Ports using
solana gossipIf you see, that your Validator is using the Ports 11222 and 11228 - everything is working fine. Keep in mind, that it can take a few minutes until it shows in the gossip, so be patient.
That's it, you should now have a running Relayer!
If you want to use the Relayer with SWQOS, please add the same overrides flag you're using for the Validator to the Relayer Service file like this.
/etc/relayer/os-relayer \
--keypair-path=/etc/relayer/keys/relayer-keypair.json \
--signing-key-pem-path=/etc/relayer/keys/private.pem \
--verifying-key-pem-path=/etc/relayer/keys/public.pem \
--staked-nodes-overrides=/etc/swqos/overrides.ymlAfter, point the SWQOS of the RPC Node you want to connect to the Port of the Relayer (11228) and you're set.