libp2p / go-libp2p-kad-dht

A Kademlia DHT implementation on go-libp2p
https://github.com/libp2p/specs/tree/master/kad-dht
MIT License
526 stars 226 forks source link

XOR-trie based routing table #572

Open petar opened 4 years ago

petar commented 4 years ago

Implement RT using XOR tries (from github.com/libp2p/go-libp2p-xor). Wins:

aarshkshah1992 commented 4 years ago

@petar Please do post some slides explaining this when you get the time.

aarshkshah1992 commented 4 years ago

Here's a comment by @Stebalien explaining how to visualize a Routing Table as a binary Tree for a given local node. Use the image from Kad paper(though it visualizes the whole network and not the Routing Table for a peer, but the idea is the same) for reference.

"As far as i know, It will be a binary tree based on the xor distance between the local peer and arbitrary target keys. The local peer will be all the way on the left at 000000... Then, starting from the root, traversing down to the left towards the local peer, each branch to the right will represent a bucket. The peers on the first branch will have no bits in common, the peers on the second branch will have one bit in common, etc."

Screenshot 2020-04-09 at 12 48 29 PM
petar commented 4 years ago

Here's some slides, mostly saying the same thing: https://docs.google.com/presentation/d/1CN4hh2TtmK8YZN0i3iCtbor3fnnixdz9Cw0wASh6HVw/edit?usp=sharing

aarshkshah1992 commented 4 years ago

@Stebalien What's the priority of this ?

Would it be fair to say that Accelerated Lookups depends on this ?

Stebalien commented 4 years ago

Yes, accelerated lookups depends on this.