Skip to content

docs(adr): per-IP rate-limit rows say relay-only connections skip the layer - #2579

Merged
yigitdot merged 2 commits into
mainfrom
claude/amazing-kowalevski-5aa7e6
Oct 21, 2026
Merged

yigitdot merged 2 commits into
mainfrom
claude/amazing-kowalevski-5aa7e6

Conversation

@yigitdot

@yigitdot yigitdot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

ADR 005 § Probe rate limiting and the ADR 022 rate-limit table described the per-IP layer as keying every connection, including "after iroh-relay unwrapping". The code does no unwrapping: rate_limit::peer_ip returns None for relay-only connections and RateLimiter::try_admit_one skips layer 2 for them, keying direct-path IPs masked to /64 for IPv6. Both Per-IP rows and both "Why three layers" paragraphs now state that behavior, including that a relay peer that rotates NodeId meets only the global cap.

The same unqualified per-IP claim is also fixed where it repeats:

  • ADR 005: the Sybil sentence in § Hold budget and the "one token from each bucket" line.
  • ADR 022: the "one token from each bucket" line.
  • ADR 003 § Probe fishing.
  • appendix-observability: the probe per-IP and global rate-limit metric descriptions.

The design question of whether to keep, cut, or reshape these layers stays open in #2505.

Closes #2504

🤖 Generated with Claude Code

… layer

ADR 005 and ADR 022 described the per-IP layer as keying every
connection, including "after iroh-relay unwrapping". The code does no
unwrapping: rate_limit::peer_ip returns None for relay-only connections
and RateLimiter::try_admit_one skips layer 2 for them, keying
direct-path IPs masked to /64 for IPv6. Both Per-IP rows and both "Why
three layers" paragraphs now state that behavior.

Closes #2504

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 14:44

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

…only binding layer

The per-IP rows said the per-peer and global layers still bound a
relay-only connection, but per-peer does not bind a relay peer that
rotates NodeId; only the global cap does. ADR 005 (Sybil hold-budget
sentence, token accounting), ADR 022 (token accounting), ADR 003 Probe
fishing and the probe rate-limit metric descriptions repeated the
unqualified per-IP claim. Each now scopes the per-IP layer to
direct-path connections.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@yigitdot
yigitdot merged commit 3ade425 into main Oct 21, 2026
32 checks passed
@yigitdot
yigitdot deleted the claude/amazing-kowalevski-5aa7e6 branch October 21, 2026 15:07
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.

docs(adr): ADR 005/022 per-IP rate-limit rows claim relay unwrapping the code does not do

2 participants