Foundations of Blockchain
上QQ阅读APP看书,第一时间看更新

How does Proof of Work ensure Byzantine fault tolerance?

Proof of Work is a consensus algorithm designed to make sure that each participant node in the network that creates a block must prove that it has done a certain amount of work on the block before it is inserted in the public blockchain ledger.

Bitcoin's Proof of Work consensus algorithm was designed to make sure that blockchain data is immutable and cannot easily be altered by bad actors. Majority decisions in a blockchain network are represented by the longest chain; this is because it has proof of having done the most work. Whilst this system would achieve a consensus in a decentralized network, what if a bad actor tries to create an alternate blockchain with some fraudulent transactions? This isn't easy when Proof of Work is being used. Whenever a bad actor makes a modification to a block that was created earlier, all the successive blocks would be recreated, all of which would redo the work. Recreating all the blocks would take a very long time as the process requires a lot of computation power. However, you'll find that often, the work of a bad actor will be rejected by the majority of the network because it was not able to keep up with the work done by the honest nodes.

Thus, Proof of Work helps to achieve a BFT system, even in the presence of dishonest nodes.

Although Proof of Work provides a practical solution to the Byzantine failure problem, an attack called 51% could theoretically result in Byzantine failure. In a 51% attack, the majority of the computation power in the blockchain network is controlled by a dishonest entity. This implies that the Bitcoin can have 50% faulty nodes and still function without failing. This is the fault tolerance of Bitcoin's consensus mechanism. The 51% attack is covered in more detail in Chapter 10Blockchain Security.