Skip to main content

keep_alive_surb_reserve

Function keep_alive_surb_reserve 

Source
fn keep_alive_surb_reserve(target: u64) -> u64
Expand description

SURBs the Exit keeps back from its data, so that its keep-alives can still be sent.

The Exit’s SURB-level reports and its distress signals each need a SURB, and nothing else the Exit sends is as important to the Entry: a report is how a balancer that cannot see the Exit’s stock learns it is running dry. One percent of the Entry’s buffer target, at least 32, keeps that many reports and distress signals sendable: at one report per surb_balance_notify_period (15 s in the node’s default configuration) that outlasts minutes of a total outage, long enough for the Entry to hear it and refill.

Never more than a quarter of the target, as for the PIX fill reserve (effective_surb_reserve): an Entry that asks for a buffer shallower than the floor must not find the Exit unable to send it anything at all.