Crates.io | ic-certified-map |
lib.rs | ic-certified-map |
version | 0.4.0 |
source | src |
created_at | 2021-06-04 18:09:34.564958 |
updated_at | 2023-07-13 22:32:04.904779 |
description | Merkleized map data structure. |
homepage | https://docs.rs/ic-certified-map |
repository | https://github.com/dfinity/cdk-rs |
max_upload_size | |
id | 406222 |
size | 67,524 |
This package provides a map that can be used by Internet Computer canisters to implement certified queries.
Incremental certification. The canister can store thousands of entries while keeping the cost of certification relatively low.
Proofs of absence. If the requested key is not present in the map, the returned tree structure allows the caller to verify that fact.
Relatively small merkle proofs. The size overhead of the certificate is O(log N), where N is the number of entries in the map.
The canister uses an augmented Red-Black binary search tree to store the entries. Each node of the search tree is annotated with the root hash of the hash tree built from the subtree rooted at this node. Each time the tree is rotated or modified, the corresponding hashes are recomputed in O(1) time.