Zmq Questions about Block Rollback #16372

issue Rui2guo opened this issue on July 11, 2019
  1. Rui2guo commented at 9:16 AM on July 11, 2019: none

    hello, I'd like to ask ZMQ whether block monitoring for bitcoin will process rollback blocks into queues for example: I found that ZMQ hashblock listener did not listen for the correct hash of the rollback block. Original Chain: 590482 -->590483 --->590484 Normal occurrence block rollback chain:590482 -->590483(roll) --->590484(roll)-->590485--->(......) ZMQ is not acquired the 590483(r) 590484(r) blockhash ,but the blockhash of 590485 is acquired. the old 590483 590484 is acquired Does Bitcoin ZMQ not support this?

  2. FndNur1Labs commented at 8:12 PM on July 13, 2019: none

    Is this for fixed indexed or block check point?

  3. Rui2guo commented at 7:29 AM on July 15, 2019: none

    Is this for fixed indexed or block check point?

    yes,this is block index, imply put, the rollback block will not be retrieved via ZMQ

  4. promag commented at 11:40 PM on July 16, 2019: member

    I could be missing something but looking at CChainState::ActivateBestChain you can see that NotifyBlockTip is only called for the tip of the reorg. Maybe you should "walk backwards" from that new tip until you find an already known block?

  5. promag commented at 1:43 PM on July 17, 2019: member

    After all this behavior is expected and documented in https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md#remarks, quoting:

    Note that when the block chain tip changes, a reorganisation may occur and just the tip will be notified. It is up to the subscriber to retrieve the chain from the last known block to the new tip.

    You can close this.

  6. promag commented at 1:46 PM on July 17, 2019: member

    FYI #16404.

  7. fanquake added the label RPC/REST/ZMQ on Aug 4, 2019
  8. fanquake closed this on Aug 4, 2019

  9. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me