Kademlia routing table and distance metric
By : Byung Joon Yoon
Date : March 29 2020, 07:55 AM
|
Adding new nodes to Kademlia, building Kademlia routing tables
By : Hiroshi Uyama
Date : March 29 2020, 07:55 AM
it helps some times I'm assuming you've read the Kademlia paper. Here's an excerpt from my article An Introduction to Kademlia DHT & How It WorksSome background information: code :
foreach(K-Buckets as KB)
1. NN generates a random NodeId `RNID` // A NodeId that will be in KB
2. NN sends LookupRequest(RNID) to the K-Closest nodes it knows to RNID.
3. The response will be K nodes closest to RNID.
4. NN now fills KB.
|
Kademlia XOR metric properties purposes
By : user2395278
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , I can only speak for Kademlia, maybe someone else can provide a more general answer. In the meantime... d(x,x) = 0 d(x,y) > 0, if x != y
|
Better understanding Kademlia's XOR Integer Metric
By : rahul
Date : March 29 2020, 07:55 AM
Hope that helps It's not correct because binary.Uvarint() can only decode numbers within 64 bits, and your rawBytes is 256 bits The "varint" encoding (as commented in https://golang.org/src/encoding/binary/varint.go) is basically not compatible with raw bytes. code :
func xorDistance(node string, otherNode string) *big.Int {
var rawBytes [32]byte
for i := 0; i < 32; i++ {
rawBytes[i] = node[i] ^ otherNode[i]
}
return big.NewInt(0).SetBytes(rawBytes[:])
}
|
Can XOR metric be used to implement DHT without Kademlia?
By : Jonathan Seitz
Date : March 29 2020, 07:55 AM
I wish did fix the issue. No. Without kademlia's routing table you would have no guarantee that any node's neighbor list would actually contain contacts that are closer to the target key and thus could help your query converge towards the target.
|