Skip to main content

Module manager

Module manager 

Source

Structsยง

AbortOnDrop ๐Ÿ”’
Aborts the wrapped task when dropped, which neither a join handle nor an [AbortHandle] does on its own drop. Built through From from any [Abortable].
ClaimedPublication ๐Ÿ”’
A member taken out of OwedPublications by whoever is publishing it.
CycleBudgetReservation ๐Ÿ”’
One Sessionโ€™s reservation against the nodeโ€™s live reconstructor-cycle budget.
DegradedSwitch ๐Ÿ”’
What the Exitโ€™s loss driver last told the notification stream, so that it acts only when the answer changes.
EffectivePixAdmission ๐Ÿ”’
The PIX terms a single incoming Session is admitted on.
EntryAnnouncement ๐Ÿ”’
What spawn_exit_keep_alive takes from the Entryโ€™s Session request.
IncomingSessionPixConfig
Configuration of the PIX protocol for incoming Sessions on Exit nodes.
OwedPublications ๐Ÿ”’
The members of the batch last staged that are still owed their publication, and the ones that have had it.
ParkedSurbRefund ๐Ÿ”’
The SURB refund of a packet parked at the PIX egress gate, given back unless the gate admits the packet.
PendingOutgoingGuard ๐Ÿ”’
Removes an outgoing Sessionโ€™s pseudonym from the managerโ€™s pending index when dropped.
PendingOutgoingToken ๐Ÿ”’
Per-claim token distinguishing one initiationโ€™s marker from another attemptโ€™s under the same pseudonym.
PixFillControl ๐Ÿ”’
The Exitโ€™s control over the single Exit โ†’ Entry keep-alive stream a Session runs.
PixFillState ๐Ÿ”’
PixToolbox
PIX protocol toolbox to enable SessionManager to use PIX protocol.
SessionManager
Manages lifecycles of Sessions.
SessionManagerConfig
Configuration for the SessionManager.
SessionSlot ๐Ÿ”’
SessionSlotGuard ๐Ÿ”’
RAII guard that rolls back a freshly inserted SessionSlot unless the session setup is explicitly committed.
SessionSsaState ๐Ÿ”’
The PIX dimensions this Session negotiated, on the Exit side.
SurbReserveBasis ๐Ÿ”’
What one Sessionโ€™s fill reserve is derived from (see effective_surb_reserve).
SurbsStored ๐Ÿ”’
What an incoming packet did to the SURB store, as the packet pipeline reported it.

Enumsยง

DispatchResult
Indicates the result of processing a message.
DropReason
Why an inbound packet was dropped without being delivered.
ResendDecision ๐Ÿ”’
What the action driver does with a SessionPixAction::ResendSsaRequest.
SessionHandles ๐Ÿ”’
Handles to streams and tasks spawned by the Session.
SsaRefusal ๐Ÿ”’
Why handle_ssa_request dropped a request without committing to it, short of refusing the Session.

Constantsยง

