<p>The concept of confirmation in Bitcoin is a measure for how deeply buried a block or transaction is in the blockchain. It measures how many blocks on top there are. More means the block or transaction is harder to revert, as an attacker would need to at least do as much work as was needed to build those confirming blocks.</p>

<p>By definition, 1 confirmation equates being included in the blockchain.</p>

<p>If this question happens to be about the output of <code>getblock</code> RPC or similar APIs: it simply counts how many blocks there are on top. If the tip of the chain has height 426396, and the block you're querying for has height 426391, the result will state there are 6 confirmations (426396 - 426391 + 1 = 6).</p>

CC BY-SA 3.0
2016-08-22T18:43:10.613Z
2016-08-22T18:43:10.613Z
Pieter Wuille
<p>Blocks in Bitcoin, as they exist in the blockchain, don't actually contain a confirmation field. When you query for a block in bitcoin-rpc or similar, additional information is added to the block based on your client's knowledge of the current state of the blockchain.</p>

<p>A pure block contains only five fields (some of which have sub-fields):</p>

<ol>
<li><p>Magic number (to identify that the following info is a block)</p></li>
<li><p>Blocksize (how many bytes to read until the end of the block)</p></li>
<li><p>Block header (important for block ordering/verification)</p>

<ul>
<li>Version (the "rules" that this block adheres to)</li>
<li>Previous Block Hash (a fingerprint of the block this block builds on)</li>
<li>Transaction Merkle Root (a fingerprint of all of the block transactions)</li>
<li>Timestamp (UNIX epoch)</li>
<li>"nBits" or a compact expression of the block's PoW target</li>
<li>Nonce (a number the block miner used to find a valid PoW solution)</li>
</ul></li>
<li><p>Transaction count (number of transactions in block)</p></li>
<li><p>Transaction list</p></li>
</ol>

<p>Back to your question, the "block confirmation" count of a block is simply how many other blocks build on top of that block. Take for example the following three-block-long blockchain:</p>

<p><a href="https://i.sstatic.net/9C8uM.png" rel="noreferrer"><img src="https://i.sstatic.net/9C8uM.png" alt="Three-block-long blockchain"></a></p>

