This PR creates a new ZMQ notifier that gives a “total hash history” of block (dis)connection, mempool addition/substraction, all in one pipeline. It also exposes a “mempool sequence number” to both this notifier and getrawmempool
results, which allows the consumer to use the results together without confusion about ordering of results and without excessive getrawmempool
polling.
See the functional test interfaces_zmq.py::test_mempool_sync
which shows the proposed user flow for the client-side tracking of mempool contents and confirmations.
Inspired by #19462 (comment) Alternative to #19462 due to noted deficiencies in current zmq notification streams.
Also fixes a legacy zmq test that didn’t actually trigger a reorg because of identical blocks being generated on each side of the split(oops)