Last Active: Nov 02, 2019
Threads: 18
Posts: 58
Reputation:
0
Does anyone out there know how DHT actually works? How does it find other nodes without first contacting a server for a list of them? Does it scan ip ranges in search? Does anyone have any info on programming examples of this kind of thing?
Last Active: Mar 08, 2019
Threads: 415
Posts: 3,499
Reputation:
47
Probably someone knows how DHT works under the hood. That someone isn't me though.
Last Active: Sep 03, 2024
Threads: 226
Posts: 6,307
Reputation:
26
DHT - Distributed Hash Table - is a system to find torrent swarms/peers.
Index/tracker sites usually work as a catalog of torrents, their contents (in meta-files) and who has the actual data (the swarm). DHT doesn't need trackers, just a hash value; it's like a barcode for each torrent. A DHT router will point (announce) you to the swarm and from initial peers you can find others with that torrent.
TPB doesn't work with trackers anymore, it will send you only the hash code as a magnet link. As soon as you find peers, your client will ask (and receive) a copy of the meta-file, so you can see the torrent details: Name, folders, files inside, remarks, anything in standard BitTorrent protocol. Client will then try to connect to and download from peers.
https://en.wikipedia.org/wiki/Distributed_hash_table
https://stackoverflow.com/questions/1332...rk#1746896
https://stackoverflow.com/questions/1181...otstrapped
Last Active: Nov 02, 2019
Threads: 18
Posts: 58
Reputation:
0
Sep 19, 2018, 08:59 am
(This post was last modified: Sep 19, 2018, 09:01 am by ID10TError. Edited 1 time in total.)
Edit I started to reread the wiki writeup and it has changed. looks like more info now but i'm still searching through.
Thanks for the info but it fails to describe how the dht system goes about locating other nodes in the network unless its using some pre made list it downloads I dont see how it can find the other nodes without blindly searching ip ranges.
Last Active: Mar 08, 2019
Threads: 415
Posts: 3,499
Reputation:
47
(Sep 19, 2018, 08:59 am)ID10TError Wrote: Thanks for the info but it fails to describe how the dht system goes about locating other nodes in the network unless its using some pre made list it downloads I dont see how it can find the other nodes without blindly searching ip ranges.
I'm curious now too. Maybe someone will come along and explain it to us.
Last Active: Sep 03, 2024
Threads: 226
Posts: 6,307
Reputation:
26
As far I got in those articles, the DHT is made of "nodes" and "routers" which take care of the "announcing" part. So, even if trackerless, DHT has some kind of reference units to speed up requests. But the best info comes from The Source: BEP 5 and see also BEP 44.
Of course, one need to understand the very basics of BEP 3 / The BitTorrent Protocol.
http://www.bittorrent.org/beps/bep_0000.html <-- The Knowledge.
Last Active: Today
Threads: 67
Posts: 6,381
The short answer is that there are hard coded bootstrap nodes that your client uses to get on the DHT network.
But your client will also cache IPs and try those each time you start it up and it will query peers it finds from trackers and on current running torrents.
Last Active: Sep 03, 2024
Threads: 226
Posts: 6,307
Reputation:
26
Thanks Moe, that's impressive o,Ô
So, it's theoretically possible a client without connections (and updates) for a long time would never find DHT when plugged again.
Last Active: Today
Threads: 67
Posts: 6,381
Theoretically, but highly unlikely.
Last Active: Sep 03, 2024
Threads: 226
Posts: 6,307
Reputation:
26
Yep, it would be Torrent Armageddon in such case.
|