{"repo":"thyeem/monotree","free":true,"listed":false,"github":"https://github.com/thyeem/monotree","clone":"git clone https://github.com/thyeem/monotree.git","description":"An optimized Sparse Merkle Tree in Rust","language":"Rust","stars":65,"topics":["sparse-merkle-tree","optimization-algorithms","cryptocurrency","inclusion-proof","database","rust","sparse-merkle-trie"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"Monotree Rust implementation of an optimized Sparse Merkle Tree. This is a kind of binary-radix tree based on bitwise branching, currently , no nibble of bit. For now, branching unit is just a single bit , neither a 4-bit nor a byte nibble . See monotree.py for a pure Python implementation of monotree . Features - Very simple and lightweight , but fast and robust . - Fully featured Sparse Merkle Tree (SMT) as a storage - This includes: non-inclusion proof , as well as inclusion proof , and its verification. - Again, NOT verbose at all. This library mostly relies on the Rust standard library only except for database APIs and hashers . Currently, monotree supports these databases and hash functions following, but is designed to be super easy to customize and add: Databases include : - HashMap - RocksDB - Sled Hashers include : - Blake3 - Blake2s and Blake2b - SHA-2 - SHA-3 (Keccak) Install Add dependency to Cargo.toml or use cargo add Quick start Refer to examples/basic.rs for a complete working example. Regarding non-inclusion proof and inclusion proof , See Merkle proof section in More Examples below. Initialize Insert Retrieve Remove Batch: Atomic Transaction Instead of executing each operation one by one, write them in a batch and then commit them all at once. One can do the same thing above using batch operation for performance gain and atomicity . In short, prepare → many of { insert , get , remove } → commit Prepare Transaction Freely insert , get , and remove Commit Tra","default_branch":null,"files":null,"tree":[],"storefront":"/r/thyeem","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/thyeem/monotree/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}