#node #trie #key #hash #merkle-tree #hasher #generic

no-std subtrie

Merkle-Patricia Trie generic over key hasher and node encoding

1 unstable release

0.0.1 Oct 28, 2024

#78 in #hasher

Download history 193/week @ 2024-10-26 212/week @ 2024-11-02 65/week @ 2024-11-09

470 downloads per month

Apache-2.0

495KB
11K SLoC

Build Status

Trie

A generic implementation of the Base-16 Modified Merkle Tree ("Trie") data structure, provided under the Apache2 license.

Trie Hash alone is able to be used in no_std builds by disabling its (default) std feature. Implementation is in subtrie crate.

Testing in reference-trie crate and trie-db-test.

In the spirit of all things Rust, this aims to be reliable, secure, and high performance.

Used in the Substrate project. If you use this crate and would your project listed here, please contact us.

Buidling &c.

Building is done through cargo, as you'd expect.

Building

cargo build --all

Testing

cargo test --all

Benchmarking

cargo bench --all

Building in no_std

cargo build --no-default-features

lib.rs:

Trie interface and implementation.

Dependencies

~0–9.5MB
~97K SLoC