Skip to main content

Crate exoware_qmdb

Crate exoware_qmdb 

Source
Expand description

Store-backed bridge for Commonware authenticated storage proofs.

The crate currently supports multiple Commonware authenticated backends:

  • ordered QMDB (qmdb::any and qmdb::current::ordered)
  • immutable (qmdb::immutable)
  • keyless (qmdb::keyless)

Writers upload exact Commonware operations into the Exoware store, then publish an externally authoritative watermark once the uploaded prefix is complete.

Uploads may still happen concurrently and out of order. Current batch-boundary state may also be uploaded ahead of publication. Only watermark publication is monotonic: publishing watermark W means the whole contiguous prefix [0, W] is available and may now be trusted by readers.

Readers fence historical queries against that low watermark. Historical proofs use the global ops-MMR nodes stored by Position.

Current ordered proofs use versioned current-state deltas:

  • bitmap chunk rows
  • grafted-node rows

Those rows are versioned by uploaded batch boundary Location, not by the final published watermark. That is what preserves lower-boundary current proofs below a later published low watermark.

Re-exports§

pub use error::ProofKind;
pub use error::QmdbError;
pub use proof::OperationRangeCheckpoint;
pub use proof::RawCurrentRangeProof;
pub use proof::RawKeyValueProof;
pub use proof::RawMmrProof;
pub use proof::RawMultiProof;
pub use proof::VariantRoot;
pub use proof::VerifiedCurrentRange;
pub use proof::VerifiedKeyValue;
pub use proof::VerifiedMultiOperations;
pub use proof::VerifiedOperationRange;
pub use proof::VerifiedVariantRange;

Modules§

error
proof
prune

Structs§

BuiltImmutableUpload
BuiltKeylessUpload
Deterministic output of a keyless row-build.
BuiltOrderedUpload
BuiltUnorderedUpload
Deterministic output of an unordered row-build.
CurrentBoundaryState
Current-state rows for one uploaded ordered batch boundary.
ImmutableClient
ImmutableWriter
Sole-writer immutable QMDB helper. Pipelining, flushing, failure, and sole-writer contract are identical to KeylessWriter — see its docs for details.
KeylessClient
KeylessWriter
Sole-writer keyless QMDB helper.
OrderedClient
OrderedConnect
OrderedConnectClient
OrderedWriter
Sole-writer ordered QMDB helper. Pipelining, flushing, failure, and sole-writer contract are identical to KeylessWriter — see its docs for details. prepare_upload additionally requires the caller-supplied CurrentBoundaryState for the batch.
PreparedUpload
A QMDB upload that has reserved writer state and encoded its Store rows, but has not yet been persisted.
PreparedWatermark
A prepared QMDB watermark row that should be staged into the same Store batch as the uploads it publishes.
PublishedCheckpoint
Writer publication point that is known to be durable in Store.
RangeConnectSubscription
RangeSubscribeProof
UnorderedClient
UnorderedWriter
Sole-writer unordered QMDB helper. Pipelining, flushing, failure, and sole-writer contract are identical to KeylessWriter — see its docs for details.
UploadReceipt
Metadata returned after uploading one batch of QMDB operations.
VersionedValue
Historical value resolved for one logical key.
WriterState
Caller-owned frontier for resuming a single-writer helper without reading the store.

Enums§

QmdbVariant
QMDB proof/root variant supported by exoware-qmdb.

Constants§

MAX_OPERATION_SIZE
Maximum encoded operation size for QMDB key and value payloads (u16 length on the wire).

Functions§

build_immutable_upload
build_keyless_upload
Pure function: from the MMR peaks preceding the batch, compute every store row needed to persist ops as a single atomic PUT. No I/O.
build_ordered_upload
Build every store row for one ordered batch: op rows, update-index rows, presence row, MMR node rows (derived from the supplied peaks), current-state rows (from the caller-supplied current_boundary), and optionally the watermark row. No I/O.
build_unordered_upload
Pure row-build for an unordered batch. Produces op rows, update-index rows for keyed ops, presence row, MMR node rows, and (optionally) the watermark row.
immutable_range_connect_stack
keyless_range_connect_stack
ordered_connect_stack
Mount both OrderedService (Get/GetMany) and RangeService (Subscribe) on one endpoint, so a single HTTP URL serves the full ordered-QMDB surface.
recover_boundary_state
Recover the ordered current-boundary delta for one batch from local proof material emitted by a Commonware current::ordered::Db.
unordered_range_connect_stack

Type Aliases§

ImmutableRangeConnect
ImmutableRangeConnectClient
KeylessRangeConnect
KeylessRangeConnectClient
OrderedRangeConnect
OrderedRangeConnectClient
UnorderedRangeConnect
UnorderedRangeConnectClient