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 天 13 小时
- 30 天内合并 PR
- 23
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cameri/nostream 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Add Astro marketing site for nostream (hero film, docs, get-started schematic)可能已有人在做 @Ferryx349 今天认领。 未关闭enhancement Website
cameri/nostream#822 · 已指派 1 人 ·
维护者通常 1 天内回复
-
feat(nip77): advertise NIP-77 in NIP-11 and expose its settings in the admin console可能已有人在做 @Priyanshubhartistm 于 2 天前认领。 未关闭enhancement
cameri/nostream#819 · 已指派 1 人 ·
维护者通常 1 天内回复
-
feat(nip77): NEG-OPEN/NEG-MSG/NEG-CLOSE wire protocol for the PostgreSQL backend可能已有人在做 @Priyanshubhartistm 于 2 天前认领。 未关闭enhancement
cameri/nostream#817 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Admin Console] Ops visibility panels (mirror, workers, NIP-05, storage)可能已有人在做 @Ferryx349 于 3 天前认领。 未关闭Admin Console enhancement
cameri/nostream#816 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
vercel/streamdown#673 · 1 个 reaction ·
维护者通常 1 天内回复
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunk未关闭factory-active task-identify-harness-labels-done task-identify-issue-type-done
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
agilepathway/label-checker#721 ·
维护者通常 1 天内回复
-
CLI Empathy needs triage
难度 2/5 1-3 小时 新手友好度 74/100
chromaui/chromatic-cli#1524 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复