3. Syncing DB
Validator Nodes
This document introduces another centralized fast state syncing method using rclone. Please use it with caution. This guide is mainly used for a newly started node to catch up with the blockchain faster. Otherwise, the blockchain syncing may take weeks from genesis block.
Rclone db snapshot is sync'ed with blockchain frequently. However, there maybe a potential race condition when the rclone may fail due to our nodes were updating the db files at the same time. In this case, just re-run the rclone command to re-sync again.
1. Installing Rclone
For installing Rclone, please follow the instructions at https://rclone.org.
on a Linux system, you may run the following command.
Make sure your rclone version is above v1.53.2 . you can check version by rclone version
2. Configuring Rclone
To check the location of the rclone.conf
file run:
The rclone.conf
file is usually located at ~/.config/rclone/rclone.conf
.
Now run the following command to create the rclone.conf
file.
3. Running Rclone
Below is the command to sync shard 0:
If you encounter the following error:
Add the option --config=/path/to/your/rclone.conf
to the command line.
After the sync, you may use du -h posichain_db_*
command to check the size of the downloaded snapshots.
-P
will display a download progress & ETA.
Non-Validating/Explorer Nodes
To sync your node in archival mode, run the following command. Depending on the size, the syncing of the blockchain will take quite some time.
Last updated