Skip to main content

drive/verify/document_ranked/
mod.rs

1//! Verifies grovedb proofs produced by the ranked
2//! (`GROUP BY … ORDER BY <aggregate> LIMIT n [OFFSET m]`) query surface.
3//!
4//! Mirrors the layering of [`super::document_count`]: a pure
5//! grovedb-level verifier as a method on
6//! [`DriveDocumentRankedQuery`](crate::query::DriveDocumentRankedQuery)
7//! taking raw `proof: &[u8]` and returning `(RootHash, T)`. The
8//! tenderdash signature composition that wraps this call lives in
9//! `rs-drive-proof-verifier`.
10//!
11//! Only one verifier exists here, and by design: the ranked surface has a
12//! single proof shape. Where the count surface has five verifiers because
13//! five different grovedb primitives can answer a count, every ranked
14//! request — either direction, at any offset, on any of the three axes —
15//! resolves to one `RankedPage` axis traversal proved through grovedb's
16//! unified `prove_query`, against the same `PathQuery` the verifier
17//! reconstructs from the request.
18
19/// Indexed-axis top-k proof verification — returns the ranked groups the
20/// proof commits to, in ranking order.
21pub mod verify_ranked_top_k_proof;