That’s an interesting idea and I like it if it’s possible.
I also have an idea and I’m not a developer so it might be terrible… Sorry, I thought I’d hijack your issue rather than spamming NEO’s github too much (my idea relates to the same problem).
I also apologise for the non technical language below!
To me it seems like most spam attacks originate from one address or go around in circles through various addresses etc. Is it possible to have a ‘filter’ that can detect spammy transactions and the address they originate from (including any ‘children’ transaction addresses below that address)? If that’s possible then those addresses could then get flagged for x amount of blocks.
Then those addresses could be subject to the additional rules below:
1) Assign the lowest possible priority, so genuine free transactions will be prioritised higher than the spammy free transactions.
2) Limit the amount of no fee spammy transactions that can be sent (ie the offending circle of addresses will be barred from sending more than 1 free transaction per a block for the next 100 blocks
3) These extra rules would only apply for free transactions and would be would be processed as usual if the sender then decides to pay a transaction fee.
Please delete if this isn’t possible or is a terrible idea.