some ideas on kadelima kbucket size #5444
Replies: 1 comment 4 replies
-
It seems that you are describing a peerstore rather than a DHT routing table. The promise of a DHT such as Kademlia is that each node keeps a state (routing table) of size Maintaining a larger state is expensive in terms of connections, because a node must periodically make sure that the peers in its buckets are responsive. So we don't want to increase the bucket size of farther buckets. From a routing perspective, all buckets must have the same size, which is a system wide parameter (e.g Ideally, a peerstore would complement the DHT routing table to store information about peers we were recently connected to. Peers in the peerstore require lower maintenance, and can be used easily by applications. The DHT routing table can never replace a peerstore in holding the discovered peers, once a bucket is full, it will discard any newly discovered peers matching this bucket. |
Beta Was this translation helpful? Give feedback.
-
The distance between local key and a remote key is determined by the difference in leading zeros of the XOR result. That means, for buckets that hold records farther and farther from local, their sizes need to get bigger and bigger, because for example a distance of 5 means a space for 2^4 different possible peers(records) and a distance of 50 means 2^49 different possible peers. And given that the records are stored in a vector instead of a tree, it will take longer for a more distant bucket to visit all records(to find a specific record). Simply increasing the bucket size won't solve the problem once and for all, as the network can get bigger and bigger to easily fill up the most distant bucket(imbalance between buckets).
Beta Was this translation helpful? Give feedback.
All reactions