Open your favorite Terminal application
Install the Solana release v1.18.23 on your machine by running:
xxxxxxxxxxsh -c "$(curl -sSfL https://release.solana.com/v1.18.23/install)"
The following output indicates a successful update:
xxxxxxxxxxdownloading v1.18.23 installerConfiguration: /home/solana/.config/solana/install/config.ymlActive 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.bz2Update successful
Depending on your system, the end of the installer messaging may prompt you to
xxxxxxxxxxPlease 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):
xxxxxxxxxxexport 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:
xxxxxxxxxxsolana --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
xxxxxxxxxxsudo bash -c "cat >/etc/sysctl.d/21-solana-validator.conf <<EOF# Increase UDP buffer sizesnet.core.rmem_default = 134217728net.core.rmem_max = 134217728net.core.wmem_default = 134217728net.core.wmem_max = 134217728# Increase memory mapped files limitvm.max_map_count = 1000000# Increase number of allowed open file descriptorsfs.nr_open = 1000000EOF"
xxxxxxxxxxsudo sysctl -p /etc/sysctl.d/21-solana-validator.conf
Increase systemd and session file limits
Add
xxxxxxxxxxLimitNOFILE=1000000
to the [Service] section of your systemd service file, if you use one, otherwise add
xxxxxxxxxxDefaultLimitNOFILE=1000000
to the [Manager] section of /etc/systemd/system.conf.
xxxxxxxxxxsudo systemctl daemon-reload
xxxxxxxxxxsudo bash -c "cat >/etc/security/limits.d/90-solana-nofiles.conf <<EOF# Increase process file descriptor count limit* - nofile 1000000EOF"
Close all open sessions (log out then, in again) ###
xxxxxxxxxxcurl https://sh.rustup.rs -sSf | shsource $HOME/.cargo/envrustup component add rustfmtWhen building the master branch, please make sure you are using the latest stable rust version by running:
xxxxxxxxxxrustup updateOn Linux systems you may need to install libssl-dev, pkg-config, zlib1g-dev, protobuf etc.
On Ubuntu:
xxxxxxxxxxsudo apt-get updatesudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make libprotobuf-dev protobuf-compilerxxxxxxxxxxgit clone https://github.com/jacklevin74/xolana.gitcd xolanagit checkout xolanaxxxxxxxxxxcargo build --releaseCheck version
xxxxxxxxxx./target/release/solana-validator -V
It should be shown like this:
xxxxxxxxxxsolana-cli 1.18.23 (src:aeb3a2e1; feat:4215500110, client:SolanaLabs)
xxxxxxxxxxsolana config set -u http://xolana.xen.network:8899
Create a new wallet
xxxxxxxxxxsolana-keygen new --no-passphrase
Create identity.json
xxxxxxxxxxsolana-keygen new --no-passphrase -o identity.json
Create vote.json
xxxxxxxxxxsolana-keygen new --no-passphrase -o vote.json
Create withdrawer.json
xxxxxxxxxxsolana-keygen new --no-passphrase -o withdrawer.json
Create stake.json
xxxxxxxxxxsolana-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:
xxxxxxxxxxnohup 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:
xxxxxxxxxxnohup ./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
xxxxxxxxxxtail -f nohup.out
Check catch up status
xxxxxxxxxxsolana catchup --our-localhost
Should be shown info like this:
xxxxxxxxxx<IDENTITY_PUBKEY> has caught up (us: 74487 them: 74488)
Check validator status
xxxxxxxxxxsolana gossip
and
xxxxxxxxxxsolana validators
Check ledger status
xxxxxxxxxx./target/release/solana-validator --ledger ./ledger monitor
xxxxxxxxxxsolana transfer <IDENTITY_PUBKEY> 1 --allow-unfunded-recipient
xxxxxxxxxxsolana create-stake-account stake.json 1
xxxxxxxxxxsolana create-vote-account vote.json identity.json <WITHDRAWER_PUBKEY> --commission 10
Transfer some SOL (eg. 1) to public address of stake.
xxxxxxxxxxsolana transfer <STAKE_PUBKEY> 1
Do delegate stake operation.
xxxxxxxxxxsolana delegate-stake stake.json vote.json
Do stake operation.
xxxxxxxxxxsolana stake-account stake.json
Normal logs
xxxxxxxxxxtail -f nohup.out
Check leader schedule
xxxxxxxxxxsolana leader-schedule | grep <IDENTITY_PUBKEY>
or
xxxxxxxxxxtail -f nohup.out | grep -i "My next leader slot"
Check validator status
xxxxxxxxxxsolana gossip
and
xxxxxxxxxxsolana validators
Check block production
xxxxxxxxxxsolana block-production
Check epoch information
xxxxxxxxxxsolana epoch-info
Validator exits safely
xxxxxxxxxxsolana-validator exit
Check validator process again, make sure it exits properly
xxxxxxxxxxps aux | grep solana-validator