Peer
Purpose
A node on the mix network, named by the address the wire reaches it at — a tumbler that mixes cells, or an edge a recipient collects from. The transport layer routes cells between peers; what a peer is on the floor (a libp2p multiaddress, a host and port) is the bound wire's concern, so the mix layer holds only the opaque address it hands to the wire.
Attributes
- address: is
Textthat names where the wire reaches the peer, such as "peer-3"
Invariants
- The address is not empty.
Scenarios
A peer is its address
Given: the address "peer-3" When: a Peer is created Then: it is accepted and reads back with address "peer-3"
A peer without an address is rejected
Given: an empty address When: a Peer is created Then: the creation is rejected because the address is empty