i know one thing i could do that might maybe dramatically decrease its' bugginess is to completely remove all of the access control stuff, strip it back to a bare, dumb relay that needs a proxy layer to be useful or is fine with no security ie personal LAN realy. remove the nip-42 also. nip-70, and other things

Reply to this note

Please Login to reply.

Discussion

Well, my client could provide that stuff. I could just ask the AI to copy what you built and then you could remove it.

The logic is already there, in the repo. 🤔

Would moving that stuff to Typescript noticeably slow it down?

yeah, that's what i'm saying. break it down so it's just a dumb relay, with all the go-fast bits, and then do like what nostr:npub10npj3gydmv40m70ehemmal6vsdyfl7tewgvz043g54p0x23y0s8qzztl5h did with the sprockets, except do it as a HTTP proxy, for handling auth and access control and etc. then it doesn't matter so much what language you use, because the core engine does all the heavy lifting, the other things are just gate keepers and don't have heavy work to do anyway, just opening and closing gates really.

Ah, okay, that sounds good. I'll work with it, as-is, and if you want to change it, we can do that in a later iteration.

i'll make a stripped down branch now, i'm kinda a bit idling on the fiatmine job at the moment, some last few bugs the front end dev has found, later today hopefully i will zip that all up and fingers crossed nothing more comes up during the next week.

i'm working on something else at the moment too, a yet another re-imagining type thing, simplifying everything, exhaustively. like removing kinds, making tags just k/v and eliminating complex, arbitrary escapings for just \n and \\ and nothing else required. gonna think about how to write the queries too, something also line structured and sentinel based. Go's top level syntax for file structure is inspired by the same principles used in Pascal and Modula/Oberon where a specific reserved word right after a line break indicates a file section, these are called sentinels. they are much faster to parse and simple to write the state machine for them, you can even be lazy and literally just split a file into lines (step one) and then group those lines by when you find sentinels (step two). i mean, if you can slice and dice strings in any language you can do this. unlike shit like json. i mean, look at yaml and toml, both of these work on a similar line structure basis, toml is better, yaml has this retardo fucking python whitespace syntax shit.

i started doing that and then it was like, ugh, this is the Wrong Way

the Right Way (tm) is to start from scratch and copy in the bits that are needed and remove the extra bits that aren't needed.

so there will be a new https://min.realy.lol that is a dumb, unprotected, spam hungry beast of fastness and speed

i've had a bit of a rough day with people failing to understand the logic of my server's API, still confusion about it 3 weeks after i raised the point that we probably need another table and endpoint to handle some specific state and only just realised today that this had not been understood, and so much difficult communication in the weeks since that time and still no clarity is dawning.

so i'm feeling pretty ugh right now

and i go and look at this code and it's like, to remove all that auth stuff is a massive job, but i have to do it to fix probably what will be most of the problems with this thing and there will be no auth.

i'm really struggling to find a motivation to actually do this.

but then i'm also quite bored. ok, gonna try anyway. just remove all the auth related stuff, and all the admin stuff that requires auth.

anyhow, if you go to https://realy.lol you will find there is now a branch `minimal` which has all the auth removed. it works, seemingly ok, with nostrudel but jumble doesn't seem to recognise that events are saved for whatever reason.

anyway, point being there is now an ultra bare minimum realy that should not be let outside into the wild internet where it will quickly be laden with gay porn and yodabotspam.

and maybe it needs some fixing with how it's sending back OK messages or something.

it also has the HTTP API there but all the admin stuff has been removed because there is no auth anywhere now.

didn't really take me that long to fix. just remove things, then compiler complains with lists of all the things that are broken, i just go through and remove them and recompile until nothing complains and it runs.

that's probably about it for me building nostr relays tho, unless i can get paid for it. my day job is too much of a pain at the moment and i really need to keep this job and also need to recover my dignity and sense of self worth at this point.