MS-SMT: Merkle-Sum Sparse Merkle Tree in Rust
A Rust implementation of a Merkle-Sum Sparse Merkle Tree (MS-SMT) data structure.
A Merkle-Sum Sparse Merkle Tree (MS-SMT) is a data structure that combines the features of a Merkle tree and a sum tree, allowing for efficient proofs of inclusion and accumulation of values. It's particularly useful for securely storing large amounts of data with the ability to verify the integrity and sum of the data efficiently.
Features
- Efficient Storage: Store and retrieve key-value pairs with associated sums efficiently.
- Merkle Proofs: Generate and verify Merkle proofs for inclusion and sums without accessing the entire tree.
- Customizable Storage Backend: Default in-memory store provided, with the ability to implement custom storage backends.
- Easy-to-use API: Simple and intuitive API for common tree operations like insert, get, delete, and proof generation.
- Thread-safe: Built with concurrency in mind using thread-safe data structures.
Installation
Add mssmt to your Cargo.toml dependencies:
[]
= "0.0.1"
Or install via Cargo:
Usage
Here's a basic example of how to use the mssmt crate:
use ;
use to_array;
use ;
Documentation
For more detailed information on the API and usage, please refer to the API documentation.
Examples
For more examples, please refer to the examples directory.
License
This project is licensed under the MIT License. See the LICENSE file for details.