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?
-
Rui2guo commented at 9:16 AM on July 11, 2019: none
-
FndNur1Labs commented at 8:12 PM on July 13, 2019: none
Is this for fixed indexed or block check point?
-
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
-
promag commented at 11:40 PM on July 16, 2019: member
I could be missing something but looking at
CChainState::ActivateBestChainyou can see thatNotifyBlockTipis only called for the tip of the reorg. Maybe you should "walk backwards" from that new tip until you find an already known block? -
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.
- fanquake added the label RPC/REST/ZMQ on Aug 4, 2019
- fanquake closed this on Aug 4, 2019
- DrahtBot locked this on Dec 16, 2021