3

I'm trying to setup a RPC Testnet node but unfortunately this node is slowly lagging behind syncing. I've tried latest recommendations after Aug 2022 Testnet restart but problem still persists.

Find below setup config and hardware specs. Please let me know if any other info would be valuable in this case. I appreciate your help.

Solana Setup Config

Solana version: v1.11.5

solana-validator \
--ledger "/var/solana/data/ledger" \
--identity "/var/solana/data/config/validator-keypair.json" \
--known-validator eoKpUABi59aT4rR9HGS3LcMecfut9x7zJyodWWP43YQ \
--known-validator 4ZtE2XX6oQThPpdjwKXVMphTTZctbWwYxmcCV6xR11RT \
--known-validator 8SRKNfvMerfA1BdU79CAwU4wNfjnDvFrBo3o5f5TS4uv \
--known-validator 9v7E6oEm1V86hjTubtBon7cRYPvQriWZKHZEX6j92Po4 \
--known-validator 3viEMMqkPRBiAKXB3Y7yH5GbzqtRn3NmnLPi8JsZmLQw \
--known-validator 3iPu9xQ3mCFmqME9ZajuZbFHjwagAxhgfTxnc4pWbEBC \
--entrypoint 5.9.35.85:8001 \
--entrypoint entrypoint.testnet.solana.com:8001 \
--entrypoint entrypoint2.testnet.solana.com:8001 \
--entrypoint entrypoint3.testnet.solana.com:8001 \
--expected-bank-hash 4NstanApNPjCAd2HwBhHokqCQbJfCAYgp92VvJibSM5M \
--expected-genesis-hash 4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY \
--no-voting \
--snapshot-interval-slots 500 \
--maximum-local-snapshot-age 500 \
--rpc-bind-address 0.0.0.0 \
--rpc-port 8799 \
--gossip-port "8801" \
--dynamic-port-range "8000-8020" \
--no-port-check \
--full-rpc-api \
--wal-recovery-mode skip_any_corrupted_record \
--enable-rpc-transaction-history \
--enable-cpi-and-log-storage \
--init-complete-file "/var/solana/data/init-completed" \
--snapshot-compression "none" \
--require-tower \
--no-wait-for-vote-to-start-leader \
--no-poh-speed-test \
--limit-ledger-size \
--accounts "/var/solana/accounts" \
--maximum-incremental-snapshots-to-retain 2 \
--no-os-network-limits-test \
--expected-shred-version 24371 \
--log 

VM Hardware Specs

CPU:Intel(R) Xeon(R) Platinum 8151 CPU @ 3.40GHz
Memory: 350GB
Disk: 1.7Tb

Solana Catchup log

$ solana catchup --our-localhost 8799 /var/solana/data/config/validator-keypair.json -u testnet
167909 slot(s) behind (us:146908628 them:147076537), our node is falling behind at -3.6 slots/second (AVG: -2.6 slots/second (falling))

2 Answers 2

7

My answer to your question is going to start out more general and then get into specifics. Let's start with what catchup is conceptually.

When a Solana validator node joins any of the clusters and does not have any ledger information (recent blocks in the chain), then it must download a snapshot from another source. Once the node downloads that snapshot, the snapshot has to be unpacked, processed and then new shreds (pieces of blocks) need to be downloaded from the network until your validator is caught up to the tip of the chain. So the process is:

  1. Download snapshot
  2. Unpack snapshot
  3. Process snapshot
  4. Download shreds until you are caught up

Since the cluster is always producing more blocks every second, your validator must be able to go through all of these steps fast enough so that it can get to the tip of the network. If the network is producing blocks faster than you can download and process them, then your node will fall behind and cannot participate in the network. There is some discussion of catch up here: https://www.solana-validator-guidebook.com/FAQ/frequently-asked-questions#what-does-catching-up-to-the-cluster-mean

Here are some common reasons why your node might be falling behind when trying to catch up:

1. You might not be comparing your node to the correct cluster

It can be easy on the Solana command line to accidentally be running a testnet node, but then comparing your node to another cluster when you do the catchup command. To make sure you are on the correct, network you can add a flag or change your config. There are 3 shortcut flags to use: mainnet-beta => -um, testnet => -ut and devnet => -ud. Assuming you are trying to catchup to the testnet cluster, you can do the following command:

solana -ut catchup

(This doesn't seem to be the case for your config but wanted to mention it here).

2. Your snapshot download is too slow

In the logs for the validator, you can see the snapshot download speeds. If it takes a while to download your snapshot, then the starting point for your validator to catch up may be so far behind the rest of the network that it does not have any hope of downloading and processing shreds fast enough. Usually, you'll want to be within 2000 slots of the network when your validator begins to catchup (better processors and network speeds may be able to overcome being behind by more slots).

To fix this issue, you can try deleting the contents of your ledger directory and then downloading a new snapshot from other validators by changing the --known-validator flag. You can also specify a minimum download speed by using the --minimal-snapshot-download-speed flag. You can find info about these flags by doing solana-validator --help. Lastly, there is a 3rd party tool, not built by Solana Labs, that can download snapshots for you. More info about what it does is here: https://github.com/c29r3/solana-snapshot-finder

3. Your hardware cannot process the shreds fast enough

If you think the processor may not be able to process the blocks fast enough to catch up, try using the top command to watch processor performance during catch up and see if it's an issue.

Some configuration parameters may adversely affect the hardware while it's trying to catchup.

In the example above using --log without a specified file may slow the processor down. Try naming a location for the log file.

Also, --snapshot-compression "none" can slow the system down because the cost of compressing the snapshot is actually not as bad as all of the IOPS that is required to write all of the uncompressed snapshot data to disk.

You will have to experiment with these parameters to see what is the best for your system. You may also have to upgrade your hardware if configuration changes are not helping.

If you think the hardware itself might be the issue, make sure you meet these specs when upgrading: https://docs.solana.com/running-validator/validator-reqs

4. Your network speed is too slow

If your validator manages to get a very recent snapshot, it may not be able to download shreds fast enough from the rest of the network. Just like the hardware issue above, make sure you are aware of the networking requirements here: https://docs.solana.com/running-validator/validator-reqs.

5. Virtualized Servers Can Be Tough To Configure

Another common cause of failing to catchup is that people try to run the Solana validator on virtualized hardware. Although using cloud infrastructure is not impossible (many nodes in the top 100 stake weighted validators run on cloud infrastructure), it can be costly to get a VM fast enough and with good enough network speeds to keep up with the cluster. Issues with VMs are mentioned here: https://docs.solana.com/running-validator/validator-reqs#virtual-machines-on-cloud-platforms. As an alternative, you could try the Solana Foundation Server Program: https://solana.org/server-program

I hope some of those suggestions help!

0

solana discord has no right to speak. No one has ever met this problem. The hardware network configuration meets the official requirements. The catup is slower than the main network and will never join the main network

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.