SubverseIM / Subverse.NET

An example implementation of the Subverse Network written in C# .NET for Core v8.0+
https://subverse.network
The Unlicense
4 stars 1 forks source link

[SubverseV2] Implement Mainline DHT (Replace Alethic.Kademlia) #21

Closed SubverseIM closed 3 weeks ago

SubverseIM commented 1 month ago

As the title suggests, BitTorrent's Mainline DHT protocol stack should be implemented in order to advertise routes in a distributed manner.

Furthermore, the routing algorithm should be modified to be non-recursive, that is, complete in two steps:

  1. Whenever we receive a new AMS connection over TCP, Announce this peer as "interested" in our counterpart's PGP fingerprint (using it as the infohash)
  2. Whenever we receive a new message over an AMS connection, forward it directly to a connected peer (if possible)
  3. Otherwise, enumerate all possible TCP/IP routes to the intended destination(s) using GetPeers
  4. Foreach route, establish a new AMS connection over TCP, and forward a copy of the original message via this route if the connection was successful (decrement TTL)

Finally, SubverseV2 will be implemented as a homogenous network, i.e. all peers act as client and server simultaneously and actively participate in routing. It will no longer distinguish between "nodes" and "hubs"

SubverseIM commented 3 weeks ago

Closed as irrelevant