feat(nip77): NEG-OPEN/NEG-MSG/NEG-CLOSE wire protocol for the PostgreSQL backend
Les mainteneurs répondent en général sous 1 jour
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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-MSGandNEG-CLOSE, and sendNEG-MSGandNEG-ERRreplies.NEG-OPENfor an id that is already open closes the old session first, and ids live in a separate namespace fromREQids. - 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 withNEG-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
COUNTapplies. - Add a
nip77settings section withenabled(defaultfalse, so merging this changes nothing for existing relays) and the limits above, documented inCONFIGURATION.md. The feature only responds whennip77.enabledis true andeventStore.backendispostgres, so it stays out of the way of alternative backends that implement negentropy themselves. - Remove the temporary
.knip.jsonignore 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
- Spec: https://github.com/nostr-protocol/nips/blob/master/77.md
- Builds on #801 / #809. The
nip77.*settings were originally going to be a separate follow-up; they are included here so the handlers are never active without a kill-switch and bounded limits.
- Langage dominant
- TypeScript
- Étoiles
- 829
- Forks
- 234
- Merge moyen
- 2 j 10 h
- PR mergées (30 j)
- 24
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de cameri/nostream
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 45/100
Les mainteneurs répondent en général sous 1 jour
-
feat(nip77): advertise NIP-77 in NIP-11 and expose its settings in the admin consolePeut-être pris @Priyanshubhartistm l’a pris aujourd’hui. Ouverteenhancement
cameri/nostream#819 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
[Admin Console] Ops visibility panels (mirror, workers, NIP-05, storage)Peut-être pris @Ferryx349 l’a pris il y a 1 jour. OuverteAdmin Console enhancement
cameri/nostream#816 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
feat(admin): bounded NIP-66 probe history and Network Health timelinePeut-être pris @Ferryx349 l’a pris il y a 5 jours. OuverteAdmin Console enhancement
cameri/nostream#800 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de cameri/nostream
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
db-ux-design-system/core-web#8461 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Cannot run an integration on windows when power shell is selected as the default profile terminalOuvertePriority/Blocker Type/Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
wso2/product-integrator#2767 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
severity:low
Difficulté 1/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour