I set up an RPC node following the suggestions on the official docs, the launch script looks like this.
#!/bin/bash
export RUST_BACKTRACE=1
export RUST_LOG=solana=info
exec solana-validator \
--identity /home/solana/.config/solana/id.json \
--entrypoint entrypoint.mainnet-beta.solana.com:8001 \
--entrypoint entrypoint2.mainnet-beta.solana.com:8001 \
--entrypoint entrypoint3.mainnet-beta.solana.com:8001 \
--entrypoint entrypoint4.mainnet-beta.solana.com:8001 \
--entrypoint entrypoint5.mainnet-beta.solana.com:8001 \
--known-validator 5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on \
--known-validator dDzy5SR3AXdYWVqbDEkVFdvSPCtS9ihF5kJkHCtXoFs \
--known-validator eoKpUABi59aT4rR9HGS3LcMecfut9x7zJyodWWP43YQ \
--known-validator 7XSY3MrYnK8vq693Rju17bbPkCN3Z7KvvfvJx4kdrsSY \
--known-validator Ft5fbkqNa76vnsjYNwjDZUXoTWpP7VYm3mtsaQckQADN \
--known-validator 9QxCLckBiJc783jnMvXZubK4wH86Eqqvashtrwvcsgkv \
--rpc-port 8899 \
--dynamic-port-range 8802-8816 \
--no-port-check \
--gossip-port 8001 \
--no-os-network-limits-test \
--no-untrusted-rpc \
--no-voting \
--private-rpc \
--rpc-bind-address 0.0.0.0 \
--enable-cpi-and-log-storage \
--enable-rpc-transaction-history \
--enable-rpc-bigtable-ledger-storage \
--no-duplicate-instance-check \
--wal-recovery-mode skip_any_corrupted_record \
--log /home/solana/.logs/rpc-node \
--accounts /var/solana/accounts \
--ledger /var/solana/data/ledger \
--limit-ledger-size 100_000_000 \
--rpc-send-default-max-retries 30 \
--rpc-send-service-max-retries 30 \
--rpc-send-retry-ms 2000 \
--full-rpc-api
I noticed after I perform a restart the process spends a lot of time (several minutes) stuck on this message
[2024-10-21T15:36:14.912202575Z INFO solana_validator::bootstrap] Searching for an RPC service with shred version 50093 (Retrying: Wait for known rpc peers)...
[2024-10-21T15:36:14.912418814Z INFO solana_validator::bootstrap] Total 0 RPC nodes found. 0 known, 0 blacklisted
In some cases, I even get this error
[2024-10-21T15:38:26.313727162Z ERROR solana_validator::bootstrap] Failed to get RPC nodes: Unable to find any RPC peers. Consider checking system clock, removing
--no-port-check
, or adjusting--known-validator ...
arguments as applicable
Googling around, it seems this can be improved by changing the list of known-validator
s, however I am using those suggested in the official docs so I would assume they're some of the best. Also, I tried changing for some others but the result is unchanged, the node still spends a lot of time waiting to find a suitable RPC node. Does this have anything to do with my configuration? I might be wrong, but I assume the time spent searching for nodes is time my own node is not actually receiving time, so the data will be delayed. Because I am going to use this node to receive real time block data, that would be a problem.