pjv on Nostr: I don't think that strfry currently exposes enough through its plugin framework to ...
I don't think that strfry currently exposes enough through its plugin framework to implement the anti-spam ideas here (which I agree will be essential). Or if it does, it's currently undocumented.
What it does is let you build a simple (non-stateful) "write policy" plugin that gives you the incoming event (with some metadata like IP address, etc) and lets your plugin decide whether that event should be accepted or not.
The plugin I am currently testing on my instance:
1. lets you define a whitelist of pubkeys that are allowed to post anything.
2. lets anyone post a kind 10002 event
3. lets anyone post any event with a 'p' tag that includes any of the pubkeys in the whitelist
4. rejects writing everything else
strfry seems not to have any "read policy" plugin implementation (yet?). So I am unable to put limits on what people can read.
Published at
2023-03-06 16:39:14Event JSON
{
"id": "82b1087448d9c2fe66a45626883d6039e36cc5cc31e5d47704e7a88594e288c1",
"pubkey": "0c99877612291bd818b3dd92f2852b823557b3744c3cb10470865c7a56a4929b",
"created_at": 1678120754,
"kind": 1,
"tags": [
[
"p",
"ee11a5dff40c19a555f41fe42b48f00e618c91225622ae37b6c2bb67b76c4e49"
],
[
"e",
"0000a729b81acd486b870883c1920039a8014d0c1aac0f884e4575bd478e3975",
"wss://nostr-pub.wellorder.net",
"root"
],
[
"e",
"1f4417b3e74917c6aecd2bbf866b4294092d79ebe1c5ad1548427a521a60eb4d",
"wss://nostr.mikedilger.com",
"reply"
]
],
"content": "I don't think that strfry currently exposes enough through its plugin framework to implement the anti-spam ideas here (which I agree will be essential). Or if it does, it's currently undocumented.\n\nWhat it does is let you build a simple (non-stateful) \"write policy\" plugin that gives you the incoming event (with some metadata like IP address, etc) and lets your plugin decide whether that event should be accepted or not.\n\nThe plugin I am currently testing on my instance:\n\n1. lets you define a whitelist of pubkeys that are allowed to post anything.\n2. lets anyone post a kind 10002 event\n3. lets anyone post any event with a 'p' tag that includes any of the pubkeys in the whitelist\n4. rejects writing everything else\n\nstrfry seems not to have any \"read policy\" plugin implementation (yet?). So I am unable to put limits on what people can read. ",
"sig": "38a17d1266430bc4667b0ef247f529f6c1f70393c80ef393f2964d2ce0d002d89a9ab0a5b0eb27586228f7229a0aaca18e7a38ee9cc811d3c48569743afbe2a9"
}