Replying to Avatar Pip the WoT guy

nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq3zamnwvaz7tmwdaehgu3wwa5kuef0qqszv6q4uryjzr06xfxxew34wwc5hmjfmfpqn229d72gfegsdn2q3fgfjtyk0 and nostr:nprofile1qyvhwumn8ghj76rzwghxxmmjv93kcefwwdhkx6tpdshszrnhwden5te0dehhxtnvdakz7qpqjlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qy09qsr, the WoT coracle has a few issues, that will become more and more apparent as nostr grows:

1. each follows/mute count 1. This doesn't consider that there are people that follow 5k others, while most are more picky, nor considers the reputation of the one following. These nuances are reflected by the pagerank formula for instance https://en.wikipedia.org/wiki/PageRank.

The contribute of one's follows are proportional to its pagerank and inversely proportional to the size of the follow-list. This is true both for global or personalized pagerank.

2. a users has only information on the two-hop network around him. This consists of an average of ~50k people, which is fine for now because the network is small, but won't scale when nostr is at 10M+ users.

Vertex abstracts away all of these complexities, and gives simple to use end-points for many common operations like:

- sorting replies, comments, zaps...

- verify reputation of a target npub

- get recommendations

I am more than happy to have a chat about how give access to these tools guys, just let me know

I agree with your first point, valuing each follow/mute should take into account how many users the user is following. I think ill try to learn the math behind page rank and see if it works any better for me

For 2. I agree this does not scale but I'm trying to find a simple enough solution that a pure (no server) nostr client can implement that will be the most effective. Once I figure out how to implement the "simple" self sovereign method I would love to see how this could be off loaded to a third party server (or even a personal server on a Umbrel)

But for my use case in noStrudel I need the "WoT" to do two things:

1. Sort pubkeys by "rank" (find the real hodlbod test)

2. Filter out new, on-off spam accounts

The effectiveness of these things will vary based on if the user is using a locally calculated WoT or a remote service, but I think thats fine

Reply to this note

Please Login to reply.

Discussion

I agree, local first, then pagerank as progressive enhancement

personalized Pagerank is the best "local", that is as wide as possible, but still relevant.

but yeah it's hard to compute locally.

Would it change if these ranks where computed server-side, but you can do client-side verification that prevent the service provider from lying?

I have a few ideas in mind.

cc nostr:nprofile1qqszv6q4uryjzr06xfxxew34wwc5hmjfmfpqn229d72gfegsdn2q3fgpz9mhxue69uhkummnw3ezuamfdejj7qgjwaehxw309ahx7um5wf6k2tnrdakj7r0afcs

No, because I still want wot numbers if the server goes down

okay, so it's more a matter of uptime rather than trust, am I right?

I am thinking about running a second relay so that if the first goes down the second can cover.

isn't it possible to store a cache locally and update it once every unit of time? This would radically lower the uptime requirement because the server now needs only to be online once every hour/day/week...

It's both uptime and trust, a local fallback will always be necessary. I could run a cache, but it would also be a third party service with questionable uptime, it's just good to have something built into the software itself because it's such an important core function

I am missing something sir. I assume that Coracle stores locally the WoT calculations it computes client-side. Is it true?

If so, why can't it store the ranks provided by Vertex in the same way?

Because the problem is cold start. Someone (new or returning) opening the app for the first time won't have a cache. The cache gets invalidated pretty often too due to limits with web storage

yeah but this is true for both your current WoT and the Vertex ranks, no?

The way I imagine it is:

- a user main feed is based on its follow-list, which is pulled from relays

- as the user starts clicking around (search, reading replies...), this calls a service provider like Vertex, and the ranks are stored for later use.

So it would progressively load ranks as needed, not ahead of time.

Believe me I am not trying to push anything, just trying to genuinely understand.

Yes, but client-calculated wot can be pulled from relays. IOW, vertex is a centralizing factor. It's benign, but still centralizing.

The issue with client-calculated is low quality and suboptimal UX. The problem I reported with profile feeds taking long to show up in Coracle appears to be related, as you see the notes spinner while the "follower" list gets populated. Correct me if I'm wrong.

Having a fallback mechanism sounds like the best of both worlds.

No, that doesn't sound right, wot is calculated concurrently, it shouldn't be holding up feeds (unless too many requests are being sent to a single relay).

> Having a fallback mechanism sounds like the best of both worlds.

Yes, that's what I'm saying

Yes, that'd work for Community Apps.

As the communities' job and effect is that they do most of the spam prevention + user validation.

Page rank is more rarely needed for the individual user and it's fine if servers go down sometimes.

I can fall back on a light local "user network" calculation by using the Communities and Contacts and going max two level deep (ideally just one even, which'd be fine).

yeah, I think one level should be stored locally, as it's very easy and useful, and then server for everything else.

I'm not too worried about the server lying, since ideally users could choose their provider or maybe run their own.

The way I see it there are two uses for pagerank or "WoT"

1. The client wants to hide content that is outside of the users social network (subjective distance or score)

I'm not sure how this could work without the server sending the whole graph (probably Mb of data) or the client making API requests to check each pubkey (not great for privacy)

For this case I think the simple kind:3 WoT is good enough, at least for now

2. The client wants to sort events or pubkeys by "reputation" or score

Vertex already does this well for user search ( query -> pubkey[] ) but it may be useful to have some kind of generic sorting method for events to allow a client to sort replies ( again probably bad for privacy )

I tend to agree with nostr:npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn. I want my client to work without a dependency on a server. but I'd also like to integrate with some kind of server to improve performance or to get better sorting / filtering results

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

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