I'm not talking about all relays sharing data. I mean each relay that receives the update adds it to its own list of reactions. I love the fact that there is no centralized "truth teller" with Nostr. People pick and choose which relays they trust and go with the data it presents them. That's great. I'd just like a less cost-intensive way to aggregate the reactions.

Reply to this note

Please Login to reply.

Discussion

that model makes a great incentive for relays to game likes though. events you post to a relay can be independently verified. aggregated lists cannot be.

What I'm proposing is that each relay store all of the reactions in a single event rather than a bunch of separate events so a client can make a single call and iterate through all of the reactions to tally them up. That's not different than what is done now except that it's not in a bunch of separate events that require the relay to scan its db for all of the reactions and the client to wait on receiving all of those separate reaction events rather than a single event with a single indexed key that's extremely efficient to lookup and send to the client.

so doesn't help client side and makes db exception scenarios on relay side? personally i'd be against any proposal that changes relay db structure for one particular event kind.

Lots of performance issues would be mitigated if relays were smarter, but this is probably one of the easiest to implement I would imagine. Does force clients to trust relays a whole lot more, so it’s probably something that won’t happen for a while

Can’t just magically have an aggregate event. That defeats the whole purpose of the way events are designed. I have a short write up of events that might help clarify here https://armstrys.github.io/nostrfastr/nostr_core.html#nostr-events

lnbc4200n1p3m5cmzpp5wm9ncx5xcld29ja2q05l3nglp6uulvm6zr4ekkhykzfqthvqchpqdq5g9kxy7fqd9h8vmmfvdjscqzpgxqyz5vqsp5ghwp7423j8gwhmz7c0rmwdq2ved3q73vkzwy7nre4n4l0kyhtmhs9qyyssqprt5f4ysl7e2z6tk5s7jfpg20855xktkalcct95nm4th5dud9z4yhy22h3lnttfql84hwkena08h35eqc8up3e6pwalgqjtrvy6ptggpwjkult

I'm not proposing anything "magically" happen. As a 25+ year dev I'm aware of the technical issues involved in aggregate storage. I also understand Nostr being designed for in-time events and not aggregates. If any solution would be unacceptable due to that design philosophy, then there's no purpose in having a reaction event, at least not for large public relays.

Once Nostr popularity has millions (or tens of millions) of daily active users requesting thousands or hundreds of thousands of kind 7 notes for each note being displayed, the load on the relays would be untenable. There's a discussion of possibilities on the issue I posted to the Nostr git if your'e interested in chiming in there.

https://github.com/nostr-protocol/nips/issues/159

Yes, sorry I naively posted last night without looking deeper into your comments and profile. Thanks for the link - curious to see more about this proposal.

No worries. #[3] posted a good solution to the git thread. Have a REST API built into relays that returns all the stats for a given note (# reactions, # replies, # reports) etc. That would solve more than just the reactions issue.