pub const MAX_RANKED_LIMIT: u16 = 100;Expand description
Hard ceiling on k (the request’s LIMIT).
The ranked proof commits one secondary entry per returned group, so
proof bytes grow linearly in k. 100 keeps the worst case in the same
order of magnitude as the other aggregate proof surfaces (compare
super::conditions::WhereClause::in_values’s 100-value cap on In
fan-out) and matches the In bound callers already design against.
This is a hard ceiling, not a clamp: a request with limit > 100
is rejected with
crate::error::query::QuerySyntaxError::InvalidLimit rather than
silently truncated. Truncation would be especially treacherous here
because k is part of the traversal the client reconstructs for
[grovedb::GroveDb::verify_path_query] — a server-side clamp would
produce a page the client’s reconstruction did not ask for.
There is deliberately no companion ceiling on OFFSET; see the
module docs and DriveDocumentRankedQuery::offset.