For this example /opt/jito
directory will be used as base directory. If you want you can use another base directory.
jito-validator source will be in /opt/jito/jito-solana
jito-validator releases will be in /opt/jito/releases
Use /opt/jito/releases/active_release/bin/solana-validator
in your solana.service file
Check that jito-solana repository contains solana version you want to install. For this go to https://github.com/jito-foundation/jito-solana and check the tag as showed on the picture:
Actually you can do this from terminal with git tag -l '*-jito'
before checkout
step (see bellow).
- Try
cargo -V
. If you will seeCommand 'cargo' not found...
(or similar) then installcargo
(this's Rust package manager):curl https://sh.rustup.rs -sSf | sh
. NB. Do not forget to update your$PATH
. Run the command from last line of previous output (usuallysource "$HOME/.cargo/env"
) - Install build-essential package and Solana dependencies:
sudo apt update && sudo apt install -y build-essential libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make libprotobuf-dev protobuf-compiler
- Try
git -v
. If you will seeCommand 'git' not found...
(or similar) then install git:sudo apt install -y git
- Make base directory:
mkdir /opt/jito
(if you don't have folder/opt
(this's very strange) then use-p
arg in this command for creating/opt
too (or make folders separately)) - Change current directory to base:
cd /opt/jito
- Clone jito-validator source from github:
git clone https://github.com/jito-foundation/jito-solana.git
- Change current directory to jito-solana:
cd jito-solana
Continue with All times section bellow.
- Change current directory to jito-solana:
cd /opt/jito/jito-solana
- Fetch last history from github:
git fetch
Continue with All times section bellow.
- Save target version for convenience (change
1.10.10
to yours):export JV=v1.10.10-jito
- Checkout source:
git checkout $JV
- Update submodules:
git submodule update --init --recursive
- Build jito-validator from sources:
CARGO_BUILD_JOBS=8 scripts/cargo-install-all.sh --validator-only /opt/jito/releases/$JV
(there is a limit of 8 threads for compilation here, you can use this amount or another or don't use at all any limitation (removeCARGO_BUILD_JOBS=8
for this, compilation will get 100% CPU). - Link active_release to this release:
ln -sfn $JV /opt/jito/releases/active_release