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

Kademlia The relationship between distance and height of the smallest subtree

I was looking at Kademlia's paper, and I had a problem I couldn't understand. In a fully-populated binary tree of 160-bit IDs, the magnitude of the distance between two IDs is the height of the smallest subtree containing them both. d(101,010) = 5…
kingmeng
  • 43
  • 6
0
votes
1 answer

Kademlia DHT: Consequences of duplicate Node IDs (GUID - Sybil)

In Kademlia and other DHTs, each node should be uniquely identifiable, yet nothing inherently enforces the random creation of an ID. Thus my question: What would be the consequence of a new (adversarial) peer joining the network with an existing…
Marcellvs
  • 391
  • 1
  • 3
  • 15
0
votes
2 answers

Mainline DHT: why hash in ping is different than hash in find_node?

I am working with Mainline DHT implementation. And I saw strange behaviour. Let’s say I know node IP and port: 1.1.1.1:7777. I send "find_node" request to him with my own node hash as a target. I get 8 nodes from him, let’s say the first one hash…
Latk12
  • 15
  • 2
0
votes
1 answer

How to estimate the number of nodes between the current node and some other node in Kademlia?

In Kademlia, all (key, value) pairs stored by the node, aside from the ones that were originally published by the current node itself, have an expiration time based on where the current node is located in relation to the key. If the current node is…
Hot Coffee
  • 3
  • 1
  • 1
  • 5
0
votes
1 answer

BitTorrent, DHT, BEP42, Calculating my NodeId

I'm trying to calculate NodeId's according that are compliant with BEP42 I'm not clever enough to understand the example code given in BEP42 However the algorithm for creating nodeId's is given as : crc32c((ip & 0x030f3fff) | (r << 29)) There is…
Richard
  • 1,070
  • 9
  • 22
0
votes
1 answer

Routing Table in Kadmelia K-Bucket algorithm without looping over each bit in the Node ID

Context I'm trying to implement Kadmelia's K-Bucket algorithm to keep track of closer nodes. I understand in theory how the algorithm works When a new node is added If the bucket size hasn't exceeded k (bucket size) we add it to the current…
Sid
  • 6,134
  • 9
  • 34
  • 57
0
votes
1 answer

P2P Network Bootstrapping

For P2P networks, I know that some networks have initial bootstrap nodes. However, one would assume that with all new nodes learning of peers from said bootstrap nodes, the network would have difficulty adding new peers and would end up with many…
Lev Knoblock
  • 611
  • 2
  • 6
  • 20
0
votes
1 answer

Java P2P Networking

I was looking at a few implementations on GitHub of Kademlia in Java, but I haven't found anything that works without manually port forwarding the routers on which the items are (whether through hole punching or UPnP) and is still actively updated.…
Lev Knoblock
  • 611
  • 2
  • 6
  • 20
0
votes
1 answer

Changing Kademlia Metric - Unidirectional Property Importance

Kademlia uses XOR metric. Among other things, this has so called "unidirectional" property (= for any given point x and distance e>0, there is exactly one point y such that d(x,y)=e). First question is a general question: Is this property of the…
Wapac
  • 4,058
  • 2
  • 20
  • 33
0
votes
1 answer

How to use DHT library dht-example.c for distributed hash tables

I want to use BitTorrent DHT library as distributed hash tables from within a C program. Therefore I downloaded and compiled it on my machine - worked flawless. Now I have an executable dht-example which outputs: Usage: dht-example [-q] [-4] [-6]…
Achim
  • 442
  • 1
  • 3
  • 13
0
votes
1 answer

Where to send DHT announce to?

Writing another DHT-ready torrent client I run into a question regarding announcing on DHT. It is clear that I have to sent get_peers to the nodes closer and closer to the searched info hash until at least one node respond with a list of peers…
Alex
  • 655
  • 1
  • 8
  • 16
0
votes
3 answers

Explaining NAT Tranversal C++?

I have created an P2P application which is FULLY decentralized and is using a Kademlia algorithm to make it so. This has been tested on the local network and it completely successful. I heard about UDP Hole Punching, however hole punching requires…
user3858657
0
votes
1 answer

Effiencient Kademlia Buckets

I'm writing a modificted Kademlia P2P system here but the problem I'm describing here is very similar to the implementation of the original one. So, what's the most efficient way of implementing k-Buckets? What matters for me are access time,…
Marcel
  • 245
  • 4
  • 9
0
votes
1 answer

Kademlia implementation in c++

I am looking for full kademlia DHT Implementation in c++? I have tried bitdht which is not ver well documented and it is not even fully implemented. Also maidsafe-dht is too complex. Can any one refer to any other implementations except for the ones…
-1
votes
1 answer

Can two nodes exchange messages directly?

I'm doing some research on Kademlia based decentralized networks. After bootstrapping a new node, instead of broadcasting messages to the nearest nodes, can a message be sent to a specific node identified by its ID? (Even if that means to relay the…