drive/verify/document_count/mod.rs
1//! Verifies grovedb proofs produced by the `GetDocumentsCount` endpoint.
2//!
3//! Mirrors the layering used by `packages/rs-drive/src/verify/document/`:
4//! pure grovedb-level verifiers as methods on
5//! [`DriveDocumentCountQuery`](crate::query::DriveDocumentCountQuery)
6//! that take raw `proof: &[u8]` and return `(RootHash, T)`. The tenderdash
7//! signature composition layer that wraps these calls lives in
8//! `packages/rs-drive-proof-verifier/src/proof/document_count.rs`.
9
10/// Aggregate-count proof verification (`AggregateCountOnRange`
11/// primitive) — returns a single `u64`.
12pub mod verify_aggregate_count_proof;
13/// Carrier-aggregate-count proof verification (carrier
14/// `AggregateCountOnRange` composition with outer `Keys` per
15/// grovedb PR #663) — returns one `(in_key, u64)` per resolved In
16/// branch. Used by `group_by = [in_field]` count queries that
17/// carry both an `In` clause and a range clause.
18pub mod verify_carrier_aggregate_count_proof;
19/// Distinct-count proof verification (regular range proof against a
20/// `ProvableCountTree`) — returns the per-`(in_key, key)` entries the
21/// proof commits to.
22pub mod verify_distinct_count_proof;
23/// Point-lookup count proof verification (CountTree element proof for
24/// Equal/`In` counts on a `countable: true` index) — returns one entry
25/// per covered branch, with each `count` extracted from the verified
26/// CountTree element's `count_value`.
27pub mod verify_point_lookup_count_proof;
28/// Primary-key CountTree proof verification — used by the
29/// `documents_countable: true` fast path for unfiltered total counts
30/// at the doctype level. Returns a single `u64` count.
31pub mod verify_primary_key_count_tree_proof;