Skip to content

kind:30443 keypackages accumulate across sessions instead of replacing #302

@Datawav

Description

@Datawav

Description

Each time a client publishes keypackages, it generates new kind:30443 events with fresh d tag values. Since every d is unique, relays treat them as separate addressable events and none replace the others. The result is that keypackages accumulate indefinitely — one per session, per login.

Expected behavior

A client session should reuse the same d tag values (or delete stale keypackages) so that old ones are replaced rather than left on relays.

Observed behavior

Multiple kind:30443 keypackage events from the same pubkey accumulate on relays, each with a unique d tag. After a few sessions, a pubkey can have 10+ live keypackages spanning days or weeks.

Impact

  • Inviters may pick up a stale keypackage (already consumed or from an old epoch)
  • Relay storage grows unbounded for active users
  • No way for a client to know which keypackages are still valid without consuming them

Notes

The non-replaceable kind:443 keypackages have the same issue — old ones are not deleted on login/logout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions