nostream
3.17.0
Minor Changes
-
#1199
cce55b6Thanks @Priyanshubhartistm! - feat(nip43): publish the kind 13534 membership listWith the new
nip43.publishMembershipListsetting (off by default) the relay publishes a replaceable kind 13534 event, signed by its own key, with the NIP-70-tag and onemembertag 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 wheninfo.selfdoes 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
36ce4d5Thanks @Ferryx349! - feat(peering): show relationship state, terms and traffic split in adminThe 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
cbc9c1dThanks @Ferryx349! - feat(peering): surface buyer invoices and budgets in the admin consoleWatches 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
be2aba4Thanks @Ferryx349! - feat(peering): add the buyer invoice ledger and budget primitivesAdds the storage and decoding foundation for buying peering: a
peering_invoicesledger deduped by BOLT11 payment hash, per-peer/globalpeering_budgetscounters, a narrow BOLT11 decoder, and the buyer settings contracts. Automatic payment and admin approval ship in the follow-up slices. -
#1168
9c5917dThanks @Ferryx349! - feat(peering): enforce buyer budgets before paying peer invoicesAdds 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
7bbf889Thanks @Ferryx349! - feat(peering): add owner-attested peering requestsPeers 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,preferredorwaived; configured peers keep working without proof-of-work by default.nostream peering requestproduces and sends the request using an owner key supplied outside settings. Operational traffic never requires the owner’s key.
Patch Changes
-
#1234
bef8c4aThanks @Priyanshubhartistm! - fix(admin): record a logout in the audit history only when it ends a sessionPOST /admin/logoutis public, because it has to clear the session cookie whoever sends the request, and it wrote anadmin.logoutrecord 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
593ad2dThanks @Priyanshubhartistm! - fix(admin): the settings API cannot change the admin password hash through a parent pathPATCH /admin/settingsrefused a change toadmin.passwordHash, but it only looked at the path of the request. A request for the pathadminwith a newadminobject, alone or inside a batch of changes, replaced the object and so wrote or removedadmin.passwordHashwithout 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 theadminobject with the same hash in it, and changing any other admin setting, still work. -
#1200
49dd6f8Thanks @Priyanshubhartistm! - fix(cli): do not shadow settings.json with the defaultsnostream startandnostream setupcopy the default settings to.nostr/settings.yamlwhen that file is missing. The relay readssettings.yamlfirst and falls back to the deprecatedsettings.jsononly when there is no yaml, so on a deployment that still had only asettings.jsonthe copy replaced every override in it with the defaults: an admission policy such asnip43.enabled, payment settings and limits stopped applying, silently. The defaults are now copied only when neither file exists, so asettings.jsonkeeps working until the admin console ornostream configwrites asettings.yaml. -
#1236
1ab0404Thanks @Priyanshubhartistm! - fix(cli): keep the .env file private to its ownernostream setupandnostream config env setwrote.envwith the default file mode, which under the usual umask makes it readable by every local account that can reach the project directory. The file holdsSECRET, which signs the admin session tokens, and other credentials. The CLI now creates.envreadable by its owner only (mode 0600), including when it starts from.env.example, and restricts an existing.envto the owner whenever it writes to it. An existing.envthat 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
65d5455Thanks @Priyanshubhartistm! - fix(cli): mask DB_URI and REDIS_URI innostream config envoutputnostream config env listandconfig env gethide the value of secret keys unless--show-secretsis given, but they only recognised keys with SECRET, PASSWORD, API_KEY or PRIVATE_KEY in the name.DB_URIandREDIS_URIcan 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
baa1c81Thanks @Priyanshubhartistm! - fix(cli): show control characters innostream infooutput as escapesnostream infoprinted 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 --jsonis unchanged. -
#1160
1267cecThanks @Priyanshubhartistm! - fix(nip42): require auth to COUNT a filter that names no kinds when restricted reads are onWith
nip42.restrictedReadsenabled, 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 withoutkindsis now treated like one that names a restricted kind, the same rule NIP-77 reconciliation already follows: it must be scoped withauthorsor#pto the authenticated client’s own pubkeys. Relays that do not enablenip42.restrictedReadsare not affected. -
#1232
63bb7b5Thanks @Priyanshubhartistm! - fix(nip09): collect the ids of a deletion request in one passDeleteEventStrategybuilt the list of event ids from theetags of a kind-5 event with[...eventIds, tag[1]]inside areduce, which copies everything collected so far for each tag. An event with several thousandetags (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
616c16eThanks @chappie-daemon! - fix(import): collect the ids of a deletion request in one loop and cap them at 65,533The importer collected the ids a kind-5 deletion request names by copying the list for every
etag, so a request with 50,000 tags held the import for seconds, and one with more than 65,533 validetags 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 whoseetags 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
dddbcc0Thanks @Priyanshubhartistm! - fix(nip05): a changed NIP-05 identifier does not inherit the earlier verificationWhen an author published a kind-0 profile with a different
nip05and the lookup failed with a transient error (a timeout, a 5xx), the new identifier and domain were saved with the previous identifier’sisVerifiedandlastVerifiedAt. With NIP-05 modeenabledthat 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
98d2359Thanks @Priyanshubhartistm! - fix(nip05): a replaced kind-0 profile no longer changes the author’s NIP-05 verificationA 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 anip05field 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 modeenabledblocked the author from publishing. The NIP-05 handling now runs only for a profile that is the author’s current one (the latercreated_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
b5789fbThanks @Ferryx349! - fix(peering): keep wallet payments recoverable and request invoices before the feedSubscribe 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
PAYINGfor recovery, while outgoing LNbits expiry no longer counts as a failed payment. Each payment attempt owns its row, may only leavePAYINGonce, 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
42ed600Thanks @Ferryx349! - fix(peering): retry serialization conflicts in invoice settlementA 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
14010afThanks @Ferryx349! - fix(peering): count failed invoice settlements and alert onceA paid peering invoice whose settlement rolls back is now retried with a persisted attempt counter and last error. After
peering.settlementFailureThresholdfailures (default 5), onepeering.payment.failednotification is enqueued for the operator, and the invoice stays in the retry set. Duplicate callbacks and underpayments are not counted. -
#1260
55987d8Thanks @Ferryx349! - docs(peering): explain the unconfirmed-settlement cursorThe 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
fb4a892Thanks @Ferryx349! - fix(peering): keep unconfirmed settlements in the retry setA processor report that downgrades a completed peering invoice with
confirmed_atstill null no longer overwrites the storedCOMPLETEDstatus. The invoice remains in the settlement retry set until the period is committed. -
#1159
8f39038Thanks @Priyanshubhartistm! - fix(ops): retry a probe alert that could not be savedWhen 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
f42a762Thanks @chappie-daemon! - fix(subscriptions): stop an aborted REQ from stranding its database connectionA 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
__knexUidTypeError 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 satactiveinClientReadfor 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. -
bbf014eThanks @Priyanshubhartistm! - fix(admin): refuse pubkeys in the settings lists that cannot match an eventThe pubkey blacklist, the pubkey whitelist and the rate-limit bypass list (
limits.event.pubkey.blacklist,limits.event.pubkey.whitelistandlimits.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
470d3f9Thanks @chappie-daemon! - docs: split the README into a landing page and reference guidesThe 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.mdanddocs/OPERATIONS.mdverbatim, and the standalone setup points at the development quick start inCONTRIBUTING.mdinstead of repeating it.docs/SETUP.mdnow 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/callbackconvention, and the standalone database and Redis steps.docker-compose.ymlnow forwardsNWC_URL, and.env.examplenames it correctly.
3.16.0
Minor Changes
-
#1088
e1f92adThanks @Ferryx349! - feat(peering): deliver paid peering invoices and gate peer feedsConfigured peers can request their BOLT11 invoice as a signed
kind 402event and pay it through Relay B’s existing processor. FeedREQ,COUNTand 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
1d5c473Thanks @Ferryx349! - feat(peering): add the paid peering billing ledger -
#1089
15de73aThanks @Ferryx349! - feat(peering): renew, lapse and expose paid peering accessThe 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/peeringand 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
afb381fThanks @Priyanshubhartistm! - fix(admin): revoke the session token at logout, not only its cookiePOST /admin/logoutdeleted 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 (aBearerclient, 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
6b3db4dThanks @Priyanshubhartistm! - fix(cli): reject a SECRET that cannot be saved to .env and read back unchanged -
#1156
69197f7Thanks @Priyanshubhartistm! - fix(logging): do not write credential headers to debug logsDebug logging of incoming requests printed every header, so the admin session cookie, an
Authorizationbearer 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
8e90d9eThanks @Priyanshubhartistm! - fix(settings): reload settings when either settings.yaml or settings.json changesA worker watched only the settings file whose extension existed when it started. The loader reads
settings.yamlfirst and falls back to the deprecatedsettings.json, and the admin console and the CLI always writesettings.yaml, so a worker that started fromsettings.jsonnever 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
5c4b4f0Thanks @Ferryx349! - fix(admin): serialize every settings-file writer with the settings write lockThe 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
-
#1130
ef017e5Thanks @dependabot! - chore(deps): bump astro from 7.4.4 to 7.4.7 -
#1092
508d8c1Thanks @Priyanshubhartistm! - fix(payments): a payment for a cheaper plan no longer downgrades a pubkey whose dearer plan is still running
3.15.2
Patch Changes
-
#1072
81edd16Thanks @chappie-daemon! - test(relay): add non-sequential socket test suite for connection and command racesAdds 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
4b4b247Thanks @chappie-daemon! - Admission now runs inside a serializable transaction.admit_user()opens withPERFORM ASSERT_SERIALIZED(), so calling it on the default read-committed connection raisedSN_NOT_SERIALIZABLEand 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
d6b98abThanks @aikido-autofix! - feat(web): set security headers on every web responseThe 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-Policiesand the cross-origin isolation headers through Helmet.The app’s own nonce-based
Content-Security-Policyremains 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 byX-Frame-Options; the dashboard’s own Grafana frame is unaffected.
Patch Changes
-
#1067
0832ffdThanks @Ferryx349! - fix(payments): accept LNbits 1.x callback bodiesLNbits 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
dfcc967Thanks @Ferryx349! - feat(admin): account for peer on-demand requestsRecords on-demand
REQ,COUNT, andNEG-OPENrequests 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
e37b284Thanks @Ferryx349! - feat(peering): rate-limit on-demand requests from authenticated peersAuthenticated peers can request events outside their standing feed with a normal
REQ,COUNT, or ad-hocNEG-OPENsession. Those requests continue to use peer subscription and NIP-77 limits instead of client limits, and are now bounded per peer pubkey bylimits.peer.request.rateLimits(default 300 requests/minute acrossREQ,COUNT, andNEG-OPEN).Refused
REQ/COUNTcalls receiveCLOSEDwith arate-limited:reason and retry hint; refusedNEG-OPENsessions receiveNEG-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
ba8691aThanks @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
ccb1c40Thanks @Ferryx349! - fix(relay): handle messages sent immediately after a WebSocket opensAttaches 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
e410a75Thanks @Ferryx349! - feat(peering): treat authenticated peers as feeds, not clientsAdds
limits.peer, a separate limit set for connections that have proven a configuredpeering.peerspubkey with NIP-42 AUTH. Peer subscriptions uselimits.peer.subscriptioninstead oflimits.client.subscription, and peer messages uselimits.peer.messagein a separate rate-limit bucket, so a full-feed subscription cannot trip the client EWMA limiter or the clientmax_subscriptionscap.Peers are eligible for full feeds by default:
maxLimitis uncapped and the subscription caps are higher. An omitted peer REQlimitqueries 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.mdanddocs/PEERING.md. -
#1043
7090cbbThanks @Ferryx349! - feat(peering): sync configured peers over NIP-77 and a live feedAdds an outbound peering-sync worker. For every enabled
peering.peersentry it reads the peer’s NIP-11peering.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 atGET /admin/peering, shown in the admin console’s Operations view, and included in diagnostics exports.
3.11.0
Minor Changes
-
#1030
9b585dbThanks @Ferryx349! - feat(peering): authenticate peer relays with NIP-42 using the relay keypairAdds the peering identity layer: a configured
peering.peerstrust list keyed by relay pubkey (hex ornpub), 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[].relayUrlis the outbound address only — identity is always the verified pubkey, never the URL. Relay key storage and the AUTH exchange are documented indocs/PEERING.md, and the new fields are validated with the rest of the settings document.
Patch Changes
-
#1024
eb304b8Thanks @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
searchPathfor 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 declaresknex2.4.2 on both the default branch andrewrite/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.tspassingbindings as readonly unknown[]todb.raw(), is fixed by dropping the assertion:toSQL().bindingsis already the accepted type. The emitted JavaScript is byte-identical with and without the assertion.
3.10.2
Patch Changes
-
#986
3696f3eThanks @Ferryx349! - fix(admin): Greptile follow-ups for moderation limits and activity statsModeration 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), notevent_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 withstartgreater thanend. PATCH and moderation actions return the normalized limits read back from settings after save.
3.10.1
Patch Changes
-
#1011
fd7679bThanks @chappie-daemon! - fix(rate-limit): send the backoff the strategy actually means, name an outage as an error, and bucket messages by typeThree defects on one wire path, from the spike in #1004.
The EWMA backoff was a half-life, sent as a delay.
RateLimit.periodis the decay half-life underewma, so the time until a limit lifts isperiod · log2(R_new / rate), notperiod. Withrate: 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 returnsperiod · log2(score / rate). It was only accidentally safe before: the hash carried a TTL of exactlyperiod, 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 answerserror: rate limiter unavailableand still rejects the event; fail-closed behaviour is unchanged.The message bucket ignored the message type. One bucket per client meant a
REQcould be refused because itsEVENTs 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.hitreturnsIRateLimiterResult(limited, plusretryAfterMswhen the strategy can estimate one) so each strategy answers in its own terms; a caller with no estimate keeps sending the period. -
#1012
d8095deThanks @chappie-daemon! - fix(startup): print the banner as text, and letLOG_FORMAT=jsonopt out of itdocker compose logs nostreamshowed 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 onerelay startingrecord 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
- #922
fcb33deThanks @Priyanshubhartistm! - feat(payments): add per-plan event rate limits and retention
Patch Changes
-
#1009
ad8c5c4Thanks @chappie-daemon! - build: pin the node base image in every file that names oneDockerfilepinnednode:24.22.1-alpineby digest, butDockerfile.railwayapp,Dockerfile.test,docker-compose.ymlandtest/integration/docker-compose.ymlstill saidnode: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
fa54cb0Thanks @chappie-daemon! - fix(settings): state that rate-limit periods are milliseconds and reject a period that is not oneEvery shipped limit counts in milliseconds —
1000,60000,900000,3600000— but nothing said so.RateLimit.periodis a barenumber, so an operator writingperiod: 60for a minute got a 60 ms window — and becauserateis 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
RateLimitand on everyrateLimitsblock inresources/default-settings.yaml, andvalidateRateLimitPeriodsrejects 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
469f1b1Thanks @Ferryx349! - feat(peering): advertise peering terms and scopes in NIP-11The relay information document now carries a
peeringsection built from the newpeeringsettings block. It advertises whether peering is offered, the feeds available askindsscopes with an absolutesince/untilrange or a rollingwindowSeconds, terms in the existing NIP-11 fee-object shape (amount,unit,period) where an emptytermslist means settlement-free, a peercontactor WebSocketendpoint, andmin_pow_difficulty— the NIP-13 work a peering request must carry,0meaning 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 allpeering.*fields are documented inCONFIGURATION.mdwith an example document.Closes #932.
-
#926
2819e30Thanks @Priyanshubhartistm! - feat(payments): let clients see their subscription tier
Patch Changes
-
#972
a46ae06Thanks @chappie-daemon! - fix(compose): keep dynamic container addresses off the static onesdocker-compose.ymlpinsnostream,nostream-dbandnostream-cacheto10.10.10.2–.4, but dynamic allocation drew from the bottom of the same/24. The observability stack has no dependency that orders it afternostream, sootel-collectorcould be given.2andnostreamthen failed to start withAddress 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, so10.10.10.1stays the trusted proxy, and the overlay pins (.5,.252,.253) stay outside the pool. -
#1005
b185f35Thanks @chappie-daemon! - ci(deploy): retry the website deploy on a transient Cloudflare failureRun 40103130697 failed at
Deploy the preview workerwith Cloudflare API errorcode: 10013after 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-leveltimeout-minutes. It retries onlycode: 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
dff00baThanks @chappie-daemon! - Add canonical first-party production relay setup guide at/docs/setupand replace outdated third-party guides inREADME.md. -
#1003
80b0a9eThanks @chappie-daemon! - test(redis): prove the relay keeps publishing after the cache loses its scriptsNothing 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 answeringNOSCRIPT. The adapter’s retry for that was added in #920 and had only a stubbed unit test:evalShawas mocked, which cannot catch a retry that stops working through the workers that actually call it.The new integration scenario publishes, runs
SCRIPT FLUSHagainst the same Redis, then publishes twice more.SCRIPT FLUSHis 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
42ed39eThanks @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
98bd234Thanks @chappie-daemon! - chore(deps): build and test on Node 24.22.1, which patches the Brotli decoderCVE-2026-111497 is an out-of-bounds write in every Brotli decoder up to 1.2.0, reachable by anything that decodes a
brstream. Node bundles its own decoder, so the fix is the Node release: 24.22.1 on the 24 line..nvmrcand both Dockerfile stages move from floatingnode:24-alpineto a pinnednode:24.22.1-alpine. -
#945
062ee00Thanks @chappie-daemon! - Namespace EWMA rate-limiter keys so they cannot collide with sliding-window keysThe 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 — aWRONGTYPEerror on every connection and message until the old key expired. EWMA now writes under anewma:prefix, which also keeps both strategies’ windows intact if the strategy is switched back. -
#965
ee65257Thanks @chappie-daemon! - fix(ci): publish legal image tags and keeplatestoff prereleasesA changesets relay release is tagged
nostream@3.7.0, and@is not legal in a Docker tag, so thetype=ref,event=tagrule handed buildx a tag it refused: the first live run of the Release workflow failed withinvalid tag ...: invalid reference formatand 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.Zas well beside it for a legacy tag, andlatestonly 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.mdanddocs/DEPLOY-RUNBOOK.mdno longer promisenostream@X.Y.Zas a pinnable image tag, and the runbook now names the receiver change that subscribing toreleaseevents depends on. -
#969
8ea15fcThanks @Ferryx349! - feat(website): add the relay peering launch film and home-page section -
#967
9c736c8Thanks @chappie-daemon! - ci(release): allow the image build to be dispatched for an existing tagA 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.ymlnow acceptsworkflow_dispatchwith ataginput, 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 ofnostream@3.8.0-rc.1still leaveslatestwhere it is.
3.7.0
Minor Changes
-
#895
a52cbfdThanks @Ferryx349! - Add admin Operations area with mirror and worker heartbeats, NIP-05 verification ops, storage counts, and dashboard view. -
#920
abd4a1bThanks @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
7e504e1Thanks @Priyanshubhartistm! - feat(payments): add the subscription data model and plan settings -
#909
7b4f627Thanks @Priyanshubhartistm! - feat(payments): add the subscription lifecycle, renewal invoices and plan-based write access -
#924
e417437Thanks @Priyanshubhartistm! - chore: sunset the StaticMirroringWorkerThe static mirroring worker is removed, together with the
mirroring.staticsettings and the mirror health table and/admin/ops/mirrorsroute of the admin console. Amirroring.staticthat is still configured is ignored and logs a warning at start-up. To sync events with another relay, use NIP-77 (Negentropy), for example withstrfry sync.
Patch Changes
-
#943
17157d5Thanks @chappie-daemon! - fix(payments): parse the ISO 8601time/expiryreturned by LNbits >= 1.0 so paid admissions are confirmed and expired invoices are retired -
#944
82124b0Thanks @chappie-daemon! - fix(ci): stop building and pushing container images outside a releaseRemove 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
ff53a73Thanks @Ferryx349! - Fix the operator notifications target type dropdown so the select chevron renders once on the right instead of tiling across the field whenconsole-inputandform-selectshare the same control.
3.6.1
Patch Changes
- #875
59c5ebfThanks @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
d11faf4Thanks @Ferryx349! - Add bounded NIP-66 probe history API and Network Health dashboard timeline
3.5.1
Patch Changes
-
#838
50ffe33Thanks @chappie-daemon! - fix(deps): resolve open dependabot security alertsBumps 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
82287d4Thanks @Ferryx349! - feat(website): add Astro marketing site with landing film, docs, changelog and community pagesAdds
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
f0bcdccThanks @Priyanshubhartistm! - feat(nip77): advertise NIP-77 in NIP-11 supported_nips while it is active and expose its settings in the admin console -
#818
7409006Thanks @Priyanshubhartistm! - feat(nip77): serve NEG-OPEN, NEG-MSG and NEG-CLOSE negentropy sync for the PostgreSQL event store
3.4.1
Patch Changes
-
#825
48fe9c4Thanks @chappie-daemon! - fix(settings): validateinfo.relay_urlis a usable absolute URLvalidateSettings()now rejects arelay_urlthat is not a valid absolute URL, parses with an empty host (scheme-only strings likelocalhost:8008), or uses a protocol other thanws/wss/http/https. Previously an invalid value started cleanly and then broke every HTTP request with500 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
36d2a30Thanks @Ferryx349! - feat(nip-01): send therate-limitedbackoff hint on CLOSEDWhen the per-IP message rate limit trips on a
REQorCOUNT, the relay now replies["CLOSED", <id>, "rate-limited: slow down", "<ms>"]with the tripped window’s period as the backoff, instead of aNOTICE. Other message types keep the existingNOTICE. -
#768
8a5600bThanks @Ferryx349! - docs(deploy): add deploy runbook and single-relay recreate script -
#809
4cf419fThanks @Priyanshubhartistm! - feat(nip77): add negentropy set-reconciliation core and a sorted event id query
Patch Changes
-
#810
0133088Thanks @chappie-daemon! - docs(readme): document Marmot Protocol MIP support -
#813
c81407dThanks @Ferryx349! - Reject settings where any rateLimits[].period is not greater than 0 -
#812
7e44de1Thanks @chappie-daemon! - feat(website): add the nostream 3.3.0 release film
3.3.0
Minor Changes
-
#806
0304b8aThanks @Anshumancanrock! - feat(storage): add aneventStore.backendsetting and build every event repository through one factoryDefaults to
postgres, the only backend for now. The backend is read once at startup and passed to every worker. -
#799
75d2a91Thanks @Ferryx349! - feat(admin): add NIP-11 vs probe mismatch warnings on Network HealthCloses #798
-
#807
f7d4b76Thanks @Ferryx349! - NIP-01: include an optional backoff (ms) as the fifth element ofrate-limitedOK messages -
#796
e861bebThanks @Ferryx349! - feat(nip66): add read/write RTT probes, NIP-42 detection, mirror targets, and enriched kind 30166 tagsExtends 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
3ea816cThanks @Ferryx349! - feat(deploy): add HAProxy blue/green compose stackTwo relays behind HAProxy with
/readyzhealth checks andoption 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 clusterprocess.send. -
#788
ce368e8Thanks @Priyanshubhartistm! - feat: execute hide action for actionable NIP-56 reportsAdds
nip56.hideActionableReports(defaultfalse): when true, events matching anactionablereport (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. Requiresnip56.enabledto have any effect. Previously an actionable report was only ever recorded, never acted on.
Patch Changes
-
#740
b68919dThanks @Priyanshubhartistm! - fix(cli): stopnostream infoandnostream invite createfrom hanging indefinitely when the database is unreachable -
#792
29dbed8Thanks @Anshumancanrock! - fix: match filters with several tag names and apply limit per filter
3.1.0
Minor Changes
-
#756
570a7ccThanks @Priyanshubhartistm! - feat: add relay-load-aware adaptive PoW difficulty (NIP-13)Adds
limits.event.powsettings 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 staticeventId.minLeadingZeroBitsvalue (the staticpubkey.minLeadingZeroBitscheck 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
837540bThanks @Ferryx349! - feat: add disabled-by-default admin API with password auth, session, and health endpoints -
#666
44f3bb4Thanks @Ferryx349! - feat: add admin observability dashboard with Grafana embed and provisioned metrics panels -
#653
8ab4825Thanks @Ferryx349! - feat: add OpenTelemetry metrics bootstrap with OTLP export for Prometheus -
#661
237b1a4Thanks @Ferryx349! - feat: instrument event and websocket handlers with OpenTelemetry metrics -
#662
36d95ccThanks @Ferryx349! - feat: add Prometheus-backed admin metrics SSE endpoint -
#753
7c2875eThanks @Ferryx349! - feat(admin): add GET /admin/network-health endpoint -
#764
ff43cd3Thanks @Ferryx349! - feat(admin): add Network Health panel to observability dashboardAdds a dashboard section that renders the latest NIP-66 probe snapshot with per-target DNS, TLS, WebSocket RTT, and NIP-11 status.
-
#784
c6c4c4fThanks @Ferryx349! - feat(admin): add GET/PATCH /admin/notifications API for operator alert configCloses #760.
-
#787
de7c9dfThanks @Ferryx349! - feat(admin): add notifications console page for operator alertsAdds 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
f70adf2Thanks @Ferryx349! - feat: add authenticated admin settings API endpoints -
#706
841833fThanks @Ferryx349! - feat: add settings editor tab to admin dashboard UI -
#770
07524ebThanks @Priyanshubhartistm! - feat: add WoT-weighted NIP-56 content reportingAccepts 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 anip56.trustedModeratorspubkey 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
fd7f56aThanks @Priyanshubhartistm! - feat(dvm): dispatch pending DVM jobs to worker processes and publish kind 6000-6999 results back -
#729
275c30cThanks @Priyanshubhartistm! - feat(dvm): trap NIP-90 job request events (kind 5000-5999) and record them via the job repository -
#727
d00eb42Thanks @Priyanshubhartistm! - feat(dvm): add job persistence migration and repository for DVM job state -
#737
9f36191Thanks @Priyanshubhartistm! - feat(dvm): add NIP-89 handler recommendation/information kinds and verify passive accept-and-serve -
#721
11ec673Thanks @Priyanshubhartistm! - feat(dvm): add worker registry settings and dvm-orchestrator process topology -
#587
30fa252Thanks @Anshumancanrock! - Add NIP-50 full-text search support with PostgreSQLtsvector/GINindexing.Clients can now include a
searchfield in REQ filter objects to perform full-text queries against event content. Results are ranked by relevance (ts_rank) instead of the usualcreated_atordering, per the NIP-50 specification.Features:
- New
searchfilter 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, supportsenglish,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.)
- New
-
#702
e172cceThanks @Anshumancanrock! - feat(nip42): enforce authentication on reads for restricted event kinds (encrypted DMs, gift wraps) across REQ, live broadcasts and COUNT -
#716
2f5a1c0Thanks @Anshumancanrock! - feat(nip42): add session tracking with optional TTL and publish-time authRequired (NIP-11 restricted_writes) -
#732
d413bd6Thanks @Anshumancanrock! - Add a CLI to mint NIP-43 invite codes (nostream invite create) so operators can issue a claim without SQL. New codes honornip43.defaultMaxUsesandnip43.inviteCodeExpirySeconds. -
#650
3461dfeThanks @Anshumancanrock! - Add NIP-43 invite code foundation: InviteCodeRepository with atomic claimCode, invite_codes migration, and event kind/tag constants. -
#738
a0853dbThanks @Anshumancanrock! - feat(nip43): issue kind 28935 invite codes on requestNIP-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.enabledand the newnip43.allowInviteRequests, a NIP-42 authenticated requester, aninfo.selfconsistent with the relay signing key, and a per-pubkey budget under the newlimits.invite.rateLimits(5/hour by default). This also makes the previously inertnip43.inviteRequestWhitelistsetting 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, butinfo.selfwas 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 againstselfwould reject it.info.selfis now optional: when unset or unparseable, NIP-11 advertises the derived signing pubkey instead, andnostream infoprints that pubkey so operators can pin it.Kind 28935 also sits in the ephemeral range, so a client-published one fell through to
EphemeralEventStrategyand was broadcast to every subscriber — including everyone subscribed to kind 28935 waiting for a real invite. Anyone could inject a forgedclaimtag into that subscription. It is now rejected with anOKfalse 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 thatnostream infoprints the signing pubkey that CONFIGURATION.md tells operators to pin. -
#676
0bfa0b5Thanks @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. Whennip43.enabledis 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
5a70839Thanks @Ferryx349! - feat(nip66): add shared relay probe engine for DNS, TLS, WebSocket RTT, and NIP-11 checks -
#741
afa8999Thanks @Ferryx349! - feat(nip66): publish kind 30166 and 10166 relay health events after probe runsAfter 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
d14b1e9Thanks @Ferryx349! - feat(nip66): add RelayMonitorWorker cluster worker and probe scheduler -
#689
e294a71Thanks @Ferryx349! - Add NIP-66 relay monitor settings foundation with defaults for probe interval, timeouts, targets, monitor identity, and DNS cache TTL. -
#644
2f6d773Thanks @Anshumancanrock! - feat: reject NIP-70 protected events and reposts embedding them -
#730
ef4123eThanks @Anshumancanrock! - feat(admin): accept NIP-98 Authorization on protected admin API routes -
#722
cf5ea4fThanks @Anshumancanrock! - feat(nip98): add Authorization header event verifier for HTTP auth (kind 27235) -
#781
8d29f15Thanks @Ferryx349! - feat(admin): operator notification backend with Postgres outboxAdds transactional outbox dispatch for operator alerts (HTTP, Discord, Slack, Telegram), delivery log,
admin.notificationssettings, event hooks for admission invoices and settings changes, and admin test/history endpoints. Closes #759. -
#763
358763aThanks @Ferryx349! - feat(ops): add /readyz readiness probe for Postgres and RedisAdds a public readiness endpoint for zero-downtime deploy workflows. HAProxy (or similar) can use
/readyzto confirm an instance can serve traffic before cutover, while/healthzremains a lightweight liveness check. -
#672
595c0a6Thanks @Ferryx349! - refactor: extract shared settings-config module and guided schema for admin settings editor foundation -
#779
f6ee3e3Thanks @Priyanshubhartistm! - feat: wire the WoT graph into adaptive PoW difficultyAdds
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); requireswot.enabledto have any effect, since a pubkey’s distance is otherwise always unknown. -
#745
276fe16Thanks @Priyanshubhartistm! - feat: add a Web of Trust graph service that tracks NIP-02 follow distance from an operator-configured seed pubkeyAdds a
WotGraphServicethat builds a trust graph rooted atwot.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). ExposesgetDistance()andisTrusted()for other parts of the relay to query. Disabled by default (wot.enabled: false). -
#773
5577070Thanks @Ferryx349! - feat(shutdown): drain WebSocket clients on SIGTERMOn SIGTERM,
/readyzreturns 503, new WebSocket connections are rejected, and existing clients receive Nostr CLOSED messages before the socket closes. Drain is bounded byWS_DRAIN_TIMEOUT_MS(default 30s).
Patch Changes
-
#714
df1ed5dThanks @Ferryx349! - fix(admin): update aria-expanded and label when mobile menu is toggled -
#680
f92eabeThanks @Priyanshubhartistm! - fix: advertise NIP-13 (Proof of Work) support insupportedNips -
#750
f5c8dc8Thanks @Anshumancanrock! - deploy: run production migrations from the relay imageBake
migrations/andknexfile.jsinto the runtime image and point the prod compose migrate service at that image so schema cannot drift from the code that ships. -
#743
f36410aThanks @Ferryx349! - ci: build and push container image to GHCR after CI passes on mainAdds a GitHub Actions workflow that publishes
ghcr.io/cameri/nostream:mainand a per-commitsha-*tag once the CI Checks workflow succeeds for pushes tomain. -
#775
59b1e51Thanks @Anshumancanrock! - fix: return COUNT results for filters with generic tag queries (#e,#p,#g,#h), which projectedevent_idtwice and failed with “error: unable to count events” -
#646
eb64d8aThanks @dependabot! - chore(deps): bump js-yaml from 4.1.1 to 4.2.0 -
#647
68da3d4Thanks @dependabot! - chore(deps): bump ws from 8.20.1 to 8.21.0 -
#705
95a672eThanks @dependabot! - chore(deps): bump axios from 1.16.0 to 1.18.0 -
#751
8509aeaThanks @Ferryx349! - deploy: minimal server bootstrap with optional settings overridesAdd 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
8fa72d6Thanks @Ferryx349! - deploy: add production Docker Compose stack for relay serversAdds a minimal prod compose file, migrate image Dockerfile, and server layout docs for deployments that pull
ghcr.io/cameri/nostream:maininstead of building on the host. -
#765
3690bd8Thanks @Ferryx349! - ci: disable CodeQL workflowRemoves 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
7c4b728Thanks @Priyanshubhartistm! - fix: de-duplicate events returned by generic tag-filter subscriptionsEventRepository.findByFilters()left-joinsevent_tagsfor 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 matchingevent_tagsrow, so subscribers received the sameEVENTmessage multiple times. The query now selectsDISTINCT events.*for tag-filtered queries so each stored event is returned at most once. This also covers generic tag filters combined with a NIP-50searchterm (e.g.{"search": "...", "#p": ["a", "b"]}), which take the search branch and are now de-duplicated as well. -
#771
b07f9c3Thanks @chappie-daemon! - fix: enforcelimits.client.subscription.maxFilterValueson REQ and COUNT filtersFilters whose array criteria (
ids,authors,kinds,#<tag>) hold more thanmaxFilterValuesvalues in total are now rejected withToo many filter valuesinstead of being handed to PostgreSQL as an unboundedWHERE 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
limitationobject asmax_filter_values, a non-standard extension since NIP-11 has no field for per-filter value counts. -
#703
7af0387Thanks @Priyanshubhartistm! - Fix the Content-Security-Policyconnect-srcdirective for relays served over plainws://.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 theconnect-srcdirective kept aws://…entry instead of the intendedhttp://…origin for local/dev, Tor, or reverse-proxied setups. Thews:protocol now correctly maps tohttp:.Adds regression test coverage for the protocol mapping (
getWebProtocolForRelay, extracted fromcreateWebAppso it can be unit tested directly), since this file previously had no test coverage at all. -
#708
a76d0b5Thanks @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
14cca60Thanks @Ferryx349! - fix(ci): publish container image after CI passes on mainRemoves 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
f0aab15Thanks @Ferryx349! - fix: include event id in expired and rate-limited rejection logsExpired and rate-limited event rejections logged
event %s rejected: ...without passingevent.id, so operators saw a literal%sinstead of the event id. -
#715
9361601Thanks @Priyanshubhartistm! - fix: abort in-flight streaming queries when a subscription is cancelled -
#746
7297b96Thanks @Anshumancanrock! - fix(payments): stop stale invoices from wedging payment pollingA relay could stop clearing payments entirely, needing
delete from invoicesto 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.invoiceExpirySecondswhen 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
e87e1afThanks @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
9fb1c10Thanks @Ferryx349! - test(nip66): add integration tests for RelayMonitorWorker snapshot storage -
#725
849c3f7Thanks @Anshumancanrock! - feat(http): build absolute request URL from relay_url -
#726
3d3848eThanks @Anshumancanrock! - feat(redis): add setKeyIfNotExists for one-time claims -
#640
ca23be1Thanks @Anshumancanrock! - test: optimize nip05.spec.ts & nip03.spec.ts resource management- Lift sinon stub to
before/afterin verifyNip05Identifier tests (create once, reset between tests) - Extract SSRF guard callback once in
beforeinstead of per-testbeforeEach - Pre-build shared OTS buffers and attestations at module scope to eliminate redundant Buffer.concat calls
- Add shared event factory for extractNip05FromEvent tests
- Lift sinon stub to
-
#686
cb7daf6Thanks @Priyanshubhartistm! - fix: stop checking additional rate limit windows once a client is already rate-limitedisRateLimited()inEventMessageHandlerandWebSocketAdapterlooped through every configured rate limit window even after one had already tripped, callingrateLimiter.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
3648954Thanks @Priyanshubhartistm! - fix: await Redis EXISTS call in RedisAdapter.hasKey() so it reflects actual key presence instead of always returning true -
#711
220949dThanks @Priyanshubhartistm! - fix: include the actual error message in replaceable event rejection responsesReplaceableEventStrategy.execute()sent clients a bareerror:command result (with no message body) whenevereventRepository.upsert()failed for a reason other than a duplicate event id. The underlyingerror.messagewas caught but never included in the response, leaving clients with no actionable information about why the event was rejected. The command result now includeserror.message. -
#682
dc78df5Thanks @Priyanshubhartistm! - fix: prevent crash in NIP-11 relay information document when payments settings are absent
3.0.0
Major Changes
-
#524
b3effd1Thanks @vikashsiwach! - Use exact pubkey matching for fee-schedule whitelists and event pubkey whitelist/blacklist checks. -
#574
f1c1118Thanks @Mahmoud-s-Khedr! - Add a brand-new unifiednostreamCLI/TUI that replaces the legacyscripts/*shell wrappers for lifecycle, setup, info, config, data, and development workflows.Fixes - fixed some consistnacy issues after the migration from
npmtopnpm
Minor Changes
-
#522
7edd6c3Thanks @a-khushal! - added NIP-45 COUNT support with end-to-end handling (validation, handler routing, DB counting, and tests). -
#629
36f8badThanks @Anshumancanrock! - feat: NIP-42 AUTH handler and WebSocket session wiring -
#534
a07b0f6Thanks @archief2910! - Add hot-path PostgreSQL indexes for subscription, vanish, retention, and invoice queries; adddb:benchmarkanddb:verify-index-impacttooling; document index rationale and benchmarking. Closes #68. -
#556
d8f62b4Thanks @saniddhyaDubey! - perf: added k6 performance tests for connection and message rate limiting -
#623
54139edThanks @saniddhyaDubey! - new user-facing config field -
#476
49322a9Thanks @saniddhyaDubey! - Add EWMA rate limiter with configurable strategy support -
#602
d3ba328Thanks @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
htag (nostr_group_id) before storing;#htag subscriptions work via the existing generic tag index - NIP-11 relay info now advertises
supported_mips: [0, 1, 2, 3]
-
#515
5c12f36Thanks @archief2910! - Add NIP-03 OpenTimestamps support for kind 1040 events: structural.otsvalidation, Bitcoin attestation requirement, digest match to the referencedetag, and relay metadata updates (#105). -
#589
25d5405Thanks @CKodidela! - Add NIP-25 Reactions support for kind 7 and kind 17 events: reaction utility helpers (isReactionEvent,isExternalContentReactionEvent,isLikeReaction,isDislikeReaction,parseReaction), schema validation enforcing requiredetag on kind 7 and requiredk/itags on kind 17, unit tests, and integration tests. -
#585
ce59383Thanks @CKodidela! - Add NIP-65 Relay List Metadata support for kind 10002 events: relay list utility withisRelayListEventandparseRelayListhelpers, unit tests, and relay information document updated to advertise NIP-65 (#577). -
#514
214bef5Thanks @Anshumancanrock! - Add gzip and xz compression support to event import/export flows.- Export supports
--compress/-zwith--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.
- Export supports
-
#628
ce7b838Thanks @Ferryx349! - refactor(http): remove deprecated network.remote_ip_header fallback and rely on network.remoteIpHeader -
#539
bdd4f6bThanks @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
e1a7bfbThanks @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
-
#622
6a0a5faThanks @Anshumancanrock! - feat: add NIP-42 types, schemas and constants
Patch Changes
-
#555
ddc811dThanks @Anshumancanrock! - Migrate project tooling from npm to pnpm across CI workflows, Docker setup, hooks, and contributor commands. -
#600
dfa2838Thanks @saniddhyaDubey! - fix: maxLimit checks added to subscription message handler -
#572
b718036Thanks @dependabot! - Bump dev dependency uuid from 8.3.2 to 14.0.0 -
#616
f9f6d64Thanks @Anshumancanrock! - fix: check payments.enabled in callback route middleware -
#597
7da1b9aThanks @Anshumancanrock! - refactor: only register OpenNode, LNbits, and Zebedee callback routes when their processor is active -
#438
f5ba023Thanks @tharu-jwd! - fix: close dead connections even if they have active subscriptions -
#546
faa7ed2Thanks @Justxd22! - Fix root HTML negotiation and subpath-aware template links behind trusted proxies. -
#613
36e5af8Thanks @dependabot! - chore(deps): bump axios from 1.15.1 to 1.15.2 -
#617
50822b9Thanks @dependabot! - chore(deps): bump fast-uri from 3.1.0 to 3.1.2 -
#618
c6368dbThanks @dependabot! - chore(deps): bump ws from 8.20.0 to 8.20.1 -
#620
dac92b4Thanks @dependabot! - chore(deps): bump uuid from 8.3.2 to 14.0.0 -
#630
1295272Thanks @dependabot! - chore(deps): bump axios from 1.15.2 to 1.16.0 -
#575
b7324a6Thanks @kanishka0411! - Expire stale pending invoices when LNbits no longer has the invoice or reports it as unpaid past its expiry time. -
#592
0119c74Thanks @Anshumancanrock! - Security: override serialize-javascript to >=7.0.3 (CVE RCE, GHSA-5c6j-r48x-rmvq) -
#553
3c78e61Thanks @Anshumancanrock! - Fix replaceable batch upserts to apply NIP-01 tie-breaker semantics when timestamps are equal by comparing event IDs. -
#583
321a9ccThanks @kanishka0411! - Allow generic tag filters to match empty string tag values. -
#586
2418209Thanks @kanishka0411! - Implement geohash wildcard/prefix behavior for#gfilters (closes #265): a criterion ending in*matches any eventgtag 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
a6d32b1Thanks @Anshumancanrock! - Use timingSafeEqual for Nodeless webhook HMAC verification and guard against missing NODELESS_WEBHOOK_SECRET -
#591
f31be1cThanks @Priyanshubhartistm! - fix: add husky install fallback for non-dev environments -
#551
7fc0552Thanks @CKodidela! - Add unit tests for InvoiceRepository and UserRepository with sinon-stubbed DB client -
#538
9496685Thanks @saniddhyaDubey! - Fix: Restore CONFIGURATION.md with proper settings and remove duplicate changesets created during recovery -
#557
32a1ec5Thanks @a-khushal! - update NIP-11 relay info fields and CORS, with test and docs updates -
#593
f599b1dThanks @YashIIT0909! - fix: resolve TOCTOU race condition and key collisions in SlidingWindowRateLimiter -
#511
a38d402Thanks @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
25f9637Thanks @vikashsiwach! - Add integration tests for NIP-02 contact lists (Kind 3) -
#527
4d030c7Thanks @kanishka0411! - Add NIP-11 integration tests and fix max_filters mapping in relay information document. -
#547
664168aThanks @Priyanshubhartistm! - Improve NIP-22created_atlimit handling coverage and boundary reliability.This adds integration coverage for accepted and rejected events across configured positive and negative
created_atdeltas, and keeps rejection semantics consistent (rejected) for out-of-range timestamps. -
#537
a89a95eThanks @vikashsiwach! - Add NIP-62 integration tests for Request to Vanish -
#643
faf55f1Thanks @Anshumancanrock! - feat: add NIP-70 protected event detection utility -
#596
250c767Thanks @CKodidela! - Normalize runCommandWithOutput to return a CommandResult discriminated union instead of rejecting on spawn errors, fixing a crash ininfo --jsonwhen Docker is not installed. -
#625
69d6187Thanks @Ferryx349! - Refactor EventRepository query construction to reduce method complexity. -
#497
e1a7bfbThanks @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
c87dd03Thanks @Ferryx349! - test(integration): verify response content-type across core HTTP paths -
#562
de14f3cThanks @Priyanshubhartistm! - Add integration test coverage for NIP-04 encrypted direct messages (kind 4). -
#525
b09e23aThanks @kushagra0902! - Dedup keys were taking multiple tags, that was not according to NIP-01 behaviour. -
#568
c0c1c35Thanks @tharu-jwd! - fix: static mirroring silently drops events when mirror has no limits configured -
#604
40abf66Thanks @phoenix-server! - Add unit tests for maintenance service factory instantiation and dependency wiring. -
#493
5bf1a58Thanks @kanishka0411! - Fix IP spoofing via unconditional trust of x-forwarded-for header -
#606
47a9f4eThanks @phoenix-server! - Add unit tests for maintenance-worker-factory with 100% code coverage -
#545
a9ae0cdThanks @Justxd22! - Fix Redis cache connection config to skip AUTH whenREDIS_PASSWORDis unset -
#548
00240a9Thanks @CKodidela! - Support uppercase tag filters (#A-Z) in filter schema validation -
#566
8eee70fThanks @a-khushal! - add support for NIP-14 subject tags in text notes, with units tests to validate parsing and repository behavior