You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Per-IP and per-source rate layers are free to bypass via relay-only connections #2505
peer_ip returns None when the connection has only a relay path. An attacker who dials through the node's home relay with no direct address carries no source key. NodeIds cost nothing, so the per-peer layer does not bind them either. On a relay-only path, only the global layer applies.
The ADRs justify these layers by saying "IP rotation requires money" (ADR 005 § Probe rate limiting, ADR 022). That is true for direct paths. For an attacker who chooses the relay, it is free.
Open question
Run the per-IP / per-source layers through the spec-discipline gates. Gate 2 (attacker binding) is the main one.
For keeping them: they still limit floods from direct IPs. A direct path is the default, and it is cheaper for the attacker than relayed bandwidth. Relays may meter or limit what they forward, which would make the relay path a real cost. Check what the n0 relay enforces.
For cutting them: an attacker can bypass them for free, while honest peers behind NAT share their buckets. Each also adds a keyed map, a prune task, metrics and config knobs.
Something in between: keep the layer and let relay-only connections share one bucket. The cost is that honest relay-only peers would share a budget.
The outcome may be "keep as-is". If so, record why, and correct the ADR text (#2504).
Related: #2502, which kept a per-source connection-count cap out for the same binding reason.
The ADR-text leg (#2504) is done in #2579: both Per-IP rows and both "Why three layers" paragraphs now state that the key is the direct-path source IP (/64 for IPv6) and that a relay-only connection passes the layer unchecked, bounded by the per-peer and global layers. The open design question here (keep as-is / cut / shared relay bucket) is unchanged.
Activity
yigitdot commentedon Oct 21, 2026
The ADR-text leg (#2504) is done in #2579: both Per-IP rows and both "Why three layers" paragraphs now state that the key is the direct-path source IP (/64 for IPv6) and that a relay-only connection passes the layer unchecked, bounded by the per-peer and global layers. The open design question here (keep as-is / cut / shared relay bucket) is unchanged.
docs(adr)!: the payer fronts credit (#2877)