Skip to content

Fix unreachable workers in pings collector NET-384 - #215

Merged
kalabukdima merged 2 commits into
mainfrom
address-cache
Aug 4, 2026
Merged

Fix unreachable workers in pings collector NET-384#215
kalabukdima merged 2 commits into
mainfrom
address-cache

Conversation

@kalabukdima

@kalabukdima kalabukdima commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Commit 292e67f introduced a regression. Pruning the existing cached addresses sometimes drops reachable ones, replacing them with unreachable ones.

The Identify response reports listen_addrs advertised by the peer. They may differ from the address the peer was actually dialed on (e.g., the worker manually overwrites the address through the config). In this case, the address from Identify replaces the correct address in both the cache and Kademlia local store. The peer is then not reachable for 20-100 minutes because no reachable addresses are stored for it.

In this PR:

  • Added a test showing the behaviour when Identify announces an incorrect address. The test fails before the fix.
  • Reverted 292e67f — multiple addresses in DHT are never a problem because they all are dialed simultaneously.

kalabukdima and others added 2 commits July 29, 2026 10:42
A peer's announced listen addrs replace both the Kademlia entry and the
address cache, discarding the address the live connection runs on. The
test stays red until both stores are fixed.

Part of NET-384

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Treating a peer's identify announcement as the authoritative is wrong
because sometime workers announce unreachable addresses

This reverts commit 292e67f.
@kalabukdima kalabukdima changed the title Address cache Fix unreachable workers in pings collector Aug 3, 2026
@kalabukdima kalabukdima changed the title Fix unreachable workers in pings collector Fix unreachable workers in pings collector NET-384 Aug 3, 2026
@kalabukdima
kalabukdima marked this pull request as ready for review August 3, 2026 05:45
@kalabukdima
kalabukdima requested a review from mo4islona August 3, 2026 05:45
@kalabukdima
kalabukdima merged commit d905db5 into main Aug 4, 2026
3 checks passed
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.

1 participant