Applying a Snapshot to the Crossfi Node
Using a snapshot can significantly speed up the synchronization of your node by downloading a chunk of the blockchain directly. Here is how to apply a snapshot to your Crossfi node:
Stop the Crossfi Node Service
First, ensure that the Crossfi node is not running.
Backup the Current Validator State
Back up your current
priv_validator_state.json
to prevent any loss of data.Remove Old Data
Clear out the existing data directory.
Set the Snapshot Name
Define the name of the snapshot file you're going to use.
Download and Extract the Snapshot
Fetch the snapshot using
curl
and extract it directly into the.mineplex-chain
directory.Restore the Validator State
Once extraction is complete, restore the
priv_validator_state.json
from the backup.Restart the Crossfi Node Service
After the snapshot is applied and the validator state is restored, restart the node.
Monitor the Logs
Finally, check the logs to ensure that the node is running correctly.
Make sure to replace 20240305
with the date of the snapshot you wish to use if you're using a different one.
Manual Backup and Restoration with Crossfi Toolkit
The screenshot displays a webpage with the URL http://crossfi-toolkit.coinsspor.com/
. It is an index of a directory showing three files: addrbook.json
, crossfi-snapshot-20240305.tar.lz4
, and genesis.json
, along with their last modified dates and file sizes.]
Files Available
addrbook.json
: This file contains a list of peers that your node can connect to for syncing with the network.genesis.json
: The genesis file is used when initializing your blockchain and contains all the initial configurations.crossfi-snapshot-20240305.tar.lz4
: A compressed snapshot of the blockchain up to the specified date which can be used to quickly sync your node with the network.
Using the Toolkit
Downloading Files Manually
To download a file manually, click on the file name in the index.
For example, to download the
genesis.json
, you would click on the corresponding link in the index.
Applying a Snapshot
To apply a snapshot from the toolkit, you would:
Stop your node's service:
Back up the current state of your validator to avoid losing any important data:
Remove the old blockchain data to prepare for the snapshot:
Navigate to the toolkit index in your web browser and download the latest snapshot file by clicking on it.
Decompress the snapshot file and apply it to your node:
Restore your validator state from the backup:
Restart your node's service:
Monitor your node's logs to ensure it starts syncing:
Note: Applying a snapshot will overwrite the current blockchain data. Ensure you have backups and that you're applying a trusted snapshot. This process can be risky if not done correctly, as it can lead to a loss of data or state corruption.
Last updated