Hi Aiden,

There is an easy solution based on my understanding of [transaction validation][0] although I have not tested it:

1. Add a config option `txnotify` similar to `blocknotify` that executes commands or script when a new transaction is received from a peer.
2. Add a function `ExecuteTxNotify()` that will run the script provided by the user in step 1. Script should either return 'accept' for 'reject' and function would return true/false accordingly.
3. Call `ExecuteTxNotify()` in ` AcceptToMemoryPool()` so that rejected transactions do not enter the mempool.

[0]: https://bitcoincore.academy/transaction-validation.html

/dev/fd0
floppy disk guy

On Thu, Sep 25, 2025 at 12:00 AM Aiden McClelland <me@drbonez.dev> wrote:
Hi all,

I'd like to share for discussion a draft BIP to allow for a modular mempool/relay policy: https://github.com/bitcoin/bips/pull/1985

I think it could potentially reduce conflict within the community around relay policy, as an alternative to running lots of different node implementations/forks when there are disagreements.

I am working on a reference implementation using Bellard's QuickJS, but it has been almost a decade since I've written C++, so it's slow going and I'm sure doesn't follow best-practices. Once it's working, it can be cleaned up.

Thanks,
Aiden McClelland

--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/cbdab6fa-93bc-44c9-80f0-6c68c6554f56n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/CALiT-ZqFhMV8VfgOdNyamG4oLgyCL5E7W8s3F9gB_k0ihyUAgA%40mail.gmail.com.