Routing

Primary Maintainer: Benjamin Bollen (benjamin.bollen@maidsafe.net)

Secondary Maintainer: Peter Jankuliak (peter.jankuliak@maidsafe.net)

Routing - a specialised storage DHT

|Crate|Linux/OS X|ARM (Linux)|Windows|Appveyor|Coverage|Issues| |:---:|:--------:|:---------:|:-----:|:------:|:------:|:----:| ||Build Status|Build Status|Build Status|Build status|Coverage Status|Stories in Ready|

| API Documentation - master branch | SAFE Network System Documention | MaidSafe website | Safe Community site | |:------:|:-------:|:-------:|:-------:|

Important notice on 6 August 2015

The routing library is undergoing an important rewriting. The external API and the internal outlines have been laid out. The library is currently not in a functional state. To obtain the last functional state of Routing we refer to Routing version 0.2.8, as published on crates.io. We expect it to be a few more days of work before routing will be published as version 0.3.2, the first expected functional version of the new routing API. The published version 0.3.0 should only be used by a user library to compile against, and prepare for the upcoming new interface.

update on 18 August: the functionality in routing has been restored and some unit tests have been updated and asserted. The basic behaviour of the routing example has been asserted in this version 0.3.2. Final internal work has to be done, and expected soon in version 0.3.3

Overview

A secured DHT, based on a kademlia-like implementation, but with some very stark differences. This is a recursive as opposed to iterative network, enabling easier NAT traversal and providing more efficient use of routers and larger networks. This also allows very fast reconfiguration of network changes, aleviating the requirement for a refresh algorithm. A recursive solution based on a network protocol layer that is 'connection oriented' also allows a close group to be aligned with security protocols.

This library makes use of Public-key cryptography to allow a mechanism to ensure nodes are well recognised and cryptographically secured. This pattern allows the creation of a DHT based PKI and this in turn allows a decentralised network to make use of groups as fixed in relation to any address. This is particularly useful in a continually fluid network as described here, creating a server-less and autonomous network.

This is a very under researched area. For a general introduction to some of the ideas behind the design related to XOR Space, watching The SAFE Network from First Principles series is recommended. The slides for XOR Distance Metric and Basic Routing lecture are also available here. The last video from the series on how the same ideas were applied to decentralised BitTorrent trackers is available here. A proper formalisation of the Routing algorithm is in progress.

Pre-requisite:

libsodium is a native dependency for sodiumxoide. Thus, install sodium by following the instructions here.

For windows, download and use the prebuilt mingw library. Extract and place the libsodium.a file in "bin\x86_64-pc-windows-gnu" for 64bit System, or "bin\i686-pc-windows-gnu" for a 32bit system.

Todo Items

General note: please document code you touch, and introduce property-based unit tests where applicable.

RUST-3 Sprint tasks

[0.3.0] Unified Data

Use public key for all messages

[0.3.1] Sentinel

Future sprints

Note 2015-06-22: below tasks will be affected by proposed RFC: Remove Transaction Managers (view draft)

Old tasks for reference