Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#817 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@Priyanshubhartistm y travaille déjà.

Depuis le 12/10/2026.

  • #818 par @Priyanshubhartistm — ouverte

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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

Langage dominant
TypeScript
Étoiles
829
Forks
234
Merge moyen
2 j 10 h
PR mergées (30 j)
24

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de cameri/nostream

Toutes les issues de cameri/nostream

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.