Location swapping
Location swapping is used on darknets in order to make the network routable. Freenet is based on locally greedy routing toward the correct location, with an underlying small world network. On opennet, the connection selection algorithm creates connections between nodes that match the already selected node locations; on darknet, node locations are selected to match the existing topology.When created, a darknet node selects a location to occupy (much like an opennet node). Nodes then send out and answer swap requests. Similar to the locally greedy strategies used for routing and opennet connection creation, each node tries to swap locations with other nodes such that it has a location that is optimal relative to the location of its peers. Note that nodes swap locations not only with their peers, but also with nodes more distant to them.
Nodes operating in hybrid mode (darknet and opennet) will also swap locations. (verify!)
The current swapping protocol is secured by a commit / reveal strategy; however, this is not sufficient to prevent all attacks against the swapping algorithm. (more details needed)
See also
SneakernetDistributed Routing in Small World Networks by Oskar Sandberg (the basis for Freenet's location swapping algorithm)