Snapshot Downloader
The Snapshot Downloader is a Rust-based automation tool that downloads a blockchain binary, snapshot (single or multi-part), and address book, then automatically extracts the binary and snapshot, initializes the node, merges custom settings into app.toml and config.toml, and starts the chain. It also provides lifecycle hooks to execute commands at different stages (post-download, post-extraction, post-start).
This guide walks you through the installation, setup, and configuration of the Snapshot Downloader for running a Cronos node. Follow the steps in order, adapting to your hardware setup (e.g. number of disks).
Environment Setup
The tool works best on Linux with Btrfs, as the tool leverages Btrfs subvolumes for efficient snapshot handling. On Linux, users can manually create snapshots of subvolumes and roll back to previous states if needed.
On macOS and Windows, the downloader still supports snapshot download, extraction, and node start, but Btrfs-specific snapshot and rollback features are unavailable.
Note: On Windows, it requires a Unix-compatible shell (e.g., Git Bash) to run the tool.
Dependencies Installation
Install Rust using the official installer.
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ . "$HOME/.cargo/env"Install other dependencies needed for building Rust projects.
$ sudo apt install -y gcc libssl-dev pkg-configBuild Snapshot Downloader
Configure Snapshot Downloader config.yaml
config.yamlThe tool supports single-file or multi-part snapshots, custom lifecycle hooks, and TOML overrides for node configuration.
This example demonstrates a multi-part archive snapshot, including an addrbook download.
Choose Snapshot
Checkout the latest snapshots at https://snapshot.cronos.org/
Update DB Settings
In snapshot-downloader2/config.yaml, under the app_yaml and config_yaml sections, update the database settings according to the target snapshot database type and pruning type, along with any other desired configurations. Follow the same pattern as:
Below are examples of each database with pruning type Default , overriding minimum-gas-prices and persistent_peers.
Full Config Examples
Below are examples of snapshot-downloader2/config.yaml for Cronos EVM. Update URLs, chain IDs, and settings as needed for the latest snapshots and binaries.
Cronos EVM Mainnet Example 1: Single File
This example uses a single file snapshot for the Cronos EVM chain.
Cronos EVM Mainnet Example 2: Multi-part
This example demonstrates a multi-part archive snapshot, including an
addrbookdownload.
Running the Tool
Once configured, run the tool with:
Monitor the output for progress. The tool will handle downloads, extractions, initialization, and startup. Use lifecycle hooks ( post_snapshot_download_command post_snapshot_extract_command and post_start_command ) for custom automation.
For troubleshooting, check logs in the workspace directory or adjust retry settings in the config. Always verify snapshot and binary URLs from official sources for the latest versions.
Last updated
Was this helpful?