Improving the Relay Publish Logic
- The Problem
- The Improved Logic
- Testing With a Local Relay
- Building Toward More Reliable Publishing
- Work With Me
Andrew G. Stanton - Sunday, March 8, 2026
Publishing events to Nostr relays sounds simple.
In practice, it rarely is.
Relays can behave differently depending on their configuration, uptime, and load. Some accept events immediately. Others respond slowly. Some reject events or silently fail.
Handling this correctly requires thoughtful publishing logic.
Today I improved the publish_event logic in the relay manager used by Continuum.
The Problem
Originally the publish workflow could sometimes report a failure even when an event had successfully reached at least one relay.
That creates confusion.
From a practical standpoint, publishing succeeds if any relay successfully stores the event.
Once one relay has accepted the event, the event exists on the network and can propagate further.
The Improved Logic
The updated logic now evaluates relay responses more carefully.
Instead of treating publishing as a single binary result, the system examines responses from each relay individually.
If at least one relay confirms the write, the operation is considered successful.
This produces much more accurate feedback.
Testing With a Local Relay
Running a local relay inside Docker has been especially useful while working on this logic.
Because the relay runs on my own machine I can:
- inspect events directly
- test publishing behavior
- debug relay interactions
The local relay currently acts as a development and debugging relay, not a permanent public endpoint.
But it provides a reliable environment for improving the publishing pipeline.
Building Toward More Reliable Publishing
Publishing reliability is one of the most important parts of any Nostr application.
Better publish logic makes it easier to:
- diagnose relay problems
- provide accurate UI feedback
- build stronger retry mechanisms later
These improvements are small but important steps toward a more robust publishing architecture.
Reliable infrastructure often emerges from dozens of small refinements like this.
Work With Me
If you’re exploring:
• Nostr authentication
• Sovereign identity infrastructure
• AI-assisted workflows
• Local-first containerized systems
I offer a limited number of advisory and implementation sessions for builders, teams, and ministries working in these areas.
Typical engagements include:
• Architecture session (90 minutes) – $500
• Implementation sprint – starting at $2,500
• Ministry / Foundation advisory engagement – $2,500
Early Adopters
I’m also looking for early adopters interested in running Continuum, a local-first publishing and identity system built on Nostr.
There is no cost for early adopters, and I’m happy to personally help with installation and setup.
Even if you’re just curious and want to see how it works, feel free to reach out.
Feedback from early adopters directly influences the direction of the project.
Contact: andrewgstanton@gmail.com
or DM on Nostr:
You can also support this work as a Continuum Patron ($250).
Write a comment