Skip to content

chore(kad): stricter closest peer - #5688

Open
acud wants to merge 2 commits into
masterfrom
kademlia-closest-peer
Open

acud wants to merge 2 commits into
masterfrom
kademlia-closest-peer

Conversation

@acud

@acud acud commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Makes peer selection in forwarding to be stricter. This is due to some issues we've found in forwarding.

Open API Spec Version Changes (if applicable)

None

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@gacevicljubisa

gacevicljubisa commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Can we remove test skip in TestClosestPeer?

Follow-up: with the skip removed, TestClosestPeer passes on this branch, but it does not cover the bin > prox removal. If I put that early stop back, TestClosestPeer still passes, because all its peers are in bins 0-1. It only catches the reachability change.

One case would cover it: a peer in a bin deeper than PO(base, target), with the peers in that bin skipped.

@acud
acud force-pushed the kademlia-closest-peer branch from f6ffc5b to 30c26c4 Compare November 10, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants