Skip to content

Expose Kademlia K_VALUE as a configurable parameter #6247

@noamsp-starkware

Description

@noamsp-starkware

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions