#merkle-tree #leave #space-efficient #append-only #bridge

no-std leanbridgetree

Space-efficient Merkle tree designed for linear appends with witnessing of marked leaves

3 releases (breaking)

Uses new Rust 2024

0.3.0 Aug 7, 2025
0.2.0 Aug 6, 2025
0.1.0 Jul 30, 2025

#582 in Data structures

Download history 104/week @ 2025-07-26 233/week @ 2025-08-02 58/week @ 2025-08-09 2/week @ 2025-08-16 44/week @ 2025-08-23 32/week @ 2025-08-30 40/week @ 2025-09-06 14/week @ 2025-09-13

131 downloads per month

MIT/Apache

79KB
1.5K SLoC

leanbridgetree

This is a Rust crate that provides an implementation of an append-only Merkle tree structure. Individual leaves of the merkle tree may be marked such that witnesses will be maintained for the marked leaves as additional nodes are appended to the tree, but leaf and node data not specifically required to maintain these witnesses is not retained, for space efficiency.

The crate also supports using "bridges" containing the minimal possible amount of data to advance witnesses for marked leaves data up to the latest state of the tree without having to append each intermediate leaf individually, given a bridge between the desired states computed by an outside source. The state of the tree is internally represented as a set of such bridges.

Documentation

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Original work

This crate is a heavily modified fork of the excellent bridgetree crate from Zcash Zebra. The fork started by creating a new commit history from the tree at b93e70980009caa857d244e7c4c8f1992bd4a478 in the original repository.

Dependencies

~140–750KB
~14K SLoC