Skip to content
On this page

relay.ochk.io — the orangecheck family Nostr relay

wss://relay.ochk.io is the family's first-party Nostr relay. Every OC web app publishes to it (alongside three or more public relays), and every OC client app reads from it (alongside the public set). It exists for reliability and family-curated indexing — not as a trust anchor.

The aim: relay.ochk.io is never the only copy of anything. Every event is also published to public relays, and every read also queries them. Today that does not hold: publishing to a public relay is not storage, and public relays have dropped family events. So the second copy is kept in git: the daily Archive workflow commits every family event the relay stores, its id and signature checked, to the archive branch (opens in a new tab). See BYPASS.md (opens in a new tab).

What it doesLink to this section

It's a strfry (opens in a new tab) instance running on Fly.io (region fra). strfry has no kind allowlist of its own, so one write-policy plugin, policy/oc-dtag-filter.py (opens in a new tab), decides what it stores. It applies two shape gates to every event:

  1. Kind allowlist. Only the family's kinds are accepted: 30078, 30080–30087, and OC Chat's 30110–30112 and 30114. Anything else is rejected with blocked: kind <n> is not in the oc family allowlist.
  2. d-tag prefix gate. Within those kinds, an event is accepted only if its d tag starts with one of its kind's namespace prefixes. Anything else is rejected with blocked: d tag '<d>' is not an oc namespace prefix for kind <n>.
kindsub-protocolaccepted d tag
30078OC Attest / OC Lock / OC Pledge / OC Chatan attestation's bare id (64 lowercase hex), or oc-lock:, oc-pledge:, oc-pledge-outcome:, oc-pledge-abandonment:, oc-chat:device:
30080OC Vote · polloc-vote:poll:
30081OC Vote · ballotoc-vote:ballot:
30082OC Vote · revealoc-vote:reveal:
30083OC Stamp · stamp / OC Agent · delegationoc-stamp: or oc-agent-del:
30084OC Agent · actionoc-agent-act:
30085OC Agent · revocationoc-agent-rev:
30086OC Agent · sub-delegationoc-agent-sub:
30087OC Me (ochk.app)oc-me-event:, oc-me-payment:, oc-me-rebind:, oc-me-trust:, oc-me-payout-binding:, oc-me-distribution:, oc-me-distribution-void:, oc-me-drop:
30110OC Chat · channel descriptoroc-lock-chat-ch:
30111OC Chat · channel postoc-lock-chat-msg:
30112OC Chat · sealoc-lock-chat-seal:
30114OC Chat · directoryoc-lock-chat-dir: or oc-lock-chat-chdir:

Together, those two gates mean every event served from relay.ochk.io has a family kind and a family d tag. On top of them:

  • Two kinds are checked further. A kind-30114 directory event must meet OC Chat's claim rule, and a kind-30078 OC Lock device record (oc-lock:device:) must carry a valid BIP-322 signature by the address its d tag names. A key that already holds a record there may also replace it with a revocation of its own device, signed or not. A sidecar runs both checks; a late or failed check is a refusal.
  • Each source has write limits. A source (an IPv4 address, or an IPv6 address by its /64) may send 30 events at once and then one every 2 seconds, and at most 1,000 events and 4 MiB of event JSON per UTC day. A source with 60 events refused within an hour is refused for the next hour. Over a limit, the answer is rate-limited: too many events from this address, try again later.

What it doesn't doLink to this section

  • It does not judge content. Apart from the directory and device-record checks above, the policy reads only kind and the literal d-tag bytes, never the envelope body. If you want semantic rejection, you want a verifier; the relay enforces shape.
  • It does not require auth. No NIP-42 challenge on the read or write path. Anyone, anywhere, with any pubkey, can publish a family-shaped event (within the write limits) or query for one.
  • It does not charge. Free, anonymous, public.
  • It does not act as a custodian or trust anchor. Relays are commodity infrastructure. Trust anchors are Bitcoin (BIP-322 attestations) and Nostr-published envelopes (offline-verifiable forever).
  • It does not replace public relays. @orangecheck/nostr-core's DEFAULT_RELAYS ships with five entries — four public (nos.lol, relay.primal.net, relay.damus.io, nostr.oxtr.dev) plus relay.ochk.io. A build-time TypeScript invariant in the package fails the build if a future engineer reduces the set to relay.ochk.io alone.

