feat(nip77): negentropy reconciliation core for the PostgreSQL backend
Mantenedores costumam responder em até 1 dia
@Priyanshubhartistm já está trabalhando nisso.
Desde 8/10/2026.
- #809 de @Priyanshubhartistm — aberto
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 829
- Forks
- 234
- Merge médio
- 2d 10h
- PRs com merge (30d)
- 24
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de cameri/nostream
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 45/100
Mantenedores costumam responder em até 1 dia
-
feat(nip77): advertise NIP-77 in NIP-11 and expose its settings in the admin consoleTalvez já em andamento @Priyanshubhartistm assumiu hoje. Abertaenhancement
cameri/nostream#819 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
feat(nip77): NEG-OPEN/NEG-MSG/NEG-CLOSE wire protocol for the PostgreSQL backendTalvez já em andamento @Priyanshubhartistm assumiu hoje. Abertaenhancement
cameri/nostream#817 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
[Admin Console] Ops visibility panels (mirror, workers, NIP-05, storage)Talvez já em andamento @Ferryx349 assumiu hoje. AbertaAdmin Console enhancement
cameri/nostream#816 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de cameri/nostream
Issues semelhantes
-
status: needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
a2ui-project/a2ui#3158 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
hemilabs/ui-monorepo#2475 ·
Mantenedores costumam responder em até 1 dia
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
lingdojo/kana-dojo#32279 · 1 comentário · 5 reações ·
Mantenedores costumam responder em até 1 dia
-
code-quality refactoring
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
github/gh-aw-firewall#9879 ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: Arrow-key cursor movement in combined diff view doesn't scroll to keep the cursor visibleAbertaos:macos
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
Mantenedores costumam responder em até 1 dia