DEFAULT_MAX_SSAS_PER_SSA_REQUEST
Default for SessionManagerConfig::max_ssas_per_ssa_request โ€” how many SSA commitments an Entry accepts in a single [SsaServerCommitmentMessage].
DEFAULT_SSAS_PER_SSA_REQUEST
Default for SupervisorConfig::ssas_per_request โ€” how many SSAs an Exit may ask for in a single [SsaServerCommitmentMessage]. It is the maximum in dynamic mode and the exact batch in fixed mode.
DEPOSIT_DATA_REQUEST_TIMEOUT
How long an Exit waits for the deposit pool to answer a DepositDataRequest before sending the batch without what has not arrived.
EXTERNAL_SEND_TIMEOUT ๐Ÿ”’
Timeout when sending Start protocol messages to the sink
FULL_QUEUE_WARN_INTERVAL ๐Ÿ”’
How many drops of a full queue may pass between two warn! lines.
IDLE_NOTIFY_PERIODS_PER_IDLE_TIMEOUT ๐Ÿ”’
How many idle reports fit into the Entryโ€™s slot idle timeout at the longest backoff.
IDLE_REPORTS_AT_BASE ๐Ÿ”’
Idle reports sent at the base period before backing off: the first idle minute at 15 s.
INITIATION_OPTIONS_SHIFT ๐Ÿ”’
Bit position of the 64-bit options word within StartInitiation::additional_data.
MAX_ASSUMED_SESSION_PACKET_RATE
Fastest return-path rate a Session is assumed to sustain, in packets per second.
MAX_CONCURRENT_START_SESSIONS ๐Ÿ”’
StartSession handlers allowed in hand at once.
MAX_OVERLAPPING_BATCHES
SSA batches whose reconstructor state can be live on the Exit at the same moment.
MAX_SSA_BATCH_SIZE
Hard ceiling on both SSA batch-size knobs, whatever the configuration says.
MIN_CHALLENGE ๐Ÿ”’
The first challenge value used in Start protocol to initiate a session.
MIN_COMMITMENTS_PER_SSA_COMMIT_MSG ๐Ÿ”’
Conservative lower bound on how many coefficient commitments fit into one SsaCommit message.
MIN_FRAME_TIMEOUT ๐Ÿ”’
Minimum timeout until an unfinished frame is discarded.
MIN_SURB_BUFFER_DURATION
Minimum time the SURB buffer must endure if no SURBs are being produced.
MIN_SURB_BUFFER_NOTIFICATION_PERIOD
Minimum time between SURB buffer notifications to the Entry.
NO_ANNOUNCEMENT ๐Ÿ”’
Stands for โ€œthe Entry has announced no targetโ€ in PixFillControlโ€™s record of the last one.
SESSION_READINESS_TIMEOUT ๐Ÿ”’
Maximum time to wait for counterparty to receive the target number of SURBs.
SSA_REPEAT_RESEND_GRACE ๐Ÿ”’
How long after a batchโ€™s commitments last went out the Entry takes a repeat of its request to mean that they were lost on the way, rather than that the repeat crossed them.
SSA_SUCCESSOR_SERVICE_POLL ๐Ÿ”’
How often SSA_SUCCESSOR_SERVICE_WAIT re-reads the returned-packet count.
SSA_SUCCESSOR_SERVICE_WAIT ๐Ÿ”’
How long the Entry holds a near-miss SsaRequest while the Exitโ€™s returned data catches up to the successor boundary.
START_PROTOCOL_CHANNEL_RESERVE ๐Ÿ”’
Slack added on top of the PIX commitment burst to cover non-PIX Start protocol traffic (session initiations, establishments, errors, keep-alives).
START_SESSION_ADMISSION_CONCURRENCY
Concurrent session-server admission waits, held below the lane size so a slow server refuses with Busy instead of parking every handler.
START_SESSION_LANE_DEPTH_FACTOR ๐Ÿ”’
How many queued StartSessions may wait per handler.
SUCCESSOR_GATE_ARRIVAL_SIGMAS ๐Ÿ”’
Standard deviations below an honest Exitโ€™s expected returned packets at which the successor gate sets its bar โ€” see successor_required_packets.
SURB_DARK_NOTIFY_PERIOD ๐Ÿ”’
How often the Exit reports its SURB level while its frames stall: while the forward path is dark.
SURB_DEGRADED_HOLD ๐Ÿ”’
How long a frame loss keeps the Exitโ€™s notification at its degraded period.
SURB_DEGRADED_POLL ๐Ÿ”’
How often the Exitโ€™s loss driver re-reads the Sessionโ€™s forward path.
SURB_DEGRADED_STALL ๐Ÿ”’
How long the Exitโ€™s frames have to stall before the forward path counts as degraded without a loss yet.
SURB_RESERVE_POLL ๐Ÿ”’
How often a data packet held back for the keep-alive reserve looks at the SURB estimate again.

Functionsยง

