1. What happens in the bitcoin network when two miners solve a block at the same time?
If two miners solve a block at the same time they will each propagate their block to the nodes closest to them in location. The separate nodes will each confirm the block they receive as the truth, and both blocks will be accepted by each node and be totally valid in accordance with the rules. But, as soon as another miner links a new block to one as a continuation of the chain it will become the longest dominant chain. Whichever block has a new miner that adds a block to it first will become the main version of truth and the other block will be removed / dropped while all of the transactions will return to the mempool. The whole network eventually agrees that this is the main order of the blockchain and continues to mine the newest blocks as the one version of truth.
2. What is a stale block?
Stale blocks are the blocks that get dropped by the network. A block is dropped in the process described above. When this happens the transactions that were not included in the other block will be added to the mempool, and the rest of the data will be discarded. Stale blocks are also sometimes referred to as âOrphan blocks.â
3. How do stale blocks occur?
Stale blocks occur when two blocks are mined at the same time and it becomes dropped, while the other competitor block has the newest block linked to it and becomes the main version of truth to the network.
4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
Your transaction may be added to a block that will be dropped as a stale block. It may be the case that two blocks were mined at the same time as described above and some nodes in the network recognized your block to be the source of truth until the other block had the newest block linked to it first, and became the dominant chain. When this occurs your transaction is sent back to the mempool and is then added to another future block when the stale block is discarded. It is recommended to wait for 6 blocks to confirm after your block to make sure that your transaction is in the public ledger and has officially been confirmed.