Reputation: 43
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 is the routing table organized?
Upvotes: 0
Views: 197
Reputation: 43
This is an idea of how I think this works: Routing table is composed of a binary tree composed of 1 and 0. A bucket range is composed of nodes with similar prefix, on a branch number composed of the amount of similar bits on the prefix that are similar. So for example branch 2 composed of 1-0 can have a bucket of (1011,1000,1011) and so on. using your own Id you can xor another nodes Id and the amount of 0's in the prefix will be the branch number and the prefix making the bucket range would be the same as your own node. When needing to insert a new node into a full bucket, if your id fits within the range you'll split the bucket. This way you'll have a routing table composed of nodes similar to you and a bit that don't. Also need to mention the deeper you go on the tree the closer you'll get to your id
Upvotes: 0