Skip to content

Nothing asks a relay what it supports, so nothing can be gated on the answer #290

Description

@sepehr-safari

Every relay publishes a NIP-11 information document: an HTTPS GET to the relay's own address with Accept: application/nostr+json, answering with its name, supported_nips, limitation (including auth_required and payment_required) and its fees. Plaza has never read one. relayRow draws a coloured dot, the host, the R/W badge from relayBadgeText, and a round trip, and that is the whole of what Plaza knows about a relay.

Two things follow. Groups only exist on relays that implement NIP-29, and the honest gate is 29 appearing in supported_nips. Without it a Groups destination either appears on every relay and fails on most, or is hardcoded to hosts I happen to have heard of. Both are worse than saying no.

It also explains a class of failure Plaza reports as "offline". payment_required is the relay refusing the websocket handshake before a single Nostr message is exchanged, which the comment block above routed_refusal_strikes already documents from my own account. auth_required is the relay taking the socket and then closing the subscription. Neither is the relay being down.

No new transport is needed: fetchSlice already sends custom headers and fireLink already fetches a document body. Every field is written by a stranger, so cap each one the way parsePlace caps a place's fields.

Done

Each pool relay has a cached document with a refresh interval and a not-yet-answered state distinct from "does not support this"; the relay row can say paid or auth-required rather than only offline; and one function answers "does this relay declare NIP-N", which is what the groups interface is gated on.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions