#merkle-tree #tree #merkle #sparse #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

#54 in #merkle

Download history 163/week @ 2024-05-13 25/week @ 2024-05-20

188 downloads per month

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–6MB
~109K SLoC