feat(nip77): negentropy reconciliation core 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.
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
- Langage dominant
- TypeScript
- Étoiles
- 829
- Forks
- 234
- Merge moyen
- 4 j 5 h
- PR mergées (30 j)
- 22
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 82/100
cameri/nostream#811 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
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 3 jours. OuverteAdmin Console enhancement
cameri/nostream#800 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Store relay settings overrides in PostgreSQL (SETTINGS_BACKEND=db)Peut-être pris @Ferryx349 l’a pris il y a 36 jours. Ouverteenhancement
cameri/nostream#757 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
feat(nip85): Web-of-Trust spam mitigation enginePeut-être à nouveau libre @Ferryx349 l’a pris il y a 67 jours, et aucune pull request n’est ouverte. Ouverteenhancement
cameri/nostream#720 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de cameri/nostream
Issues similaires
-
Remove the landing pageOuverteby: ai-assisted frontend good-for: new-member spike
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Northeastern-Electric-Racing/Argos#847 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 1/5 1-3 heures Accessibilité débutants 84/100
SignalK/freeboard-sk#990 ·
Les mainteneurs répondent en général sous 1 jour
-
[missing-inheritance] audit review (1 preset)Peut-être pris @github-actions l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
osmberlin/tagging-schema-browser#363 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Albert-Weasker/niubigeo#205 ·
Les mainteneurs répondent en général sous 1 jour
-
area/frontend area/v2 kind/bug priority/needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
kubeflow/notebooks#1498 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour