#merkle-tree #sparse #tree #merkle #blockchain #node-tree #tree-node

bloock-smt

Implementation of a Compact Sparse Merkle Tree without empty leaves

1 unstable release

0.1.0 May 18, 2024

#67 in #node-tree

MIT license

235KB
4K SLoC

enchainte-smt

Implementation of an Sparse Merkle Tree with optimizations


lib.rs:

Sparse Merkle Tree

This crate contains an implementation of a Sparse Merkle Tree as a full binary tree: a binary tree which every node other than the leaves has two children. It depends on three traits: merge, required to create new nodes for the tree; types, needed for identifying each node; and storage, which provides a database interface to store the state of the tree. By default, Sparse Merkle Tree will use blake2b from 'enchainte-merge' crate, h256 from 'enchainte-types' and kv_rocks from 'enchainte-storage' objects, which implement the mentioned traits.

Dependencies

~4–11MB
~106K SLoC