Did I fix that bug? I don't even know.
All I know is that you should all be using the ReplaceEvent hook.
Hey Ben, thanks for the continuous support! :) My repo is long overdue for an update by the way. I’ve been working on it but couldn’t get the work finished up over the weekend. Hopefully, it’ll be ready today. I’m planning to release an update with the latest upstream version of Haven, along with some extras, including Nginx and LMDB optimisations, keepalive enabled by default and enhanced support for macOS, Windows, and Linux on Arm.
Between:
1. nostr:nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gprfmhxue69uhhq7tjv9kkjepwve5kzar2v9nzucm0d5hszxmhwden5te0wfjkccte9emk2um5v4exucn5vvhxxmmd9uq3xamnwvaz7tmhda6zuat50phjummwv5hsx7c9z9's changes to EventStore and Khatru fixing a bug that caused outdated replaceable and addressable events to linger indefinitely (plus introducing optimised COUNT support)
2. nostr:nprofile1qqsw9n8heusyq0el9f99tveg7r0rhcu9tznatuekxt764m78ymqu36cpz4mhxue69uhkvun9deejuat50phjummwv5hsz8rhwden5te0wfjkccte9e3xjarrda5kuurpwf4jucm0d5hsz9thwden5te0wfjkccte9e6hg7r09ehkuef0avzrjf's upstream updates (by the way utxo, I’ll have a small PR upstream soon to enable NIP-40 / Expiration Timestamp support as well)
3. A few of my own additions already mentioned above
IO and CPU usage for my local Haven container has dropped by over 40%.
Stay tuned!
Did I fix that bug? I don't even know.
All I know is that you should all be using the ReplaceEvent hook.
Yeah, you did 🤣. The outdated replaceable and addressable events (including the infamous outdated 10002 lists that have been bothering me forever) are now being properly deleted. I no longer need to run my crappy maintenance scripts to delete outdated events! If it wasn't intended then I think this was a "happy side effect" of your changes to fix pathological duplicates. Likely the changes to the Publish method in this commit, but I'm not 100% sure: https://github.com/fiatjaf/eventstore/commit/295a7510337c39e79d5c8154d22d1fb86438098b.
And you’re totally right. I'm already working on adding ReplaceEvent handlers to Haven. I managed to break my own dev branch this weekend while updating Khatru and EventStore to the latest version (likely due to conflicts with other libraries). But as soon as I have a stable version, I'll submit a PR to utxo's repo upstream.
OK, well I thought there was a chance I had fixed it but wasn't 100% sure.
Thank you for monitoring all of this and ensuring things continue to mostly work.