By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.
We apologize but our blog is available only in English, Spanish and Russian.
Bitcoin Mining Insights

What Happens When Two Blocks are Mined Simultaneously? Bitcoin Chain Splits Explained

Understanding why temporary chain splits (i.e. forks) naturally occur, how the bitcoin protocol handles them in a decentralized way and what happens to your coins during temporary forks.

Published on Oct 05, 2021
START READING
Published on Oct 05, 2021

Table of Contents


To outsiders and newcomers, bitcoin can seem extremely complicated and nearly impossible to understand without a technical background. Meanwhile, the traditional financial system that we are all accustomed to appears fairly simplistic on the surface.

In reality, bitcoin is not as complex as it first appears because its protocol contains a simple set of rules for all network participants to follow. On the other hand, almost nobody outside of those working in the traditional finance industry understand it’s true complexity.

In this article, we will explain what happens in rare instances where there are two different versions of the transaction ledger. You will see how bitcoin achieves final settlement on transactions in a straightforward and decentralized manner which is far more transparent than the traditional financial system.

The Traditional Financial System: The Man Behind the Curtain


Source: How the Fed works

To understand just how complicated the traditional financial system is, refer to the chart above published by the Federal Reserve Bank of New York. The chart shows how the Federal Reserve (Fed) engages with institutions by borrowing and lending U.S. dollar instruments in money markets.

The majority of what is shown in the chart happens behind closed doors, and involves many organizations of power who update and maintain the global ledger. The majority of these organizations fall under the Fed who is responsible for resolving any disputes or concerns that arise. This gives the Fed the authority to make any decisions regarding the balance sheet and provides a clear hierarchy of power.

Extending The Blockchain, the Easy Way

This highly centralized fiat system is much different than the decentralized system of bitcoin,  where no one is in charge and all participants maintain a local copy of the ledger (aka the blockchain). 

The way bitcoin works is miners compete to mine blocks, and the moment a block is mined it is passed on to the nodes. Each node is connected to a unique set of other nodes which creates a web that ultimately allows information to be propagated to the entire network. 

When a block is mined, it is passed to a few nodes who validate the block and then forward it onto their unique node set. This happens until all nodes have added the new block to their local copy of the blockchain. In doing so, the blockchain is extended and a new set of transactions is confirmed for users. This process is repeated indefinitely and creates the heartbeat of the network. 

Bitcoin Temporary Forks and Disputes

Unlike the traditional system which is managed by a team of officials, bitcoin’s consensus system includes all participants in the network—both node operators and miners.

So what happens when two valid blocks are mined simultaneously by different miners? A moment of confusion occurs in which some nodes will receive block A first and some nodes will receive block B. By default, the nodes will recognize the first block they receive (A or B) as the correct one and will disregard the other if another node shares it with them. 

This creates a temporary fork, where there are two different instances of the blockchain. In order for the network to consolidate back to a single version of the transaction history, this discrepancy must be resolved. Otherwise, the network will split and users with blockchain A won't be able to transact with users from blockchain B because each side will reject the other, leading to a poor user experience. 

Resolving Temporary Chain Splits in a Decentralized Manner

Thankfully, bitcoin was built with this in mind. The moment that miners learn about a block being mined, they immediately begin working on the next block. Miners who received block A begin working on the next block to extend that chain; the same goes for miners with block B. 

The first “team” to extend their version of the blockchain wins. If somebody mines a block on blockchain B, they will pass the new block to all the nodes. Each node that had Blockchain B will add the new block, and each node that had blockchain A will now treat blockchain B as their new chain because the rules of bitcoin state that the longest chain is the correct chain. This means the moment a node finds out about a longer chain (i.e., blockchain B), it will make this the “source of truth” and disregard the old chain (i.e., blockchain A).


Through this simple mechanism, bitcoin can bring tens of thousands of node operators and miners to consensus on a single state of the ledger without a leader or central entity. The network aligns on the same version of the blockchain using the mining process which naturally resolves forks.

Confirmations and Misinformation

Temporary forks are a part of the protocol and generally get resolved within a matter of minutes. These events are often misunderstood and are used to spark panic. Users can rest assured that the protocol rules are sufficient to resolve these events quickly, and all bitcoin funds are safe despite what news articles might lead you to believe. In one case, a temporary fork led a software firm to sell off their bitcoin holdings. They believed the protocol was broken, but in reality they were deceived by the media. 

