Replying to Avatar Vitor Pamplona

Outbox is harder than it should be just because devs make their first versions with a hardcoded relay list expecting that later they will just "add outbox".

Nah... you won't. You fucked up. Now you need to rewrite everything because your architecture cannot handle it. It's as simple as that.

Outbox requires many layers of indirections: Before loading the feed, you need to load the NIP-65 event, and before loading the NIP-65 event you need to figure out the user's home relay to get the most up-to-date NIP-65 event from. You will need to setup those layers from the beginning.

More importantly: your relay pool will change from post to post. You will need to quickly disconnect and connect to relays as the use slides through their feed.

To see all replies of a thread, you will connect to all of the inbox relays of each participant in that thread. That's the only way to see everything.

The same pool must keep Bunker connections alive at all times and randomly connect to Nostur Wallet Connect relays to send zaps.

If you are crazy enough to implement multiple NIPs, like Amethyst and Nostur do, each NIP will have their own ways of defining which list should be used. You will need different bootstrapping relays for each NIP.

Our nostr libraries are terrible. They are almost all still based in the old thinking of a fixed relay pool. Even the modern AI stuff from nostr:nprofile1qqsqgc0uhmxycvm5gwvn944c7yfxnnxm0nyh8tt62zhrvtd3xkj8fhgprdmhxue69uhkwmr9v9ek7mnpw3hhytnyv4mz7un9d3shjqg4waehxw309aex2mrp0yhxgctdw4eju6t09uq3vamnwvaz7tmjv4kxz7fwd4hhxarj9ec82c30hyvdwq still uses fixed relay lists. That will drive your code into a direction that will be very hard if not impossible to fix later.

We can fix this. But it is hard to fix when every client also operates a main relay to centralize things on. Things get built around that relay and people forget to decentralize. It's sad. But this error is so common that it's not even fun anymore.

Every client needs to help users setup their relay lists. Every client MUST use the user's relay lists that other clients already helped him/her setup. Ignoring the user settings from a different client will only make your code unfixable overtime.

The happy path is evil. And if you go down into that direction, it will consume your soul.

Yes it is a deep change.

I think one of the biggest problems is the infinite-redundancy issue. Most protocols have no redundancy. We have unbounded lists of relays. I think 3 is plenty for any particular purpose. Given how many connections we already have to make, it is just too onerous to connect to all 37 of someone's outbox servers. If people want to list 37 outbox servers, clients should use the first 3 and optionally use more if those 3 are down, but beyond the first 3 nothing is guaranteed.

Not every client needs to help users setup their relay lists direclty, they can pass users over to a different client or website that does it.

Reply to this note

Please Login to reply.

Discussion

The main issue is that as a user's relay list grows, the probability for an event been in all of them decreases. This is particularly true for inbox stuff where notifications are quite spread out in the list.

I think every client has the duty to help the user setup all the lists they need to function. Otherwise, people will just complain that things don't work/nobody sees my content/I am being censored/etc.

That is also a main issue. Syncing would be useful.