Repository navigation
Description
What strfry has. Four CLI verbs that treat relays as peers rather than destinations: sync (negentropy set reconciliation against a remote relay, --dir down|up|both, filterable, with precomputed BTrees so a full-DB sync is cheap), stream (long-lived up/down/both event flow), router (many streams in one process with per-stream nostr filters and plugins, for a mesh of mirrors), and import/export in jsonl including --fried precomputed records for a fast re-ingest.
Why operators use it. This is the mechanism behind mirrored relays and behind moving a relay between hosts without asking clients to re-publish: the reconciliation transfers only the difference, and a filter can scope it ({"authors":[…]}). strfry calls it "the most original feature", and the implementation exists in several languages, which is what makes it a relay-to-relay story rather than a strfry story.
What nostream has. NIP-77 is implemented on both lines — src/handlers/neg-* on v3, crates/nostream-core/src/nip77.rs on v4 — so a client can reconcile against us, and v3 carries a peering surface (paid peering, sync, ledgers). What is missing is the operator CLI: there is no way to say "bring this DB into step with that relay", "mirror this filter continuously", or "export everything as jsonl" without writing a client.
Why this is post-v4. The protocol half ships; the tooling half is a new binary with its own failure modes (partial sync, a divergent peer, memory growth on a highly divergent set — strfry warns about exactly that). None of it blocks 1 January.
Shape it would take. nostreamd grows a subcommand set, or a sibling binary nostreamctl. Sync over the existing NIP-77 code with a BTree/rolling-fingerprint cache in LMDB; router as a fan-in of stream sessions with per-stream filters. The interesting design question is the cache: strfry's sync speed comes from the precomputed tree, so porting the verb without it ports the least useful half.
Activity