upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/explanation/grasp-02-proactive-sync.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-09 21:12:51 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-09 21:12:51 +0000
commit5fed2e2f32cfb15fff042a39f3ac82abe8948ca0 (patch)
tree9eeabc12bcadc43d18c772d9705dbf4b65d03ed2 /docs/explanation/grasp-02-proactive-sync.md
parenta68e23733e78d33ca1d48b83414a8db63ca3d5fd (diff)
docs: integrate rejected events index into architecture documentation
- Add rejected events index to architecture.md with two-tier system explanation - Document NGIT_REJECTED_HOT_CACHE_DURATION_SECS and NGIT_REJECTED_COLD_INDEX_EXPIRY_SECS in configuration.md - Add comprehensive rejected events metrics section to monitoring.md with Grafana queries and alerts - Explain negentropy integration with rejected index in grasp-02-proactive-sync.md - Document state event authorization defense-in-depth and rejection tracking in inline-authorization.md This integrates information from work/rejected-events-index-summary.md into the main documentation, ensuring architecture docs accurately reflect the implemented rejected events index system.
Diffstat (limited to 'docs/explanation/grasp-02-proactive-sync.md')
-rw-r--r--docs/explanation/grasp-02-proactive-sync.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/explanation/grasp-02-proactive-sync.md b/docs/explanation/grasp-02-proactive-sync.md
index e983316..ed8fdbf 100644
--- a/docs/explanation/grasp-02-proactive-sync.md
+++ b/docs/explanation/grasp-02-proactive-sync.md
@@ -729,6 +729,41 @@ If negentropy fails (relay doesn't support NIP-77, network error, etc.):
7292. The sync falls back to traditional REQ+EOSE 7292. The sync falls back to traditional REQ+EOSE
7303. No error is raised - fallback is automatic 7303. No error is raised - fallback is automatic
731 731
732### Integration with Rejected Events Index
733
734The rejected events index prevents wasteful re-fetching during negentropy sync by excluding rejected event IDs from the reconciliation process:
735
736**During Negentropy Reconciliation:**
737
7381. **Build "already have" set**: Combine event IDs from:
739 - Events in database
740 - Events in purgatory
741 - **Events in rejected index (hot cache + cold index)**
742
7432. **Send to negentropy**: This combined set represents "events we already have or don't want"
744
7453. **Receive differences**: Relay only sends events we don't have and haven't rejected
746
7474. **Process received events**: New events go through normal validation:
748 - If accepted → saved to database
749 - If rejected → added to rejected index
750 - If waiting for dependencies → added to purgatory
751
752**Why This Matters:**
753
754Without the rejected events index, negentropy would repeatedly download events that don't list this service or are from unauthorized maintainers, wasting bandwidth on every sync cycle.
755
756**Re-Processing on Dependency Arrival:**
757
758When a dependency is satisfied (e.g., owner announcement accepted):
7591. Related entries are **invalidated** (removed) from cold index
7602. If event still in hot cache → immediate re-processing
7613. If event expired from hot cache → will be re-fetched on next sync (now that dependency exists)
762
763This prevents permanently excluding events that could become valid after dependencies arrive.
764
765See [work/rejected-events-index-summary.md](../../work/rejected-events-index-summary.md) for complete implementation details.
766
732--- 767---
733 768
734## REQ+EOSE Pagination 769## REQ+EOSE Pagination