1 - What happens in the bitcoin network when two miners solve a block at the same time?
The miners are in competition to solve the mathematical game of variable difficulty and consisting of being the first to approach the target threshold represented through different nonce calculations (random number) but whose fastest minor wins the Reward block. However, it turns out that there can be an ambiguity on the occurrence of resolution causing two minors to solve the equation at the same time. This means that they succeeded in transmitting the block resolution information to the other nodes at the same time, which complicates the insertion consensus since two blocks meet to be added to the chain. So, this problem is solved thanks to the miner who will be the first to solve the equation of the next block. Indeed, because the latter will determine to which of the two blocks he wishes to attach the new block resolved without conccurating results. In the end, the block that he does not choose will be removed and will therefore not be added to the existing block chain.
2 - What is a stale block?
The Stale Block or orphaned block is the block that will be withdrawn in the event that two miners are in agreement for the block reward by the fact that the final resolution is up to the miners who will solve the equation of the next block first and determine which of the two block it will decide to graft, which will have the effect of resolving the competitive conflict of the previous block.
3 - How do stale blocks occur?
In view of what has been said previously, the obsolete block does not appear on the blockchain, it is simply withdrawn for the benefit of the one who has been selected, and who, for his part, is consensually accepted by all the other nodes that verify the transactions . Simply, the certification consensus of the validation of the block selected lasts the time of the physical propagation of the information necessary to certify the work loan to all the other nodes, i.e. around the end of the next 6 blocks following the withdrawal of the block. obsolete.
4 - Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
When we decide to carry out any transaction, it is necessary to wait for a confirmation time of our transaction set at 6 blocks, or on average 60 minutes. This is to be sure that our transaction is not canceled in the event of a conflict on the block certification, and therefore returned. This is why the BTC network is configured to automatically wait for 6 confirmations even if it is congested.