pub fn verify_aggregate_count_proof(
query: &DriveDocumentCountQuery<'_>,
proof: &Proof,
mtd: &ResponseMetadata,
platform_version: &PlatformVersion,
provider: &dyn ContextProvider,
) -> Result<u64, Error>Expand description
Verify a grovedb AggregateCountOnRange proof and the surrounding
tenderdash commit, returning the verified document count.
Thin tenderdash-composition wrapper over
DriveDocumentCountQuery::verify_aggregate_count_proof in
rs-drive (which does the merk-level verification). Both helpers
reuse the prover’s aggregate_count_path_query internally so the
path query bytes match byte-for-byte and the merk root
recomputation succeeds; the caller passes the query struct
itself rather than a pre-built PathQuery, removing a step
where the SDK and server could drift.
Counterpart to the materialize-and-count path in
[FromProof<DriveDocumentQuery> for DocumentCount] above: where
that one verifies a regular grovedb proof that yields concrete
documents and counts them client-side, this verifies the
merk-level aggregate primitive that yields a single u64
directly (capped only by the merk tree size, not u16::MAX).