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:
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