pub fn verify_having_range_proof(
query: &DriveDocumentHavingQuery<'_>,
proof: &Proof,
mtd: &ResponseMetadata,
platform_version: &PlatformVersion,
provider: &dyn ContextProvider,
) -> Result<(RootHash, Vec<RankedEntry>), Error>Expand description
Verified having-range (GROUP BY … HAVING <aggregate> <op> <value> LIMIT n) result types. DocumentHavingEntries carries one entry
per matching group in axis order;
verify_having_range_proof is the tenderdash-composition wrapper
that binds the proof’s reconstructed root hash to the signed app
hash and returns the verified entry list — including its
completeness: an in-range group the node omitted fails verification.
Verify a grovedb indexed-axis range proof and the surrounding
tenderdash commit, returning the reconstructed root hash and the
matching groups it commits to.
Thin tenderdash-composition wrapper over
[DriveDocumentHavingQuery::verify_having_range_proof] in rs-drive
(which does the merk-level verification). Both sides derive the
proved subtree from the same
DriveDocumentHavingQuery::indexed_property_name_tree_path and the
bounded traversal from the same
AxisRangeBounds::inclusive_bounds_i128, so prover and verifier
cannot drift on which bound over which tree is being checked, and
grovedb re-executes the proof against that reconstruction — a proof
of one bound does not cover another (the limit binds as a cap: an
exhausted proof verifies under any admitting cap, a truncated one
fails a larger cap for missing coverage).
§The root hash is the whole point
Same as on the ranked surface: the merk-level verifier returning
Ok is not by itself evidence of anything — the binding to the
quorum-signed app hash in [verify_tenderdash_proof] is what makes
the entries (and their completeness) attested facts. This function
exists so that composition can never be skipped by accident.