Oddbean new post about | logout
 For a relay with normal client, Implementing nsecbunker and dealing with it is a bit complicated as there's still some client that didn't have a working NIP-42. 
 For bostr2, It's what we're running right now as a public bouncer. As i have problem with memory management & concurrent download problem in NodeJS one. 
 yeah, there's a number of issues plaguing this business with the shitty clients but what i'm proposing to do bypasses their shittiness and also creates an entire ecosystem of relay service providers, and eliminates the islands in the network

i also think the relay needs to have a run mode where it isolates subscribed users, who can be added by the administrator, but also allows a two way flow for designated types of traffic, such as messages tagged with a particular group so you can have stuff like issues boards, public support messaging, and so on, while keeping team chat and forum private and not distributing it

of course, because nostr is self-authenticated messages, users can leak internal stuff but you could also have "watchtower" style services that the business runs that catch this and alert administrators of a leaker 
 oh yes, and it does need a slightly custom client that adds identifying tags to published messages, and an auth flow that disallows reading or writing to the relay without this extra auth step, it can't just be based on npub and auth

and the auth of course requires teh client to be slightly custom in that it SUPPORTS FUCKING NIP-42 
 you will still have fun with doing that in Go but at least it's easier

i can just give one tip tho - the concurrency code in fiatjaf's eventstore badger implementation is fucked, i am quite certain nobody has seriously tested it, because it has resource leaks that leave threads running chewing huge amounts of memory and after just 24 hours and users with outbox model clients it burns the cpu to the ground, and you have to restart it, which is unacceptable

i've fuly rewritten the entire nostr message codec to use more efficient memory usage, enabling teh use of buffer freelists, and avoiding garbage producing strings (they are immutable so their memory must be GC'd) and benchmarked and optimized a bunch of things, added support for the fast bitcoin-core signature library

it's gonna be a zinger when i finish it, but i have to focus on my paid gig building a nostr aggregator, and wrangling fucking bluesky protocol, which is evil and wrong and retarded