Relay Evidence
One Nostr event. Clear evidence, relay by relay.
Created on 9th September 2026
•
Relay Evidence
One Nostr event. Clear evidence, relay by relay.
The problem Relay Evidence solves
A signed Nostr event can be valid locally while different relays return different results. Developers and support teams need to distinguish a broken event, an advertised policy conflict, an authentication challenge and an inconclusive read.
Relay Evidence turns one signed event and an explicit list of relays into a portable JSON or Markdown report:
- Validate the event structure, ID and Schnorr signature offline.
- Compare event measurements with advertised NIP-11 limits: Unicode content length, serialized message bytes, tag count and proof-of-work difficulty.
- Query each relay for that exact ID and explain the observed result: verified event, empty EOSE, CLOSED, AUTH challenge, timeout or connection failure.
The CLI never requests a private key, publishes an EVENT or signs an AUTH response. Reports omit event content, full tags and signatures. Live queries still reveal the requested event ID and network connection to the selected relay.
The included demo reproduces five controlled localhost scenarios, including a valid returned event, an empty result with advertised size conflicts, authentication, an explicitly closed subscription and silence. These are labelled simulations. The report keeps observations separate from claims: empty EOSE does not prove censorship, and advertised limits do not prove publication rejection.
nak already offers event and relay commands; nostr-watch monitors relay capabilities; NMP maintains evidence inside a client engine. Our focused contribution is a shareable, event-specific explanation joining local validity, advertised policies and bounded read evidence in one workflow.
Built for Freedom Stack by Jhonatan del rio mejia with Codex assistance for implementation, documentation and review. AI assistance is disclosed; the tool itself needs no LLM, paid API or hosted backend. Project license: MIT.
A separate live read on 9 September 2026 obtained NIP-11 metadata and an empty EOSE from relay.damus.io for the synthetic fixture, which had not been published there. The saved report records this as not_returned. This is one network observation, not a benchmark or a publication test.
Challenges I ran into
The main challenge was preserving the difference between observation and explanation. An empty EOSE, a timeout and an AUTH challenge must not collapse into a claim that a relay censored or rejected a publication. The implementation uses explicit outcomes, correlates subscription IDs, revalidates returned events and treats NIP-11 as advisory metadata. Controlled relay fixtures cover the distinct responses, including malformed and unrelated messages.
Trustworthy local validation required another boundary: nostr-tools can cache verification on an event object. The analyzer snapshots JSON data and selects the signed fields before verifying, so a previously verified object cannot authorize a later mutation. The test suite includes a regression case for this behavior.
Policy comparisons also use different units. Unicode code points are counted separately from UTF-8 bytes, and message size includes the hypothetical EVENT envelope even though the tool never sends it. Missing or malformed limits stay unknown.
Finally, portable diagnostics must handle untrusted relay text and avoid copying event bodies into reports. Output formatting escapes Markdown/control characters; input and network work are bounded. Codex assisted with these implementation and review decisions; the localhost demonstration is explicitly identified as simulation.
Tracks Applied (1)
Freedom Stack
Bitshala
Technologies used
