Skip to content

fix(relay): return NIP-01 OK for rejected EVENTs#2364

Open
thesimplekid wants to merge 1 commit into
block:mainfrom
thesimplekid:fix_rejected_events
Open

fix(relay): return NIP-01 OK for rejected EVENTs#2364
thesimplekid wants to merge 1 commit into
block:mainfrom
thesimplekid:fix_rejected_events

Conversation

@thesimplekid

Copy link
Copy Markdown

The shared admission limits added in #1917 responded to rejected EVENT frames with NOTICE. NIP-01 requires relays to answer every EVENT with an event-correlated OK, using accepted=false when the event is rejected. NOTICE does not provide the event correlation publishing clients need, causing them to wait until timeout instead of receiving the rejection.

Return OK with the event ID and accepted=false for admission rejections and handler-capacity failures. Preserve CLOSED for rejected REQs, as required by NIP-01, and NOTICE for messages without a correlation ID.

PR #2074 established correlated CLOSED responses for rejected REQ messages and is the subscription-side precedent for this correction.

Refs: #1917, #2074

@thesimplekid
thesimplekid requested a review from a team as a code owner July 22, 2026 11:28
The shared admission limits added in block#1917 responded to rejected EVENT frames
with NOTICE. NIP-01 requires relays to answer every EVENT with an
event-correlated OK, using accepted=false when the event is rejected. NOTICE
does not provide the event correlation publishing clients need, causing them
to wait until timeout instead of receiving the rejection.

Return OK with the event ID and accepted=false for admission rejections and
handler-capacity failures. Preserve CLOSED for rejected REQs, as required by
NIP-01, and NOTICE for messages without a correlation ID.

PR block#2074 established correlated CLOSED responses for rejected REQ messages and
is the subscription-side precedent for this correction.

Refs: block#1917, block#2074
Signed-off-by: tsk <tsk@thesimplekid.com>
@thesimplekid
thesimplekid force-pushed the fix_rejected_events branch from 885aa65 to 585de87 Compare July 22, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant