Mix
Purpose
One mixing step at a tumbler node — the heart of the transport, the act that breaks the link between
how cells arrive and how they leave. A cell reaches the node and is admitted to its Tumbler, held
with others; while the pen is still gathering its batch, nothing leaves — the cell simply waits. Once
the pen is ready, the whole batch leaves at once, reordered by the entropy so the release order
betrays nothing of the arrival order, each cell one hop shorter, each routed onward to a fresh peer the
entropy picks. Held-then-reordered-then-released, at node after node, is what decorrelates a sender's
cells from each other and from the sender: an observer watching one tumbler sees cells go in and a
shuffled batch come out, and can say nothing about which became which.
Role Players
- tumbler: Tumbler — the holding pen this node admits into and releases from
- entropy: Entropy — the randomness that reorders the batch and picks each onward peer
- wire: Wire — the floor seam each released cell is forwarded through
Props
- incoming cell: is a
Cellthat has just arrived at this node - onward peers: the
Peersa released cell may be forwarded to
Role Methods
tumbler
- released: provides the held
Cellsfor release paired with the emptiedTumbler— the batch leaves whole and the pen carries forward empty, one motion, so no cell can straggle out in arrival order. Result: the heldCellspaired with the emptiedTumbler
entropy
- reordered: given the batch
Cells, provides them in release order — an order that betrays nothing of the arrival order. Result: theCellsin release order - onwardPeer: given the candidates
Peers, picks the peer one released cell is forwarded toward. Result: the pickedPeer
wire
- forwarded: given the peer
Peerand the cellCell, forwards the cell — one hop spent — toward that peer. Result: None
Functionalities
mix
Admits the incoming cell to the tumbler. While the tumbler is not yet ready, it holds the cell and
forwards nothing — the cell waits. Once the tumbler is ready, it takes the released batch whole,
reorders it by the entropy, and forwards each cell — one hop spent — through the wire toward an
onward peer the entropy picks, leaving the pen emptied. It yields the next Tumbler either way,
so the node carries its holding forward to the next step.
Result: the next Tumbler
Scenarios
A cell below the threshold waits, and nothing leaves
Given: a Mix with a tumbler of threshold 3 already holding one cell, an entropy, a wire, an incoming Cell, and onward peers "peer-7"
When: mix is performed
Then: the next tumbler holds two cells, ready reports false, and the wire was handed nothing — the cell waits
A ready pen releases a reordered batch, each cell a hop shorter
Given: a Mix with a tumbler of threshold 2 already holding one cell with hops remaining 3, an entropy, a wire, an incoming Cell with hops remaining 3, and onward peers "peer-7" and "peer-8"
When: mix is performed
Then: the next tumbler holds nothing, and two cells are forwarded through the wire — each with hops remaining 2 — toward the onward peers, released together rather than in arrival order