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 天 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 天內回覆
-
[Admin Console] Ops visibility panels (mirror, workers, NIP-05, storage)可能已有人在做 @Ferryx349 於 2 天前認領。 未關閉Admin Console enhancement
cameri/nostream#816 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
feat(admin): bounded NIP-66 probe history and Network Health timeline可能已有人在做 @Ferryx349 於 6 天前認領。 未關閉Admin Console enhancement
cameri/nostream#800 · 已指派 1 人 ·
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
apollographql/apollo-client#13493 ·
維護者通常 1 天內回覆
-
Custom hosts written as trailing-dot FQDNs (`host.local.`) aren't detected as local backends可能已有人在做 @roboomp 今天認領。 未關閉bug prio:p2 providers triaged
難度 2/5 1-3 小時 新手友好度 82/100
can1357/oh-my-pi#15798 · 3 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
code-yeongyu/oh-my-openagent#10172 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
PDFCraftTool/pdfcraft#189 ·
-
Add the Yahoo chart API duplicate last-day row (yfinance#573) to incidents.md (about 1 hour)可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉data docs good first issue
難度 1/5 1 小時以內 新手友好度 80/100
pacocartones/market-data-sanity-checker#160 ·
維護者通常 1 天內回覆