Skip to content

feat: start AutoNAT reachability probing - #345

Merged
adust09 merged 2 commits into
developfrom
feat/293-autonat-client-20261029-0105
Oct 30, 2026
Merged

adust09 merged 2 commits into
developfrom
feat/293-autonat-client-20261029-0105

Conversation

@adust09

@adust09 adust09 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Summary

Start a Switch-owned AutoNAT v1 client that periodically probes connected direct peers, aggregates dial-back reports into an observable NAT status, and stops cleanly with the Switch. Probe timing, peer throttling, request timeouts, and peer-count bounds use go-libp2p-compatible defaults and remain configurable for tests.

Spec reference

Testing

  • cabal test hs-libp2p-test --test-show-details=direct (1475 examples)
  • Real-TCP tests cover public/private/unknown aggregation, no-peer behavior, peer throttling, and cancellation of an in-flight probe during switchClose.

Closes #293

Run bounded periodic AutoNAT v1 probes against connected peers so nodes retain an observable reachability status. Tie the worker to Switch shutdown and expose configurable go-libp2p-compatible scheduling for deterministic tests.
@github-actions github-actions Bot added the enhancement New feature or request label Oct 29, 2026
Prefer never-probed and least-recently-probed connected peers so a bounded probe cycle cannot starve later connections. Ensure each opened probe stream is closed even when negotiation fails or times out.
@adust09
adust09 merged commit 1dcb384 into develop Oct 30, 2026
4 checks passed
@adust09
adust09 deleted the feat/293-autonat-client-20261029-0105 branch October 30, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

autonat: client reachability probing is never started

1 participant