feat(nip77): negentropy reconciliation core for the PostgreSQL backend
維護者通常 1 天內回覆
評估
這個 Issue 還沒有評估資料。
描述
Is your feature request related to a problem? Please describe.
Clients and relay-to-relay syncers catching up with nostream currently send wide REQ filters, so the relay streams every matching event even when the other side already has most of them. NIP-77 (Negentropy) solves this with set reconciliation: both sides exchange range fingerprints and only transfer the events that actually differ. nostream has no NIP-77 support.
The strfry backend being added separately already implements negentropy itself, so this work targets the PostgreSQL backend only and must stay cleanly separable from it.
Describe the solution you'd like
This issue covers only the first, protocol-independent piece of NIP-77, so it can be reviewed on its own before any wire-level work:
- A negentropy reconciliation core: encode/decode of negentropy messages and fingerprint computation over a sorted set of
(created_at, id)items, with no networking or WebSocket code. - A new
EventRepositorymethod returning just(created_at, event id)for events matching a filter, sorted as negentropy requires. It reuses the shared filter conditions (so NIP-56 hidden reports are never advertised) and also excludes deleted and expired events, so they are never advertised either. - Unit tests for the codec/fingerprint (including interop vectors from the reference implementation) and for the new query.
Follow-ups, tracked separately and not part of this issue: the NEG-OPEN/NEG-MSG/NEG-CLOSE/NEG-ERR wire protocol with per-connection sessions and limits, then settings, NIP-11 advertisement and backend gating.
Additional context
- Spec: https://github.com/nostr-protocol/nips/blob/master/77.md
- Reference implementation: https://github.com/hoytech/negentropy
- 主要語言
- TypeScript
- 星號
- 829
- 分支
- 234
- 平均合併
- 2 天 10 小時
- 30 天內合併 PR
- 24
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
cameri/nostream 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
enhancement
難度 5/5 一週以上 新手友好度 45/100
維護者通常 1 天內回覆
-
feat(nip77): advertise NIP-77 in NIP-11 and expose its settings in the admin console可能已有人在做 @Priyanshubhartistm 今天認領。 未關閉enhancement
cameri/nostream#819 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
feat(nip77): NEG-OPEN/NEG-MSG/NEG-CLOSE wire protocol for the PostgreSQL backend可能已有人在做 @Priyanshubhartistm 今天認領。 未關閉enhancement
cameri/nostream#817 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
[Admin Console] Ops visibility panels (mirror, workers, NIP-05, storage)可能已有人在做 @Ferryx349 於 1 天前認領。 未關閉Admin Console enhancement
cameri/nostream#816 · 已指派 1 人 ·
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 77/100
apache/rocketmq-dashboard#6610 ·
維護者通常 3 天內回覆
-
nextjs-tracking
難度 2/5 1-3 小時 新手友好度 69/100
cloudflare/vinext#3920 ·
維護者通常 1 天內回覆
-
Team:Dashboards
難度 2/5 1-3 小時 新手友好度 65/100
elastic/kibana#297299 · 1 則留言 ·
維護者通常 1 天內回覆
-
analytics beginner friendly community contributions-welcome good first issue hacktoberfest help wanted up-for-grabs
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
affected/v17 affected/v18 area/frontend type/bug
難度 2/5 1-3 小時 新手友好度 82/100
umbraco/Umbraco-CMS#24186 ·
維護者通常 2 天內回覆