Open your favorite Terminal application
Install the Solana release v1.18.23 on your machine by running:
xxxxxxxxxx
sh -c "$(curl -sSfL https://release.solana.com/v1.18.23/install)"
The following output indicates a successful update:
xxxxxxxxxx
downloading v1.18.23 installer
Configuration: /home/solana/.config/solana/install/config.yml
Active release directory: /home/solana/.local/share/solana/install/active_release
* Release version: v1.18.23
* Release URL: https://github.com/solana-labs/solana/releases/download/v1.18.23/solana-release-x86_64-unknown-linux-gnu.tar.bz2
Update successful
Depending on your system, the end of the installer messaging may prompt you to
xxxxxxxxxx
Please update your PATH environment variable to include the solana programs:
If you get the above message, copy and paste the recommended command below it to update PATH
You can do this by adding the following line to your $HOME/.profile or /etc/profile (for a system-wide installation):
xxxxxxxxxx
export PATH="/home/ubuntu/.local/share/solana/install/active_release/bin:$PATH"
Note: Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile
.
Confirm you have the desired version of solana
installed by running:
xxxxxxxxxx
solana --version
After a successful install, solana-install update
may be used to easily update the Solana software to a newer version at any time.
Your system will need to be tuned in order to run properly. Your validator may not start without the settings below.
Optimize sysctl knobs
xsudo bash -c "cat >/etc/sysctl.d/21-solana-validator.conf <<EOF
# Increase UDP buffer sizes
net.core.rmem_default = 134217728
net.core.rmem_max = 134217728
net.core.wmem_default = 134217728
net.core.wmem_max = 134217728
# Increase memory mapped files limit
vm.max_map_count = 1000000
# Increase number of allowed open file descriptors
fs.nr_open = 1000000
EOF"
xxxxxxxxxx
sudo sysctl -p /etc/sysctl.d/21-solana-validator.conf
Increase systemd and session file limits
Add
xxxxxxxxxx
LimitNOFILE=1000000
to the [Service] section of your systemd service file, if you use one, otherwise add
xxxxxxxxxx
DefaultLimitNOFILE=1000000
to the [Manager] section of /etc/systemd/system.conf.
xxxxxxxxxx
sudo systemctl daemon-reload
xxxxxxxxxx
sudo bash -c "cat >/etc/security/limits.d/90-solana-nofiles.conf <<EOF
# Increase process file descriptor count limit
* - nofile 1000000
EOF"
Close all open sessions (log out then, in again) ###
xxxxxxxxxx
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup component add rustfmt
When building the master branch, please make sure you are using the latest stable rust version by running:
xxxxxxxxxx
rustup update
On Linux systems you may need to install libssl-dev, pkg-config, zlib1g-dev, protobuf etc.
On Ubuntu:
xxxxxxxxxx
sudo apt-get update
sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make libprotobuf-dev protobuf-compiler
xxxxxxxxxx
git clone https://github.com/jacklevin74/xolana.git
cd xolana
git checkout xolana
xxxxxxxxxx
cargo build --release
Check version
xxxxxxxxxx
./target/release/solana-validator -V
It should be shown like this:
xxxxxxxxxx
solana-cli 1.18.23 (src:aeb3a2e1; feat:4215500110, client:SolanaLabs)
xxxxxxxxxx
solana config set -u http://xolana.xen.network:8899
Create a new wallet
xxxxxxxxxx
solana-keygen new --no-passphrase
Create identity.json
xxxxxxxxxx
solana-keygen new --no-passphrase -o identity.json
Create vote.json
xxxxxxxxxx
solana-keygen new --no-passphrase -o vote.json
Create withdrawer.json
xxxxxxxxxx
solana-keygen new --no-passphrase -o withdrawer.json
Create stake.json
xsolana-keygen new --no-passphrase -o stake.json
Please go to https://xolana.xen.network/web_faucet, and request xolana faucet (airdrop testing SOL).
If running solana-validator from installed solana cli directly:
xxxxxxxxxx
nohup solana-validator --identity identity.json --limit-ledger-size 50000000 --rpc-port 8899 --entrypoint xolana.xen.network:8001 --full-rpc-api --log - --vote-account vote.json --max-genesis-archive-unpacked-size 1073741824 --no-incremental-snapshots --require-tower --enable-rpc-transaction-history --enable-extended-tx-metadata-storage --skip-startup-ledger-verification --rpc-pubsub-enable-block-subscription &
If running solana-validator from the bianry built through xolana source code:
xxxxxxxxxx
nohup ./target/release/solana-validator --identity identity.json --limit-ledger-size 50000000 --rpc-port 8899 --entrypoint xolana.xen.network:8001 --full-rpc-api --log - --vote-account vote.json --max-genesis-archive-unpacked-size 1073741824 --no-incremental-snapshots --require-tower --enable-rpc-transaction-history --enable-extended-tx-metadata-storage --skip-startup-ledger-verification --rpc-pubsub-enable-block-subscription &
Check normal logs
xxxxxxxxxx
tail -f nohup.out
Check catch up status
xxxxxxxxxx
solana catchup --our-localhost
Should be shown info like this:
xxxxxxxxxx
<IDENTITY_PUBKEY> has caught up (us: 74487 them: 74488)
Check validator status
xxxxxxxxxx
solana gossip
and
xxxxxxxxxx
solana validators
Check ledger status
xxxxxxxxxx
./target/release/solana-validator --ledger ./ledger monitor
xxxxxxxxxx
solana transfer <IDENTITY_PUBKEY> 1 --allow-unfunded-recipient
xxxxxxxxxx
solana create-stake-account stake.json 1
xxxxxxxxxx
solana create-vote-account vote.json identity.json <WITHDRAWER_PUBKEY> --commission 10
Transfer some SOL (eg. 1) to public address of stake.
xxxxxxxxxx
solana transfer <STAKE_PUBKEY> 1
Do delegate stake operation.
xxxxxxxxxx
solana delegate-stake stake.json vote.json
Do stake operation.
xxxxxxxxxx
solana stake-account stake.json
Normal logs
xxxxxxxxxx
tail -f nohup.out
Check leader schedule
xxxxxxxxxx
solana leader-schedule | grep <IDENTITY_PUBKEY>
or
xxxxxxxxxx
tail -f nohup.out | grep -i "My next leader slot"
Check validator status
xxxxxxxxxx
solana gossip
and
xxxxxxxxxx
solana validators
Check block production
xxxxxxxxxx
solana block-production
Check epoch information
xxxxxxxxxx
solana epoch-info
Check validator process
xxxxxxxxxx
ps aux | grep solana-validator
Kill validator process
xxxxxxxxxx
pkill -f solana-validator
Check validator process again, make sure it has been killed properly
ps aux | grep solana-validator