Skip to main content

SPENDS_LIST_MAX_LIMIT

Constant SPENDS_LIST_MAX_LIMIT 

Source
pub const SPENDS_LIST_MAX_LIMIT: u32 = 500;
Expand description

The largest page control.spends.list will serve.

The audit record grows without limit — it is append-only and every automated cycle adds to it — so an unbounded read is unbounded work and an unbounded response. The bound is declared here from the start rather than added later, because a method that ships unbounded teaches every client to expect the whole record in one call, and bounding it afterwards is then a breaking change.

This bound is the only thing bounding the call. dig-node’s control plane has no request rate limiting of any kind (dig_ecosystem#2577), so a future reader weighing a larger cap should assume no limiter exists behind it, because none does.