Hierarchical Authenticated Data Structure Database
A high-performance, cryptographically verifiable database that organizes data as a "grove" — a forest of Merkle AVL trees (Merk). Enables efficient queries on any indexed field while maintaining cryptographic proofs throughout the hierarchy.
Read the GroveDB Book — comprehensive documentation covering architecture, element types, proofs, queries, and more. Available in 16 languages.
| Branch | Tests | Coverage |
|---|---|---|
| develop |
- Hierarchical tree-of-trees — organize data in nested Merk trees with a single root hash authenticating everything
- Efficient secondary indexes — pre-computed index trees give O(log n) queries on any field
- Cryptographic proofs — membership, non-membership, and range proofs with minimal size
- 7 reference types — cross-tree linking without data duplication
- Built-in aggregations — sum trees, count trees, big sum trees, and combined variants
- Batch operations — atomic updates across multiple trees
- Append-only structures — MMR trees, bulk append trees, commitment trees (Sinsemilla/Halo 2)
- Cross-platform — x86, ARM, WebAssembly
[dependencies]
grovedb = "3.0"use grovedb::{GroveDb, Element};
use grovedb_version::version::GroveVersion;
let db = GroveDb::open("./my_db")?;
let v = GroveVersion::latest();
// Create trees
db.insert(&[], b"users", Element::new_tree(None), None, None, v)?;
db.insert(&[b"users"], b"alice", Element::new_tree(None), None, None, v)?;
// Insert data
db.insert(&[b"users", b"alice"], b"age", Element::new_item(b"30"), None, None, v)?;
// Query
let age = db.get(&[b"users", b"alice"], b"age", None, v)?;
// Generate and verify proofs
let path_query = PathQuery::new_unsized(vec![b"users".to_vec()], Query::new_range_full());
let proof = db.prove_query(&path_query, None, None, v)?;
let (root_hash, results) = GroveDb::verify_query(&proof, &path_query, v)?;cargo build --release
cargo test
cargo benchInstall pre-commit to catch formatting and lint issues before CI:
pip install pre-commit # or: brew install pre-commit
pre-commit install # fmt + typos on every commit
pre-commit install --hook-type pre-push # clippy on pushGroveDB is built in three layers:
- GroveDB Core — orchestrates multiple Merk trees, elements, references, queries, proofs, and batch operations
- Merk — self-balancing Merkle AVL tree with proof generation, cost tracking, and lazy loading
- Storage — RocksDB abstraction with prefixed storage, transactions, and batching
For deep dives into each layer, see the GroveDB Book.
GroveDB implements concepts from Database Outsourcing with Hierarchical Authenticated Data Structures (Etemad & Kupcu, 2015) — using a forest of Merkle AVL trees where each tree can contain other trees, solving the fundamental limitation of flat authenticated structures.
Built by Dash Core Group as the storage layer for Dash Platform.
MIT — see LICENSE.
- GroveDB Book — full documentation
- GitHub Issues
- Discord