8 major breaking releases

12.0.0 Feb 1, 2023
11.0.0 Jan 22, 2023
10.0.0 Jan 16, 2023
9.0.0 Jan 10, 2023
0.0.0 Nov 21, 2022

#2202 in Magic Beans

37 downloads per month




Auto-generated README.md for publishing to crates.io


This crate implements a simple binary Merkle Tree utilities required for inter-op with Ethereum bridge & Solidity contract.

The implementation is optimised for usage within Substrate Runtime and supports no-std compilation targets.

Merkle Tree is constructed from arbitrary-length leaves, that are initially hashed using the same hasher as the inner nodes. Inner nodes are created by concatenating child hashes and hashing again. The implementation sorts each pair of hashes before every hash operation. This makes proof verification more efficient by removing the need to track which side each intermediate hash is concatenated on.

If the number of leaves is not even, last leaf (hash of) is promoted to the upper layer.


~711K SLoC