- What happens in the bitcoin network when two miners solve a block at the same time?
Both blocks will be added to the blockchain of the nearest situated nodes. But at the same time, different blocks are propagated through the network.
That means that in the world there are two versions of the blockchain circulating at the same time.
In consequence, the next block to be mined will be added to one of these previous blocks, depending on the version of the blockchain they work with and finally the network will continue to mine on the longest version of the blockchain.
- What is a stale block?
A stale block is a valid block that drops from the blockchain, because it hasn’t got enough validations and the network chooses always the longest chain to mine on.
- How do stale blocks occur?
Stale blocks occur when at the same time 2 or more different and valid blocks are propagated through the network. That means that in the world there are two versions of the blockchain circulating at the same time.
In consequence, the next block to be mined will be added to one of these previous blocks, depending on the version of the blockchain they work with and finally the network will continue to mine on the longest version of the blockchain. The longest version of the version will be accepted as the greatest version of truth.
The blocks that will not be mined on anymore will drop from the blockchain, and return to the mempool.
- Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
It’s always better to wait for 6 confirmations. That means that 6 other blocks are mined after the block that contains your transaction. This is because the network will always choose to work with the network that has the longest chain to continue adding blocks too.
In that case you are sure your transaction is confirmed by the network, and will be immutable.