Bellydash
Bellydash
Community Node Monitor

Snapshot Documentation

Download the blockchain snapshot file to quickly synchronize your Redbelly Network node. This guide will walk you through the process step by step.

INFO

This guide assumes a scenario where you are launching a node from scratch. You already have a server that meets the minimum requirements for Redbelly Network nodes and have completed the necessary steps described in the Node setup and onboarding section of the official documentation. After completing the installation process, your node begins synchronization starting from block 0.

How to Use the Snapshot

To speed up your node synchronization process, you can use a snapshot. Follow these steps:

Stop Your Node

First, stop your Redbelly node service:

sudo systemctl stop redbelly.service

Verify that the service has stopped:

sudo systemctl status redbelly.service

Backup Your nodekey file

Warning: Backup your nodekey file!

The file /opt/redbelly/rbn/database/nodekey contains the unique identity of your node. Applying a snapshot will overwrite the entire /opt/redbelly/rbn/database directory, which means your nodekey will be lost if you do not back it up.

Before applying a snapshot, always back up your nodekey to preserve your node identity or be able to revert:

sudo cp /opt/redbelly/rbn/database/nodekey /opt/redbelly/rbn/nodekey.backup

Important: After extracting the snapshot, you must restore your nodekey file before starting the redbelly.service to preserve your node identity.

Remove the Old Database Directory

Before extracting the snapshot, you must remove the old database directory:

sudo rm -rf /opt/redbelly/rbn/database

This step ensures that the snapshot will be extracted to a clean directory without any conflicts from the old database files.

Download and Extract the Snapshot

You can download and extract the snapshot using one of two methods:

Option 1: Quick (One-liner)

This option downloads and extracts the snapshot in one step, but does not verify the checksum. It is recommended to use this option only when you are confident about connection stability.

wget -O - https://redbelly-snapshot.mynode.uk/latest.tar | sudo tar -x -C /opt/redbelly/rbn
TIP

You can simultaneously add proper permission settings in case UID/GID have changed:

wget -O - https://redbelly-snapshot.mynode.uk/latest.tar \
  | sudo tar -x -C /opt/redbelly/rbn && \
sudo chown -R rbnuser:rbnuser /opt/redbelly/rbn && \
sudo chmod -R 700 /opt/redbelly/rbn

Option 2: Secure (Recommended)

This option ensures file integrity verification before extraction.

Download the snapshot and checksum files:

wget https://redbelly-snapshot.mynode.uk/latest.tar -O /tmp/latest.tar
wget https://redbelly-snapshot.mynode.uk/latest.sha256 -O /tmp/latest.sha256

Verify file integrity:

cd /tmp
sha256sum -c latest.sha256

Expected result: latest.tar: OK

Note: If checksum verification fails, do not extract the file. Download the snapshot again.

Extract snapshot directly to /opt/redbelly/rbn directory:

sudo tar -xf latest.tar -C /opt/redbelly/rbn

The extraction process may take some time depending on the snapshot size and your disk speed.

After downloading and extracting the snapshot (using either option), set the correct permissions:

sudo chown -R rbnuser:rbnuser /opt/redbelly/rbn && \
sudo chmod -R 700 /opt/redbelly/rbn

Restore Your nodekey file

After extracting the snapshot, restore your backed up nodekey file to preserve your node identity:

sudo cp /opt/redbelly/rbn/nodekey.backup /opt/redbelly/rbn/database/nodekey

Start Your Node

Start the node service again:

sudo systemctl start redbelly.service

Check that the service started successfully:

sudo systemctl status redbelly.service

Verify Synchronization

Monitor your node to ensure it's synchronizing correctly:

sudo tail -f /var/log/redbelly/rbn_logs/rbbc_logs.log

Your node should start from the snapshot block height and continue syncing from there. The synchronization should be much faster than starting from genesis.

Success: Your node should now be synchronized much faster, starting from the snapshot block height instead of syncing from genesis. Monitor the logs to ensure everything is working correctly.

Additional Information

What is a Snapshot?

A blockchain snapshot is a compressed archive containing the complete state of the blockchain at a specific block height. It includes all account balances, contract states, and other blockchain data up to that point.

Instead of downloading and processing all blocks from genesis (block 0), you can use a snapshot to quickly get your node up to date. This significantly reduces the time required for initial synchronization.

When to Use a Snapshot

Snapshots are particularly useful in the following scenarios:

  • Setting up a new node: Quickly get a new node synchronized without waiting hours or days
  • Resetting your node: After issues or corruption, start fresh from a known good state
  • Testing and development: Quickly reset test environments to a specific state

Snapshot Updates

Snapshots are updated regularly to provide the most recent starting point. Always use the latest snapshot for the best results. The snapshot date and block height are typically included in the filename or metadata.

Note: Currently, snapshots are limited to being updated every Sunday at midnight UTC in order to minimize operational costs.