account_incoming_surbs ๐Ÿ”’
Books an incoming packetโ€™s SURBs into the Exitโ€™s flow estimator.
acquire_egress_permit ๐Ÿ”’
Passes one outgoing data packet through a Sessionโ€™s PIX egress gate, if it has one.
announced_idle_timeout ๐Ÿ”’
The idle timeout the Entry announced in additional_data, or None if it announced none.
answer_while_draining ๐Ÿ”’
How a close is answered for a Session whose SURB buffer is already draining.
backed_off_notify_period ๐Ÿ”’
The report period after idle_reports idle reports: base for the first IDLE_REPORTS_AT_BASE, then doubling up to cap. At 15 s and 60 s the gaps run 15, 15, 15, 30, 60, 60, โ€ฆ
book_start_message_surbs ๐Ÿ”’
Books what a Start-protocol packet did to an incoming Sessionโ€™s SURB store: the SURBs it carried and the ones the store lost to it. A no-op for an outgoing Session, whose counterparty stores no SURBs of ours.
cap_organic_surbs ๐Ÿ”’
Caps how many SURBs an outgoing Session data packet may carry, per the SURB balancer.
close_session ๐Ÿ”’
Closes an established Session.
commit_slot_guard ๐Ÿ”’
Commits guard, admitting session_id into the SURB store for capacity SURBs.
count_exit_control_send ๐Ÿ”’
Counts a sendโ€™s outcome in hopr_exit_control_packets_total, passing the result through.
count_return_packet_surb ๐Ÿ”’
Counts the SURB a return packet will take as consumed in estimator, and attaches the refund that gives it back.
current_keep_alive_surb_reserve ๐Ÿ”’
The keep-alive reserve of a Session whose Entry currently asks for the target balancer holds.
cycle_budget_for
What a PIX Session at these dimensions costs the nodeโ€™s live-cycle budget.
decode_pix_offer ๐Ÿ”’
Decodes the incentivization the Entry offered, before anyone is asked what to do about it.
defer_admission_retire ๐Ÿ”’
Retires pseudonym on behalf of token, after a grace derived from the pipelineโ€™s SURB-resolution window (see surb_retire_grace), when a runtime is running.
effective_surb_reserve ๐Ÿ”’
The SURB reserve one Sessionโ€™s fill actually respects.
exit_data_egress ๐Ÿ”’
The Exitโ€™s data egress for a rate-controlled Session: holds each packet back while the SURB stock is down to the keep-alive reserve of the target balancer holds (once the Entry refills it, see hold_for_surb_reserve), books the SURB it consumes, and passes it through the PIX egress gate.
exit_forward_path_is_degraded ๐Ÿ”’
Whether the Exit should report its SURB level faster than its normal period.
forget_request_of ๐Ÿ”’
Forgets last_request when retired is one of its members.
has_announced_surb_target ๐Ÿ”’
Whether the Exit holds a SURB target the Entry announced for this Session.
hold_for_surb_reserve ๐Ÿ”’
Holds an outgoing data packet back while the Exitโ€™s SURB stock is down to its keep-alive reserve (see current_keep_alive_surb_reserve).
initiation_cache_ttl ๐Ÿ”’
TTL of the pending-initiation caches: the longest initiation_wait plus the time the StartSession send may take before that wait starts.
initiation_options ๐Ÿ”’
Inverse of into_initiation_additional_data for the options word, ignoring the least significant half.
initiation_timeout_max_one_way ๐Ÿ”’
initiation_wait ๐Ÿ”’
How long new_session waits for the answer to a StartSession over the given hop counts.
into_initiation_additional_data ๐Ÿ”’
Packs the 64-bit options word into the most significant half of StartInitiation::additional_data, and the Entryโ€™s idle timeout into its lowest 32 bits.
is_full_queue_warn_due ๐Ÿ”’
Whether the drop that saw drops_so_far prior full-queue drops is the one that logs.
keep_alive_surb_reserve ๐Ÿ”’
SURBs the Exit keeps back from its data, so that its keep-alives can still be sent.
max_cycle_budget_for_quota
The largest reservation any offer inside a quota_range ending at quota_bytes can produce.
note_exit_data_activity ๐Ÿ”’
Tells the Exitโ€™s keep-alive stream, if it runs one, that application data moved.
publication_cut_short ๐Ÿ”’
Puts a claimed member back after its publication failed, and reports the cut.
publish_commitment ๐Ÿ”’
Puts one cycleโ€™s commitment burst on the wire and, only once all of it is out, announces its deposit address.
release_session_slot ๐Ÿ”’
Tears down a Session slot: stops its tasks and returns what it holds.
report_start_result ๐Ÿ”’
Shared result handling for both Start lanes.
republish_commitments ๐Ÿ”’
Sends the whole burst of each of members again, rebuilt from the material the generator retains, and announces nothing.
resend_payload ๐Ÿ”’
Decides whether ssa_ids can be re-sent, and with what.
resume_publication ๐Ÿ”’
Finishes publishing the batch an interrupted publication left behind, member by member in ascending order, stopping at the first transport failure.
send_via_msg_sender ๐Ÿ”’
session_config ๐Ÿ”’
session_config_with ๐Ÿ”’
As session_config, with the initiating sessionโ€™s own head-of-line bound.
session_idle_notify_cap ๐Ÿ”’
The longest idle report period for one Exit Session.
start_control_channel_capacity ๐Ÿ”’
Capacity of the control Start protocol lane (every variant but StartSession).
start_session_channel_capacity ๐Ÿ”’
Capacity of the StartSession lane.
successor_required_packets ๐Ÿ”’
Returned packets the successor gate demands of an Exit whose boundary is target packets, at the share loss tolerated_loss the negotiated split survives.
surb_retire_grace ๐Ÿ”’
How long a teardown waits before retiring its Sessionโ€™s pseudonym from the SURB storeโ€™s admitted class.
validate_incoming_session_pix_config
Validates the incoming-PIX invariants that span quota, supervision and memory settings.

Type Aliasesยง

AdmissionCell ๐Ÿ”’
The admission-token cell a SessionSlot shares with the SessionSlotGuard that allocated it.
BoxSink ๐Ÿ”’
CommitmentBurst ๐Ÿ”’
The messages of one cycleโ€™s client commitment, as [SsaClientCommitmentMessage::new_multiple] splits it.
EgressItem ๐Ÿ”’
One outgoing data packet on its way to the wire.
EgressPermit ๐Ÿ”’
The result of asking the PIX egress gate for permission to send one packet.
LastSsaRequest ๐Ÿ”’
The batch most recently put on the wire by the PIX action driver, with the message that carried it.
SessionInitiationCache ๐Ÿ”’
SessionNotifiers ๐Ÿ”’
StartMessage ๐Ÿ”’
StartProtocolMsgSink ๐Ÿ”’