Is there a way to run algorithms on client side? Or is there a way to trustlessly verify that the algorithm hasn’t been tampered with maliciously by the black box relay?

Reply to this note

Please Login to reply.

Discussion

Not really. If I wanted to give you a Twitter like feed, purely on the client, I’d need to grab all events over the last day from your followers, and all events on those events (zaps, reactions, comments, reposts) - 10s of thousands of events potentially. Then I’d perform an algorithm on all that data on a potentially resource constrained device. It’d be really slow and most of that data is discarded because the algo determined it was irrelevant.

You already trust your relay not to remove things you want to see. The hope in nostr design is “at least one relay I query won’t remove that message.”

You could extend that to algorithms potentially; at least one of these relays will give me an honest result (assuming there’s some ability to reconcile results … say only accepting results that roughly agree with the others). You could also provide the data necessary to verify the algorithm’s result, particularly if the algorithm is specified.

It’s kind of early to say how it should work exactly but specifying algorithms will reduce trust in any particular relay which is the point … even if you can’t reduce the trust to zero.