What is Nostr?
npub1x0r…cerr
2023-06-18 02:36:47
in reply to nevent1q…hvts

npub1x0…xcerr on Nostr: By the way, i posted a solution in relay-level protection. ...

By the way, i posted a solution in relay-level protection.

Many of you asked me for solution for this kind of problem. But that will make it only gives all notes from "following", not the global section.

What do i mean is making the relay to only retrieve events from atleast 1 authors (0 authors on filter? No global feed or events returned. That's it).

And above will impact the following:
- relay will not give all new events that the relay got
- relay will only give events that requests for an individuals.

But could also solve the entire spam problem in massive scale.

Still not understand the solution?
I will made a code for relay software as an example in JS:

// We do not want to give clients all events that the relay got
// So if client did not request atleast 1 authors pubkey, Then reject
if (!filter.authors.length)
return ws.send(JSON.stringify([
"NOTICE", "Atleast 1 author pubkey was provided"
]));
Author Public Key
npub1x0rg2evrkhx4jv49kvumsufc52mtwhur3pshvqezsnfnnncs2nashxcerr