Files
corescope-rx/docs
efitenandClaude Opus 5 7ad2f132b0 fix: leave the repeater's rate limiter to the repeater
v1.16.0 mirrored simple_repeater's anon_limiter as a rolling client-side ceiling of four
asks per 180s per target. Reading the firmware instead of this repo's notes about it
shows the copy can only do harm.

anon_limiter(4, 180) is real (examples/simple_repeater/MyMesh.cpp:880) and is shared
across every anon request type and every requester, as the notes said. What they did not
say is that RateLimiter::allow uses a FIXED window:

    if (now < _start_timestamp + _secs) { _count++; if (_count > _maximum) return false; }
    else { _start_timestamp = now; _count = 1; }

The window is anchored to the repeater's clock and starts at the first request it accepts
after an expiry, which a client cannot observe. A rolling copy is therefore wrong in both
directions, and expensively in one: it refuses asks the repeater would have answered
because its window had just reset. The request it refused most reliably was the bonus ask
v1.16.0 was built to send — the one aimed at a strong reception, which by nature does not
wait. The same source shows a denial costs nothing: _count keeps counting but
_start_timestamp does not move, so extra requests neither extend the block nor penalise
the sender.

One repeater's load is bounded by the encounter, unchanged from v1.16.0: four unanswered
asks plus at most one bonus, each at least 30s apart, no new encounter until five minutes
of silence. Five asks over at least two minutes, and on the road far fewer — 180 seconds
is about 3 km, by which time the repeater is out of range and the question does not arise.
That last point is the user's, and the field log agrees with it: every reception the
client-side window would have held off came from a node heard for minutes at a time.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSoyBhrLLtSqLgBMEKMiJV
2026-09-12 23:59:36 +02:00
..