feat(kad_dht): implement grid topology with 256-bucket Kademlia DHT - #1292
feat(kad_dht): implement grid topology with 256-bucket Kademlia DHT#1292asmit27rai wants to merge 20 commits into
Conversation
…outing table taking reference with cpp-libp2p
|
@seetadev Please have a look and share your feedback. |
|
@asmit27rai : Neat progress. Please resolve the CI/CD issues. CCing @sumanjeet0012 on the thread. |
|
|
sumanjeet0012
left a comment
There was a problem hiding this comment.
@asmit27rai, could you please provide an example file demonstrating how to run the Kademlia DHT with a grid routing table? This will help us test it by executing the example.
| @@ -0,0 +1,206 @@ | |||
| """ | |||
| Example: Using Grid Topology Routing Table | |||
There was a problem hiding this comment.
Examples should be placed in https://github.com/libp2p/py-libp2p/tree/main/examples/kademlia
|
|
||
| ideal_connections_num: int = 100 | ||
|
|
||
| max_connections_num: int = 1000 |
There was a problem hiding this comment.
Why the max_connections_num ( configuration related to advanced connection management ) present here.
|
|
||
| value_lookups_quorum: int = 0 | ||
|
|
||
| floodsub_forward_mode: bool = False |
There was a problem hiding this comment.
This is related to pubsub, what's the use of floodsub_forward_mode here ?
| protocol_id: str = "/ipfs/kad/1.0.0" | ||
|
|
||
| passive_mode: bool = False | ||
|
|
There was a problem hiding this comment.
We are not using most of the configurations in our project. Should we simplify and clean up the configuration by keeping only the entries that are actually in use?
|
@sumanjeet0012 Addressed your review. |
|
Implementing a grid-topology routing table for the Kademlia DHT is a valuable contribution and has the potential to improve the routing layer. However, after reviewing the current implementation, I identified several significant issues with the proposed grid-topology k-bucket design that should be addressed before it can be considered for merging. The issues are:
@asmit27rai Once you address these issues, Kindly create an example which uses the new routing table and try to demonstrate the working of the same using the public APIs of Kademlia DHT. |
Signed-off-by: asmit27rai <raiasmit10@gmail.com>
|
@sumanjeet0012 Addressed the comment. |
This PR implements a complete Grid Topology for the Kademlia DHT routing
table in py-libp2p, following the cpp-libp2p specification. The implementation
provides a fixed 256-bucket binary tree structure organized by XOR distance
metrics for efficient peer discovery and management in distributed networks.
Fixes: ##1293