Myth about Bitcoin Mining
Bitcoin mining is the process of creating new bitcoins by solving extremely complicated math problems that verify transactions in the currency. When a bitcoin is successfully mined, the miner receives a predetermined amount of bitcoin.
Such mining process is highly controversial due to the astronomical amount of energy consumed by millions of miners.
Yet, bitcoin mining is the centerpiece of the whole crypto scheme. It helps to settle the transaction verification and appendance to the blockchain.
The mining process uses so-called proof-of-work (PoW) — the work done to generate the winning hash is viewed as proof the miner validated the transactions in the block.
PoW is also sometimes called a consensus mechanism, but proof-of-work is only part of consensus. Consensus is achieved after the miner adds the block to the blockchain, and the rest of the network validates it using the hashes (reaching consensus). This doesn't require much energy or computational power because each mining node also does this while mining the latest block. As new blocks are added, the network confirms them.
What most people don't realize, PoW is only a very clumsy mechanism to create a grace period so that the bitcoin transaction (packaged in a block) would have time to propagate across all nodes on the network.
If a majority of nodes accept one version of the block (initiated by one of the many miners), it will be accepted as the "next" block on the chain. And PoW only serve to delay the process so that different versions of the "next" blocks can propagate across neighboring nodes and outwards, until enough nodes accept that version of block. It takes time for this to happen and settle, therefore PoW provides the time needed for this to settle.
Please refer to this post on how consensus is actually achieved.
The whole point of PoW is to determine who gets to add the next block to the chain.
In PoW, one or more lucky miners could find that nonce meets the network security requirement and start broadcast hashed blocks to the whole network.
The tie is broken by the first of the two that gets extended with a child block.
In practice, in case two conflicting blocks at the same height appear on the network, every node will pick the one they saw first as winner. Because communication across the earth happens at a finite speed, some miners may see one side of the fork first, and other miners may see another one first, even if there is some time between them (up to ~seconds). However, the one that was actually first will most likely reach more other miners first than the other one, and that one will thus have the most chance of being built upon first.
Note that in theory it is possible for this discrepancy to persist: it is possible that a block is found on both sides of the split ~simultaneously again. In that case, it will be the block after that that determines the winner, and so forth. However, under reasonable assumptions, the probability that this persists for long is extremely small, and that is also what is observed in practice. Reorganizations of more than 2 blocks deep are extremely rare.
It doesn't matter how close the two blocks are found, the procedure is the same: every node will accept the first one they see, but switch over when the other one is extended first.
In practice, in case two conflicting blocks at the same height appear on the network, every node will pick the one they saw first as winner. Because communication across the earth happens at a finite speed, some miners may see one side of the fork first, and other miners may see another one first, even if there is some time between them (up to ~seconds). However, the one that was actually first will most likely reach more other miners first than the other one, and that one will thus have the most chance of being built upon first.
Note that in theory it is possible for this discrepancy to persist: it is possible that a block is found on both sides of the split ~simultaneously again. In that case, it will be the block after that that determines the winner, and so forth. However, under reasonable assumptions, the probability that this persists for long is extremely small, and that is also what is observed in practice. Reorganizations of more than 2 blocks deep are extremely rare.
It doesn't matter how close the two blocks are found, the procedure is the same: every node will accept the first one they see, but switch over when the other one is extended first.
Comments
Post a Comment