This was a unique case because there were two different transactions in two competing blocks. While the mining process resolved the temporary fork, the firm noticed the discrepancy and believed that there was a bug in the bitcoin protocol. Naturally, this was resolved, the transaction went through as intended, and no funds were lost. Had the firm understood how this mechanism worked, they could have kept their confidence in the system.

Bitcoin was designed to ensure that all transactions are final once mined and cannot be spent twice (AKA double spent). A transaction confirmed in a block gets more secure as new blocks are mined on top of it. The deeper the transaction is in the blockchain, the more secure it becomes. If users are worried about temporary forks, they can simply wait for more blocks to be mined. It's standard practice to consider 6 block confirmations as sufficiently immutable.

Emotions vs. Rational Code and  Open Source Math

One of the key innovations that makes decentralized money possible is the built-in mechanism to ensure that all nodes on the network have an identical copy of the blockchain. The importance of resolving consensus differences cannot be understated. If chain splits are not resolved via the rules of the protocol, then a permanent fork will occur, and therefore divide the network. This is why there is so much discussion and care taken by developers when making upgrades to bitcoin. It is CRITICAL to make sure no upgrades split the network and create multiple versions of bitcoin.

It seems complicated at first, but when you understand how nodes and miners work together to extend the blockchain, you see that it’s actually much simpler than the traditional financial system. Everybody who runs a bitcoin node is responsible for keeping their ledger up to date by validating new transactions and blocks. This is a drastically different approach than letting the Fed or some other central bank determine the rules and manage the money with little to no transparency. Money is an extremely complicated system and human emotion has no place in trying to manage it. Bitcoin replaces human decision making with an open-source protocol that keeps everybody on the same page.

In a world of increasing complexity and misinformation everywhere you look, bitcoin’s proof of work provides transparent and unfakeable truth. No politicians or media needed.

KonferenceWebXWhereWhenConfirmed
Cell
CellCellCell
Cell
CellCellCell
Cell
CellCellCell
Cell
CellCellCell
Cell
CellCellCell
Cell
CellCellCell
Cell
CellCellCell

You can view the changelog also in our documentation.
See the full changelog
No items found.

Get notified when we release new update

By subscribing you are agreeing to our Privacy Policy
Wohoo! You're subscribed, we'll be in touch soon.
Something went wrong. Please try again.
Share now

About Braiins

Bitcoin mining software company: Braiins Pool, Braiins OS+ & Stratum V2.

By miners, for miners.

Still scrolling?
Keep reading!

The Basics of Building a Bitcoin Mining Greenhouse

Bitcoin Mining Insights

Published

5.10.2021

Understanding why temporary chain splits (i.e. forks) naturally occur, how the bitcoin protocol handles them in a decentralized way and what happens to your coins during temporary forks.


To outsiders and newcomers, bitcoin can seem extremely complicated and nearly impossible to understand without a technical background. Meanwhile, the traditional financial system that we are all accustomed to appears fairly simplistic on the surface.

In reality, bitcoin is not as complex as it first appears because its protocol contains a simple set of rules for all network participants to follow. On the other hand, almost nobody outside of those working in the traditional finance industry understand it’s true complexity.

In this article, we will explain what happens in rare instances where there are two different versions of the transaction ledger. You will see how bitcoin achieves final settlement on transactions in a straightforward and decentralized manner which is far more transparent than the traditional financial system.

The Traditional Financial System: The Man Behind the Curtain


Source: How the Fed works

To understand just how complicated the traditional financial system is, refer to the chart above published by the Federal Reserve Bank of New York. The chart shows how the Federal Reserve (Fed) engages with institutions by borrowing and lending U.S. dollar instruments in money markets.

The majority of what is shown in the chart happens behind closed doors, and involves many organizations of power who update and maintain the global ledger. The majority of these organizations fall under the Fed who is responsible for resolving any disputes or concerns that arise. This gives the Fed the authority to make any decisions regarding the balance sheet and provides a clear hierarchy of power.

Extending The Blockchain, the Easy Way

This highly centralized fiat system is much different than the decentralized system of bitcoin,  where no one is in charge and all participants maintain a local copy of the ledger (aka the blockchain). 

The way bitcoin works is miners compete to mine blocks, and the moment a block is mined it is passed on to the nodes. Each node is connected to a unique set of other nodes which creates a web that ultimately allows information to be propagated to the entire network. 

