diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-10 00:39:57 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-10 00:39:57 +0000 |
| commit | e6c4524dd1c15ea6d948c8c5630a9e9de392d989 (patch) | |
| tree | 397ebb612637a99141e47fb7baeebd41a9f4bd00 /docs/reference/relay-limits.md | |
| parent | a84ae9f2a241a9ab5239ffad23537d3c0be1ccfc (diff) | |
fix: move state events from Layer 1 to identifier-based filters
Removes kind 30618 (state events) from Layer 1 announcement filter and
adds targeted subscriptions using #d (identifier) tags in Layer 2.
Problem: Layer 1 was receiving ALL state events from all relays,
causing 1000+ rejections for repositories we don't host.
Solution:
- Remove Kind::RepoState from build_announcement_filter (Layer 1)
- Add state_event_filters_for_our_repos() function that creates filters
with kind 30618 and #d tags for only our hosted repo identifiers
- Integrate state filters into build_layer2_and_layer3_filters
- Extract unique identifiers from repo refs and batch by 100 per filter
Benefits:
- Dramatically reduces bandwidth and rejection noise (1000+ → ~0)
- More efficient: one filter with multiple identifiers vs broadcast
- Only receive state events for repositories we actually care about
Resolves: work/active-issues/layer1-state-event-oversubscription.md
Diffstat (limited to 'docs/reference/relay-limits.md')
0 files changed, 0 insertions, 0 deletions