Hello everyone:
I am submitting a proposal to Zcash Community Grants (ZCG) to build a State Snapshot and Fast Sync infrastructure module for Zebra, the Rust full node implementation of Zcash.
This project focuses on exporting, distributing, verifying, and restoring finalized chain state, allowing new Zebra nodes to bootstrap quickly from trusted snapshots instead of syncing from genesis.
⸻
Project Overview
This proposal introduces a reusable, secure state snapshot system for Zebra that enables:
• Point-in-time snapshots of finalized Zcash chain state
• Fast node bootstrap from verified snapshots
• Dramatically reduced cold-start time for full nodes
• More efficient CI/CD, testing, and elastic deployment workflows
⸻
Motivation
Running a new Zebra full node today requires replaying the entire blockchain from genesis, which creates several challenges:
High Cold-Start Cost
• Full sync can take many hours or days
• Heavy CPU, IO, and memory usage
• Impractical for frequent or automated deployments
Poor Developer CI/CD Experience
• Tests and integration environments must wait for full sync
• Hard to spin up multiple nodes with identical state
• Slows development, testing, and experimentation
Lack of Standardized Snapshot Infrastructure
• No official or community-maintained snapshot solution exists for Zebra
• Different teams re-implement partial solutions
⸻
High-Level Technical Approach
The proposed solution consists of:
1. Snapshot Generation
• Extract finalized state from Zebra’s RocksDB storage
• Support Transparent, Sapling, and Orchard pools
• Streaming export for large state sizes
2. Custom Snapshot Format (.zsnap)
• Designed for large-scale data
• Segmented layout for incremental verification
• Built-in metadata (network, height, tree roots, versioning)
• Optional compression (LZ4 / Zstd)
3. Multi-Level Verification
• Integrity checks (checksums)
• Tree root verification (Sapling / Orchard / Sprout)
4. Snapshot Loading & Fast Sync
• Restore Zebra state directly from snapshot
• Pre-load verification
• Streaming import with controlled memory usage
• Designed to handle 200–250GB+ state sizes predictably
5. Distribution CLI Tooling
• Snapshot publishing to HTTP / S3 / CDN
• Resume-capable downloads
• CLI commands for generate / verify / load / inspect
⸻
Expected Impact
For the Zcash ecosystem, this enables:
• Faster onboarding of new full node operators
• 4–10× faster bootstrap compared to syncing from genesis
• Node ready in \~2–3 hours instead of 10–24 hours
⸻
Deliverables Milestones
The proposal is structured into three milestones covering:
1. Snapshot format, core read/write engine, compression, generation
2. Verification system and snapshot loader
3. Download system, CLI tools, documentation, and release
⸻
Full proposal details, are available here:
https://github.com/ZcashCommunityGrants/zcashcommunitygrants/issues/187
Thank you for your time and input.