Page MenuHomePhabricator

zmq test: Actually make reorg occur
ClosedPublic

Authored by PiRK on Tue, Oct 12, 08:25.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC3cf2c996d877: zmq test: Actually make reorg occur
Summary

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.

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)

This is a backport of core#19572 [1/4]
https://github.com/bitcoin/bitcoin/pull/19572/commits/1b615e61bfc464f215a1b48e6e27d1e8fc16b2d1

Note: I wasn't able to reproduce the issue that this commit is supposed to fix. I tried adding an extra line after generating the 2 new blocks on node 1, without being able to get an identical block: assert disconnect_block not in connect_blocks

Test Plan

test/functional/test_runner.py interface_zmq

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable