Skip to content

NIP-09 deletion events accepted but addressable events still returned in queries #168

@BenGWeeks

Description

@BenGWeeks

Summary

When publishing a NIP-09 deletion event (kind 5) with an a tag referencing an addressable event (kind 30402), the relay accepts the event (returns true), but continues to return the original event in subsequent queries.

Steps to Reproduce

  1. Publish an addressable event (e.g., kind 30402 product listing)
  2. Publish a kind 5 deletion event referencing it:
    {
      "kind": 5,
      "content": "Product deleted",
      "tags": [["a", "30402:<pubkey>:<d-tag>"]]
    }
  3. Relay responds with true (accepted)
  4. Query for kind 30402 events from the same pubkey
  5. The "deleted" event is still returned

Expected Behavior

Per NIP-09:

Relays SHOULD delete or stop publishing any referenced events that have an identical pubkey as the deletion request.

After accepting the deletion event, the relay should stop returning the referenced addressable event in query results.

Actual Behavior

  • Deletion event is accepted (publish returns true)
  • Original addressable event is still returned in queries
  • This causes deleted items to reappear in client UIs after refresh

Environment

  • Relay: wss://relay.damus.io/ (running strfry)
  • NIP-11 shows support for NIP-09: supported_nips: [1, 2, 4, 9, 11, 22, 28, 40, 70, 77]

Context

This was discovered while implementing product deletion in a Nostr marketplace. Full investigation details: PlebeianApp/market#413

Questions

  1. Is this expected behavior (relay stores deletion but clients must filter)?
  2. Should strfry be removing/hiding the referenced event from query results?
  3. Is there a different approach for deleting addressable events?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions