[verified] fix(file): pace chunks to fit rendezvous rate limit
All checks were successful
ci / test (pull_request) Successful in 2m42s

Sender-side only. First chunk attempt is immediate; later attempts
(retries and later chunks) wait 3s. Three attempts per chunk, then
fail closed. Token bucket 30/60s burst 10 is unchanged.

A 1 MiB file is 17 one-shot sessions; pacing floor is 16*3s = 48s
plus handshake time. Latency trade, not a security fix.
This commit is contained in:
Sirius DevOps 2026-09-11 23:49:29 -04:00
commit 4bbc2de9ab
No known key found for this signature in database
5 changed files with 122 additions and 4 deletions

View file

@ -208,6 +208,14 @@ HTTP Digest; it is not this protocol.
Cap: 1 MiB reconstructed file. No resume. One Noise session per chunk.
The sender is responsible for fitting the receiver's documented rendezvous
budget (30 accepts / 60s, burst 10). Chunks MUST be paced so the average
interval between send attempts stays at least 3s — a margin under the 0.5/s
refill; pacing at exactly 2s sits on the refill boundary and drains under
jitter. A sender MAY retry an individual chunk a bounded number of times.
Exhausting retries fails the transfer. No outbox, no resume, no continuation
under a new `xfer_id`.
```
fil <xfer_id_hex>\n<filename>\n<sha256_hex>\n<idx>/<total>\n<raw bytes>
```

View file

@ -40,7 +40,7 @@ OnionWire never holds spend keys. Optional `ONIONWIRE_WALLET_RPC` talks HTTP Dig
## Rate limit is availability, not anonymity
Incoming rendezvous accepts are token-bucket limited (30/60s, burst 10). Excess is dropped without handshake. That is a DoS/availability control. It does not hide that you run an onion, and it is not a traffic-analysis defense.
Incoming rendezvous accepts are token-bucket limited (30/60s, burst 10). Excess is dropped without handshake. That is a DoS/availability control. It does not hide that you run an onion, and it is not a traffic-analysis defense. The constants are unchanged. Clients absorb the cost: file senders pace and retry chunks to fit this budget. The accept loop does not distinguish a friend from a flood.
## Network (UDP / clearnet)