Skip to content

RUST-BUG-187 - Advance Kad bootstrap candidates across retries #370

In progress

Description

@itlezy

Keep bounded maintenance bootstrap rounds and advance across configured and restored endpoints after failed rounds. Preserve explicit single-endpoint bootstrap and no-seed behavior. Prove that a healthy eleventh endpoint can be reached after ten silent endpoints, and cover exhaustion and a changed candidate list.

Compare behavior with stock eMule ac3d52e and amule-org aMule c5989ec4a. Use #164 for deterministic protocol evidence and #31 for same-revision interoperability.

Roadmap placement is Beta 3 Client gate.

Candidate lifecycle and wire proof

Rust 99d9111 reserves slices of ten candidates. The current test proves its index ranges, wrap, and a changed candidate count. It does not witness ten unanswered bootstrap requests, a successful reply from the eleventh endpoint, or the resulting self-lookup. Add that wire witness and cover replacement or reorder without a count change.

Stock ac3d52e and amule-org c5989ec4a consume their transient seed queue one candidate at a time and stop when it empties. The ordinary cadence is two seconds while the routing table is empty and fifteen seconds otherwise. Rust wraps the cursor and retries from the maintenance loop. Record that lifecycle difference separately from the shared goal of reaching later candidates. Bootstrap-only import semantics remain under #393.

Source anchors: Rust crates/emulebb-kad-dht/src/node/bootstrap.rs and crates/emulebb-core/src/lib.rs; stock and aMule Kademlia.cpp.

Eleventh-candidate loopback evidence

Rust PR #394 at commit 6b19a5d adds bootstrap_reaches_eleventh_candidate_and_looks_up_own_id in emulebb-kad-dht. The fixture observes a real UDP BootstrapReq at each of ten silent sockets and confirms the eleventh has no traffic in round one. The next call on the same node bootstraps from the eleventh socket. The response is followed by a FIND_NODE request for the Rust node's own Kad ID, addressed to the responding contact. The registered Windows package test passed all 149 tests.

This establishes the configured-list retry behavior on Rust loopback. The stock and aMule transient seed cadence described above remains a separate source comparison, and same-count candidate replacement or reorder remains an open test case.

Activity

  1. added
    bug
    rust
    beta3-blocker
    on Nov 25, 2026
  2. moved this from Todo to In Progress in eMuleBB Roadmapon Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    beta3-blockerbugrust

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions