HomePhabricator

zmq test: Actually make reorg occur

Description

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10303

Details

Provenance
Gregory Sanders <gsanders87@gmail.com>Authored on Jul 22 2020, 14:49
PiRKCommitted on Oct 14 2021, 06:20
PiRKPushed on Oct 14 2021, 06:20
Reviewer
Restricted Project
Differential Revision
D10303: zmq test: Actually make reorg occur
Parents
rABC2553d209b57e: Fix the check-seeds.sh wrong evaluation of the live nodes
Branches
Unknown
Tags
Unknown