pub fn verify_carrier_aggregate_sum_proof(
query: &DriveDocumentSumQuery<'_>,
proof: &Proof,
mtd: &ResponseMetadata,
limit: Option<u16>,
left_to_right: bool,
platform_version: &PlatformVersion,
provider: &dyn ContextProvider,
) -> Result<Vec<SumEntry>, Error>Expand description
Verify a carrier AggregateSumOnRange proof against a
rangeSummable: true index and return the per-In-branch sums.
Thin tenderdash-composition wrapper over
[DriveDocumentSumQuery::verify_carrier_aggregate_sum_proof].
Sum analog of count’s
super::document_count::verify_carrier_aggregate_count_proof.
Used by the prove path when the request shape is
select=SUM, group_by=[in_field], where = In(in_field) + range(other_field), prove=true — drive’s detect_sum_mode
routes that shape to
DocumentSumMode::RangeAggregateCarrierProof, which collapses
each In branch’s range into a single committed i64.
Result: one SumEntry per present In branch with
in_key = <serialized In value>, key = [], sum = Some(n).
Absent In branches are omitted; callers that need to surface
“queried but absent” diff their In array against the returned
in_keys.