{"repo":"polytope-labs/solidity-merkle-trees","free":true,"listed":false,"github":"https://github.com/polytope-labs/solidity-merkle-trees","clone":"git clone https://github.com/polytope-labs/solidity-merkle-trees.git","description":"The most advanced solidity library for merkle (multi) proof verification of different kinds of merkle trees","language":"Solidity","stars":205,"topics":["algorithms","merkle-mountain-range","merkle-proof","merkle-tree","solidity","merkle-multi-proofs","cryptography","ethereum","merkle-patricia-trie","substrate"],"license":"Apache-2.0","category":"blockchain-web3","readme_excerpt":"@polytope-labs/solidity-merkle-trees This library contains implementations of various merkle tree verification algorithms. Currently supported algorithms: - [x] Merkle Trees (supports unbalanced trees). - [x] Merkle Mountain Ranges. - [x] Merkle-Patricia Trie. Installation Merkle Multi Proofs This algorithm is based on the research done here: https://research.polytope.technology/merkle-multi-proofs Supports both balanced and unbalanced trees (leaf count need not be a power of 2). You can use it to verify proofs like so: Leaves carry a 0-based index and hash . The proof is a flat bytes32[] array of sibling hashes — no position metadata needed. The contract converts indices to 1-based tree positions internally and walks up level by level, consuming proof elements for missing siblings. You can generate the merkle multi proofs using the rs-merkle crate. To convert an rs-merkle proof into the format the Solidity verifier expects: Merkle Mountain Range Multi Proofs This algorithm is based on the research done here: https://research.polytope.technology/merkle-mountain-range-multi-proofs You can use it to verify proofs like so: You can generate the MMR proofs using the ckb-merkle-mountain-range crate. Note: The MMR verifier provides membership proofs only — it guarantees that a given leaf hash exists somewhere in the committed tree. It is not positionally binding : the Leaf.index field determines how the proof is reconstructed but a valid leaf hash may verify at more than one index. ","default_branch":null,"files":null,"tree":[],"storefront":"/r/polytope-labs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/polytope-labs/solidity-merkle-trees/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."}