yeah, it is a lot simplified, and i had an AI help me make it fully pass all mikedilger's relay tests, and it seems to be pretty solid now, and should be maybe one of the fastest relays around because of its very fussy and specific memory handling.
a lot of parts of events are not copied during the decode process, mainly tags and content fields, the un-quote process also operates in-place. it did used to in-place do things to the hex encoded fields as well and maybe i should return it to doing that but for now they just allocate an extra half as much new memory for it. but it got a bit complicated sometimes, idk, i don't think it will give that much benefit.
the encoder for the database is fast tho, faster than fiatjaf's, as is the JSON decoder for filters and events. the event decoder is almost as fast as decoding a binary event, i'm kinda proud of how well it works. wrote a state machine using goto statements :)
oh yeah and the database indexes are designed so it doesn't decode events without knowing already they are correct, when i first started working with the badger database engine that fiatjaf wrote, it has less than a complete set of indexes so you have to decode a lot of events often just to see if they match.
anyhow, yeah, i'm in the process of building a subscription management system for it where you just zap the relay's bot-npub and then gonna make an extension to the privileged privacy protection handling so it will also mark kind 1 events with a specific tag to be privileged so it can message you in your main feed like when you pay, it will tell you when it will expire and remind you a day before it expires. the idea is that i don't have to write any UI for it, and combined with #jumble it would be pretty cool for community relays with membership fees.
i am about to start learning to work with typescript tho. dreading it but i'll get paid and later on there will be some fun stuff with building AI agents and whatnot. so i'm gonna do the front end work and finally be officially full stack. and then i can also use those skills to add UI to the relay.
