Files
bitvid/js
thePR0M3TH3ANandClaude Opus 4.8 25d3e83c46 refactor(moderation): batch kind-1984 report subs via SubscriptionManager (P2)
Replaces the per-video live report subscription (one pool.sub per visible
video × ~20 relays, re-fired on every reconnect — the ~1000 REQ/s storm) with
ONE batched SubscriptionManager subscription over the whole active id set,
updated in place as the set changes. Backfill fetches history only for
newly-added ids (one batched list()). Unchanged sets are a no-op (dedup guard).

MODERATION_REPORT_SUBS_ENABLED flipped back on. Trusted-mute subs were already
batched-by-author, so the relay cap + contact-loop fix already tamed them.

Legacy per-id path retained only for SubscriptionManager-less environments
(unit tests / mock clients). All 39 moderation tests pass; new cheat-resistant
batching test added; nip07-heat shows reports no longer storm (steady idle).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-14 15:04:40 -04:00
..
2026-01-23 02:09:08 -05:00
2026-01-26 21:49:18 -05:00
2026-02-22 15:56:05 -05:00
2026-02-21 19:59:47 -05:00
2026-01-30 16:51:01 -05:00