fn successor_required_packets(target: u64, tolerated_loss: f64) -> u64Expand description
Returned packets the successor gate demands of an Exit whose boundary is target packets, at the
share loss tolerated_loss the negotiated split survives.
floor(max(0, μ − zσ)) for an Exit’s arrivals at exactly that loss, Binomial(target, 1 − L):
μ = target · (1 − L), σ = √(target · L · (1 − L)) and z SUCCESSOR_GATE_ARRIVAL_SIGMAS.
A split with no surplus tolerates no loss, so σ is zero and the whole target is demanded exactly.
A tolerance near one floors at one packet, not zero, for any non-zero target: the bound is at most
μ ≤ target, so one is never more than the boundary itself. Without it a tiny boundary under a
huge surplus (128 × (2 + 255): μ 10.8, σ 3.2) demands nothing, the near-miss wait never starts
on zero returned packets, and the successor is funded on the Entry’s own emission alone. An Exit
that has returned nothing since its first commitment has shown no service whatever split the Entry
chose. The cost is an honest Exit at the tolerated loss returning nothing with probability
L^target — 1.5 × 10⁻⁵ at 128 × (2 + 255), the order of the 4σ bound’s own 3 × 10⁻⁵ — and
it bites only at degenerate cycles of a few dozen packets (8 × (2 + 255): 0.59), where no
statistic means anything.
An f64 carries both terms to well under a packet below a watermark of 10⁹ cycles.