Skip to content

channel-notify-prefs: oversized blob (NIP-44 65KB) pruning and recovery #3236

Description

@LordMelkor

Deferred finding (F9) from the adversarial review of #3233 (per-channel notification settings, #3160).

channelNotifyPrefsSync serializes and NIP-44-encrypts the whole prefs store with no size budget. NIP-44 payloads cap at 65,535 bytes; a store that accumulates enough customized channels, tombstones, and preserved unknown fields will cross the limit, after which every publish fails into a console.warn and preferences silently stay local-only.

Needed:

  • A pruning strategy before publish (e.g. drop oldest default-level tombstones first, then compact entries for channels deleted from the roster).
  • Surface persistent publish failure to the user instead of warn-and-drop.
  • A regression test at/over the boundary.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions