Skip to main content

Module controller

Module controller 

Source

Structs§

ActivityEpoch đź”’
The instant the activity stamps of a BalancerStateValues count from: when it was made.
BalancerStateValues
Runtime state of the SurbBalancer.
ProducedHistory đź”’
This side’s produced count over the last REPORT_LAG, one sample per balancer update, so that a counterparty report can be read net of the production it cannot have seen yet.
SurbBalancer
Runs a continuous process that attempts to evaluate and regulate the flow of SURBs to the Session counterparty, to keep the number of SURBs locally or at the counterparty at a certain level.
SurbBalancerConfig
Configuration for the SurbBalancer.

Constants§

CAPACITY_PLATEAU_THRESHOLD đź”’
Consecutive non-rising reported levels (below target, no distress) before the counterparty’s store capacity is inferred. Small, but greater than one: a single flat sample is ordinary churn, and the cost of a false inference is under-supplying the counterparty, so the bar errs high.
REFILL_PACING_SECS
How long the refill that follows a wipe of the counterparty’s stock is paced for, at a rate of one fifth of the target per second (at least one keep-alive’s worth, never above max_surbs_per_sec; see pacing_cap), so the refill takes about as many seconds.
REPLY_STREAM_WINDOW
How recent the last reply must be, relative to the last data packet before the current run of unanswered data, for a silence to be a reply stream that stopped rather than a Session that gets no replies: one default notify period.
REPORT_LAG
How long a counterparty’s SURB level report is assumed to have been on its way: the production of this long before a report arrives is added to the level it carries.
SILENCE_SUSTAIN_AFTER
How long data can go out with nothing at all coming back before the Entry sustains the counterparty’s SURBs on its own: three seconds.