Minmo's Nostr relay for the Pontmore network: strfry with a write policy that keeps only Pontmore events. It is a fast, close copy of what Minmo's apps read, kept in sync with the public relays, so it speeds things up without becoming a single point of failure.
Operations, rollout and the design rationale are in docs/devops/relay.md.
| Kind | What | Kept when |
|---|---|---|
| 7300, 7301 | Swap roots and steps (PIP-02) | The root parses under pontmore/swap@1; a step names its root and previous step |
| 7312 | Escrow quotes | Signed by a known operator, naming itself as the escrow; a swap root commits to it and execution reads it back |
| 38383 | Desk offers | It is a Pontmore offer (other NIP-69 order books share the kind) |
| 30360 | Agent definitions (PIP-00) | Version 1 content with a t=agent tag |
| 30361 | Escrow descriptors (PIP-01) | The descriptor parses and hasn't expired |
| 0, 10002 | Profiles and relay lists | The author is a known agent, operator or swap participant |
| 30078 | App data | A minmo/... record (encrypted backups, desk setup), or a swap record (d = root id) signed by an operator |
| 1985 | Reputation labels | L=pontmore/reputation, signed by an operator |
| 1059 | Private swap messages (NIP-59) | Addressed to a known key |
Everything else is refused. A key is known when the relay holds an agent
definition, escrow descriptor or offer it signed, or a swap root that names it.
The rules reuse @minmo/pontmore's parsers, so the relay accepts what the
apps accept.
Swap history is kept indefinitely; it is small and is what swap analytics read.
Private messages are pruned after GIFT_WRAP_RETENTION_DAYS (90). Offers
expire on their own (NIP-40).
One container runs four processes:
strfry relay on port 7777, behind Traefik at relay.<env>.minmo.to.
Every write goes through /app/write-policy.strfry router streams protocol events down from the public relays as
they're published. It streams nothing up: clients publish to every relay in
their list themselves, and echoing the backfill up gets the relay's address
rate-limited by the public relays.node relay.mjs reconcile), every 10 minutes, copies
what the router can't: full history on first start, events missed while the
relay was down, and the keyed kinds (profiles, app data, labels, private
messages), which can't be streamed by kind alone. It copies through the
write policy, so the same rules apply.| Variable | Default | Purpose |
|---|---|---|
PUBLIC_RELAYS | wss://nos.lol,wss://relay.primal.net,wss://relay.damus.io | Relays to sync with |
WRITES_PER_MINUTE | 600 | Events one client address may write per minute; 0 turns it off |
RATE_LIMIT_EXEMPT | Comma-separated client addresses the limit skips | |
RECONCILE_INTERVAL_SECONDS | 600 | Time between reconcile passes |
GIFT_WRAP_RETENTION_DAYS | 90 | How long private messages are kept |
PRUNE_INTERVAL_SECONDS | 3600 | Time between pruning passes |
npm run build --workspace=@minmo/pontmore
npm run test --workspace=@minmo/relay
npm run typecheck --workspace=@minmo/relay
npm run lint --workspace=@minmo/relay
npm run build --workspace=@minmo/relay # bundles dist/relay.mjs
Run it locally with Docker (the first build compiles strfry, which takes a few minutes):
docker compose --profile relay up --build relay
It listens on ws://localhost:7777. To have the local API use it, start the
API with NOSTR_RELAYS=ws://relay:7777,wss://nos.lol,wss://relay.primal.net,wss://relay.damus.io.
To point a dev build of the mobile app at it, set EXPO_PUBLIC_NOSTR_RELAYS
the same way with an address the device can reach.
strfry is built from the upstream source at a pinned release commit; to
upgrade, change STRFRY_VERSION and STRFRY_COMMIT in the Dockerfile
together and compare config/strfry.conf with the new release's default
config.
Content type
Image
Digest
sha256:45f986a53…
Size
68.7 MB
Last updated
about 2 hours ago
docker pull minmoto/relay:sha-22d3902