Proof-of-Work
To put it simply, Proof-of-work is the process where Bitcoin nodes compete for the right to update the blockchain with a new block of transactions. The competition is to solve an extremely complex puzzle before other nodes do.
This puzzle is really hard to solve but, once solved, easily verifiable by the rest of the nodes. So, the node must provide an answer, also known as a “proof,” that everyone else can then easily verify if correct or not.
One of the best analogies I have read for the complex puzzle nodes solve is from Nathaniel Popper’s book , Digital Gold.
“… it is relatively easy to multiply 2,903 and 3,571 using a piece of paper and pencil, but much, much harder to figure out what two numbers can be multiplied together to get 10,366,613.”
In this analogy, the node must determine what two numbers multiplied together result in 10,366,613 by guessing random combinations of numbers until the correct result is found. The node then provides the answer (the answer being 2,903 and 3,571), or “proof,” to other nodes who can then easily multiply the numbers and verify that it is correct.
Whoever solves the puzzle first gets to broadcast the block of transactions to the other nodes. This ensures that only someone who has invested enough energy and computational power earns the right to add new transactions to the ledger.
When the nodes receive the new block they perform something like an audit of previous transactions to ensure that the new transactions add up correctly and that the correct amount of Bitcoin remained on the ledger.
After all the nodes verify that the transactions in the new block make sense against the previous ledger entries, the new block is chained to the previous block and forever saved to the blockchain. The node that solved the puzzle is then rewarded with Bitcoin.
This process is commonly referred to as “mining” as the computer work it takes a node to earn the Bitcoin reward can be thought of as the digital equivalent to the real-world work that mining gold requires.
Because it takes so much computational power to add a new block to the chain it becomes impossible to try to add fraudulent transactions like adding extra Bitcoin to one’s wallet. If someone wanted to try this they alone would need to make up over 50% of all Bitcoin nodes and computing power so that they could add a new block and then have the majority of nodes accept and verify that block as legitimate.
Given how large Bitcoin’s blockchain has become today, the upfront cost of the computer equipment necessary to attempt such a thing would be effectively impossible for any group or even government to accomplish.
And even if it were successful people would find out that there is an issue with the system and therefore sell their holdings, devaluing the very currency they were trying to counterfeit.
So the process of proof-of-work effectively solves the byzantine problem because nodes can trust new transactions (the data on the blockchain) without needing to trust or know each other. And because there is an economic incentive via Bitcoin rewards to participate rather than attack it, Bitcoin’s blockchain will remain Byzantine fault-tolerant for as long as people believe Bitcoin has value.
The combination of these features results in an immutable ledger of economic transactions that is controlled by the collective of its users rather than any company, government or group.