Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

feat(nip77): NEG-OPEN/NEG-MSG/NEG-CLOSE wire protocol for the PostgreSQL backend

未关闭
#817 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@Priyanshubhartistm 已经在做这个了。

开始于 2026年10月12日。

  • #818 来自 @Priyanshubhartistm —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

enhancement

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-MSG and NEG-CLOSE, and send NEG-MSG and NEG-ERR replies. NEG-OPEN for an id that is already open closes the old session first, and ids live in a separate namespace from REQ ids.
  • 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 with NEG-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 COUNT applies.
  • Add a nip77 settings section with enabled (default false, so merging this changes nothing for existing relays) and the limits above, documented in CONFIGURATION.md. The feature only responds when nip77.enabled is true and eventStore.backend is postgres, so it stays out of the way of alternative backends that implement negentropy themselves.
  • Remove the temporary .knip.json ignore 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

主要语言
TypeScript
星标
829
派生
234
平均合并
2 天 10 小时
30 天内合并 PR
24

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cameri/nostream 的其他 Issue

查看 cameri/nostream 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。