Questions tagged [kademlia]

Kademlia is a distributed hash table for p2p networks

Kademila is a distributed hash table for p2p networks. Kademlia works by using node lookups to specify the structure of a network and facilitate information exchange. It was developed in 2002 and the algorithm has been ported to many languages.

Resources

The original Kademlia paper by Petar Maymounkov and David Mazières

106 questions
0
votes
1 answer

How to find metadata in the dht while only having the Infohash?

So far I assumed a client would just search for peers in the dht and use bep 9 in order to get the metadata, however when trying it myself and opening Wireshark I couldn't find any usage of bep 9. Does the client automatically try trackers or…
raz
  • 29
  • 7
0
votes
2 answers

receiving unreadable text while trying to bencode a "find_node" query

Im using the bencodeNET trying to send a find_node query and receive an answer using a bootstrapping node. it seems like the request works well and I do get a response on wireshark and c#. the problem is when decoding (using bencoding ofc) I get…
raz
  • 29
  • 7
0
votes
1 answer

How does the routing table work in mainline dht?

Initially this was a different question. But the questions I ended up answering which gave me a good idea of how everything works were: How are buckets organized?- how does the range system work. How does the xor matrix works for distance? And how…
orraz1
  • 43
  • 5
0
votes
1 answer

DHT detection in local network

Are there any tools to detect DHT on a local network? Maybe Kademlia, Hyperswarm or some other library? The goal is not to block DHT (almost impossible), but to write a script or service that will notify if a DHT client is detected on the local…
0
votes
1 answer

Is it possible to compute an approximate size estimate of a kademlia network from a node's k-buckets?

Assuming that nodeids are evenly distributed, would it be possible to calculate an estimated number of nodes based on the k-bucket cache? The reason I want this is that I want to create a kademlia network based on mainline DHT with BEP42 added…
redfish64
  • 565
  • 3
  • 10
0
votes
0 answers

How exactly does ipfs cat method find and display contents of files using a CID by making use of DHT?

I have done a lot of research on the internet to learn how exactly ipfs cat and get methods work find and download files from other peers using a CID. I want to fully understand how this process works: "The cat method first searches your own node…
rasputin
  • 31
  • 5
0
votes
1 answer

Node Id generation in storj

How does NodeId generation in a storj kademlia node take place? Why does it take long time to generate a nodeid and how does this contribute to the security of the node?
j2thep
  • 1
  • 4
0
votes
0 answers

Kademlia DHT finding bucket index for a node

I am trying to implement a Kademlia distributed hash table in rust and I am wondering if there is a mistake with the way im implementing find_node_bucket_index in the routing table. Correct me if im wrong, but the way that I understood how nodes are…
Nawaf
  • 87
  • 1
  • 2
  • 6
0
votes
1 answer

Bucket splitting exception in Kademlia

In the section "Routing" in the original paper, the problem of the normal bucket splitting rule is described as follows: Every node with prefix 001 would have an empty k-bucket into which u should be inserted, yet u's bucket refresh would only…
kota-yata
  • 27
  • 7
0
votes
1 answer

What is the relation between a nodeId and a key in distributed hash tables?

My understanding of a distributed hash table is that every node can be identified uniquely by a nodeId and can store information, like host, port and values. Every node stores other nodeIds in (a) lookup table(s) and finding another node can be made…
Marlo
  • 207
  • 1
  • 4
  • 12
0
votes
2 answers

How can one find the value for a given a key in kademlia?

Kademlia has 4 RPC messages: ping store find_node find_value How does a Kademlia node find the value for a given key? Given an id, it is clear that it will take only $log(n)$ steps for a node in a network of size $n$ to find the node with that id.…
0
votes
0 answers

Python Kademlia DHT

I am very lost on this assignment. We are supposed to use kademlia to create 3 python files. The 2 files are nodes and then the third are a set a query the DHT application. We are also given a CSV file that we must import and and send the data to…
Jfudge33
  • 1
  • 1
0
votes
1 answer

Kadelmia lookup operation: how are conflicting values resolved?

The idea behind the lookup protocol is to find the k closest neighbors to the key and check if any of them has the value corresponding to the queried key. Paper: http://css.csail.mit.edu/6.824/2014/papers/kademlia.pdf My question is, could a…
nz_21
  • 6,140
  • 7
  • 34
  • 80
0
votes
1 answer

Find Node Operation in Kadelmia: why does it pick elements from bucket instead of looking through the entire routing table?

The first step of the find node operation is as follows (as described in the paper): The lookup initiator starts by picking α nodes from its closest non-empty k-bucket (or, if that bucket has fewer than α entries, it just takes the α closest nodes…
nz_21
  • 6,140
  • 7
  • 34
  • 80
0
votes
0 answers

How to implement Kademlia DHT

I'm trying to implement the Kademlia(binary tree) DHT in python. From what I understand the routing table needs to compare the individual bits from a root node's ID against a new entry. If the ID's bits do not match, you go left, if they match, you…