Snapshot Downloader
The Snapshot Downloader is a Rust-based tool that automates setting up a Cronos node from a snapshot. It supports two modes:
Download only: Run with
--profileto download a snapshot without any configuration file.Full setup: Configure
config.yamland runcargo runto go through the full node setup lifecycle.
This guide walks you through installation, setup, and configuration. 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 it 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.
Build Snapshot Downloader
Mode 1: Download Snapshot Only
Run with --profile to download a snapshot without a config.yaml file.
Full available profile list:
Mode 2: Full Node Setup with config.yaml
With config.yaml, the downloader runs through a 6-step lifecycle to set up and start a full node automatically.
Lifecycle steps:
Download and extract
cronosdbinaryRun
cronosd initDownload snapshot
Extract snapshot
Update
app.tomlandconfig.tomlStart
cronosd
Choose Snapshot
Check the latest snapshots at https://snapshot.cronos.com/.
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.
Run The Tool
Once configured, run:
The tool will go through all 6 steps in order. Use lifecycle hooks (post_snapshot_download_command, post_snapshot_extract_command, post_start_command) for any custom automation between steps.
Skipping Steps
You can skip one or more steps by passing skip flags. This is useful when re-running the tool after a partial run, or when certain steps have already been completed.
--skip-binary-download
Step 1: Download and extract cronosd binary
--skip-download-snapshot
Step 3: Download snapshot
--skip-extract-snapshot
Step 4: Extract snapshot
--skip-download-addrbook
Addrbook download (if addrbook_url is set)
--skip-execute-binary
Step 6: Start cronosd
Examples
Re-run without re-downloading or re-extracting the snapshot:
Re-run from scratch but skip starting the node:
Skip everything except starting the node:
Last updated
Was this helpful?