Enki on Nostr: Spam filter update. So on the Free relay I run (freelay.sovbit.host) this is what ...
Spam filter update. So on the Free relay I run (freelay.sovbit.host) this is what constitues spam at the moment.
A user rapidly posting the same content repeatedly
A bot instantly replying to every post
A new account creating many posts immediately
Multiple accounts posting nearly identical content
Exceeding kind-specific rate limits (like too many profile updates)
Over all, it's a pretty forgiving system. Every new Npub the relay sees starts with 100 points. Passing spam checks gets you more points, and a higher score gets higher rate limits. Spam is penalized a pretty hard, but you can recover over time. If, for some reason, a Npub gets to -50 points, its effectively blocked. Until you get back to -25, and you have massive rate limits until you get back to 0.
Everything about the rate limits is configurable plus there are settings that allow specific kinds through that would trigger rate limits (IE I allow kind 38383 for robosats orderbook stuff) so one can tune it per relay.
The idea was to stop rapid fire bot behavior from issues we have seen in the past, like the reply guy that would rapid fire replies from more than one account. With this system, I admit there are ways that a well programmed bot could skirt the filter but its a start.
Open to suggestions and improvements.
A user rapidly posting the same content repeatedly
A bot instantly replying to every post
A new account creating many posts immediately
Multiple accounts posting nearly identical content
Exceeding kind-specific rate limits (like too many profile updates)
Over all, it's a pretty forgiving system. Every new Npub the relay sees starts with 100 points. Passing spam checks gets you more points, and a higher score gets higher rate limits. Spam is penalized a pretty hard, but you can recover over time. If, for some reason, a Npub gets to -50 points, its effectively blocked. Until you get back to -25, and you have massive rate limits until you get back to 0.
Everything about the rate limits is configurable plus there are settings that allow specific kinds through that would trigger rate limits (IE I allow kind 38383 for robosats orderbook stuff) so one can tune it per relay.
The idea was to stop rapid fire bot behavior from issues we have seen in the past, like the reply guy that would rapid fire replies from more than one account. With this system, I admit there are ways that a well programmed bot could skirt the filter but its a start.
Open to suggestions and improvements.