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:
- Download snapshot
- Unpack snapshot
- Process snapshot
- 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!