When a block is mined, it is passed to a few nodes who validate the block and then forward it onto their unique node set. This happens until all nodes have added the new block to their local copy of the blockchain. In doing so, the blockchain is extended and a new set of transactions is confirmed for users. This process is repeated indefinitely and creates the heartbeat of the network. 

Bitcoin Temporary Forks and Disputes

Unlike the traditional system which is managed by a team of officials, bitcoin’s consensus system includes all participants in the network—both node operators and miners.

So what happens when two valid blocks are mined simultaneously by different miners? A moment of confusion occurs in which some nodes will receive block A first and some nodes will receive block B. By default, the nodes will recognize the first block they receive (A or B) as the correct one and will disregard the other if another node shares it with them. 

This creates a temporary fork, where there are two different instances of the blockchain. In order for the network to consolidate back to a single version of the transaction history, this discrepancy must be resolved. Otherwise, the network will split and users with blockchain A won't be able to transact with users from blockchain B because each side will reject the other, leading to a poor user experience. 

Resolving Temporary Chain Splits in a Decentralized Manner

Thankfully, bitcoin was built with this in mind. The moment that miners learn about a block being mined, they immediately begin working on the next block. Miners who received block A begin working on the next block to extend that chain; the same goes for miners with block B. 

The first “team” to extend their version of the blockchain wins. If somebody mines a block on blockchain B, they will pass the new block to all the nodes. Each node that had Blockchain B will add the new block, and each node that had blockchain A will now treat blockchain B as their new chain because the rules of bitcoin state that the longest chain is the correct chain. This means the moment a node finds out about a longer chain (i.e., blockchain B), it will make this the “source of truth” and disregard the old chain (i.e., blockchain A).


Through this simple mechanism, bitcoin can bring tens of thousands of node operators and miners to consensus on a single state of the ledger without a leader or central entity. The network aligns on the same version of the blockchain using the mining process which naturally resolves forks.

Confirmations and Misinformation

Temporary forks are a part of the protocol and generally get resolved within a matter of minutes. These events are often misunderstood and are used to spark panic. Users can rest assured that the protocol rules are sufficient to resolve these events quickly, and all bitcoin funds are safe despite what news articles might lead you to believe. In one case, a temporary fork led a software firm to sell off their bitcoin holdings. They believed the protocol was broken, but in reality they were deceived by the media. 

This was a unique case because there were two different transactions in two competing blocks. While the mining process resolved the temporary fork, the firm noticed the discrepancy and believed that there was a bug in the bitcoin protocol. Naturally, this was resolved, the transaction went through as intended, and no funds were lost. Had the firm understood how this mechanism worked, they could have kept their confidence in the system.

Bitcoin was designed to ensure that all transactions are final once mined and cannot be spent twice (AKA double spent). A transaction confirmed in a block gets more secure as new blocks are mined on top of it. The deeper the transaction is in the blockchain, the more secure it becomes. If users are worried about temporary forks, they can simply wait for more blocks to be mined. It's standard practice to consider 6 block confirmations as sufficiently immutable.

Emotions vs. Rational Code and  Open Source Math

One of the key innovations that makes decentralized money possible is the built-in mechanism to ensure that all nodes on the network have an identical copy of the blockchain. The importance of resolving consensus differences cannot be understated. If chain splits are not resolved via the rules of the protocol, then a permanent fork will occur, and therefore divide the network. This is why there is so much discussion and care taken by developers when making upgrades to bitcoin. It is CRITICAL to make sure no upgrades split the network and create multiple versions of bitcoin.

It seems complicated at first, but when you understand how nodes and miners work together to extend the blockchain, you see that it’s actually much simpler than the traditional financial system. Everybody who runs a bitcoin node is responsible for keeping their ledger up to date by validating new transactions and blocks. This is a drastically different approach than letting the Fed or some other central bank determine the rules and manage the money with little to no transparency. Money is an extremely complicated system and human emotion has no place in trying to manage it. Bitcoin replaces human decision making with an open-source protocol that keeps everybody on the same page.

In a world of increasing complexity and misinformation everywhere you look, bitcoin’s proof of work provides transparent and unfakeable truth. No politicians or media needed.

Get notified when we release new update

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

By subscribing you agree with Privacy Policy

Share article