-
Notifications
You must be signed in to change notification settings - Fork 6
DHT
David Gerber edited this page Aug 24, 2022
·
3 revisions
Here are some information about the DHT used by Retroshare and Xeres:
- http://www.bittorrent.org/beps/bep_0005.html
- https://en.wikipedia.org/wiki/Kademlia
- https://en.wikipedia.org/wiki/Mainline_DHT
Retroshare uses the DHT almost like a Bittorrent client, except there's no torrent to download. Please note that it doesn't use it in a "parasitic" kind of way because it directly participates in the DHT's inner working (storing keys, answering queries) and in doing so, helps maintain it.
The Node ID is not random but is the SHA1 hash of:
-
"RS_VERSION_0.5.1"
(including null terminator!) - the Location ID (aka SSLID, aka Node ID), which is a 16-bytes identifier
There's no announcement (announce_peer
) by the client, which means the IP is not stored in the DHT. The clients find each others by doing a find_node
request using the target node ID that they already know. Once they reach the node itself or a close node, they'll get its IP.