The most advanced Merkle tree library for Rust

Overview

rs-merkle

Rayon crate Rayon documentation Build and test

rs-merkle is the most advanced Merkle tree library for Rust. Basic features include building a Merkle tree, creation, and verification of Merkle proofs for single and several elements, i.e. multi-proofs. Advanced features include making transactional changes to the tree and rolling back to any previously committed tree state, similarly to Git.

The library is highly customizable. Hashing function and the way how the tree is built can be easily configured through a special trait.

rs-merkle is available on crates.io, and API Documentation is available on docs.rs.

About Merkle trees

Merkle trees, also known as hash trees, are used to verify that two or more parties have the same data without exchanging the entire data collection.

Merkle trees are used in Git, Mercurial, ZFS, IPFS, Bitcoin, Ethereum, Cassandra, and many more. In Git, for example, Merkle trees are used to find a delta between the local and remote repository states to transfer only the difference between them over the network. In Bitcoin, Merkle trees are used to verify that a transaction was included in the block without downloading the whole block contents. ZFS uses Merkle trees to quickly verify data integrity, offering protection from silent data corruption caused by phantom writes, bugs in disk firmware, power surges, and other causes.

Usage

Add the following to your Cargo.toml:

[dependencies]
rs_merkle = "1.0"

Documentation

Documentation is available on docs.rs.

Contributing

Everyone is welcome to contribute in any way or form! For further details, please read CONTRIBUTING.md

Authors

Also, see the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

You might also like...
Prefix tree (ordered map and set) data structure using 100% safe Rust

PFX: A 100% safe, blob-oriented prefix tree This crate provides a prefix tree map and set data structure, implemented purely in safe Rust. The API is

The fallen leaves tell a story... of a colorful file tree visualizer for the command-line.
The fallen leaves tell a story... of a colorful file tree visualizer for the command-line.

Erdtree A bLazInGlY fAsT, simplified version of the ancient tree command which displays a colorful depth indented listing of files with their memory s

High-level networking library that extends the bevy_replicon library to allow snapshot interpolation and client-side prediction

bevy_replicon_snap A Snapshot Interpolation plugin for the networking solution bevy_replicon in the Bevy game engine. This library is a very rough pro

A Rust library for working with Bitcoin SV

Rust-SV A library to build Bitcoin SV applications in Rust. Documentation Features P2P protocol messages (construction and serialization) Address enco

A Rust library for generating cryptocurrency wallets
A Rust library for generating cryptocurrency wallets

Table of Contents 1. Overview 2. Build Guide 2.1 Install Rust 2.2a Build from Homebrew 2.2b Build from Crates.io 2.2c Build from Source Code 3. Usage

A modern TLS library in Rust
A modern TLS library in Rust

Rustls is a modern TLS library written in Rust. It's pronounced 'rustles'. It uses ring for cryptography and libwebpki for certificate verification. S

Sodium Oxide: Fast cryptographic library for Rust (bindings to libsodium)

sodiumoxide |Crate|Documentation|Gitter| |:---:|:-----------:|:--------:|:-----:|:------:|:----:| |||| NaCl (pronounced "salt") is a new easy-to-use h

rabe is an Attribute Based Encryption library, written in Rust

Rabe rabe is a rust library implementing several Attribute Based Encryption (ABE) schemes using a modified version of the bn library of zcash (type-3

A Rust library for lattice-based additive homomorphic encryption.

Cupcake Cupcake is an efficient Rust library for the (additive version of) Fan-Vercauteren homomorphic encryption scheme, offering capabilities to enc

Comments
  • Derive Eq and PartialEq on MerkleProof.

    Derive Eq and PartialEq on MerkleProof.

    Thanks for the library, it's working really well for me so far 👍

    I have a use case where I am using axum and it's TypedHeader struct and I want to decode a header to a struct that includes a MerkleProof::<Sha256> but I can't as it does not implement Eq or PartialEq. I would be able to workaround this by storing a Vec<u8> and lazily decoding to MerkleProof elsewhere in the code but that is awkward.

    This small change derives Debug, Eq and PartialEq for MerkleProof. All tests continue to pass.

    opened by tmpfs 1
Releases(v1.2.0)
Owner
Anton Suprunchuk
Anton Suprunchuk
The Fastest and most Advanced Ethereum Client

The Fastest and most Advanced Ethereum Client. » Download the latest release « Table of Contents Description Technical Overview Building 3.1 Building

Jay Lee 6 Feb 17, 2022
Sparse Merkle tree for a key-value map.

LSMTree A Rust library that implements a Sparse Merkle tree for a key-value store. The tree implements the same optimisations specified in the Libra w

Al Liu 14 Oct 8, 2022
Bootstrap your merkle tree.

Merkle Generator Bootstrap your merkle tree, in Rust. Table of Contents Features Installation Usage Contributing Features Merkle Tree creation Merkle

DeGatchi 40 Feb 14, 2023
DAPOL+ Proof of Liabilities using Bulletproofs and Sparse Merkle trees

DAPOL+ implementation Implementation of the DAPOL+ protocol introduced in the "Generalized Proof of Liabilities" by Yan Ji and Konstantinos Chalkias A

Mysten Labs 5 Apr 9, 2023
Uses Plonky2 proof system to build recursive circuits for Merkle Trees.

ProvableMerkleTrees Introduction This repo provides Rust code to build Merkle Trees, equipped with a Provable interface to generate Zero Knowledge pro

null 5 Aug 18, 2023
Heimdall is an advanced Ethereum smart contract toolkit for forensic and heuristic analysis.

Heimdall is an advanced EVM toolkit which aims to make dealing with smart contracts on EVM based chains easier. Installation & Usage Heimdall's update

Jonathan Becker 489 Jan 2, 2023
Benchmarks of most widely used web frameworks built in rust.

Rust framework benchmarks Benchmarking utility to test the performance of all the rust web frameworks. Built with rust ?? . Demo (Last updated: Thu Ju

Ishtmeet Singh 4 Oct 21, 2022
Aptos-core strives towards being the safest and most scalable layer one blockchain solution.

Aptos-core strives towards being the safest and most scalable layer one blockchain solution. Today, this powers the Aptos Devnet, tomorrow Mainnet in order to create universal and fair access to decentralized assets for billions of people.

Aptos Labs 4.7k Jan 6, 2023
Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer of security for your most sensitive files.

Koofr Vault https://vault.koofr.net Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer o

Koofr 12 Dec 30, 2022
Most useful information about your system in a single command.

mymy Access the most common information about your system using a single command. Mymy is a command line tool that provides the most helpful informati

Théo Crevon 5 Apr 4, 2023