<p>The blue block (which starts the blockchain, so it's also called the genesis block) has three confirmations (it confirms itself, plus the two blocks that build on it further reinforce it as legitimate). The green block has two confirmations (it confirms itself, plus the one block that builds on it further reinforces it as legitimate). The orange block only confirms itself, giving it one confirmation.</p>

<p>If another block were added to the blockchain:</p>

<p><a href="https://i.sstatic.net/HHK2Q.png" rel="noreferrer"><img src="https://i.sstatic.net/HHK2Q.png" alt="Four-block-long blockchain"></a></p>

<p>All of the blocks from the previous image (blue, green, orange) would receive one additional confirmation, since they've been further "buried" in the blockchain.</p>

<p>As soon as a block exists (so it confirms itself automatically, giving it one confirmation) it can be included into the blockchain. In the event of a network fork, however, this isn't always the case. The number of confirmations of a block indicates how difficult that block would be to overwrite. </p>

<p>In the length-4 blockchain shown immediately above, attempting to overwrite the red block would only require introducing a block which competes with red as a child of orange:</p>

<p><a href="https://i.sstatic.net/V7Xdp.png" rel="noreferrer"><img src="https://i.sstatic.net/V7Xdp.png" alt="enter image description here"></a></p>

<p>Note that introducing the black block into the blockchain wouldn't necessarily overwrite the red block. If miners choose to mine on top of the black block instead of the red block, making the blockchain [blue-green-orange-black-...] the "longest" (really "heaviest," see bottom of post) chain, then the black block will replace the red block. If miners instead choose to mine on top of the red block, making the blockchain [blue-green-orange-red-...] the longest chain, then the red block won't be replaced. To ensure (assuming network miners don't explicitly favor the red block for some reason, and mine on top of it even when it isn't the latest block in the blockchain) that the red block gets forked, an attacker would need to introduce two blocks which fork off of orange:</p>

<p><a href="https://i.sstatic.net/JZyRn.png" rel="noreferrer"><img src="https://i.sstatic.net/JZyRn.png" alt="Nearly-guaranteed fork of red block"></a></p>

<p>To fork the green block off of the network, however, an attacker would need to introduce at least three blocks which build an alternative blockchain off of the blue block:</p>

<p><a href="https://i.sstatic.net/W3wvq.png" rel="noreferrer"><img src="https://i.sstatic.net/W3wvq.png" alt="Potential fork of green, orange, and red blocks"></a></p>

<p>And for a much higher chance of a successful attack, would need to introduce four blocks which build an alternative blockchain off of the blue block:</p>

<p><a href="https://i.sstatic.net/c7e8K.png" rel="noreferrer"><img src="https://i.sstatic.net/c7e8K.png" alt="Very likely fork of the green block, orange block, and red block"></a></p>

<p>Note that this attack would have (possibly-intended) side-effect of also removing the orange and red blocks from the blockchain.</p>

<p><strong>Earlier, I used the term "longer" when referring to competing blockchain forks. While in reality the chain with the longest length measured in blocks is almost always the best blockchain, <em>it isn't necessarily</em>.</strong> Rather than count the number of blocks on the blockchain, bitcoin nodes choose the blockchain which is the "heaviest" or has the highest cumulative difficulty. Bitcoin mining involves "brute-forcing" a solution to a problem by repeatedly performing double-SHA256 calculations on a potential block header (described briefly above) searching for a resultant hash with certain properties (which can be incorrectly but essentially summarized as "a lot of leading zeroes"). A higher difficulty means that, on average, miners will have to perform more work for each valid PoW solution. The "best" or "heaviest" chain is the chain which has the highest total difficulty (which is calculated by adding up the difficulty of each block).</p>

<p><strong>To summarize, a block can be accepted to the blockchain as soon as it exists, and it has one confirmation by simply existing. However, blocks of arbitrary depth can be removed from the blockchain by a blockchain fork.</strong></p>

CC BY-SA 3.0
2016-08-22T18:46:42.197Z
2016-08-22T18:46:42.197Z
Maxwell Sanchez
<blockquote>
  <p>What is the importance of the "confirmation" field in a block?</p>
</blockquote>

<p>A confirmation is the act of a transaction being included in a single block within the Bitcoin blockchain.</p>

<p>A confirmation represents a certain degree of permanence within the Bitcoin blockchain.</p>

<p>The 'miners' are the entities that create blocks and decide what transactions to include in the blocks.</p>

<p>While a transaction included in a single block <em>could</em> be reversed by a miner, this would require that miner to generate both a replacement block for the block the transaction was in <em>and</em> an entirely new block, all before the rest of the miners can find any new blocks.</p>

<p>This is usually unfeasible, but it does occasionally happen and the block that gets replaced is known as an orphaned block. This also becomes exponentially less feasible when trying to replace greater numbers of blocks.</p>

<p>Once a transaction is included in a block, it will automatically be a part of all future blocks (via one-way cryptographic hashing of the prior block in each new block), so the total confirmations represent the number of blocks that have been generated since the transaction was initially confirmed.</p>

<p>Please note that when an end-user initially makes a transaction, the transaction is broadcast to the network nearly instantly, but it can often take 10 minutes or more for the transaction to actually get confirmed in a block.</p>

<blockquote>
  <p>How many confirmations are required to accept a block in a blockchain?</p>
</blockquote>

<p>A confirmation is the act of the network/miners accepting a transaction in the blockchain.</p>

<p>However, from an end-user practical perspective, it is useful to consider how many confirmations would make the end-user feel confident that a transaction will not be reversed.</p>

<p>For small amounts, 0 or 1 confirmations could be considered secure.</p>

<p>For larger amounts, 2 or 3 or even more confirmations may be desired before a transaction is considered permanent/secure.</p>

<p>6 confirmations has generally been the standard for 'absolutely no way this will be reversed', but there have been a couple occasions where several dozen blocks were orphaned due to software bugs.</p>

CC BY-SA 3.0
2016-08-23T18:09:41.530Z
2016-08-23T18:09:41.530Z
Michael C Ippolito
<p>What is the importance of the "confirmation" field in a block?</p>

<p>How many confirmations are required to accept a block in a blockchain?</p>

<blockchain><block><confirmations>
What is the "confirmation" field in a block?
Ananya Shrivastava
# What is the "confirmation" field in a block?

(Asked by: username_0 on 2016-08-22)

What is the importance of the "confirmation" field in a block?

How many confirmations are required to accept a block in a blockchain?

**Tags:** blockchain, block, confirmations


---

## 3 answers

### Answer by username_2 on 2016-08-22. Score: 9

Blocks in Bitcoin, as they exist in the blockchain, don't actually contain a confirmation field. When you query for a block in bitcoin-rpc or similar, additional information is added to the block based on your client's knowledge of the current state of the blockchain.

A pure block contains only five fields (some of which have sub-fields):

1. Magic number (to identify that the following info is a block)
2. Blocksize (how many bytes to read until the end of the block)
3. Block header (important for block ordering/verification)

   * Version (the "rules" that this block adheres to)
   * Previous Block Hash (a fingerprint of the block this block builds on)
   * Transaction Merkle Root (a fingerprint of all of the block transactions)
   * Timestamp (UNIX epoch)
   * "nBits" or a compact expression of the block's PoW target
   * Nonce (a number the block miner used to find a valid PoW solution)
4. Transaction count (number of transactions in block)
5. Transaction list

Back to your question, the "block confirmation" count of a block is simply how many other blocks build on top of that block. Take for example the following three-block-long blockchain:

[![Three-block-long blockchain](https://i.sstatic.net/9C8uM.png)](https://i.sstatic.net/9C8uM.png)

The blue block (which starts the blockchain, so it's also called the genesis block) has three confirmations (it confirms itself, plus the two blocks that build on it further reinforce it as legitimate). The green block has two confirmations (it confirms itself, plus the one block that builds on it further reinforces it as legitimate). The orange block only confirms itself, giving it one confirmation.

If another block were added to the blockchain:

[![Four-block-long blockchain](https://i.sstatic.net/HHK2Q.png)](https://i.sstatic.net/HHK2Q.png)

All of the blocks from the previous image (blue, green, orange) would receive one additional confirmation, since they've been further "buried" in the blockchain.

As soon as a block exists (so it confirms itself automatically, giving it one confirmation) it can be included into the blockchain. In the event of a network fork, however, this isn't always the case. The number of confirmations of a block indicates how difficult that block would be to overwrite.

In the length-4 blockchain shown immediately above, attempting to overwrite the red block would only require introducing a block which competes with red as a child of orange:

[![enter image description here](https://i.sstatic.net/V7Xdp.png)](https://i.sstatic.net/V7Xdp.png)

Note that introducing the black block into the blockchain wouldn't necessarily overwrite the red block. If miners choose to mine on top of the black block instead of the red block, making the blockchain [blue-green-orange-black-...] the "longest" (really "heaviest," see bottom of post) chain, then the black block will replace the red block. If miners instead choose to mine on top of the red block, making the blockchain [blue-green-orange-red-...] the longest chain, then the red block won't be replaced. To ensure (assuming network miners don't explicitly favor the red block for some reason, and mine on top of it even when it isn't the latest block in the blockchain) that the red block gets forked, an attacker would need to introduce two blocks which fork off of orange:

[![Nearly-guaranteed fork of red block](https://i.sstatic.net/JZyRn.png)](https://i.sstatic.net/JZyRn.png)

To fork the green block off of the network, however, an attacker would need to introduce at least three blocks which build an alternative blockchain off of the blue block:

[![Potential fork of green, orange, and red blocks](https://i.sstatic.net/W3wvq.png)](https://i.sstatic.net/W3wvq.png)

And for a much higher chance of a successful attack, would need to introduce four blocks which build an alternative blockchain off of the blue block:

[![Very likely fork of the green block, orange block, and red block](https://i.sstatic.net/c7e8K.png)](https://i.sstatic.net/c7e8K.png)

Note that this attack would have (possibly-intended) side-effect of also removing the orange and red blocks from the blockchain.

**Earlier, I used the term "longer" when referring to competing blockchain forks. While in reality the chain with the longest length measured in blocks is almost always the best blockchain, *it isn't necessarily*.** Rather than count the number of blocks on the blockchain, bitcoin nodes choose the blockchain which is the "heaviest" or has the highest cumulative difficulty. Bitcoin mining involves "brute-forcing" a solution to a problem by repeatedly performing double-SHA256 calculations on a potential block header (described briefly above) searching for a resultant hash with certain properties (which can be incorrectly but essentially summarized as "a lot of leading zeroes"). A higher difficulty means that, on average, miners will have to perform more work for each valid PoW solution. The "best" or "heaviest" chain is the chain which has the highest total difficulty (which is calculated by adding up the difficulty of each block).

**To summarize, a block can be accepted to the blockchain as soon as it exists, and it has one confirmation by simply existing. However, blocks of arbitrary depth can be removed from the blockchain by a blockchain fork.**


---

### Answer by username_1 on 2016-08-22. Score: 5

The concept of confirmation in Bitcoin is a measure for how deeply buried a block or transaction is in the blockchain. It measures how many blocks on top there are. More means the block or transaction is harder to revert, as an attacker would need to at least do as much work as was needed to build those confirming blocks.

By definition, 1 confirmation equates being included in the blockchain.

If this question happens to be about the output of `getblock` RPC or similar APIs: it simply counts how many blocks there are on top. If the tip of the chain has height 426396, and the block you're querying for has height 426391, the result will state there are 6 confirmations (426396 - 426391 + 1 = 6).


---

### Answer by username_3 on 2016-08-23. Score: 1

> What is the importance of the "confirmation" field in a block?

A confirmation is the act of a transaction being included in a single block within the Bitcoin blockchain.

A confirmation represents a certain degree of permanence within the Bitcoin blockchain.

The 'miners' are the entities that create blocks and decide what transactions to include in the blocks.

While a transaction included in a single block *could* be reversed by a miner, this would require that miner to generate both a replacement block for the block the transaction was in *and* an entirely new block, all before the rest of the miners can find any new blocks.

This is usually unfeasible, but it does occasionally happen and the block that gets replaced is known as an orphaned block. This also becomes exponentially less feasible when trying to replace greater numbers of blocks.

Once a transaction is included in a block, it will automatically be a part of all future blocks (via one-way cryptographic hashing of the prior block in each new block), so the total confirmations represent the number of blocks that have been generated since the transaction was initially confirmed.

Please note that when an end-user initially makes a transaction, the transaction is broadcast to the network nearly instantly, but it can often take 10 minutes or more for the transaction to actually get confirmed in a block.

> How many confirmations are required to accept a block in a blockchain?

A confirmation is the act of the network/miners accepting a transaction in the blockchain.

However, from an end-user practical perspective, it is useful to consider how many confirmations would make the end-user feel confident that a transaction will not be reversed.

For small amounts, 0 or 1 confirmations could be considered secure.

For larger amounts, 2 or 3 or even more confirmations may be desired before a transaction is considered permanent/secure.

6 confirmations has generally been the standard for 'absolutely no way this will be reversed', but there have been a couple occasions where several dozen blocks were orphaned due to software bugs.


---

