mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
Each [[mirror]] entry takes an optional NIP-01 filter as a JSON object string, like strfry-router's per-stream filter. It is applied twice, matching strfry's design (cmd_router.cpp): - it shapes the REQ sent upstream (the mirror still owns since via backfill_seconds and strips limit — the subscription is unbounded); - every delivered event is re-checked against it before ingest, so an upstream answering outside its REQ — including a trusted one whose events skip signature verification — can only inject events inside the operator-declared scope. Out-of-scope deliveries surface on a 'filtered' counter. Malformed filter JSON fails the boot, not the first delivery. Several disjoint scopes for one upstream = repeat [[mirror]] with the same url. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TtDNpayEYvJH7QuPswND3A