Skip to main content

MAX_DEFERRED_ACKS_PER_CYCLE

Constant MAX_DEFERRED_ACKS_PER_CYCLE 

Source
pub const MAX_DEFERRED_ACKS_PER_CYCLE: usize = 8192;
Expand description

Cap on deferred acknowledgements held across all polynomials of one cycle.

The per-polynomial cap alone leaves the cycle total at num_polys × 128 — a million entries at production dimensions, which is no bound at all. This one is derived rather than chosen: the drain discards any acknowledgement whose share has already left awaiting_acks, and that cache expires entries after max_ack_await_time (30 s by default). An older deferral is therefore provably dead, so the ceiling only has to cover the shares one cycle can receive inside that window: ~181 shares/s at the deployed 1.5 Mbps per-Session cap, so ~5 400. 8192 leaves ~1.5× headroom and costs at most ~786 KB per cycle.

Public for the same reason as MAX_DEFERRED_ACKS_PER_POLYNOMIAL.