23 releases (14 stable)

16.0.0 Jan 7, 2025
15.0.1 Sep 25, 2024
15.0.0 Feb 26, 2024
14.0.0 Feb 13, 2024
0.0.0 Jan 29, 2023

#997 in Magic Beans

Download history 1273/week @ 2024-09-26 1046/week @ 2024-10-03 1139/week @ 2024-10-10 1893/week @ 2024-10-17 1570/week @ 2024-10-24 1704/week @ 2024-10-31 11061/week @ 2024-11-07 26715/week @ 2024-11-14 25909/week @ 2024-11-21 25412/week @ 2024-11-28 27768/week @ 2024-12-05 26570/week @ 2024-12-12 12014/week @ 2024-12-19 7265/week @ 2024-12-26 22688/week @ 2025-01-02 20975/week @ 2025-01-09

70,602 downloads per month
Used in 366 crates (7 directly)

Apache-2.0

30KB
618 lines

Release

Polkadot SDK Stable 2412


lib.rs:

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 does not perform any sorting of the input data (leaves) nor when inner nodes are created.

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

Dependencies

~1.6–2.4MB
~50K SLoC