Skip to content
Stephen Oliver edited this page Mar 30, 2017 · 1 revision

In Freenet routing, both Freenet Keys and nodes are assigned locations.

Locations are numbers between 0 inclusive and 1 exclusive.

Opennet and darknet have different ways of assigning locations to nodes, and making sure that the locations are a good fit for the network topology.

On opennet, node locations are chosen when the node is created, and then remain fixed. On darknet, locations can change as nodes swap locations with their peers. Such changes are logged to the file locations.log.txt.

Keys are assigned location based on either the hash of the data (for CHKs) or the hash of the document name and public key (SSKs, and by extension USKs and KSKs). The routing process ensures that data is stored on nodes whose locations are near the location of the key.

Locations are circular, so that the distance between location 0.99 and 0.01 is 0.02.

They can be thought of as angular positions around a circle, except specified on the range 0 to 1 instead of in degrees or radians; the distance between two locations is the smaller of the two angles between them. For the code-inclined, this is distance = min(abs(loc_a - loc_b), 1 - abs(loc_a - loc_b)).

The location swapping algorithm is proposed in a paper by Oskar Sandberg. Additional improvements are discussed in a paper by Vilhelm Verendel.

See also

Clone this wiki locally