DHT and Bittorent
#1
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?
Reply
#2
Probably someone knows how DHT works under the hood. That someone isn't me though.
Reply
#3
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
Reply
#4
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.
Reply
#5
(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.
Reply
#6
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.
Reply
#7
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.
Reply
#8
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.
Reply
#9
Theoretically, but highly unlikely.
Reply
#10
Yep, it would be Torrent Armageddon in such case.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  DHT/Magnet usage ktetch 6 21,137 Mar 27, 2015, 07:28 am
Last Post: NokTham



Users browsing this thread: 1 Guest(s)