Skip to main content

Module backend

Module backend 

Source
Expand description

Padding backend based on maybenot.

§Operation

For each each circuit hop, we have an optional maybenot::Framework. This framework wraps multiple “padding machines”, each of which is a randomized state machine. (Arti is built with a list of pre-configured of padding machines. The set of padding machines to use with any given circuit hop are negotiated via PADDING_NEGOTIATE messages.) We interact with the framework via Framework::trigger_events, which consumes TriggerEvents and gives us TriggerActions. Those TriggerActions tell us to schedule or reschedule different timers, to block traffic, or to send padding.

We wrap the Framework in MaybenotPadder, which keeps track of the expiration time for each timer. From MaybenotPadder, we expose a single timer describing when the next action from the padding machine may be necessary. This timer is likely to update frequently.

Structs§

BlockingState 🔒
State of a MaybenotPadder that is blocking.
MachineState 🔒
The state for a single padding Machine within a Framework.
MaybenotPadder 🔒
An implementation of circuit padding using maybenot.
PadderState 🔒
Represents the state for all padding machines within a framework.
ThisThreadRng 🔒
Helper: An Rng object that calls rand::rng() to get the thread Rng.
Timer 🔒
Possible state of a Framework’s aggregate timer.

Enums§

ScheduledAction 🔒
An action that we should take on a machine’s behalf, after a certain interval has elapsed.

Traits§

PaddingBackend 🔒
Helper trait: Used to wrap a single MaybenotPadder.

Type Aliases§

Framework 🔒
The particular instantiated padding framework type that we use.
Rng 🔒
The Rng that we construct for our padding machines.
TriggerAction 🔒
A maybenot::TriggerAction as we construct it for use with our Frameworks.
TriggerEventsOutVec 🔒
A type we use to report events that we must trigger on the basis of triggering other events.