Module qmdb

Module qmdb 

Source
Expand description

A collection of authenticated databases inspired by QMDB (Quick Merkle Database).

§Terminology

A key in an authenticated database either has a value or it doesn’t. Two types of operations can be applied to the db to modify the state of a specific key. A key that has a value can change to one without a value through the delete operation. The update operation gives a key a specific value whether it previously had no value or had a different value.

Keys with values are called active. An operation is called active if (1) its key is active, (2) it is an update operation, and (3) it is the most recent operation for that key.

§Acknowledgments

The following resources were used as references when implementing this crate:

Re-exports§

pub use verify::create_multi_proof;
pub use verify::create_proof;
pub use verify::create_proof_store;
pub use verify::create_proof_store_from_digests;
pub use verify::digests_required_for_proof;
pub use verify::extract_pinned_nodes;
pub use verify::verify_multi_proof;
pub use verify::verify_proof;
pub use verify::verify_proof_and_extract_digests;

Modules§

any
Authenticated databases that provides succinct proofs of any value ever associated with a key. The submodules provide two classes of variants, one specialized for fixed-size values and the other allowing variable-size values.
current
A Current authenticated database provides succinct proofs of any value ever associated with a key, and also whether that value is the current value associated with it. The implementations are based on a crate::qmdb::any authenticated database combined with an authenticated CleanBitMap over the activity status of each operation. The two structures are “grafted” together to minimize proof sizes.
immutable
An authenticated database that only supports adding new keyed values (no updates or deletions), where values can have varying sizes.
keyless
The Keyless qmdb allows for append-only storage of arbitrary variable-length data that can later be retrieved by its location.
operation
store
A mutable key-value database that supports variable-sized values, but without authentication.
sync
Shared sync types and functionality for authenticated databases.
verify

Enums§

Error
Errors that can occur when interacting with an authenticated database.