Skip to main content

Crate neodata

Crate neodata 

Source
Expand description

Streaming fixed-memory merkle tree with backend-agnostic storage.

neodata implements a B-ary merkle tree (default B=16) that supports O(log_B N) incremental append using positional grouping. The tree’s internal nodes are stored in a pluggable Store backend, keeping only the root hashes and entry count in memory.

§Quick start

use neodata::{MerkleLog, MemStore};

let mut log = MerkleLog::<MemStore, 16>::new(MemStore::new());
let hash = log.append(b"hello").unwrap();
assert_eq!(log.length(), 1);

Re-exports§

pub use diff::NodeBlock;
pub use diff::collect_needed_nodes;
pub use diff::verify_partial;
pub use log::MerkleLog;
pub use log::subtree_sizes;
pub use proof::Proof;
pub use proof::ProofLevel;
pub use proof::extract_siblings;
pub use proof::reconstruct_children;
pub use proof::verify;
pub use store::MemStore;
pub use store::Store;

Modules§

diff
Sync proof primitives for merkle tree diff and verification.
hash
Domain-separated BLAKE3 hashing.
log
Streaming append-only merkle log.
proof
Membership proofs for merkle logs.
store