Expose Kademlia K_VALUE as a configurable parameter
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.6k
- Forks
- 1.3k
- Avg merge
- 8h 47m
- Merged PRs (30d)
- 19
Description
Description
The Kademlia implementation in rust-libp2p currently uses a fixed K_VALUE which is not configurable by users.
When running a closed network of ~100 nodes, I observe cases where peers are unable to reliably discover or locate each other, despite the network being transitively connected and all peers being reachable.
Motivation
K_VALUE is a core parameter that impacts routing table density and lookup convergence. A fixed value limits the ability to adapt Kademlia behavior to smaller or private networks. Exposing this parameter would allow tuning without changing the default behavior.
Current Implementation
K_VALUE is a const.
Are you planning to do it yourself in a pull request?
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Kademlia implementation and its fixed K_VALUE constant. Trace how Kademlia parameters are initialized, then define completion as allowing users to configure K_VALUE while preserving the current default behavior and improving tuning for private networks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100