feat(nip77): NEG-OPEN/NEG-MSG/NEG-CLOSE wire protocol for the PostgreSQL backend
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
Is your feature request related to a problem? Please describe.
The negentropy reconciliation core and the sorted event id query landed in #809 (issue #801), but nothing calls them yet, so relays still cannot answer NIP-77 sync requests. Clients and relay-to-relay syncers keep catching up with wide REQ filters and receive every matching event.
Describe the solution you'd like
Expose the core over the websocket as described in NIP-77, for the PostgreSQL event store only:
- Parse and validate
NEG-OPEN(subscription id, a single filter, hex initial message),NEG-MSGandNEG-CLOSE, and sendNEG-MSGandNEG-ERRreplies.NEG-OPENfor an id that is already open closes the old session first, and ids live in a separate namespace fromREQids. - Keep per-connection session state and free it on
NEG-CLOSE,NEG-ERR, idle timeout and disconnect. - Bound resource use, since each session holds the whole matching
(created_at, id)set in memory: a maximum number of events per session (rejected withNEG-ERR blocked:), a maximum number of concurrent sessions per connection, and an idle timeout (NEG-ERR closed:). - Apply the same NIP-42 restricted-kind checks and filter limits that
COUNTapplies. - Add a
nip77settings section withenabled(defaultfalse, so merging this changes nothing for existing relays) and the limits above, documented inCONFIGURATION.md. The feature only responds whennip77.enabledis true andeventStore.backendispostgres, so it stays out of the way of alternative backends that implement negentropy themselves. - Remove the temporary
.knip.jsonignore entry added with the core. - Tests for message validation, session lifecycle, limits, and a full client-to-relay reconciliation over the handlers.
Out of scope, tracked separately: advertising NIP-77 in NIP-11 supported_nips, and the admin console settings schema.
Additional context
- Spec: https://github.com/nostr-protocol/nips/blob/master/77.md
- Builds on #801 / #809. The
nip77.*settings were originally going to be a separate follow-up; they are included here so the handlers are never active without a kill-switch and bounded limits.
- 主要语言
- 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 天内回复
-
[Admin Console] Ops visibility panels (mirror, workers, NIP-05, storage)可能已有人在做 @Ferryx349 今天认领。 未关闭Admin Console enhancement
cameri/nostream#816 · 已指派 1 人 ·
维护者通常 1 天内回复
-
feat(admin): bounded NIP-66 probe history and Network Health timeline可能已有人在做 @Ferryx349 于 4 天前认领。 未关闭Admin Console enhancement
cameri/nostream#800 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
status: needs-triage
难度 2/5 1-3 小时 新手友好度 83/100
a2ui-project/a2ui#3158 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
hemilabs/ui-monorepo#2475 ·
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 82/100
lingdojo/kana-dojo#32279 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
code-quality refactoring
难度 2/5 1-3 小时 新手友好度 77/100
github/gh-aw-firewall#9879 ·
维护者通常 1 天内回复
-
[Bug]: Arrow-key cursor movement in combined diff view doesn't scroll to keep the cursor visible未关闭os:macos
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复