IIUC, upon a new event, strfry sends data to the plugin on stdin, the plugin executes once and then reports back on stdout. So then, how is the rate limiting sources persisted between notes?
initial version is out 👀
still very early though, only have a ratelimit plugin atm
https://github.com/damus-io/noteguard nostr:note1y7vxy6gaest9809hrg96zl3vnsc3rwveuq8ad2l5uwdhhapd93tqu0w5v3
Discussion
not sure what you mean. why would it be persisted between nodes, which nodes?
Not "noDes" but noTes. When strfry sees a new note, it sends it to the plugin you specify in the config over stdin. The plugin executes and responds back over stdout. In other words, unless you write to file, the Map that holds track of the sources will not be persisted for the next note (or the next execution of the script). The sources I refer to is this: https://github.com/damus-io/noteguard/blob/master/src/filters/rate_limit.rs#L16
Maybe I haven't had enough coffee yet, idk 😂
Lol i just woke up my brain is still booting. I should coffee before I nostr
Maybe your brain is dual-booting two different OS simultaneously?