Replaceable events should only be used for things that are written sporadically. There some shady stuff being done out there with these, I think it's wise to only allow some explicit whitelisted kinds that we know aren't spammy.

Reply to this note

Please Login to reply.

Discussion

💯 To be fair, I’m encountering broken client behaviour or client/relay incompatibilities that result in spammy activity with otherwise "legit" events more often than actual malicious code or directed attacks. But you’re right, we should be doing something about it. Whitelisting specific events is a good start. Maybe I’ll build a Citrine-style dashboard for Haven so users can at least get a sense of what they’re storing in their relays. From there, we could add functionality for deleting individual events, deleting all events of a certain kind or even blocking them entirely.

For now, though, ReplaceEvents are doing a great job of preventing unnecessary database bloat. Again, many thanks.

I'm not talking about malicious stuff, but things like Amethyst draft events that rewrite the same addressable a thousillion times (I'm not sure this actually exists but I've heard it is a thing).

I’ll have a look deeper. I haven’t paid much attention to Haven’s private relay since Inbox and Outbox are always the ones on fire, but apparently, I only have three kind 31234 events (Amethyst-style drafts) across all my relays. Draft events are certainly high-frequency, but as far as I can see, they aren’t bloating the database.

List and set events, on the other hand, have been the bane of my existence. That, along with the fact that Amethyst still doesn’t send the right events to the correct types of relays, remain my top two unsolved tech problems on Nostr. Vitor mentioned he was working on it, but it’s a non-trivial change given how much functionality has been built on top of the classical general relay model. Fingers crossed, both clients and relays will see some improvements this year. I’d prefer these two fixes over any new features.