Warm tip: This article is reproduced from serverfault.com, please click

How to ensure notified bitcoin block is confirmed?

发布于 2020-12-09 07:11:59

How can i make sure the notified block is confirmed and related transactions of block is final?

I'm trying to monitor my wallet for any deposits, Someone told me to make sure block is verified i need to monitor older block of blockchain with difference of 3, which means i always need to get the height=newest_height - 3, Is this idea correct? How can i trust the notified block? My problem is when i try test with simnet chain params, i will be notified just after generation of any new block with the height of newest one. should i put any configuration for getting a block differ than newest block height?

I'm using Golang, and library i'm using is from btcsuite btcwallet.

I would be appreciated if you guide me with your helpful suggestions.

Questioner
Saeed K
Viewed
0
Mad Jackal 2020-12-10 00:44:01

PoW consensus does not provide for the concept of "finalizing" a block or transaction - for PoW this is a probabilistic concept. Since the PoW considers forks as normal, a block can theoretically be "canceled" at any depth. However, practice has established that the probability of replacing a block at a depth of more than 6 did not occur, therefore it is considered that if there are 6 or more other blocks "on top" of the block, then transactions in it are "conditionally finalized".