Add submission relay client support #121

Merged
raucao merged 1 commits from feature/submission_relay into master 2026-11-18 09:53:09 +00:00
Owner

Marco now publishes new place photos to the public submission relay at wss://submit.nostr.kosmos.org and reads from it as a built-in untrusted relay. The moderation service reviews submissions and promotes approved, author-signed events to wss://nostr.kosmos.org, so the existing relay-trust model keeps submitted content hidden until it is also seen on a trusted relay. A user's own uploads stay visible immediately.

This also tightens kind-5 deletion handling per NIP-09: a deletion is only honored when the kind-5 event's author matches the referenced event's author, both in the store/provenance path of NostrDataService and in applyDeletions() for contribution/activity grouping. Unknown referenced authors are treated as no match (fail-safe), and the author map is capped at 10,000 entries.

Changes:

  • app/services/nostr-data.js: submission relay as default write relay and as an untrusted configured read relay (never added to requiredReadRelays/trustedRelays), plus the kind-5 author check.
  • app/utils/contributions.js: NIP-09 author rule in applyDeletions().
  • doc/nostr/relay-trust.md: document the submission relay and the kind-5 author rule.
  • Tests for relay defaults/exclusions, trust behavior, and the kind-5 author check.

Verification: pnpm lint and pnpm test (464 tests) pass.

Part of raucao/marco#97.

Marco now publishes new place photos to the public submission relay at `wss://submit.nostr.kosmos.org` and reads from it as a built-in untrusted relay. The moderation service reviews submissions and promotes approved, author-signed events to `wss://nostr.kosmos.org`, so the existing relay-trust model keeps submitted content hidden until it is also seen on a trusted relay. A user's own uploads stay visible immediately. This also tightens kind-5 deletion handling per NIP-09: a deletion is only honored when the kind-5 event's author matches the referenced event's author, both in the store/provenance path of `NostrDataService` and in `applyDeletions()` for contribution/activity grouping. Unknown referenced authors are treated as no match (fail-safe), and the author map is capped at 10,000 entries. Changes: - `app/services/nostr-data.js`: submission relay as default write relay and as an untrusted configured read relay (never added to `requiredReadRelays`/`trustedRelays`), plus the kind-5 author check. - `app/utils/contributions.js`: NIP-09 author rule in `applyDeletions()`. - `doc/nostr/relay-trust.md`: document the submission relay and the kind-5 author rule. - Tests for relay defaults/exclusions, trust behavior, and the kind-5 author check. Verification: `pnpm lint` and `pnpm test` (464 tests) pass. Part of raucao/marco#97.
raucao added 1 commit 2026-11-18 09:41:20 +00:00
Add submission-relay client support
CI / Lint (pull_request) Successful in 53s
CI / Test (pull_request) Successful in 1m11s
Release Drafter / Update release notes draft (pull_request) Successful in 16s
52fd5c1b15
Default write relay, untrusted read relay, kind-5 author checks
raucao added the featurenostr labels 2026-11-18 09:52:00 +00:00
raucao merged commit 9c01c461cb into master 2026-11-18 09:53:09 +00:00
raucao deleted branch feature/submission_relay 2026-11-18 09:53:10 +00:00
Sign in to join this conversation.