Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#801 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Priyanshubhartistm đang làm issue này rồi.

Từ ngày 8/10/2026.

  • #809 của @Priyanshubhartistm — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
829
Fork
234
Merge trung bình
4 ngày 5 giờ
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cameri/nostream

Tất cả issue của cameri/nostream

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.