Create a read-only node
Tutorial*
*below are additional steps not covered in tutorial
Open a Terminal application
1. Install rust, cargo, rustfmt etc
Install rustc, cargo and rustfmt.
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup component add rustfmt Make sure you are using the latest stable rust version by running:
rustup updateAlso install git, libssl-dev, pkg-config, zlib1g-dev, protobuf etc.
sudo apt-get update
sudo apt-get install -y git libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make libprotobuf-dev protobuf-compiler2. Install Tachyon v2.0 and Solana tools
Clone the Tachyon repository:
git clone https://github.com/x1-labs/tachyon.gitBuild Tachyon and the solana tools:
cd tachyon
cargo build --releaseUpdate your PATH environment variable:
export PATH=$PATH:$(pwd)/target/release
echo "export PATH=$PATH:$(pwd)/target/release" >> ~/.bashrcVerify the installation:
solana --version
tachyon-validator --versionIf you see the versions listed below, the installation was successful:
solana-cli 2.0.21 (src:00000000; feat:607245837, client:Tachyon)
tachyon-validator 2.0.21 (src:00000000; feat:2908148756, client:Tachyon)3. System Tuning (Linux)
Your system will need to be tuned in order to run properly. Your validator may not start without the settings below.
Optimize sysctl knobs
sudo bash -c "cat >/etc/sysctl.d/21-tachyon-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"sudo sysctl -p /etc/sysctl.d/21-tachyon-validator.confIncrease systemd and session file limits
Add
LimitNOFILE=1000000to the [Service] section of your systemd service file, if you use one, otherwise add
DefaultLimitNOFILE=1000000to the [Manager] section of /etc/systemd/system.conf, using
nano /etc/systemd/system.confExecute configuration
sudo systemctl daemon-reloadsudo bash -c "cat >/etc/security/limits.d/90-tachyon-nofiles.conf <<EOF
# Increase process file descriptor count limit
* - nofile 1000000
EOF"Close all open sessions (log out then, in again)
4. Set to X1 Testnet network
solana config set -u https://rpc.testnet.x1.xyzTo verify set network, use:
solana config get5. Create keypairs
Using command solana-keygen to generate a new wallet. It will generate a 12-word seed (aka. mnemonic, or recovery) phrase. Save it safe.
solana-keygen new --no-passphrase -o ~/.config/solana/id.json
solana-keygen new --no-passphrase -o ~/.config/solana/identity.json
solana-keygen new --no-passphrase -o ~/.config/solana/vote.json
solana-keygen new --no-passphrase -o ~/.config/solana/stake.json
To switch between keypairs:
solana config set -k id.json6. Fund wallet
Check balance:
solana balance7. Create a validator startup script & start node
In your ubuntu home directory (e.g. /home/ubuntu/), create a folder called bin. Inside that folder create a file called validator.sh and make it executable:
mkdir -p $HOME/bin
touch $HOME/bin/validator.shNext, open the validator.sh file for editing:
nano $HOME/bin/validator.shCopy and paste the following contents into validator.sh then save the file:
#!/bin/bash
export RUST_LOG=solana_metrics=warn,info
exec tachyon-validator \
--identity $HOME/.config/solana/identity.json \
--vote-account $HOME/.config/solana/vote.json \
--entrypoint entrypoint0.mainnet.x1.xyz:8001 \
--entrypoint entrypoint1.mainnet.x1.xyz:8001 \
--entrypoint entrypoint2.mainnet.x1.xyz:8001 \
--entrypoint entrypoint3.mainnet.x1.xyz:8001 \
--entrypoint entrypoint4.mainnet.x1.xyz:8001 \
--known-validator 7ufaUVtQKzGu5tpFtii9Cg8kR4jcpjQSXwsF3oVPSMZA \
--known-validator 5Rzytnub9yGTFHqSmauFLsAbdXFbehMwPBLiuEgKajUN \
--known-validator 4V2QkkWce8bwTzvvwPiNRNQ4W433ZsGQi9aWU12Q8uBF \
--known-validator CkMwg4TM6jaSC5rJALQjvLc51XFY5pJ1H9f1Tmu5Qdxs \
--known-validator 7J5wJaH55ZYjCCmCMt7Gb3QL6FGFmjz5U8b6NcbzfoTy \
--only-known-rpc \
--log $HOME/validator.log \
--ledger $HOME/ledger \
--rpc-port 8899 \
--full-rpc-api \
--dynamic-port-range 8000-8020 \
--wal-recovery-mode skip_any_corrupted_record \
--limit-ledger-size 50000000 \
--enable-rpc-transaction-history \
--enable-extended-tx-metadata-storage \
--rpc-pubsub-enable-block-subscription \
--full-snapshot-interval-slots 5000 \
--maximum-incremental-snapshots-to-retain 10 \
--maximum-full-snapshots-to-retain 50Make validator startup script executable:
chmod +x $HOME/bin/validator.shMake sure you're in the home directory:
cd $HOMEStart validator with nohup:
nohup $HOME/bin/validator.sh &Check validator logs to see if it's running:
tail -f $HOME/validator.logCheck catch up status:
solana catchup --our-localhostUse monitor command to check validator operations:
tachyon-validator --ledger ./ledger monitorSee all nodes connected to network, whether they are staked or not. Your identity.json should show up there.
solana gossipCheck validator process:
ps aux | grep validator Kill validator process:
tachyon-validator exit -fLast updated

