After a transaction is confirmed and included in a block, it is said to have a depth (confirmation) of one. However I've read that many companies require "multiple" confirmations (up to 6) before they consider a transaction truly confirmed. Does that mean that a block that is confirmed can be revoked, thus nullifying the previously confirmed transaction? What purpose would such a behavior serve -- in other words, once a transaction is confirmed and a block is formed, what advantage is there to later "unconfirmed" that block?
-
related: bitcoin.stackexchange.com/q/48302/5406, bitcoin.stackexchange.com/q/29911/5406, bitcoin.stackexchange.com/a/44407/5406, bitcoin.stackexchange.com/q/13987/5406– Murch ♦Dec 21, 2017 at 3:09
-
Perhaps due to my novice understanding of how this all works, I don't see how the above is related to my question.– DaveDec 21, 2017 at 3:22
-
I'm afraid you're right: What you're describing is a chain reorganization, i.e. an event where a blockchain tip becomes stale due to being overtaken by a competing blockchain tip. All four linked questions describe aspects of this event that relate to your question in some fashion.– Murch ♦Dec 22, 2017 at 20:30
1 Answer
Every Bitcoin node creates it's own blockchain. When a new block is found, it is broadcasted to the network. Other nodes will only consider the highest blockchain as being the "real" blockchain.
Sometimes, two separate nodes build a block containing different transactions. Two competing blockchains now exist, it is now a race for the next block. Once the next block is found, we can reject the other inferior chain. But if that inferior blockchain manages to get two new blocks, it will be broadcasted again as the main one.
To avoid having a transaction that was once in a block, but it got replaced, we simply state how many blocks happened since the transaction as confirmations. After 6 confirmation it's considered almost impossible to alter, so we just say it's confirmed.
-
Thanks for this detailed explanation. A follow-up, if the scenario happens taht you described in paragraph 2 -- the inferior blockchain manages to get two new blocks, thus becoming the main chain -- is there any affect on the people involved in the transaction that was once part of a different chain but is now part of this new one?– DaveDec 22, 2017 at 20:28
-
Yes, transactions which may have not existed now exist and transactions which were confirmed in earlier blocks may seem like they never happened. This is why you should always wait 6 confirmations with Bitcoin Dec 22, 2017 at 20:31
-
You can check orphaned blocks here : blockchain.info/orphaned-blocks Dec 22, 2017 at 20:33
-
1Aside, the blockchain.info orphaned blocks list no longer seems to work. It never managed to catch all the orphans but now it seems to catch almost none of them. Jul 23, 2018 at 1:21