Changelog

What's new.

Latest upgrades, newest first. Generated from changesets on every release; currently at v3.17.0.

nostream

3.17.0

Minor Changes

  • #1199 cce55b6 Thanks @Priyanshubhartistm! - feat(nip43): publish the kind 13534 membership list

    With the new nip43.publishMembershipList setting (off by default) the relay publishes a replaceable kind 13534 event, signed by its own key, with the NIP-70 - tag and one member tag per admitted pubkey, and refreshes it after every successful join or leave, and when a member’s request to vanish is accepted, so that pubkey is taken out of it. Joins and leaves that are rejected or change nothing do not refresh it. Nothing is published when info.self does not match the relay’s signing pubkey, since NIP-43 requires that signer. The list makes every member’s pubkey public to anyone who can read the relay, which is why the setting defaults to off. It is a convenience for clients, not the source of truth for who may publish, and it holds at most the first 10,000 members. Users who asked to vanish are left out. Admissions made another way, for example a paid admission, do not refresh it.

  • #1216 36ce4d5 Thanks @Ferryx349! - feat(peering): show relationship state, terms and traffic split in admin

    The Peering console now shows each peer’s relationship state and current terms, reconciliation and peer-request activity, and the existing budget and held-invoice panels in one place. Relationship state follows the same access window as the relay, so an ended period no longer appears active.

  • #1169 cbc9c1d Thanks @Ferryx349! - feat(peering): surface buyer invoices and budgets in the admin console

    Watches the peer’s signed kind 402 invoice stream over the authenticated sync connection, pays through LNbits or NWC, and exposes held invoices with operator approve/reject actions, budget spend/remaining, and invoice counts.

  • #1167 be2aba4 Thanks @Ferryx349! - feat(peering): add the buyer invoice ledger and budget primitives

    Adds the storage and decoding foundation for buying peering: a peering_invoices ledger deduped by BOLT11 payment hash, per-peer/global peering_budgets counters, a narrow BOLT11 decoder, and the buyer settings contracts. Automatic payment and admin approval ship in the follow-up slices.

  • #1168 9c5917d Thanks @Ferryx349! - feat(peering): enforce buyer budgets before paying peer invoices

    Adds the buying-side policy: verify a peer invoice against its advertised NIP-11 term, dedupe on the payment hash, reserve per-peer and global budget counters atomically, pay through the configured wallet, and hold anything outside the envelope for operator approval.

  • #1233 7bbf889 Thanks @Ferryx349! - feat(peering): add owner-attested peering requests

    Peers can present a one-time, owner-signed request over their authenticated NIP-42 connection. The receiving relay verifies the owner signature, the AUTH relay key, the requested scopes, the current terms snapshot and NIP-13 proof-of-work, stores the accepted attestation, and returns a relay-signed acceptance. Operators choose required, preferred or waived; configured peers keep working without proof-of-work by default. nostream peering request produces and sends the request using an owner key supplied outside settings. Operational traffic never requires the owner’s key.

Patch Changes

  • #1234 bef8c4a Thanks @Priyanshubhartistm! - fix(admin): record a logout in the audit history only when it ends a session

    POST /admin/logout is public, because it has to clear the session cookie whoever sends the request, and it wrote an admin.logout record to the audit history for every request, with or without a session. Anyone who could reach the admin routes could post to it repeatedly and fill the shared, size-limited audit history in Redis with logouts that never happened, pushing real administrator records out of it. The record is now written only by the logout that ends a session: a request with a valid session (as a cookie or a Bearer token) whose session had not been revoked yet. Revoking a session now tells the caller whether it was this call that did it, in one atomic step, so a copy of a token that was already logged out, or several logouts of the same session at once, write nothing more. Every such request still gets the cookie cleared and a 200.

  • #1231 593ad2d Thanks @Priyanshubhartistm! - fix(admin): the settings API cannot change the admin password hash through a parent path

    PATCH /admin/settings refused a change to admin.passwordHash, but it only looked at the path of the request. A request for the path admin with a new admin object, alone or inside a batch of changes, replaced the object and so wrote or removed admin.passwordHash without being refused. Anyone holding a valid admin session, or a copy of its token, could set a password hash they chose, or delete it, without knowing the current password, and the change outlived the session. The API now compares every write-protected value in the settings it is about to save with the stored ones and refuses the whole request when one differs (changed, added or removed), whichever path or batch caused it. Replacing the admin object with the same hash in it, and changing any other admin setting, still work.

  • #1200 49dd6f8 Thanks @Priyanshubhartistm! - fix(cli): do not shadow settings.json with the defaults

    nostream start and nostream setup copy the default settings to .nostr/settings.yaml when that file is missing. The relay reads settings.yaml first and falls back to the deprecated settings.json only when there is no yaml, so on a deployment that still had only a settings.json the copy replaced every override in it with the defaults: an admission policy such as nip43.enabled, payment settings and limits stopped applying, silently. The defaults are now copied only when neither file exists, so a settings.json keeps working until the admin console or nostream config writes a settings.yaml.

  • #1236 1ab0404 Thanks @Priyanshubhartistm! - fix(cli): keep the .env file private to its owner

    nostream setup and nostream config env set wrote .env with the default file mode, which under the usual umask makes it readable by every local account that can reach the project directory. The file holds SECRET, which signs the admin session tokens, and other credentials. The CLI now creates .env readable by its owner only (mode 0600), including when it starts from .env.example, and restricts an existing .env to the owner whenever it writes to it. An existing .env that setup does not need to change is left as it is. Where the permissions cannot be changed, for example on a file system without Unix permissions, the write still succeeds.

  • #1237 65d5455 Thanks @Priyanshubhartistm! - fix(cli): mask DB_URI and REDIS_URI in nostream config env output

    nostream config env list and config env get hide the value of secret keys unless --show-secrets is given, but they only recognised keys with SECRET, PASSWORD, API_KEY or PRIVATE_KEY in the name. DB_URI and REDIS_URI can carry a password (postgresql://user:password@host/db), so it was printed as it was. These two keys are now masked like the other secrets, and shown in full with --show-secrets.

  • #1239 baa1c81 Thanks @Priyanshubhartistm! - fix(cli): show control characters in nostream info output as escapes

    nostream info printed the relay name, URL and other settings values as they are. These can be changed through the admin settings, so a value containing a newline or terminal escape sequence could add forged lines to the output or send commands to the operator’s terminal, such as replacing the clipboard where the terminal allows it. The text output now shows control characters as visible escapes (for example \x0a). nostream info --json is unchanged.

  • #1160 1267cec Thanks @Priyanshubhartistm! - fix(nip42): require auth to COUNT a filter that names no kinds when restricted reads are on

    With nip42.restrictedReads enabled, a COUNT filter that named a restricted kind (4, 1059, …) had to be scoped to the client’s own pubkeys, but a filter that named no kinds was not checked, and the count still included the restricted events. An unauthenticated client could count, for example, {"#p": [pubkey]} and learn how many private messages a pubkey had received. A COUNT filter without kinds is now treated like one that names a restricted kind, the same rule NIP-77 reconciliation already follows: it must be scoped with authors or #p to the authenticated client’s own pubkeys. Relays that do not enable nip42.restrictedReads are not affected.

  • #1232 63bb7b5 Thanks @Priyanshubhartistm! - fix(nip09): collect the ids of a deletion request in one pass

    DeleteEventStrategy built the list of event ids from the e tags of a kind-5 event with [...eventIds, tag[1]] inside a reduce, which copies everything collected so far for each tag. An event with several thousand e tags (a message can hold about 7,000) therefore blocked the worker for tens of milliseconds before a single id was looked up, and it did so on every such event. The ids are now collected in one pass, and an id that appears more than once is asked for once. Which events are deleted is unchanged.

  • #1269 616c16e Thanks @chappie-daemon! - fix(import): collect the ids of a deletion request in one loop and cap them at 65,533

    The importer collected the ids a kind-5 deletion request names by copying the list for every e tag, so a request with 50,000 tags held the import for seconds, and one with more than 65,533 valid e tags overflowed PostgreSQL’s bind parameters and ended the whole import. The ids are now collected in one loop, and a repeated id is asked for once. A request whose e tags name more than 65,533 distinct event ids, the most one delete statement can carry, is refused: nothing is deleted or stored, it counts as an error, and the import goes on. No request a v3 relay could have applied is over this limit. Peering sync, which writes through the same code, gets the faster collection but no cap; its frames are already limited to 2 MiB.

  • #1172 dddbcc0 Thanks @Priyanshubhartistm! - fix(nip05): a changed NIP-05 identifier does not inherit the earlier verification

    When an author published a kind-0 profile with a different nip05 and the lookup failed with a transient error (a timeout, a 5xx), the new identifier and domain were saved with the previous identifier’s isVerified and lastVerifiedAt. With NIP-05 mode enabled that treated the new domain as verified, so an author could keep publishing under a domain the relay’s allow or block list now rejected, or under an identifier they had not proven, without ever passing a lookup. The earlier verification is now kept after a transient error only when the identifier and domain are the same (ignoring letter case); a changed identifier starts unverified until a lookup succeeds.

  • #1174 98d2359 Thanks @Priyanshubhartistm! - fix(nip05): a replaced kind-0 profile no longer changes the author’s NIP-05 verification

    A relay accepts an older kind-0 profile for an author who has already published a newer one (the replace is a no-op and the client is answered duplicate:), but the NIP-05 handling ran for it anyway. Anyone could take a public, validly signed older profile of an author, one without a nip05 field or with another identifier, and publish it again to delete the author’s current verification, or replace it with the older identifier, which with NIP-05 mode enabled blocked the author from publishing. The NIP-05 handling now runs only for a profile that is the author’s current one (the later created_at, and the lower id on a tie, which is the one the replaceable upsert keeps). The stored profile is read the way the upsert sees it, so a current profile that subscriptions hide (a NIP-56 reported or a deleted one) still counts. If the check itself fails the profile is processed as before.

  • #1169 b5789fb Thanks @Ferryx349! - fix(peering): keep wallet payments recoverable and request invoices before the feed

    Subscribe to the seller’s invoice stream before opening a paid feed, so a feed rejected until payment no longer closes the connection first. Wallet submits now report whether they settled; pending, unknown and ambiguous transport outcomes keep their reservation and stay PAYING for recovery, while outgoing LNbits expiry no longer counts as a failed payment. Each payment attempt owns its row, may only leave PAYING once, and serializes submission against recovery, so a stale lookup cannot release a charge that is still in flight. Renewal invoices are only offered inside the period-relative renewal window, so ordinary reconnects cannot buy extra periods.

  • #1261 42ed600 Thanks @Ferryx349! - fix(peering): retry serialization conflicts in invoice settlement

    A serializable peering settlement that loses a concurrent race now retries the whole confirmation transaction up to three times. Deterministic failures (missing peer, missing term snapshot) and underpayments are not retried.

  • #1248 14010af Thanks @Ferryx349! - fix(peering): count failed invoice settlements and alert once

    A paid peering invoice whose settlement rolls back is now retried with a persisted attempt counter and last error. After peering.settlementFailureThreshold failures (default 5), one peering.payment.failed notification is enqueued for the operator, and the invoice stays in the retry set. Duplicate callbacks and underpayments are not counted.

  • #1260 55987d8 Thanks @Ferryx349! - docs(peering): explain the unconfirmed-settlement cursor

    The maintenance worker’s retry offset can skip an invoice until a short page resets it. Document that this is a starvation guard, not an exact resume point, and that it delays a retry without losing it.

  • #1259 fb4a892 Thanks @Ferryx349! - fix(peering): keep unconfirmed settlements in the retry set

    A processor report that downgrades a completed peering invoice with confirmed_at still null no longer overwrites the stored COMPLETED status. The invoice remains in the settlement retry set until the period is committed.

  • #1159 8f39038 Thanks @Priyanshubhartistm! - fix(ops): retry a probe alert that could not be saved

    When a probe run changed status (ok to failed, or back to ok), the new status was stored first and the alert was written to the notification outbox afterwards. If the database was unavailable at that moment the alert was lost: the next run saw the same status and sent nothing, so an operator never heard about that outage or recovery. The status is now recorded only after the alert has been stored, and a short claim keeps two runs from sending the same alert, so a failed save is tried again by the next run that observes the same change.

  • #1271 f42a762 Thanks @chappie-daemon! - fix(subscriptions): stop an aborted REQ from stranding its database connection

    A REQ aborted before its query was running (a CLOSE, a closed socket or a rate-limit refusal that lands while the read waits for a pooled connection) destroyed knex’s stream too early. Before knex held a connection the release threw the __knexUid TypeError the web worker logs as “Unable to acquire connection”; before pg had submitted the queued query the cursor close was a no-op, so pg ran it afterwards and the connection sat active in ClientRead for good. Each one cost a connection until the pool was full and every REQ on that worker hung. The read is now aborted through a wrapper that ends the subscription at once and closes the cursor only when that is safe, and a REQ aborted before its query starts no longer starts one.

  • bbf014e Thanks @Priyanshubhartistm! - fix(admin): refuse pubkeys in the settings lists that cannot match an event

    The pubkey blacklist, the pubkey whitelist and the rate-limit bypass list (limits.event.pubkey.blacklist, limits.event.pubkey.whitelist and limits.event.whitelists.pubkeys) are compared with the pubkey of each event as they are written, and an event’s pubkey is always 64 lowercase hex characters. The settings API saved any value in them, so a blacklist entry written in uppercase hex was stored and then never matched, and the pubkey it was meant to ban could still publish. Settings validation now rejects an entry that is not a 64-character lowercase hex pubkey, and says which entry, for the settings API, the CLI, backup restore and the validate endpoint. Pubkeys added through the moderation endpoints are already normalized and are not affected. A settings file that already holds an entry written another way is not rejected at startup, but the next settings change made through those paths is refused until the entry is fixed.

  • #1175 470d3f9 Thanks @chappie-daemon! - docs: split the README into a landing page and reference guides

    The README had grown to 731 lines and carried a full payments walkthrough, an operations manual and a duplicate of the standalone setup steps. It is now 264 lines: what the relay is, the supported NIPs, requirements, the Docker quick start, and a table pointing at the guide for each task. The payments and operations material moved to docs/PAYMENTS.md and docs/OPERATIONS.md verbatim, and the standalone setup points at the development quick start in CONTRIBUTING.md instead of repeating it. docs/SETUP.md now links its payments pointer at the new file. The moved instructions were then checked against the code: the importer write semantics, the admission-fee sum, the knex fallback database name, the LNURL /callback convention, and the standalone database and Redis steps. docker-compose.yml now forwards NWC_URL, and .env.example names it correctly.

3.16.0

Minor Changes

  • #1088 e1f92ad Thanks @Ferryx349! - feat(peering): deliver paid peering invoices and gate peer feeds

    Configured peers can request their BOLT11 invoice as a signed kind 402 event and pay it through Relay B’s existing processor. Feed REQ, COUNT and NIP-77 requests are refused with a payment-required reason until a paid period is active. Expired invoices are reissued after a cooldown, and a missed webhook is rechecked before access is denied.

  • #1087 1d5c473 Thanks @Ferryx349! - feat(peering): add the paid peering billing ledger

  • #1089 15de73a Thanks @Ferryx349! - feat(peering): renew, lapse and expose paid peering access

    The billing worker now issues renewal invoices before a period ends, rechecks pending payments before lapsing a peer, closes live peer sockets on lapse, and keeps stored events and sync state for a later resume. GET /admin/peering and the dashboard show billing status, access end, the open invoice and the last processor error. NEG-MSG rechecks paid access so an open NIP-77 session cannot keep syncing after the paid period ends.

Patch Changes

  • #1145 afb381f Thanks @Priyanshubhartistm! - fix(admin): revoke the session token at logout, not only its cookie

    POST /admin/logout deleted the browser cookie but the session token itself stayed valid until it expired (24 hours by default), because the token was only <expiresAt>.<signature> and nothing on the server recorded a logout. A copy of the token kept elsewhere (a Bearer client, a log, a proxy) could restore administrator access after sign-out. The token now carries a random session id under the same signature, logout records that id in Redis until the token would have expired, and every admin request checks it, so a logout on one worker ends the session on all of them and ends only that session. If Redis cannot be read the token is refused, and a logout that cannot record the id answers 500 (and still clears the cookie).

    Tokens issued before this change have no session id and are refused, so every administrator signs in once more after the upgrade.

  • #1091 6b3db4d Thanks @Priyanshubhartistm! - fix(cli): reject a SECRET that cannot be saved to .env and read back unchanged

  • #1156 69197f7 Thanks @Priyanshubhartistm! - fix(logging): do not write credential headers to debug logs

    Debug logging of incoming requests printed every header, so the admin session cookie, an Authorization bearer token, API keys and webhook signatures could be read from the logs and reused. The rate-limit middleware, the WebSocket connection log and the four payment callback controllers now log the headers with the value of every credential-bearing header replaced by [redacted].

  • #1157 8e90d9e Thanks @Priyanshubhartistm! - fix(settings): reload settings when either settings.yaml or settings.json changes

    A worker watched only the settings file whose extension existed when it started. The loader reads settings.yaml first and falls back to the deprecated settings.json, and the admin console and the CLI always write settings.yaml, so a worker that started from settings.json never reloaded after the yaml file was written. A change such as removing a pubkey from the NIP-98 admin allowlist stayed unseen by that worker until it restarted. The watcher now reloads on a change to either file.

  • #1118 5c4b4f0 Thanks @Ferryx349! - fix(admin): serialize every settings-file writer with the settings write lock

    The lock records its owner hostname and refreshes a heartbeat, so a relay in a container no longer steals a live CLI lock just because the host PID does not exist in its own PID namespace. On the same host the lock checks the owner’s process start time, so a reused PID is reclaimed without ever evicting a slow writer, and async writers keep the lock until they settle.

3.15.3

Patch Changes

3.15.2

Patch Changes

  • #1072 81edd16 Thanks @chappie-daemon! - test(relay): add non-sequential socket test suite for connection and command races

    Adds deterministic real-socket test cases covering racing connection states:

    • Reconnect storm with immediate REQ on the open tick across multiple concurrent sockets
    • Pipelined commands in a single write buffer preserving arrival order
    • REQ immediately followed by CLOSE of the same subscription ID
    • EVENT sent on open tick
    • Binary-framed JSON commands
    • Socket resilience and valid command processing following malformed JSON

3.15.1

Patch Changes

  • #1075 4b4b247 Thanks @chappie-daemon! - Admission now runs inside a serializable transaction. admit_user() opens with PERFORM ASSERT_SERIALIZED(), so calling it on the default read-committed connection raised SN_NOT_SERIALIZABLE and every NIP-43 join request failed. A caller that supplies its own client (the payments path) still runs inside the transaction it passes.

3.15.0

Minor Changes

  • #1068 d6b98ab Thanks @aikido-autofix! - feat(web): set security headers on every web response

    The web app now sends Strict-Transport-Security, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, Referrer-Policy, X-DNS-Prefetch-Control, X-Permitted-Cross-Domain-Policies and the cross-origin isolation headers through Helmet.

    The app’s own nonce-based Content-Security-Policy remains the single CSP on a response: Helmet’s default policy is disabled, because a second CSP would intersect with the app’s and block the nonce’d inline scripts the dashboard uses. Embedding the web UI in another origin is now refused by X-Frame-Options; the dashboard’s own Grafana frame is unaffected.

Patch Changes

  • #1067 0832ffd Thanks @Ferryx349! - fix(payments): accept LNbits 1.x callback bodies

    LNbits 1.x sends the payment object as a JSON string inside the webhook body. The callback route now allows a top-level JSON string, the controller parses it before validation, and the body schema accepts and strips LNbits’ extra payment fields while still requiring a valid payment_hash.

    Non-JSON string bodies still return 400 Malformed body; the HMAC query check and the invoice lookup from LNbits remain unchanged.

3.14.0

Minor Changes

  • #1059 dfcc967 Thanks @Ferryx349! - feat(admin): account for peer on-demand requests

    Records on-demand REQ, COUNT, and NEG-OPEN requests and the events served for each authenticated peer pubkey in Redis. The admin console’s Peering table shows the request and event-served counts per peer, and the diagnostics export includes the same counters. Accounting is best-effort and never fails the request it describes.

3.13.0

Minor Changes

  • #1053 e37b284 Thanks @Ferryx349! - feat(peering): rate-limit on-demand requests from authenticated peers

    Authenticated peers can request events outside their standing feed with a normal REQ, COUNT, or ad-hoc NEG-OPEN session. Those requests continue to use peer subscription and NIP-77 limits instead of client limits, and are now bounded per peer pubkey by limits.peer.request.rateLimits (default 300 requests/minute across REQ, COUNT, and NEG-OPEN).

    Refused REQ/COUNT calls receive CLOSED with a rate-limited: reason and retry hint; refused NEG-OPEN sessions receive NEG-ERR. The limiter fails closed when its store is unavailable, and unidentified clients are unaffected. Per-peer request/event accounting and admin-console visibility are left to the dedicated admin-console follow-up.

Patch Changes

  • #1058 ba8691a Thanks @avantikonde! - fix(cli): reject placeholder secret inherited from env or prompt in setup (#1018)

    Setup now rejects the default placeholder secret (change_me_to_something_long_and_random) when read from inherited environment variables or interactive prompt input, and validates the resolved secret before persisting to .env. If a placeholder is detected, setup automatically generates a fresh cryptographically secure 64-byte random hex secret.

3.12.1

Patch Changes

  • #1045 ccb1c40 Thanks @Ferryx349! - fix(relay): handle messages sent immediately after a WebSocket opens

    Attaches a temporary message listener before the awaited connection rate-limit check, pauses the socket during admission, and buffers early frames with bounded limits (64 messages / 1 MiB). Once admission succeeds the adapter is created, buffered frames are replayed in arrival order, and the socket resumes. Rate-limited connections are still terminated before any message is processed, and buffer overflow closes with code 1009 instead of silently dropping frames. Adds regression tests for early-message replay, rate-limited rejection, and overflow handling.

3.12.0

Minor Changes

  • #1034 e410a75 Thanks @Ferryx349! - feat(peering): treat authenticated peers as feeds, not clients

    Adds limits.peer, a separate limit set for connections that have proven a configured peering.peers pubkey with NIP-42 AUTH. Peer subscriptions use limits.peer.subscription instead of limits.client.subscription, and peer messages use limits.peer.message in a separate rate-limit bucket, so a full-feed subscription cannot trip the client EWMA limiter or the client max_subscriptions cap.

    Peers are eligible for full feeds by default: maxLimit is uncapped and the subscription caps are higher. An omitted peer REQ limit queries the full stored feed instead of the client 500-event default, and peer filter counts are not rejected by the protocol’s former fixed ten-filter cap. Raw filter counts are still bounded before deduplication, and stored reads wait for the socket’s send-flush callback so a slow peer cannot grow worker memory. Deleted and expired rows are excluded in SQL before the limit, so they cannot consume a page slot.

    A high but finite peer message rate keeps the credential from becoming an unbounded egress path. Unauthenticated or unconfigured connections keep the existing client limits exactly as before. The new limits are validated with the rest of the settings document and documented in CONFIGURATION.md and docs/PEERING.md.

  • #1043 7090cbb Thanks @Ferryx349! - feat(peering): sync configured peers over NIP-77 and a live feed

    Adds an outbound peering-sync worker. For every enabled peering.peers entry it reads the peer’s NIP-11 peering.scopes, authenticates with NIP-42 using the relay’s own keypair, reconciles each scope over NIP-77 negentropy, fetches only the missing ids, and keeps a live subscription for the same scopes. Periodic reconciliation and reconnect-and-resync close gaps the live feed can miss, and a new or restarted peer converges without a full dump.

    Fetched and live events are accepted only when they match the agreed scope, were requested by id, and pass id/signature verification. They are applied with the same kind rules as local writes (addressable d-tag keys, kind-5 deletes, kind-62 vanishes, ephemeral broadcast-only), and authors under an active vanish request are skipped. Live events are broadcast to local subscribers; backfill is not, so a full sync does not fan out a dump. Wide scopes are split by kind and time, overflowed fetch batches are retried in smaller pieces, live re-checks use the scope bounds rather than the subscription overlap, and fetch/live buffers are bounded by count and bytes. Per-peer sync state (status, last reconciliation, lag, missing count) is heartbeat-refreshed during long reconciliations, recorded in Redis, exposed at GET /admin/peering, shown in the admin console’s Operations view, and included in diagnostics exports.

3.11.0

Minor Changes

  • #1030 9b585db Thanks @Ferryx349! - feat(peering): authenticate peer relays with NIP-42 using the relay keypair

    Adds the peering identity layer: a configured peering.peers trust list keyed by relay pubkey (hex or npub), outbound NIP-42 AUTH signed with the relay’s own keypair, and inbound recognition of a verified peer pubkey on the connection state. Peer status is tied to the NIP-42 session, so it expires or clears with the socket; a valid AUTH from an unconfigured pubkey stays an ordinary client.

    peering.peers[].relayUrl is the outbound address only — identity is always the verified pubkey, never the URL. Relay key storage and the AUTH exchange are documented in docs/PEERING.md, and the new fields are validated with the rest of the settings document.

Patch Changes

  • #1024 eb304b8 Thanks @chappie-daemon! - fix(deps): bump knex to 3.2.9 for the search_path SQL injection (AIKIDO-2026-10469)

    knex 0.0.1–3.2.8 interpolates values passed to searchPath for the Postgres dialect into generated SQL without validating or escaping them, so a value an attacker can influence becomes an injected identifier. 3.2.9 escapes the double quotes (#6411); this repository declares knex 2.4.2 on both the default branch and rewrite/main.

    nostream never sets searchPath — grep -rn "search_path" src/ finds nothing — so the reachable path is not exercised today, and the bump is taken to remove a vulnerable dependency from the image, not to close a reachable hole.

    knex 3.0.0 drops Node < 16, which the repo already requires (>=24.14.1), and 3.2.0 tightens RawBinding. The one compile error that surfaced, src/scripts/benchmark-queries.ts passing bindings as readonly unknown[] to db.raw(), is fixed by dropping the assertion: toSQL().bindings is already the accepted type. The emitted JavaScript is byte-identical with and without the assertion.

3.10.2

Patch Changes

  • #986 3696f3e Thanks @Ferryx349! - fix(admin): Greptile follow-ups for moderation limits and activity stats

    Moderation limit PATCH and ban/unban actions could interleave read–update–save across workers and drop updates. Those paths now run under an async settings write lock that yields while waiting and reclaims stale locks without deleting a fresh holder’s file. Activity stats windows filter on first_seen (when the relay first saw the event), not event_created_at, with partial indexes on live rows for those queries. IPv6 addresses on the rate-limit bypass list are normalized the same way as connection IPs so bypass rules cannot be skipped by formatting, including when removing entries stored in another spelling. PATCH rejects kind ranges with start greater than end. PATCH and moderation actions return the normalized limits read back from settings after save.

3.10.1

Patch Changes

  • #1011 fd7679b Thanks @chappie-daemon! - fix(rate-limit): send the backoff the strategy actually means, name an outage as an error, and bucket messages by type

    Three defects on one wire path, from the spike in #1004.

    The EWMA backoff was a half-life, sent as a delay. RateLimit.period is the decay half-life under ewma, so the time until a limit lifts is period · log2(R_new / rate), not period. With rate: 6, period: 60000, a client four times over the limit was told to wait 60 s and needed 120 s. The Lua script now returns its score instead of a yes/no, and the limiter returns period · log2(score / rate). It was only accidentally safe before: the hash carried a TTL of exactly period, so a quiet client’s state expired anyway — an unstated coupling that would break the moment anyone lengthened the TTL to keep state warm.

    A limiter outage was announced as rate-limited. A failing backend made every connected client back off for a fault on this side. It now answers error: rate limiter unavailable and still rejects the event; fail-closed behaviour is unchanged.

    The message bucket ignored the message type. One bucket per client meant a REQ could be refused because its EVENTs had filled it — the wrong message throttled, and the wrong one told to back off. The bucket key now carries the type, read from a bounded prefix of the frame because the limiter runs before validation.

    IRateLimiter.hit returns IRateLimiterResult (limited, plus retryAfterMs when the strategy can estimate one) so each strategy answers in its own terms; a caller with no estimate keeps sending the period.

  • #1012 d8095de Thanks @chappie-daemon! - fix(startup): print the banner as text, and let LOG_FORMAT=json opt out of it

    docker compose logs nostream showed the logo as a single log record with the newlines escaped. The banner and its centred facts now go to stdout as text.

    A pipeline that requires every line to parse sets LOG_FORMAT=json: the logo is then replaced by one relay starting record carrying the same facts as fields (version, supportedNips, payments, eventStore, clientWorkers, …). Any other value keeps the banner, which is what a person reading the logs wants.

3.10.0

Minor Changes

Patch Changes

  • #1009 ad8c5c4 Thanks @chappie-daemon! - build: pin the node base image in every file that names one

    Dockerfile pinned node:24.22.1-alpine by digest, but Dockerfile.railwayapp, Dockerfile.test, docker-compose.yml and test/integration/docker-compose.yml still said node:24-alpine. The relay image, the CI image, the Railway image and both migration containers could each start from a different base, and a floating tag moves under a release — so the same commit built twice could run different node code without a change saying so.

    All five now carry the same tag and digest, and a unit test holds them there: it fails if any reference loses its digest, and it fails if two different references appear.

  • #1010 fa54cb0 Thanks @chappie-daemon! - fix(settings): state that rate-limit periods are milliseconds and reject a period that is not one

    Every shipped limit counts in milliseconds — 1000, 60000, 900000, 3600000 — but nothing said so. RateLimit.period is a bare number, so an operator writing period: 60 for a minute got a 60 ms window — and because rate is hits per window, that is a limit a thousand times looser than intended, honoured without complaint, and caught by nothing.

    The unit is now stated on RateLimit and on every rateLimits block in resources/default-settings.yaml, and validateRateLimitPeriods rejects what cannot be a count of milliseconds: a fraction, a string, a non-number, or anything below one millisecond. A whole number is not enough to tell 60 from 60000, which is why the unit is documented where it is set.

3.9.0

Minor Changes

  • #999 469f1b1 Thanks @Ferryx349! - feat(peering): advertise peering terms and scopes in NIP-11

    The relay information document now carries a peering section built from the new peering settings block. It advertises whether peering is offered, the feeds available as kinds scopes with an absolute since/until range or a rolling windowSeconds, terms in the existing NIP-11 fee-object shape (amount, unit, period) where an empty terms list means settlement-free, a peer contact or WebSocket endpoint, and min_pow_difficulty — the NIP-13 work a peering request must carry, 0 meaning none.

    Disabled peering publishes only { "enabled": false }, so half-configured terms are never read as an accepted peer: this is the discovery surface other relays read before connecting, not a peer-acceptance path. Settings validation rejects invalid scopes, terms, time ranges, endpoints and proof-of-work bounds with a clear path, and all peering.* fields are documented in CONFIGURATION.md with an example document.

    Closes #932.

  • #926 2819e30 Thanks @Priyanshubhartistm! - feat(payments): let clients see their subscription tier

Patch Changes

  • #972 a46ae06 Thanks @chappie-daemon! - fix(compose): keep dynamic container addresses off the static ones

    docker-compose.yml pins nostream, nostream-db and nostream-cache to 10.10.10.2–.4, but dynamic allocation drew from the bottom of the same /24. The observability stack has no dependency that orders it after nostream, so otel-collector could be given .2 and nostream then failed to start with Address already in use — most reliably after a host reboot, when the daemon starts containers in arbitrary order.

    Dynamic allocation is now confined to 10.10.10.128/26. The subnet and gateway are unchanged, so 10.10.10.1 stays the trusted proxy, and the overlay pins (.5, .252, .253) stay outside the pool.

  • #1005 b185f35 Thanks @chappie-daemon! - ci(deploy): retry the website deploy on a transient Cloudflare failure

    Run 40103130697 failed at Deploy the preview worker with Cloudflare API error code: 10013 after a build that had already succeeded, and the next push deployed the same commit successfully — a transient upstream failure, not a defect in the site or the workflow.

    Both website deploys now run through .github/scripts/deploy-with-retry.sh, which wraps the deploy step (not the build) in three attempts with a 10 s then 30 s backoff, a per-attempt timeout, and a step-level timeout-minutes. It retries only code: 10013, an HTTP 5xx, a connection reset and an expired attempt timeout; an authentication failure, a missing environment or a wrangler validation error still fails on the first attempt. Every retry emits a ::warning:: naming the attempt and the reason, so the flake rate stays visible instead of disappearing behind a passing job.

  • #1000 dff00ba Thanks @chappie-daemon! - Add canonical first-party production relay setup guide at /docs/setup and replace outdated third-party guides in README.md.

  • #1003 80b0a9e Thanks @chappie-daemon! - test(redis): prove the relay keeps publishing after the cache loses its scripts

    Nothing is shipped in this change — it is coverage for #1002. The relay issues EVALSHA, and Lua scripts live in the cache’s memory, so a Redis restart leaves every script call answering NOSCRIPT. The adapter’s retry for that was added in #920 and had only a stubbed unit test: evalSha was mocked, which cannot catch a retry that stops working through the workers that actually call it.

    The new integration scenario publishes, runs SCRIPT FLUSH against the same Redis, then publishes twice more. SCRIPT FLUSH is the whole of a restart as far as the relay can tell, and it is deterministic — no container to restart and no reconnect to wait for. The scenario configures a message rate limit on purpose, because both limiters return early on an empty list and a scenario without one would pass whether or not the fallback existed.

3.8.0

Minor Changes

  • #941 42ed39e Thanks @Ferryx349! - feat(admin): moderation tools for pubkey, kind, and IP limits (closes #634)

    Adds admin API and console view to read and update event pubkey/kind lists, rate-limit bypass lists, quick ban/unban actions, and activity stats for top publishers, client IPs, and rate-limit hits.

Patch Changes

  • #968 98bd234 Thanks @chappie-daemon! - chore(deps): build and test on Node 24.22.1, which patches the Brotli decoder

    CVE-2026-111497 is an out-of-bounds write in every Brotli decoder up to 1.2.0, reachable by anything that decodes a br stream. Node bundles its own decoder, so the fix is the Node release: 24.22.1 on the 24 line. .nvmrc and both Dockerfile stages move from floating node:24-alpine to a pinned node:24.22.1-alpine.

  • #945 062ee00 Thanks @chappie-daemon! - Namespace EWMA rate-limiter keys so they cannot collide with sliding-window keys

    The two strategies store different Redis types under the same key name: a sliding window keeps a sorted set, EWMA keeps a hash. A cache volume carried over from 2.x, or an operator switching limits.rateLimiter.strategy, therefore left EWMA reading a sorted set as a hash — a WRONGTYPE error on every connection and message until the old key expired. EWMA now writes under an ewma: prefix, which also keeps both strategies’ windows intact if the strategy is switched back.

  • #965 ee65257 Thanks @chappie-daemon! - fix(ci): publish legal image tags and keep latest off prereleases

    A changesets relay release is tagged nostream@3.7.0, and @ is not legal in a Docker tag, so the type=ref,event=tag rule handed buildx a tag it refused: the first live run of the Release workflow failed with invalid tag ...: invalid reference format and published no image for the release (#964).

    The tags are now computed by a shell step, so every tag is a value this repository chose and can check: the bare version, vX.Y.Z as well beside it for a legacy tag, and latest only when the release is not a prerelease. Each tag is validated against Docker’s grammar before the build, so an illegal one fails by name at that step instead of at buildx.

    docs/CI-MIGRATION.md, docs/DEPLOYMENT.md and docs/DEPLOY-RUNBOOK.md no longer promise nostream@X.Y.Z as a pinnable image tag, and the runbook now names the receiver change that subscribing to release events depends on.

  • #969 8ea15fc Thanks @Ferryx349! - feat(website): add the relay peering launch film and home-page section

  • #967 9c736c8 Thanks @chappie-daemon! - ci(release): allow the image build to be dispatched for an existing tag

    A published release is immutable, so when the image build fails while publishing it, the release cannot be re-published to retry: GitHub refuses the round trip with immutable cannot be changed when release is immutable. That left #964’s release with no image and no way to build one.

    release.yml now accepts workflow_dispatch with a tag input, and refuses a tag that is not a relay release, since the event carries no tag of its own. With no release flags present the prerelease is read from the version, so a dispatch of nostream@3.8.0-rc.1 still leaves latest where it is.

3.7.0

Minor Changes

  • #895 a52cbfd Thanks @Ferryx349! - Add admin Operations area with mirror and worker heartbeats, NIP-05 verification ops, storage counts, and dashboard view.

  • #920 abd4a1b Thanks @Ferryx349! - Add admin trust and automation: Redis-backed audit log API and UI, signed HTTP webhooks for probe/mirror/SSL events, OpenTelemetry probe and mirror metrics, and redacted diagnostics export.

  • #849 7e504e1 Thanks @Priyanshubhartistm! - feat(payments): add the subscription data model and plan settings

  • #909 7b4f627 Thanks @Priyanshubhartistm! - feat(payments): add the subscription lifecycle, renewal invoices and plan-based write access

  • #924 e417437 Thanks @Priyanshubhartistm! - chore: sunset the StaticMirroringWorker

    The static mirroring worker is removed, together with the mirroring.static settings and the mirror health table and /admin/ops/mirrors route of the admin console. A mirroring.static that is still configured is ignored and logs a warning at start-up. To sync events with another relay, use NIP-77 (Negentropy), for example with strfry sync.

Patch Changes

  • #943 17157d5 Thanks @chappie-daemon! - fix(payments): parse the ISO 8601 time/expiry returned by LNbits >= 1.0 so paid admissions are confirmed and expired invoices are retired

  • #944 82124b0 Thanks @chappie-daemon! - fix(ci): stop building and pushing container images outside a release

    Remove the container publish job from checks.yml so pushes to main no longer publish images to GHCR. Container image builds and pushes are now restricted exclusively to release.yml on published releases. Update deployment documentation and reference compose stacks to target the released image tag (:latest) instead of :main.

3.6.2

Patch Changes

  • #892 ff53a73 Thanks @Ferryx349! - Fix the operator notifications target type dropdown so the select chevron renders once on the right instead of tiling across the field when console-input and form-select share the same control.

3.6.1

Patch Changes

  • #875 59c5ebf Thanks @Ferryx349! - Restyle the admin console to match nostream.dev (dark black-and-pink theme, login spark field) and fix Grafana solo-panel embed URLs so in-dashboard charts load reliably.

3.6.0

Minor Changes

  • #814 d11faf4 Thanks @Ferryx349! - Add bounded NIP-66 probe history API and Network Health dashboard timeline

3.5.1

Patch Changes

  • #838 50ffe33 Thanks @chappie-daemon! - fix(deps): resolve open dependabot security alerts

    Bumps axios to ^1.20.0, stream-json to ^3.7.0 (with the v3 ESM import-shape fix in the event import service) and js-yaml to 4.3.2, and adds pnpm overrides forcing proxy-addr >= 2.0.8, fast-uri >= 3.1.7, brace-expansion >= 1.1.21 <2 / >= 2.1.7 <3 and js-yaml 3.x >= 3.15.2 <4. The hero-animation package stubs its unfixable transitive ip <= 2.0.1 (werift chain, unused at runtime) with @stdlib/utils-noop.

3.5.0

Minor Changes

  • #823 82287d4 Thanks @Ferryx349! - feat(website): add Astro marketing site with landing film, docs, changelog and community pages

    Adds website/site (nostream.dev) and updates the landing hero animation to sync NIP count and branding from the repo. Docs, changelog, version label and NIP list are read from the repository at build time.

  • #830 f0bcdcc Thanks @Priyanshubhartistm! - feat(nip77): advertise NIP-77 in NIP-11 supported_nips while it is active and expose its settings in the admin console

  • #818 7409006 Thanks @Priyanshubhartistm! - feat(nip77): serve NEG-OPEN, NEG-MSG and NEG-CLOSE negentropy sync for the PostgreSQL event store

3.4.1

Patch Changes

  • #825 48fe9c4 Thanks @chappie-daemon! - fix(settings): validate info.relay_url is a usable absolute URL

    validateSettings() now rejects a relay_url that is not a valid absolute URL, parses with an empty host (scheme-only strings like localhost:8008), or uses a protocol other than ws/wss/http/https. Previously an invalid value started cleanly and then broke every HTTP request with 500 TypeError: Invalid URL, including the Admin Console, leaving the bad setting fixable only by editing the file by hand. Found in #824.

3.4.0

Minor Changes

  • #821 36d2a30 Thanks @Ferryx349! - feat(nip-01): send the rate-limited backoff hint on CLOSED

    When the per-IP message rate limit trips on a REQ or COUNT, the relay now replies ["CLOSED", <id>, "rate-limited: slow down", "<ms>"] with the tripped window’s period as the backoff, instead of a NOTICE. Other message types keep the existing NOTICE.

  • #768 8a5600b Thanks @Ferryx349! - docs(deploy): add deploy runbook and single-relay recreate script

  • #809 4cf419f Thanks @Priyanshubhartistm! - feat(nip77): add negentropy set-reconciliation core and a sorted event id query

Patch Changes

3.3.0

Minor Changes

  • #806 0304b8a Thanks @Anshumancanrock! - feat(storage): add an eventStore.backend setting and build every event repository through one factory

    Defaults to postgres, the only backend for now. The backend is read once at startup and passed to every worker.

  • #799 75d2a91 Thanks @Ferryx349! - feat(admin): add NIP-11 vs probe mismatch warnings on Network Health

    Closes #798

  • #807 f7d4b76 Thanks @Ferryx349! - NIP-01: include an optional backoff (ms) as the fifth element of rate-limited OK messages

  • #796 e861beb Thanks @Ferryx349! - feat(nip66): add read/write RTT probes, NIP-42 detection, mirror targets, and enriched kind 30166 tags

    Extends the relay monitor with WebSocket read/write probes, optional NIP-42 auth detection, probing of mirroring.static[] peers, and richer NIP-66 discovery and monitor announcement events.

    Closes #794

3.2.0

Minor Changes

  • #777 3ea816c Thanks @Ferryx349! - feat(deploy): add HAProxy blue/green compose stack

    Two relays behind HAProxy with /readyz health checks and option redispatch, plus a rolling recreate script that replaces one relay at a time for zero-downtime image updates. Optional Redis stream fan-out (RELAY_BROADCAST_FANOUT) lets both relays share live WebSocket broadcasts while workers keep using cluster process.send.

  • #788 ce368e8 Thanks @Priyanshubhartistm! - feat: execute hide action for actionable NIP-56 reports

    Adds nip56.hideActionableReports (default false): when true, events matching an actionable report (a trusted-moderator report against a valid target) are excluded from REQ/COUNT results. A pubkey-targeted report hides every event from that pubkey; an event-targeted report hides just that event. Requires nip56.enabled to have any effect. Previously an actionable report was only ever recorded, never acted on.

Patch Changes

3.1.0

Minor Changes

  • #756 570a7cc Thanks @Priyanshubhartistm! - feat: add relay-load-aware adaptive PoW difficulty (NIP-13)

    Adds limits.event.pow settings that scale the required proof-of-work difficulty between a configured floor and ceiling based on the observed event rate, in place of the existing static eventId.minLeadingZeroBits value (the static pubkey.minLeadingZeroBits check is unaffected and still enforced independently). The event rate is tracked per worker process with the same EWMA shape already used by the relay’s rate limiter. Disabled by default (limits.event.pow.enabled: false), so existing static PoW configuration is unaffected unless explicitly opted in.

  • #641 837540b Thanks @Ferryx349! - feat: add disabled-by-default admin API with password auth, session, and health endpoints

  • #666 44f3bb4 Thanks @Ferryx349! - feat: add admin observability dashboard with Grafana embed and provisioned metrics panels

  • #653 8ab4825 Thanks @Ferryx349! - feat: add OpenTelemetry metrics bootstrap with OTLP export for Prometheus

  • #661 237b1a4 Thanks @Ferryx349! - feat: instrument event and websocket handlers with OpenTelemetry metrics

  • #662 36d95cc Thanks @Ferryx349! - feat: add Prometheus-backed admin metrics SSE endpoint

  • #753 7c2875e Thanks @Ferryx349! - feat(admin): add GET /admin/network-health endpoint

  • #764 ff43cd3 Thanks @Ferryx349! - feat(admin): add Network Health panel to observability dashboard

    Adds a dashboard section that renders the latest NIP-66 probe snapshot with per-target DNS, TLS, WebSocket RTT, and NIP-11 status.

  • #784 c6c4c4f Thanks @Ferryx349! - feat(admin): add GET/PATCH /admin/notifications API for operator alert config

    Closes #760.

  • #787 de7c9df Thanks @Ferryx349! - feat(admin): add notifications console page for operator alerts

    Adds a Notifications view to the admin dashboard for configuring targets and event toggles, testing delivery, and browsing the delivery log via the admin API.

    Closes #761

  • #690 f70adf2 Thanks @Ferryx349! - feat: add authenticated admin settings API endpoints

  • #706 841833f Thanks @Ferryx349! - feat: add settings editor tab to admin dashboard UI

  • #770 07524eb Thanks @Priyanshubhartistm! - feat: add WoT-weighted NIP-56 content reporting

    Accepts and stores kind-1984 report events, weighting each report by the reporter’s WoT distance from wot.seedPubkey (full weight for a direct follow, halving each additional hop, zero for a pubkey outside the trust graph). Reports from a nip56.trustedModerators pubkey always get maximum weight and are flagged actionable, ready for a future management-API surface to act on; every other report is stored for manual review only. Disabled by default (nip56.enabled: false).

  • #734 fd7f56a Thanks @Priyanshubhartistm! - feat(dvm): dispatch pending DVM jobs to worker processes and publish kind 6000-6999 results back

  • #729 275c30c Thanks @Priyanshubhartistm! - feat(dvm): trap NIP-90 job request events (kind 5000-5999) and record them via the job repository

  • #727 d00eb42 Thanks @Priyanshubhartistm! - feat(dvm): add job persistence migration and repository for DVM job state

  • #737 9f36191 Thanks @Priyanshubhartistm! - feat(dvm): add NIP-89 handler recommendation/information kinds and verify passive accept-and-serve

  • #721 11ec673 Thanks @Priyanshubhartistm! - feat(dvm): add worker registry settings and dvm-orchestrator process topology

  • #587 30fa252 Thanks @Anshumancanrock! - Add NIP-50 full-text search support with PostgreSQL tsvector/GIN indexing.

    Clients can now include a search field in REQ filter objects to perform full-text queries against event content. Results are ranked by relevance (ts_rank) instead of the usual created_at ordering, per the NIP-50 specification.

    Features:

    • New search filter field accepted in REQ messages
    • PostgreSQL GIN index on to_tsvector('simple', event_content) for fast full-text lookups
    • Configurable text-search language (defaults to simple, supports english, spanish, etc.)
    • Configurable max search query length for abuse prevention
    • NIP-50 listed in NIP-11 relay information document
    • Search can be combined with all existing filter fields (kinds, authors, tags, etc.)
  • #702 e172cce Thanks @Anshumancanrock! - feat(nip42): enforce authentication on reads for restricted event kinds (encrypted DMs, gift wraps) across REQ, live broadcasts and COUNT

  • #716 2f5a1c0 Thanks @Anshumancanrock! - feat(nip42): add session tracking with optional TTL and publish-time authRequired (NIP-11 restricted_writes)

  • #732 d413bd6 Thanks @Anshumancanrock! - Add a CLI to mint NIP-43 invite codes (nostream invite create) so operators can issue a claim without SQL. New codes honor nip43.defaultMaxUses and nip43.inviteCodeExpirySeconds.

  • #650 3461dfe Thanks @Anshumancanrock! - Add NIP-43 invite code foundation: InviteCodeRepository with atomic claimCode, invite_codes migration, and event kind/tag constants.

  • #738 a0853db Thanks @Anshumancanrock! - feat(nip43): issue kind 28935 invite codes on request

    NIP-43 kind 28935 is not an event clients publish — it is a REQ the relay answers by minting an invite code on the fly and returning a relay-signed ephemeral event. Nostream now serves those subscriptions, completing the membership flow: request a claim, join with kind 28934, publish.

    Off by default. It requires nip43.enabled and the new nip43.allowInviteRequests, a NIP-42 authenticated requester, an info.self consistent with the relay signing key, and a per-pubkey budget under the new limits.invite.rateLimits (5/hour by default). This also makes the previously inert nip43.inviteRequestWhitelist setting take effect. The minted event is never persisted and never broadcast: the claim tag is a bearer secret and is sent only to the socket that asked for it.

    Two fixes the flow depended on. The relay signs its own events with a key derived from SECRET, but info.self was a hand-edited string that nothing validated — by default it was a placeholder that is not a pubkey at all, so any NIP-43 client verifying a relay-signed event against self would reject it. info.self is now optional: when unset or unparseable, NIP-11 advertises the derived signing pubkey instead, and nostream info prints that pubkey so operators can pin it.

    Kind 28935 also sits in the ephemeral range, so a client-published one fell through to EphemeralEventStrategy and was broadcast to every subscriber — including everyone subscribed to kind 28935 waiting for a real invite. Anyone could inject a forged claim tag into that subscription. It is now rejected with an OK false and never broadcast, and bypasses the NIP-43 admission gate so that rejection actually reaches non-members, who are the ones most likely to publish it by mistake while trying to obtain a code.

    CLI.md and README.md now describe the request flow. CLI.md previously claimed the relay “does not yet generate kind 28935 on REQ”, and never mentioned that nostream info prints the signing pubkey that CONFIGURATION.md tells operators to pin.

  • #676 0bfa0b5 Thanks @Anshumancanrock! - Add NIP-43 join/leave request event strategies (kinds 28934/28936) with NIP-42 auth enforcement, created_at freshness validation, invite code claiming, and admission management. When nip43.enabled is set, publishing is restricted to admitted members even without payments enabled, and NIP-43 is advertised in the NIP-11 document (hidden when disabled). Join/leave update the admission cache so membership changes take effect immediately.

  • #675 5a70839 Thanks @Ferryx349! - feat(nip66): add shared relay probe engine for DNS, TLS, WebSocket RTT, and NIP-11 checks

  • #741 afa8999 Thanks @Ferryx349! - feat(nip66): publish kind 30166 and 10166 relay health events after probe runs

    After each relay monitor probe run, sign and store NIP-66 relay discovery and monitor announcement events using the configured monitor identity, bootstrap kind 0/10002 on first run, and persist via the existing parameterized replaceable event path.

    Fixes #696

  • #724 d14b1e9 Thanks @Ferryx349! - feat(nip66): add RelayMonitorWorker cluster worker and probe scheduler

  • #689 e294a71 Thanks @Ferryx349! - Add NIP-66 relay monitor settings foundation with defaults for probe interval, timeouts, targets, monitor identity, and DNS cache TTL.

  • #644 2f6d773 Thanks @Anshumancanrock! - feat: reject NIP-70 protected events and reposts embedding them

  • #730 ef4123e Thanks @Anshumancanrock! - feat(admin): accept NIP-98 Authorization on protected admin API routes

  • #722 cf5ea4f Thanks @Anshumancanrock! - feat(nip98): add Authorization header event verifier for HTTP auth (kind 27235)

  • #781 8d29f15 Thanks @Ferryx349! - feat(admin): operator notification backend with Postgres outbox

    Adds transactional outbox dispatch for operator alerts (HTTP, Discord, Slack, Telegram), delivery log, admin.notifications settings, event hooks for admission invoices and settings changes, and admin test/history endpoints. Closes #759.

  • #763 358763a Thanks @Ferryx349! - feat(ops): add /readyz readiness probe for Postgres and Redis

    Adds a public readiness endpoint for zero-downtime deploy workflows. HAProxy (or similar) can use /readyz to confirm an instance can serve traffic before cutover, while /healthz remains a lightweight liveness check.

  • #672 595c0a6 Thanks @Ferryx349! - refactor: extract shared settings-config module and guided schema for admin settings editor foundation

  • #779 f6ee3e3 Thanks @Priyanshubhartistm! - feat: wire the WoT graph into adaptive PoW difficulty

    Adds limits.event.pow.wotThresholds, letting operators reduce (or bypass) the eventId PoW requirement for pubkeys within their configured WoT distance. A direct follow can post instantly under load while an unknown pubkey pays the full adaptive difficulty. Disabled by default (no thresholds configured); requires wot.enabled to have any effect, since a pubkey’s distance is otherwise always unknown.

  • #745 276fe16 Thanks @Priyanshubhartistm! - feat: add a Web of Trust graph service that tracks NIP-02 follow distance from an operator-configured seed pubkey

    Adds a WotGraphService that builds a trust graph rooted at wot.seedPubkey, updated in real time as kind-3 contact list events are ingested, with configurable depth (wot.maxDepth) and a minimum-followers threshold for 2+ hop trust (wot.minimumFollowers). Exposes getDistance() and isTrusted() for other parts of the relay to query. Disabled by default (wot.enabled: false).

  • #773 5577070 Thanks @Ferryx349! - feat(shutdown): drain WebSocket clients on SIGTERM

    On SIGTERM, /readyz returns 503, new WebSocket connections are rejected, and existing clients receive Nostr CLOSED messages before the socket closes. Drain is bounded by WS_DRAIN_TIMEOUT_MS (default 30s).

Patch Changes

  • #714 df1ed5d Thanks @Ferryx349! - fix(admin): update aria-expanded and label when mobile menu is toggled

  • #680 f92eabe Thanks @Priyanshubhartistm! - fix: advertise NIP-13 (Proof of Work) support in supportedNips

  • #750 f5c8dc8 Thanks @Anshumancanrock! - deploy: run production migrations from the relay image

    Bake migrations/ and knexfile.js into the runtime image and point the prod compose migrate service at that image so schema cannot drift from the code that ships.

  • #743 f36410a Thanks @Ferryx349! - ci: build and push container image to GHCR after CI passes on main

    Adds a GitHub Actions workflow that publishes ghcr.io/cameri/nostream:main and a per-commit sha-* tag once the CI Checks workflow succeeds for pushes to main.

  • #775 59b1e51 Thanks @Anshumancanrock! - fix: return COUNT results for filters with generic tag queries (#e, #p, #g, #h), which projected event_id twice and failed with “error: unable to count events”

  • #646 eb64d8a Thanks @dependabot! - chore(deps): bump js-yaml from 4.1.1 to 4.2.0

  • #647 68da3d4 Thanks @dependabot! - chore(deps): bump ws from 8.20.1 to 8.21.0

  • #705 95a672e Thanks @dependabot! - chore(deps): bump axios from 1.16.0 to 1.18.0

  • #751 8509aea Thanks @Ferryx349! - deploy: minimal server bootstrap with optional settings overrides

    Add deploy/bootstrap.sh, document what operators must keep locally vs what ships in the image, and stop seeding a full settings.yaml on first boot so release defaults merge with optional overrides only.

  • #744 8fa72d6 Thanks @Ferryx349! - deploy: add production Docker Compose stack for relay servers

    Adds a minimal prod compose file, migrate image Dockerfile, and server layout docs for deployments that pull ghcr.io/cameri/nostream:main instead of building on the host.

  • #765 3690bd8 Thanks @Ferryx349! - ci: disable CodeQL workflow

    Removes the CodeQL Advanced GitHub Actions workflow, custom query pack, config, and route suppression comments to stop false-positive security alerts on admin routes that already use custom auth and rate limiting.

  • #694 7c4b728 Thanks @Priyanshubhartistm! - fix: de-duplicate events returned by generic tag-filter subscriptions

    EventRepository.findByFilters() left-joins event_tags for generic tag filters (#e, #p, etc.) without deduplicating the result. An event matching more than one tag row for the same filter (e.g. {"#p": ["a", "b"]} matching an event tagged with both) was returned once per matching event_tags row, so subscribers received the same EVENT message multiple times. The query now selects DISTINCT events.* for tag-filtered queries so each stored event is returned at most once. This also covers generic tag filters combined with a NIP-50 search term (e.g. {"search": "...", "#p": ["a", "b"]}), which take the search branch and are now de-duplicated as well.

  • #771 b07f9c3 Thanks @chappie-daemon! - fix: enforce limits.client.subscription.maxFilterValues on REQ and COUNT filters

    Filters whose array criteria (ids, authors, kinds, #<tag>) hold more than maxFilterValues values in total are now rejected with Too many filter values instead of being handed to PostgreSQL as an unbounded WHERE IN (...). The limit was previously defined in settings and surfaced in the admin settings editor while being read by nothing at all.

    The enforced limit is also advertised in the NIP-11 limitation object as max_filter_values, a non-standard extension since NIP-11 has no field for per-filter value counts.

  • #703 7af0387 Thanks @Priyanshubhartistm! - Fix the Content-Security-Policy connect-src directive for relays served over plain ws://.

    The web app factory derived an HTTP(S) origin from the relay’s WebSocket URL but mapped ws: to the invalid scheme ':', which the WHATWG URL API silently ignores. As a result the connect-src directive kept a ws://… entry instead of the intended http://… origin for local/dev, Tor, or reverse-proxied setups. The ws: protocol now correctly maps to http:.

    Adds regression test coverage for the protocol mapping (getWebProtocolForRelay, extracted from createWebApp so it can be unit tested directly), since this file previously had no test coverage at all.

  • #708 a76d0b5 Thanks @Priyanshubhartistm! - fix: reject expiration timestamp 0 and millisecond-scale values, and accept safe-integer second-based timestamps up to the Postgres int4 max (2038-01-19T03:14:07Z) in getEventExpiration()

  • #747 14cca60 Thanks @Ferryx349! - fix(ci): publish container image after CI passes on main

    Removes the standalone publish workflow and its unsafe workflow_run trigger. Image publish now runs as the final job in checks.yml on pushes to main, after lint, build, and tests succeed.

  • #735 f0aab15 Thanks @Ferryx349! - fix: include event id in expired and rate-limited rejection logs

    Expired and rate-limited event rejections logged event %s rejected: ... without passing event.id, so operators saw a literal %s instead of the event id.

  • #715 9361601 Thanks @Priyanshubhartistm! - fix: abort in-flight streaming queries when a subscription is cancelled

  • #746 7297b96 Thanks @Anshumancanrock! - fix(payments): stop stale invoices from wedging payment polling

    A relay could stop clearing payments entirely, needing delete from invoices to recover. Two things combined to cause it.

    Invoices created without an expiry could never be retired, because the expiry check treats a missing date as “not expired”, so the maintenance worker left them pending forever. The LNURL processor set no expiry on any invoice, making this certain there rather than incidental. Invoices now fall back to payments.invoiceExpirySeconds when the processor reports no expiry of its own, and existing pending rows without one are backfilled.

    Separately, each maintenance pass re-read the same oldest page of pending invoices, so one page of invoices that never resolve starved every newer one indefinitely. The worker now advances through the queue and wraps at the end, keeping the same per-pass cost while guaranteeing every pending invoice is eventually polled.

  • #786 e87e1af Thanks @Priyanshubhartistm! - fix(nip56): skip targetless report rows, record every p/e target, batch report inserts in one transaction, and warm the WoT graph at boot instead of blocking the first report on a cold-start rebuild

  • #733 9fb1c10 Thanks @Ferryx349! - test(nip66): add integration tests for RelayMonitorWorker snapshot storage

  • #725 849c3f7 Thanks @Anshumancanrock! - feat(http): build absolute request URL from relay_url

  • #726 3d3848e Thanks @Anshumancanrock! - feat(redis): add setKeyIfNotExists for one-time claims

  • #640 ca23be1 Thanks @Anshumancanrock! - test: optimize nip05.spec.ts & nip03.spec.ts resource management

    • Lift sinon stub to before/after in verifyNip05Identifier tests (create once, reset between tests)
    • Extract SSRF guard callback once in before instead of per-test beforeEach
    • Pre-build shared OTS buffers and attestations at module scope to eliminate redundant Buffer.concat calls
    • Add shared event factory for extractNip05FromEvent tests
  • #686 cb7daf6 Thanks @Priyanshubhartistm! - fix: stop checking additional rate limit windows once a client is already rate-limited

    isRateLimited() in EventMessageHandler and WebSocketAdapter looped through every configured rate limit window even after one had already tripped, calling rateLimiter.hit() (a Redis write) for each remaining window. Both now return as soon as the first exceeded window is found, avoiding redundant Redis writes for clients that are already being limited.

  • #684 3648954 Thanks @Priyanshubhartistm! - fix: await Redis EXISTS call in RedisAdapter.hasKey() so it reflects actual key presence instead of always returning true

  • #711 220949d Thanks @Priyanshubhartistm! - fix: include the actual error message in replaceable event rejection responses

    ReplaceableEventStrategy.execute() sent clients a bare error: command result (with no message body) whenever eventRepository.upsert() failed for a reason other than a duplicate event id. The underlying error.message was caught but never included in the response, leaving clients with no actionable information about why the event was rejected. The command result now includes error.message.

  • #682 dc78df5 Thanks @Priyanshubhartistm! - fix: prevent crash in NIP-11 relay information document when payments settings are absent

3.0.0

Major Changes

  • #524 b3effd1 Thanks @vikashsiwach! - Use exact pubkey matching for fee-schedule whitelists and event pubkey whitelist/blacklist checks.

  • #574 f1c1118 Thanks @Mahmoud-s-Khedr! - Add a brand-new unified nostream CLI/TUI that replaces the legacy scripts/* shell wrappers for lifecycle, setup, info, config, data, and development workflows.

    Fixes - fixed some consistnacy issues after the migration from npm to pnpm

Minor Changes

  • #522 7edd6c3 Thanks @a-khushal! - added NIP-45 COUNT support with end-to-end handling (validation, handler routing, DB counting, and tests).

  • #629 36f8bad Thanks @Anshumancanrock! - feat: NIP-42 AUTH handler and WebSocket session wiring

  • #534 a07b0f6 Thanks @archief2910! - Add hot-path PostgreSQL indexes for subscription, vanish, retention, and invoice queries; add db:benchmark and db:verify-index-impact tooling; document index rationale and benchmarking. Closes #68.

  • #556 d8f62b4 Thanks @saniddhyaDubey! - perf: added k6 performance tests for connection and message rate limiting

  • #623 54139ed Thanks @saniddhyaDubey! - new user-facing config field

  • #476 49322a9 Thanks @saniddhyaDubey! - Add EWMA rate limiter with configurable strategy support

  • #602 d3ba328 Thanks @CKodidela! - Add relay support for the Marmot Protocol (E2EE group messaging over Nostr).

    Supported MIPs: 00 (KeyPackages), 01 (Group Construction), 02 (Welcome Events), 03 (Group Messages).

    • kind 443 (legacy KeyPackage): stored as a regular event
    • kind 10051 (KeyPackage relay list): stored as a replaceable event
    • kind 30443 (KeyPackage): stored as a parameterized-replaceable event with d-tag deduplication
    • kind 444 (Welcome rumor): blocked from direct publishing; must travel inside a kind 1059 gift wrap
    • kind 445 (Group Event): dedicated strategy validates the required h tag (nostr_group_id) before storing; #h tag subscriptions work via the existing generic tag index
    • NIP-11 relay info now advertises supported_mips: [0, 1, 2, 3]
  • #515 5c12f36 Thanks @archief2910! - Add NIP-03 OpenTimestamps support for kind 1040 events: structural .ots validation, Bitcoin attestation requirement, digest match to the referenced e tag, and relay metadata updates (#105).

  • #589 25d5405 Thanks @CKodidela! - Add NIP-25 Reactions support for kind 7 and kind 17 events: reaction utility helpers (isReactionEvent, isExternalContentReactionEvent, isLikeReaction, isDislikeReaction, parseReaction), schema validation enforcing required e tag on kind 7 and required k/i tags on kind 17, unit tests, and integration tests.

  • #585 ce59383 Thanks @CKodidela! - Add NIP-65 Relay List Metadata support for kind 10002 events: relay list utility with isRelayListEvent and parseRelayList helpers, unit tests, and relay information document updated to advertise NIP-65 (#577).

  • #514 214bef5 Thanks @Anshumancanrock! - Add gzip and xz compression support to event import/export flows.

    • Export supports --compress/-z with --format gzip|gz|xz.
    • Import auto-detects compressed input by extension and magic bytes and decompresses in a stream pipeline.
    • Includes docs updates and unit/integration test coverage for compression paths.
  • #628 ce7b838 Thanks @Ferryx349! - refactor(http): remove deprecated network.remote_ip_header fallback and rely on network.remoteIpHeader

  • #539 bdd4f6b Thanks @Justxd22! - Add NWC (NIP-47) as a payments processor for admission invoices, including configurable invoice expiry and reply timeout handling, compatibility for legacy NWC URI schemes, and docs/env updates.

  • #497 e1a7bfb Thanks @phoenix-server! - Release highlights:

    Features

    • NIP-05 verification support (#463)
    • NIP-17 & NIP-44 v2 Modern Direct Messages (#458)
    • NIP-62 vanish event support (#418)
    • Vanish optimization (#446)
    • Export events to JSON Lines format (#451)
    • Import .jsonl events into events table (#414)
    • Opt-in event retention purge (#359, #412)
    • Wipe events table script (#450)
    • Nginx reverse proxy in docker-compose (#423)
    • Docker DNS pre-flight check for connectivity verification (#398)
    • Strict validation for payment callbacks (#426)
    • Real home page with templated pages (#409)

    Bug Fixes

    • NIP-01 compliance: deterministic event ordering by event_id
    • NIP-01 compliance: correct dedup keys for parametrized replaceable events (#480)
    • NIP-01 replaceable event tiebreaker (#416)
    • NIP-11 served only on root path instead of relay path (#399)
    • Dockerfile: run database migrations in CMD (#422)
    • Added expired_at filter to message pipeline (#403)
    • Removed unsafe-inline and implemented script nonces for CSP hardening (#394)
    • Axios upgraded to fix CVE-2025-62718 (#466)

    Refactors & Chores

    • Migrated validation from Joi to Zod (#484)
    • Migrated linting and formatting to Biome (#452)
    • Converted user admission to PostgreSQL stored function (#428)
    • Upgraded to Node.js 24 LTS (#419)
    • Updated dependencies (express, body-parser, js-yaml, axios)
  • #622 6a0a5fa Thanks @Anshumancanrock! - feat: add NIP-42 types, schemas and constants

Patch Changes

  • #555 ddc811d Thanks @Anshumancanrock! - Migrate project tooling from npm to pnpm across CI workflows, Docker setup, hooks, and contributor commands.

  • #600 dfa2838 Thanks @saniddhyaDubey! - fix: maxLimit checks added to subscription message handler

  • #572 b718036 Thanks @dependabot! - Bump dev dependency uuid from 8.3.2 to 14.0.0

  • #616 f9f6d64 Thanks @Anshumancanrock! - fix: check payments.enabled in callback route middleware

  • #597 7da1b9a Thanks @Anshumancanrock! - refactor: only register OpenNode, LNbits, and Zebedee callback routes when their processor is active

  • #438 f5ba023 Thanks @tharu-jwd! - fix: close dead connections even if they have active subscriptions

  • #546 faa7ed2 Thanks @Justxd22! - Fix root HTML negotiation and subpath-aware template links behind trusted proxies.

  • #613 36e5af8 Thanks @dependabot! - chore(deps): bump axios from 1.15.1 to 1.15.2

  • #617 50822b9 Thanks @dependabot! - chore(deps): bump fast-uri from 3.1.0 to 3.1.2

  • #618 c6368db Thanks @dependabot! - chore(deps): bump ws from 8.20.0 to 8.20.1

  • #620 dac92b4 Thanks @dependabot! - chore(deps): bump uuid from 8.3.2 to 14.0.0

  • #630 1295272 Thanks @dependabot! - chore(deps): bump axios from 1.15.2 to 1.16.0

  • #575 b7324a6 Thanks @kanishka0411! - Expire stale pending invoices when LNbits no longer has the invoice or reports it as unpaid past its expiry time.

  • #592 0119c74 Thanks @Anshumancanrock! - Security: override serialize-javascript to >=7.0.3 (CVE RCE, GHSA-5c6j-r48x-rmvq)

  • #553 3c78e61 Thanks @Anshumancanrock! - Fix replaceable batch upserts to apply NIP-01 tie-breaker semantics when timestamps are equal by comparing event IDs.

  • #583 321a9cc Thanks @kanishka0411! - Allow generic tag filters to match empty string tag values.

  • #586 2418209 Thanks @kanishka0411! - Implement geohash wildcard/prefix behavior for #g filters (closes #265): a criterion ending in * matches any event g tag whose value starts with the prefix before *; exact matching (no *) is unchanged. Only normal geohash prefixes are intended as input. This is a Nostream extension, not part of NIP-12.

  • #584 a6d32b1 Thanks @Anshumancanrock! - Use timingSafeEqual for Nodeless webhook HMAC verification and guard against missing NODELESS_WEBHOOK_SECRET

  • #591 f31be1c Thanks @Priyanshubhartistm! - fix: add husky install fallback for non-dev environments

  • #551 7fc0552 Thanks @CKodidela! - Add unit tests for InvoiceRepository and UserRepository with sinon-stubbed DB client

  • #538 9496685 Thanks @saniddhyaDubey! - Fix: Restore CONFIGURATION.md with proper settings and remove duplicate changesets created during recovery

  • #557 32a1ec5 Thanks @a-khushal! - update NIP-11 relay info fields and CORS, with test and docs updates

  • #593 f599b1d Thanks @YashIIT0909! - fix: resolve TOCTOU race condition and key collisions in SlidingWindowRateLimiter

  • #511 a38d402 Thanks @Priyanshubhartistm! - Migrate runtime logging to pino across adapters, services, workers, and controllers, and stabilize CI-related fixes for coverage and integration workflows after rebasing.

  • #552 25f9637 Thanks @vikashsiwach! - Add integration tests for NIP-02 contact lists (Kind 3)

  • #527 4d030c7 Thanks @kanishka0411! - Add NIP-11 integration tests and fix max_filters mapping in relay information document.

  • #547 664168a Thanks @Priyanshubhartistm! - Improve NIP-22 created_at limit handling coverage and boundary reliability.

    This adds integration coverage for accepted and rejected events across configured positive and negative created_at deltas, and keeps rejection semantics consistent (rejected) for out-of-range timestamps.

  • #537 a89a95e Thanks @vikashsiwach! - Add NIP-62 integration tests for Request to Vanish

  • #643 faf55f1 Thanks @Anshumancanrock! - feat: add NIP-70 protected event detection utility

  • #596 250c767 Thanks @CKodidela! - Normalize runCommandWithOutput to return a CommandResult discriminated union instead of rejecting on spawn errors, fixing a crash in info --json when Docker is not installed.

  • #625 69d6187 Thanks @Ferryx349! - Refactor EventRepository query construction to reduce method complexity.

  • #497 e1a7bfb Thanks @phoenix-server! - Replace semantic-release with changesets for explicit PR-level version management. Contributors now add a changeset file per PR; the Changesets Release workflow handles version bumps and GitHub releases.

  • #627 c87dd03 Thanks @Ferryx349! - test(integration): verify response content-type across core HTTP paths

  • #562 de14f3c Thanks @Priyanshubhartistm! - Add integration test coverage for NIP-04 encrypted direct messages (kind 4).

  • #525 b09e23a Thanks @kushagra0902! - Dedup keys were taking multiple tags, that was not according to NIP-01 behaviour.

  • #568 c0c1c35 Thanks @tharu-jwd! - fix: static mirroring silently drops events when mirror has no limits configured

  • #604 40abf66 Thanks @phoenix-server! - Add unit tests for maintenance service factory instantiation and dependency wiring.

  • #493 5bf1a58 Thanks @kanishka0411! - Fix IP spoofing via unconditional trust of x-forwarded-for header

  • #606 47a9f4e Thanks @phoenix-server! - Add unit tests for maintenance-worker-factory with 100% code coverage

  • #545 a9ae0cd Thanks @Justxd22! - Fix Redis cache connection config to skip AUTH when REDIS_PASSWORD is unset

  • #548 00240a9 Thanks @CKodidela! - Support uppercase tag filters (#A-Z) in filter schema validation

  • #566 8eee70f Thanks @a-khushal! - add support for NIP-14 subject tags in text notes, with units tests to validate parsing and repository behavior