Random thought. maybe bloom filters could be space efficient way to handle the filtering use case? I don't know much about them but AI says they are used to prove an ID is within a set

Reply to this note

Please Login to reply.

Discussion

I think for 1. and 2. RankProfiles is a solid approach

https://vertexlab.io/docs/services/rank-profiles/

Let's go through the case with replies:

- user clicks on a note

- client loads all replies for that note

- extract the pubkeys of these replies

- client asks Vertex for the ranks of up-to 1000 pubkeys in a single call, with the user's preferred algorithm

- client hides replies from npubs with rank lower than the user's preferred threshold

- client ranks the other replies by their rank (or a custom formula like rank * zap amount).

It's an interesting idea but I don't see where exactly in the client you would need it.

- for the feed one uses follows

- for the replies, because on the relatively low number one can use the ranks directly (giving the user the ability to set a threshold).

Bloom filters are superior to RankProfiles when you are dealing with +10k pubkeys (not in the follow-list of the user) I think.

Am I missing something?

I think your right, the only other one off use case I could think of where the client would need a filter instead of sorting would be if they wanted hide zaps / reactions or browser "global" on a relay. but none of those are things I'm trying to implement :)

Do u mean zaps and reactions in the users notifications?

I think that too can be done using RankProfiles. It's unlikely one has thousands of notifications, but not impossible if its targeted by an attacker