Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

feat(nip77): negentropy reconciliation core for the PostgreSQL backend

已關閉
#801 0 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 1 天內回覆

@Priyanshubhartistm 已經在處理了。

開始於 2026年10月8日。

  • #809 來自 @Priyanshubhartistm —— 未關閉

評估

這個 Issue 還沒有評估資料。

描述

enhancement

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 EventRepository method 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

主要語言
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 摘要。