Skip to content

Kademlia: intra-lookup RPC retransmit for loss-tolerant lookups#669

Merged
github-actions[bot] merged 1 commit into
mainfrom
claude/hopeful-keller-ujyp1l
Jul 23, 2026
Merged

Kademlia: intra-lookup RPC retransmit for loss-tolerant lookups#669
github-actions[bot] merged 1 commit into
mainfrom
claude/hopeful-keller-ujyp1l

Conversation

@kkd16

@kkd16 kkd16 commented Jul 23, 2026

Copy link
Copy Markdown
Owner

What

A follow-up to the Kademlia DHT lab (merged in #668) that lands a roadmap backlog item: intra-lookup RPC retransmit. A timed-out lookup probe is now retransmitted up to lookupRetries (=1) times before it is given up — Kademlia retransmits RPCs — and crucially without evicting the peer from the routing table (a dropped packet is not a dead node; k-bucket eviction still only happens when a direct liveness ping fails).

Why

Before this, only the eventually-refreshed routing tables tolerated packet loss; a single async lookup that happened to lose a reply could return an approximate k-closest. With one retransmit the initiator recovers from the drop and the lookup stays exact.

Effect (measured live on the deterministic kernel)

  • Lookups from one node under packet loss: 21/45 → 31/35 exact at 10% drop.
  • drop=0 stays a perfect 35/35 exact (retransmit never fires when nothing is lost, so no behaviour change on a clean network).
  • Self-test suite unchanged at 178/178; full verify-project gate green (scope + conformance + lint + build).

Scope

Three files, all under projects/quorum-distsys-k7r2/ (Golden Rule): types.ts (config + per-lookup retry counter), kademlia.ts (retransmit in the probe-timeout handler), and JOURNAL.md (checks the backlog item off and records the measured gain).

🤖 Generated with Claude Code

https://claude.ai/code/session_019XuHZAjE3TuggDG5k91gL6


Generated by Claude Code

A timed-out lookup probe is now retransmitted up to lookupRetries (=1)
times before it is given up, without evicting the peer from the routing
table (a dropped packet is not a dead node). This keeps a single async
lookup exact under packet loss, not just the eventually-refreshed
tables: measured live, lookups from one node went from 21/45 to 31/35
exact at 10% drop, with drop=0 staying a perfect 35/35. Checks off a
roadmap backlog item; suite stays 178/178; full gate green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XuHZAjE3TuggDG5k91gL6

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Scope + lint + build passed.

@github-actions
github-actions Bot merged commit 0290c97 into main Jul 23, 2026
2 checks passed
@github-actions
github-actions Bot deleted the claude/hopeful-keller-ujyp1l branch July 23, 2026 21:36
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.

2 participants