mleku the disregarded @mleku - 9mo
i'm about to add a feature to my relay that keeps the history and i have already filed an issue on the nips repo to the same effect let's do this, this is a change the protocol needs desperately no more replaceable events, just a category where it sends the newest version, and an option to request the history the simple fact is that deleting old events is inherently a racy business, who knows when that gets updated and who sees it and when they get the memo better to show the new version but DON'T DELETE THE OLD VERSIONS it's very easy because they all have different timestamps, at least, and at minimum, different IDs
i literally just realised this, but it was partly an accident because the find and delete code in khatru (and in eventstore) was getting stuck because of race coditions and i realised that this procedure is inherently racy and dangerous i hadn't actually changed my profile data since i got this relay running so i just changed my profile and lo and behold: me@iox:~$ cat Documents/mleku.jsonl|grep kind\":0|grep 4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f {"id":"68b722312787e4b4dce50a557ba37110e82c9149a3c5731d51164676f2ebd517","pubkey":"4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f","created_at":1707048883,"kind":0,"tags":[["t","bitcoin"],["t","lightningnetwork"],["t","nostr"],["t","golang"]],"content":"{\"banner\":\"https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Pleiades_large.jpg/1280px-Pleiades_large.jpg\",\"picture\":\"https://nostr.mleku.online/mleku-avatar.png\",\"website\":\"https://mleku.online/git\",\"lud16\":\"[email protected]\",\"nip05\":\"[email protected]\",\"name\":\"mleku\",\"about\":\"npub1...hsmmleku\\n\\nHis Salty Majesty Mleku:\\n\\nrogue cyber hornet computer scientist and engineer building things for #bitcoin, #lightningnetwork and #nostr in #golang\"}","sig":"c1aa30fb1e62e25cea83c869c057f804be3ab2f1b4d8f1ebb2c7bc426c3daf3884d8391713a9fd47d4a9421cc702b82079332df9747f8485d288fbc163cb5290"} {"id":"3989d8f64d67a0a2dba88c71425acf4e0788c1cd791f8f2a1ebe679640d31534","pubkey":"4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f","created_at":1707642118,"kind":0,"tags":[["t","bitcoin"],["t","lightningnetwork"],["t","nostr"],["t","golang"],["t","milk"],["t","gfy"]],"content":"{\"banner\":\"https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Pleiades_large.jpg/1280px-Pleiades_large.jpg\",\"picture\":\"https://nostr.mleku.online/mleku-avatar.png\",\"website\":\"https://mleku.online/git\",\"lud16\":\"[email protected]\",\"nip05\":\"[email protected]\",\"name\":\"mleku\",\"about\":\"npub1...hsmmleku\\n\\nHis Salty Majesty Mleku:\\n\\nrogue cyber hornet computer scientist and engineer building things for #bitcoin, #lightningnetwork and #nostr in #golang\\n\\n#milk is #gfy\"}","sig":"6b3c8b2678cca193826b7ff0bbcb62587f4bf0cb4ead6aeda3099788cbceb9e52d67f4292bd9e306471255cb5f5bf9cbe5f727d90637055fa7f30628eaee4118"} yes, there is two kind 0 events with my pubkey on it no idea how the clients are going to react to that, i guess they request just one so maybe i only need to change the ordering so it always gives the newest one first and then if more are asked for it feeds that number in the history
i think they do need to be sent in reverse chronological order in case they expect to use the first one, this seems like the most obvious expected behaviour... it happens that khatru already sorts results by this order ohhh this isn't the results it's the queries, it puts newer date queries in front of older... i need to revise this more yet
i figure more likely client is gonna cost more time to do this than my relay because my relay is Go and most clients are javascript, so it's gonna sort the results anyway
mleku the disregarded @mleku - 8mo
also, it returns the first only if the filter is for only one so it needs to be the newest first