dht

In Kademlia, why is it recommended to have 160-bit node IDs and keys and not 128-bit?

南笙酒味 提交于 2021-01-28 02:06:01
问题 The Kademlia paper states that nodes are assigned random 160-bit IDs as well as the keys. Is this a strict restriction? Can I still go ahead and use a 128-bit keyspace if that's good enough from me? 回答1: The length was chosen because SHA1, used as hash function for the hash table keys, outputs 160bits and that was the most widely used hash function at the time. The routing algorithm itself does not require that specific length to work, all it needs is the key space being large enough to avoid

Send DHT queries to “router.bittorrent.com” response garbled text

时光毁灭记忆、已成空白 提交于 2020-01-30 09:02:16
问题 I read the DHT Protocol in bep_0005 page. But when I send a ping query or a find_node query, the server response a garbled text (both of router.bittorrent.com:6881 or dht.transmissionbt.com:6881 ) Here is the Java source code bellow public String ping(final String id) { System.out.println("Start ping:" + id); Bencode bencode = new Bencode(); byte[] encoded = bencode.encode(new HashMap<Object, Object>() { private static final long serialVersionUID = 4225164001818744013L; { put("t", "tr"); put(

How PEX protocol (Magnetic links) finds it first IP?

纵饮孤独 提交于 2020-01-09 04:22:30
问题 I'm trying to understand how can a magnetic link work, as I've read they use DHT and PEX to get the peers, but if I'm a new node in the network how can I find peers with only the hash of the file?! Doesn't it always require a link to a known host? Thanks 回答1: The bittorrent DHT can be bootstrapped in many ways. It just needs the IP and Port of any other reachable DHT node out there. Current clients generally use several of the following strategies: bootstrap from a cache of long-lived nodes

How does ThePirateBay know the number of seeders for its torrents?

点点圈 提交于 2020-01-02 09:59:41
问题 How do websites like ThePirateBay.org work? I heard that the age of trackers is pretty much over, so I guess they extract data from DHT. I wrote a simple DHT scraper, but it was pretty slow to query the servers - does TPB have its own DHT nodes they sniff on? Do they verify whether the peers actually have data? 回答1: I'm not staff on TPB (or any other torrent index site) and have no exact information how they do it, but my best guess is that they regulary fetch a full scrape from the (working)

Torrent DHT udp

99封情书 提交于 2020-01-01 08:51:15
问题 Im trying to get access to a Torrent DHT network, and im having a hard time figuring out howto get access to the "entry" node in DHT. How does a DHT in a Bittorent client get "bootstrapped"? Describes that a couple of standard entry nodes could be used router.bittorrent.com and router.utorrent.com running on port 6881 (UDP). AND http://www.bittorrent.org/beps/bep_0005.html describes the protocol on howto interact with a DHT server. But if i send a simple UDP message to router.utorrent.com

Torrent DHT udp

Deadly 提交于 2020-01-01 08:50:05
问题 Im trying to get access to a Torrent DHT network, and im having a hard time figuring out howto get access to the "entry" node in DHT. How does a DHT in a Bittorent client get "bootstrapped"? Describes that a couple of standard entry nodes could be used router.bittorrent.com and router.utorrent.com running on port 6881 (UDP). AND http://www.bittorrent.org/beps/bep_0005.html describes the protocol on howto interact with a DHT server. But if i send a simple UDP message to router.utorrent.com

Distributed Storage of BLOBs for .NET?

吃可爱长大的小学妹 提交于 2019-12-31 10:38:06
问题 I am looking for a reasonably well tested library+server to store a persistent distributed hash table. I am hesistant to use SQL-based solutions as the data is highly document oriented, consisting of millions of ~64KB blobs with only a single index (computed by hash of said BLOB) - and needs to be able to be distributed for long term scaling prospects. Due to expense and bandwidth considerations, external solutions such as S3 are not an option. Something like CouchDB or Project Voldemort

How to represent a kademlia routing table as data structure

南楼画角 提交于 2019-12-29 01:25:33
问题 The kademlia paper talks about the the organization of buckets, splitting, merging and finding the correct bucket to insert in abstract, concise and confusing terms. §2.2 talks about a fixed set of 160 buckets with each bucket covering a fixed subset of the keyspace. But later chapters involve additional splitting and buckets covering different parts of the keyspace. That don't fit well into a fixed list What is the correct way to organize buckets? Meta: Since the confusion is reflected in

How to interpret 'nodes' in a DHT response?

南楼画角 提交于 2019-12-25 07:46:32
问题 I'm reading through BEP-0005 and I don't really understand how the node IDs translate to (IP, port) pairs. Consider the following code: import bencode import random import socket import pprint # Generate a 160-bit (20-byte) random node ID. rand = lambda: ''.join([chr(random.randint(0, 255)) for _ in range(20)]) my_id = rand() get_peers = {"t": '0f', "y": "q", "q": "get_peers", "a": {"id": my_id, "info_hash": '\xd9\x9d\x14\x8c\xf7\xb5\xee' '\x84</\x806\xd6d\x13\xb3\xe3\x0f\x1b\xe7'} } get

Mainline DHT unspecified entry in bencoded dictionary

微笑、不失礼 提交于 2019-12-24 10:36:56
问题 I have found an entry in a bencoded dictionary in DHT traffic, generated by BitTorrent, which I do not understand, nor can find anything about in the DHT specification at http://bittorrent.org/beps/bep_0005.html. Example of packet query and response with wireshark: query = {"a":{"id":".=...4...R..%..s~..;"}, "q":"ping", "t":"..oo", "v":"UThK", "y":"q"} response = {"r":{"id":"..=..x......o....w/%"}, "t":"..oo", "v":"UT..", "y":"r"} full hex dump can be found here: http://pastebin.com/SMB4f8LR.