nostr-protocol / nips

Nostr Implementation Possibilities
2.38k stars 575 forks source link

NIP IDEA: Avoid reply-spam using "approved replies" #488

Open noblepaul opened 1 year ago

noblepaul commented 1 year ago

1 why?

I like using nostr. But the spam problem is worse than twitter. Spammers choose to reply to popular accounts so that their spam get more reach

2. what is the purpose of this NIP?

Make spamming useless.

3. how are you going to achieve that goal?

Every note may optionally have a flag that says It supports "approved replies". Clients should only show approved replies by default. if the user wants to see "all replies" they should be able to toggle that option. The note will be published with extra tags such as the following. this is to indicate to the clients that it can toggle the replies as approved or all.

"tags": [["approved_replies", "true"],["approval_confitions" : ["follows", "curated" ,"payment:>100sats"]]

What is approval

Approval is done by signing a given reply note as follows

{
  "id": <32-bytes lowercase hex-encoded sha256 of the serialized event data>
  "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
  "created_at": <unix timestamp in seconds>,
  "kind": 7,
  "tags": [
    ["e", <32-bytes hex of the id of another event>, <recommended relay URL>],
    ["p", <32-bytes hex of a pubkey>]
  ],
  "content": "approve,
  "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data>
}

How to approve replies?

Users are free to reply to a note. The OP's client should implement the functionality to automatically approve the replies based on some conditions

Semisol commented 1 year ago

I will look into making this a NIP.

fiatjaf commented 1 year ago

This is a bad idea that overcomplicates the process entirely. One can solve this by just querying replies from approved relays, and doing the approval process in the context of each relay. One can also write some reply-approval software that reads replies from public relays and publishes the approved ones to a restricted relays, but then in the comments section people only read from the restricted relays. The possibilities are endless, and the worst one is asking all clients to calculate some state out of a stream of infinite events on every click.

noblepaul commented 1 year ago

One can solve this by just querying replies from approved relays, and doing the approval process in the context of each relay.

How does a relay decide what is a good reply or what is a bad reply? Are you suggesting that a few big relays will decide that in the future? The best person to curate a good reply is the owner of the original note. This is not just about controlling spam. Very popular accounts may get 1000's of replies to a single note and the account owner may just want to curate the best replies relevant to them

Another problem is consistency. Depending on which relay you are connected to, you may see different set of replies and the original note owner will have no control on what others see.

I believe that the best way to decentralize the protocol is by pushing as much control as possible to the end users and making the relays just dumb carriers

fiatjaf commented 1 year ago

How does a relay decide what is a good reply or what is a bad reply?

Each relay has its own criteria.

Are you suggesting that a few big relays will decide that in the future?

No. I'm suggesting that multiple approaches can coexist. Clients already have to choose from which relay to read anyway, it's not like they're reading from all relays and filtering locally. That is never going to work.

The best person to curate a good reply is the owner of the original note.

Some relays may have the criteria of asking the owner of the original note, just like you want. Then the owner of the original signals to people reading his posts: "read my approved replies from relay X". Done. But readers are still free to read unapproved replies if they want.

Another problem is consistency.

This is not a problem, this is just you thinking Nostr should be exactly like Twitter, and wanting to somehow control what people can and cannot do in the protocol. Consistency is not possible or desirable. Consistency is a bug of centralized systems.

Depending on which relay you are connected to, you may see different set of replies and the original note owner will have no control on what others see.

Yes. Exactly.

I believe that the best way to decentralize the protocol is by pushing as much control as possible to the end users and making the relays just dumb carriers

You are wrong, and you are saying you pushing control to the end user, but in fact you are burdening the end user with more bandwidth, memory and computation resource usage while giving all the power to the original author of each post, taking the control entirely from the readers.

501st-alpha1 commented 1 year ago

I believe that the best way to decentralize the protocol is by pushing as much control as possible to the end users and making the relays just dumb carriers

I strongly agree; I believe that in general the "dumb server, thick client" model is The Way, and (to give one example) is why the Internet works so much better than the legacy phone system.

How does a relay decide what is a good reply or what is a bad reply?

Each relay has its own criteria.

I am concerned that if this is all we say about the subject, it could be a centralization vector, where a few relays are nearly-spam-free and many don't want to connect to other relays. (This wouldn't necessarily break Nostr's censorship-resistance, but I would rather encourage decentralization as much as possible.)

And what happens if I want to set up my own relay and have a decent chance of fighting spam? I could use a whitelist (paid or not), but what if I want to allow my relay to be used more broadly? Would every relay roll their own solution for approved replies?

you are burdening the end user with more bandwidth, memory and computation resource usage

I understand this concern, so I have a suggestion that could hopefully balance between this concern and decentralization.

What if we have a NIP that looks something like the OP suggests, but also states that relays may optionally reject any replies that have not been approved? That way if a user wants to connect to a more lax relay (and toggle approved/all replies client side) they can, or if they only ever want to see approved replies, they can connect to a relay that does the filtering for them.

I think NIP-13 is a good example of this: it describes how Proof of Work is generated and validated, and allows either clients or relays (or both) to do the validation and filtering.

IMHO the more we can define and standardize in NIPs (and the less we rely on ad-hoc solutions), the better for the adoption and longevity of Nostr.

noblepaul commented 1 year ago

Clients already have to choose from which relay to read anyway, it's not like they're reading from all relays and filtering locally

Clients may use their own relays and writers may use their own relays. Associating spam filtering responsibility with relays will increase switching costs and that can be more centralizing. A relay should be like a VPN mostly transparent with little discretionary functions

But readers are still free to read unapproved replies if they want.

Of course, users should be able to toggle between filtered/unfiltered. But, users and note writers have an incentive to see the filtered view so that they save their time/bandwidth. The writer has the incentive to give a curated experience so that his followers get better value.

you are saying you pushing control to the end user, but in fact you are burdening the end user with more bandwidth, memory and computation resource

The bandwidth requirement is not much higher than a note writer reading all the replies once. If you write a note, you're going to read all the replies at least once anyway. The amount of bandwidth required to approve a reply is just marginally higher than reading it

In reality, I see this playing out differently. There will be well known spam filtering services users may subscribe to. So, a user will just use the public key of his spam filtering service of his choice. So, the note writers will be presented with a curated set of replies they need to approve instead of all the replies all the time. Also, the user can switch to an alternate spam filtering service while keeping the same relays. Switching between spam filter services can even be done on a per note basis. Or even better, multiple spam filters can be used in parallel

Very popular accounts (with millions of followers) may actually employ their army of moderators who curate the replies so that anyone who reads their notes get a better experience of reading quality replies. If I follow this popular personality, I'm more likely to trust that person to do curation than some obscure relay service which is more like a VPN service provider.

this is just you thinking Nostr should be exactly like Twitter

We should not reject a UX just because it is "like Twitter". Instead, the best practices must be copied from all existing centralized services

That way if a user wants to connect to a more lax relay (and toggle approved/all replies client side) they can, or if they only ever want to see approved replies

Ideally, I expect all relays to provide an option to see all replies (unfiltered). But, it's not hard to imagine a situation where some relays just store and serve filtered (approved) replies.

IMHO the more we can define and standardize in NIPs ….. 501st-alpha1

Absolutely 💯

We probably should extend this to make it possible to have the following categories

Pranoy1c commented 1 year ago

The best person to curate a good reply is the owner of the original note. This is not just about controlling spam. Very popular accounts may get 1000's of replies to a single note and the account owner may just want to curate the best replies relevant to them

This would end up creating an echo chamber which gets baked in into the protocol. That shouldn’t be desirable. If users want, they can purposefully build it themselves but it shouldn’t be part of the protocol imo.

noblepaul commented 1 year ago

The echo chamber is there because people only follow a certain set of people who have similar ideas. It doesn't happen because of the replies.

However, I would rather be in an echo chamber than drowning in a sea of spam. If nostr was even 1% as popular as Twitter, the spam problem would've been a 100x worse. Spam destroys UX