Thread

Replies (40)

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.
I've already though about the bloom filter idea, as well as @hzrd149 and many others. Imo it's just a "short blanket". You can use bloom filters to do basic filtering. E.g. hide this event because its author is not allowed, but you can only do it *after* you downloaded the event. So, where it is useful? Only where you can't control/specify the authors in the REQ beforehand. This includes: - filtering spam from DMs - filtering spam from replies under a post - filtering spam from notifications not for search, not for reccomendations What's better for filtering imo is bulk ranking, which with RankProfiles takes few ms and allows to rank 1000 pubkeys in a single request. (Oh and btw it's free for up to 100 request/day per user, which means a total of 100k per user). Instead of a simple 0 or 1, in or out, you get a score between 0 and 1, you can use the reputation in more interesting ways. e.g. for replies, you could compute a score which is score = pagerank(author) * zapped amount(from people I follow idk) and then filtering using the threshold T score < T This also has the benefits of not having to worry about expirations, because yes reputations change all the time, precisely ~18k times a day with the current scale of nostr. You just request the moment the user clicks on the event to see the replies.
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.
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?