diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-11 16:20:23 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-11 16:20:23 +0000 |
| commit | 6d0447f31eb9f9282e60ac3c90c665a8b3781331 (patch) | |
| tree | 52a15001bda47c1096f82eb0598c8320df0b637c /docs/reference | |
| parent | 497df415749039236126140193af0ea612358cc7 (diff) | |
feat: implement NIP-77 negentropy sync for historical data
Replace EOSE-based sync completion with negentropy reconciliation for:
- Initial connect (fresh sync)
- Daily sync (Layer 1 announcements)
- Stale reconnect (>15 min)
Key changes:
- Add NegentropySyncResult struct with remote_only, local_only, received fields
- Add supports_negentropy() using try-and-fallback approach
- Add negentropy_sync_filter() using nostr-sdk client.sync() API
- Modify handle_connect_or_reconnect() to use negentropy for fresh/stale sync
- Modify daily_sync() to use negentropy for Layer 1
- Single-warning logging per relay when negentropy fails
Quick reconnects (<15 min) unchanged - still use REQ with since filter.
If negentropy unsupported, gracefully falls back to REQ+EOSE flow.
Diffstat (limited to 'docs/reference')
0 files changed, 0 insertions, 0 deletions