Where it sits in the stackLink to this section

Code
       ┌─────────── browser / SDK ───────────┐
       │  publish(event)         query(filter) │
       └────────┬────────────────┬────────────┘
                │                │
       publishes to ALL    races EOSE on ALL
                │                │
       ┌────────┴───── DEFAULT_RELAYS ────────┐
       │                                       │
       │  wss://nos.lol            (public)    │
       │  wss://relay.primal.net   (public)    │
       │  wss://relay.damus.io     (public)    │
       │  wss://nostr.oxtr.dev     (public)    │
       │  wss://relay.ochk.io      (OC-curated)│
       └───────────────────────────────────────┘

Reads ask all five at once and wait for each relay to finish answering (EOSE) or time out. queryEvents waits 1500 ms by default; a caller that needs every answer passes a longer timeout. The result reports, per relay, whether it finished. Writes hit all five; the publish call returns one result per relay so callers can show "published to 4/5 relays."

Write quorum and read floorLink to this section

OC Lock device records, and the revocations that retire them, are where a missed relay matters most: a sender that misses a revocation keeps sealing to a device its owner has given up. lock.ochk.io, vault.ochk.io and chat.ochk.io count these records (kind 30078, d tag oc-lock:device:<address>) by one rule, over nostr-core's five DEFAULT_RELAYS:

  • Write quorum. A bind or a revocation is in effect once WRITE_QUORUM = 2 of the five serve it back, each relay asked on its own. An OK to the publish is not enough.
  • Read floor. A read that rests on an absence (no revocation of this device, no bind for this address) counts only when readFloor(asked) of the relays asked have finished answering in full and none was cut off. Five asked: four. A relay that stopped partway, or at a full page, leaves the read unchecked; one that sent nothing is just silent.
TypeScript
export const WRITE_QUORUM = 2;

export function readFloor(asked: number): number {
    return Math.max(1, asked - WRITE_QUORUM + 1);
}

The floor and the quorum add up to more than the relays asked (readFloor + WRITE_QUORUM > asked; with five, 4 + 2 > 5). So of the relays holding any write in effect, a read at the floor always hears from at least one. A write short of the quorum is reported as not in effect yet, never as done. A read short of the floor, or with a relay cut off, is not taken as an answer.

AppWrites device records toIn effect atReads at the floor
lock.ochk.iothe five2 of the fiveyes: sealing to an address, an address's other devices, checking a revocation took
vault.ochk.iothe five2 of the fiveyes: device labels, the vault key hand-off, the .lock export
chat.ochk.ioyour relays and the five (chat's own four relays are among them)2 of the fiveyes: sending to an address, bindings and the directory key

OperationalLink to this section

What this means for verifiersLink to this section

If you're building a verifier for OC envelopes, do not query only relay.ochk.io. The protocol's offline-verifiable promise rests on the event being available somewhere on Nostr; if your verifier can only see ours, you've broken that promise. Use @orangecheck/nostr-core (opens in a new tab) or any equivalent client that races multiple public relays.

If you're operating an enterprise integration where uptime matters and you want a deterministic write target, do publish to relay.ochk.io as one of many — but don't publish to relay.ochk.io alone. The same aim applies to consumers as it does to OC's own apps.

NIP supportLink to this section

NIP-11 self-report from the live relay: [1, 2, 4, 9, 11, 20, 22, 28, 40, 70]. Notably NIP-45 (COUNT) is not supported — strfry doesn't ship it. If you need event counts, use a REQ with limit and count client-side.

NIP-77 (negentropy sync) is supported. The relay's backups are Fly's volume snapshots, kept five days, and the daily Archive workflow's copy on the archive branch (opens in a new tab).