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
- 平均マージ
- 17時間 46分
- マージ済み PR(30日)
- 73
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cameri/nostream のほかの issue
-
Website
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
feat(payments): subscription lifecycle, renewal invoices and plan-based write access対応中かも @Priyanshubhartistm が 1 日前に担当しました。 オープンenhancement
cameri/nostream#908 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Three repositories have no unit tests (notification-outbox, notification-delivery-log, nip05-verification)対応中かも @Priyanshubhartistm が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 72/100
cameri/nostream#905 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
No unit tests for four of six payment processors (nodeless, lnurl, opennode, zebedee)対応中かも @Priyanshubhartistm が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
cameri/nostream#903 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
cameri/nostream の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
diegosouzapw/OmniRoute#17386 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
area/dashboard kind/bug kind/bug-qa QA/dev-automation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vybestack/llxprt-code#3917 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
api-parity
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
IBM/carbon-components-ember#1157 ·
メンテナーはふだん 1 日以内に返信