Skip to content

Releases

[email protected]

Choose a tag to compare

@cameri cameri released this 28 Nov 18:43
Immutable release. Only release title and notes can be modified.
778b46c

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](1267cec935fac56b325...

Read more

[email protected]

Choose a tag to compare

@cameri cameri released this 17 Nov 00:07
Immutable release. Only release title and notes can be modified.
aa3656d

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.

[email protected]

Choose a tag to compare

@cameri cameri released this 14 Nov 03:42
Immutable release. Only release title and notes can be modified.
ba5b94a

Patch Changes

[email protected]

Choose a tag to compare

@cameri cameri released this 08 Nov 05:20
Immutable release. Only release title and notes can be modified.
d80b3b2

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

[email protected]

Choose a tag to compare

@cameri cameri released this 07 Nov 20:35
Immutable release. Only release title and notes can be modified.
92a34ad

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.

[email protected]

Choose a tag to compare

@cameri cameri released this 07 Nov 13:53
Immutable release. Only release title and notes can be modified.
e7855ce

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.

[email protected]

Choose a tag to compare

@cameri cameri released this 06 Nov 11:52
Immutable release. Only release title and notes can be modified.
44f2e7b

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.

[email protected]

Choose a tag to compare

@cameri cameri released this 05 Nov 20:16
Immutable release. Only release title and notes can be modified.
88c4866

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.

[email protected]

Choose a tag to compare

@cameri cameri released this 05 Nov 22:22
Immutable release. Only release title and notes can be modified.
113d759

Patch Changes

  • #1062 5d5b5b1 Thanks @chappie-daemon! - perf(website): size the hero poster to the box it paints in

    hero-poster.webp was encoded at 1920×1080 for a box Hero.astro caps at
    1180×664 CSS px (min(1180px, 80vw, film-h * 16/9)), which Lighthouse's
    image-delivery-insight reported as 36.9 KiB of waste on
    ema.tnsor.network (#876).
    The poster now encodes at 1440×810 — 1.22× that box, enough for a 1.25×
    display, so it needs no devicePixelRatio branch — and drops from 42,926 B
    to 30,878 B, a 28% reduction. SSIM against the old file at the display size
    is 0.9968 at 1180×664 and 0.9964 at the larger 1359×764 layout #876 measured.

    The social preview is unaffected: og:image defaults to the generated
    social-card.png at 1200×630 in build-social-card.mjs, and the hero poster
    has no second consumer. scripts/build-media.mjs resizes to 1440 so the next
    pnpm run media keeps the size instead of restoring 1920.

  • #1063 771f53e Thanks @chappie-daemon! - docs(website): lead with what the relay gives you, not its language

    The default meta description and the footer still introduced nostream as "a
    Nostr relay written in TypeScript", which describes the implementation and not
    the thing a reader gets. The <title>, the og:image:alt and the repository
    description already lead with owning a relay in a social network nobody can
    switch off; the two stragglers now match them.

    The description feeds meta[name=description], og:description and
    twitter:description, so the link preview changes with it. The technical
    substance — PostgreSQL + Redis, Lightning admission, Tor and I2P, admin
    console — is unchanged.

[email protected]

Choose a tag to compare

@cameri cameri released this 04 Nov 03:14
Immutable release. Only release title and notes can be modified.
a409223

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.