Files
meshcore-tth/test
tthandClaude Opus 5.5 e8d5ab417a simple_repeater: per-origin advert window + fairness dry-run (tth #2, #1)
`fairness advert <hours>|clear`: each origin's flood advert is forwarded at
most once per window (0 = off, max 720 h), keyed on the first 4 B of its
pubkey in a 256-entry ring (2 KB RAM). Ported from DutchMeshCore's
AdvertLimiter (d26421b0); runs ahead of the advert bucket, so a held advert
takes no token. Motivation: companion CP1 floods an advert every 60 s since
30. 10. 2026 and still made up 18 % of the adverts our masts forwarded --
the 7-bit advert bucket cannot single it out without hurting the ~8 nodes
that share its bucket.

`fairness dryrun on|off`: window and buckets count every verdict but
forward anyway. `fairness air`: estimated airtime shed per reason. The
bucket kill switch (`fairness off`) no longer disables the window. Both new
settings persist (fair_advh, fair_dry).

Bench 1. 11. 2026 (x3 DUT, x1 spammer + witness, 866.5/SF8, advert every
30 s, echoes counted on the witness): dry-run 6/6 forwarded with 5 counted
as held, enforced 1/6, window off 3/3, buckets in dry-run 5/5 with 3
counted; settings survive a reboot. Native tests 26/26 fairness, 119 total.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 09:40:20 +01:00
..
2026-10-26 20:39:46 +11:00