Thread

I kinda want to do a Web of Trust scoring service as an app. So, you can download the entire Nostr graph to the phone and compute all scores yourself. You can then mannually update all scores as you need and save on Citrine.

Replies (59)

🛡️
Personalized PageRank is a great addition to nostr. But it’s proven to be susceptible to link farm attacks. Try searching for an influencer filtered by PageRank and you’ll see bots, unless you plan to always limit results to the top one result. Personalized GrapeRank addresses link farm attacks via mutes and kind 56 reports which target spammers that would otherwise make it through. An entire link farm swarm can be chopped off by a handful of targeted reports. Follows are great but they’re not enough. View Article →
no because it's hardly doable now, and not doable in the long run. First, after many memory optimisation, I am still using 4GB for my Redis-based graph. Can you do it on the phone? Yeah, but not when nostr will be 10x what's now. Second, you don't gain anything computing the rank yourself if you trust the provider with computing the graph. You might as well use the provider's ranks directly. Computing the graph requires downloading 10+ GB JSON and doing ~400k signature checks. Third, counting follow list alone, the graph needs to be updated 18k times every day, to be always up to date, which is expensive and changes the ranks. These are he number for the "whole" graph. A number of people might think that you don't need the whole graph, you just need 2-hops (follows of follows), but I argue that the experience is going to suffer dramatically. In every social media under the sun you can search, at least by user name and find the person. Imagine saying that in Nostr you can't because your locally computed social graph (which is graining your battery) isn't big enough. Like wtf.
🛡️
The library I built is … actually modular and extensible, ready to be integrated into clients and relays. It’s a different project altogether from brainstorm. While I never got around to integrating NIP-85, it does have an overall modular architecture. It would be pretty straightforward to add additional “output” module and then a “trust assertions” plugin for that.
🛡️
My Brainstorm 🧠 ⚡️ instance uses its own custom coded GrapeRank calculator. ManiMe and I were working on integrating his above repo earlier this year, didn’t quite completed the process. And yup, Brainstorm uses Vitor’s NIP to export scores. ManiMe your GrapeRank calculator repo is used by grapevine.my, is it not? Part of our goal when ManiMe made those repos was to experiment with separating the GrapeRank algo into modules. In particular, separation of the interpretation module (ingest raw data like kind 3 or 1984 events) from the calculation module (mostly weighted averages). Still needs more R&D. There will by design be lots of distinct interpretation modules. In principle a single calculation engine should have wide applicability, but I’m not sure yet to what extent different teams may want to fork and customize the calculation engine. My calculator module has a few small tweaks that I think aren’t in ManiMe’s calculator.
seems to be a good fit. I have the impression that there is a single design and everybody can implement it the same way. And it's made for static filters, which they will be if we share them in events.
🛡️
Seems like convincing everyone in nostr to use the same exact specs would be a challenge. What if we come up with a system that doesn’t require everyone to use the same specs? We declare a Decentralized List (kind 9998 per the custom NIP, linked below), called “Bloom Filter Specs”, and list the requisite parameters as “required” tags (rounds, salt, etc). So if you want to use some particular bloom filter, you declare an item on that list (a kind 9999 event) with your choice of specs and then refer to that event wherever necessary.
Not everyone, just those using the specific kind. The main issue is that there are thousands of potential hash algorithms to use in bloom filters. If we leave it open, all clients must implement ALL hashing functions just so that things don't break when they suddently face a hash that they don't support. Which, in the end, means that nobody can declare full support to the NIP because there are always new algos. Also, there is not really a huge gain from tweaking hashing algorithms for Bloom filters. We just need one that works and everybody will be happy. Just like we only use SHA256 on nostr events.
🛡️
The kind 9998 list header declaration could specify the hashing algo. Or we could leave the hashing algo unspecified and recognize that it is not necessary for all clients to support all hashing algos, just like it’s not necessary to support all NIPs. Probably the community will gravitate to one algo organically, unless some devs have strong preferences that are not always aligned. If getting everyone to agree to all the details is trivial, is there any reason not to go ahead and write up a bloom filter NIP?
I don't think so. Everybody just saves a huge list of relays in their databases. There are many places clients could share bloom filters. This all started with this idea: In this case, I proposed sha256 as a hash function so that clients didn't need to code MurMur3, but MurMur is so easy that we can just teach people how to do it.
They do, and I think individual scores will always be there. But downloading 100K individual scores takes a while, uses a lot of data and space in the disk of the phone. Having ways to minimize that usage while providing some rough level of trust enables some light clients to exist. For instance, a user search or tagging could use NIP-50 to download all the shit on relays and then filter by local bloom filters to know which users are real ones. If bloom filters are not available, then the app needs another round trip to download the individual scores of each key and discard them all when the user closes the search screen.
I think that math was wrong. The 10,000,000 keys was not the number of keys inside the filter (which for NIP-76 would be 2-3 keys on average). But relays would have to check that filter against 10,000,000 + keys that can connect to them. The false positives claim was based on testing 10,000,000 keys against a simple filter like that.
🛡️
Sounds like there will be lots of instances where a WoT Service Provider would want to deliver a bloom filter instead of a big list. Big lists cause several problems: 1. Unwieldy to transmit by API; even just a slight delay could result in bad UX, depending on the use case 2. Won’t fit in a single event due to size limits 3. Slows down processing when using the list for whatever the recipient is using it for. Any rule of thumb estimates we should keep in the back of our minds as to how big a list of pubkeys or event ids should be before we should think about delivering a bloom filter instead?