| Crates.io | zksync_mini_merkle_tree |
| lib.rs | zksync_mini_merkle_tree |
| version | 29.4.0-non-semver-compat |
| created_at | 2024-07-12 11:56:39.368163+00 |
| updated_at | 2025-09-24 17:50:00.006767+00 |
| description | ZKsync implementation of small Merkle trees |
| homepage | https://zksync.io/ |
| repository | https://github.com/matter-labs/zksync-era |
| max_upload_size | |
| id | 1300610 |
| size | 81,471 |
Simple in-memory binary Merkle tree implementation. The tree is of bounded depth (up to 1,024 leaves) and uses the keccak-256 hash function.
The tree implementation comes with a criterion benchmark that can be run with a command like this:
cargo bench -p zksync_mini_merkle_tree --bench tree
The order of timings should be 2M elements/s for all tree sizes (measured on MacBook Pro with 12-core Apple M2 Max CPU),
both for calculating the root and the root + Merkle path. This translates to approximately 130µs for a tree with 512
leaves (the tree size used for L2ToL1Logs).