pub fn peak_cycle_bytes<S: PixSpec>(params: &PixParams) -> u64Expand description
Worst-case live heap one Exit-side SSA cycle can hold, in bytes.
This is the figure the Session layer’s live-cycle budget is denominated in, and it is
deliberately the adversarial peak rather than the conforming one. Nothing constrains the
order in which an Entry emits shares within a cycle: the shipped generator walks polynomials in
blocks of SHARE_EMISSION_WINDOW, so only that window holds
share buffers at once and a conforming cycle peaks five times below this — 7.8 MiB against
39.1 MiB measured at the deployed dimensions — but a peer running anything else can drive every
polynomial to one share short of its threshold and hold the lot.
SsaPartBuilder::release_verification_state frees a buffer when its polynomial reconstructs; a
polynomial one share short never reconstructs.
Not free to the peer, which is why this is a capacity bound and not a security one: a share only reaches the Exit on a return SURB the Exit itself spends, so reaching this peak costs a full quota deposit per cycle. What it bounds is an Exit selling more service than its memory can hold.
Excludes the awaiting-acknowledgement buffer, which is bounded separately and globally by
max_ack_buffer_bytes — counting it here would
charge the same bytes twice.