[MUSIC] Consensus means general agreement. In the context of blockchain operation, consensus is an agreement among the full nodes about the next block to be added to the chain. This ensures the integrity of the chain. Even among the known permissioned entities, we need consensus. Different consensus protocols are used in various blockchains. Bitcoin uses proof of work for consensus. It is computationally intensive, and results in enormous power consumption in the massive racks of ASIC computers used in solving the POW puzzle, for the right to mine the next block. It is estimated that Bitcoin mining consume as much energy as the country of Ireland, per day. There are many other alarming statistics about Bitcoin mining you can read about in the link we have provided. Therein lies the problem, the enormous energy used by POW for mining a block. We discussed the POW method and two alternatives. Our lesson goals include explaining the importance of consensus, listing two alternatives to Proof of Work consensus algorithm, and explaining Proof of Stake. What is Proof of Work? Proof of Work works like this. Compute the hash of the block header elements that is fixed and a nonce that is a variable. H is the hash of the header and nonce. If the hash computed is less than 2 to the power of 128 for Bitcoin and less than function of difficulty for Ethereum, the miner has solved the puzzle. Otherwise, change the nonce and repeat the steps above. While it is difficult to find the combination of header and nonce that solves the problem we described about, it is easy to verify. How do you verify that hash is less than or equal to 2 to the power of 128? Check if the leading 128 bits of the hash H are 0. Bitcoin used Proof of Work, or POW, and Ethereum followed it with slight modifications. In the current version, Ethereum Metropolis, it still utilizes Proof of Work. However, Ethereum Metropolis protocol uses a memory based proof of work that is not energy intensive. In the upcoming fork, Ethereum Constantinople, the plan is to switch to POS, or Proof of Stake. What is POS? In Proof of Stake, the full node with the most at stake or most coin is chosen for adding the next block. That is why it is called Proof of Stake. The idea is, that node with the most stake will not be malicious and risk its stake for forking the network. To avoid monopoly by the node with most stake, an age based round robin policy is used in addition to the basic POS. The minter fee is paid by the transaction fees, and there'll be no minor fee such as in POW. In fact, as Ethereum is moving to its POS, the miner fee has been reduced from five ether to three ether. The POS approach is environment friendly and efficient, and is being popularly adopted by many blockchain platforms. The next consensus algorithms we'll review is Practical Byzantine Fault Tolerance, PBFT. This algorithm is proven to tolerate random or Byzantine node failures, including malicious nodes. In PBFT, nodes vote to elect a leaderc and that leader adds the next block to the chain. This is the block of validated transactions. Each node maintains the state of the network. The nodes exchange messages. The messages, along with the saved state, are used to reach a consensus in the presence of random independent faults, or bad nodes. The chosen node adds the next block of validated transactions. PBFT is popular in permissioned block chains, such as hyperledger fabric. Later in the course, we'll learn an emerging consensus algorithm called Hashgraph that is a variation of Byzantine fault tolerance. It is called asynchronous Byzantine fault tolerance, or ABFT. In summary, consensus is a core component of blockchain protocol, and an efficient algorithm is essential for the integrity as well as scalability of the blockchain. There are many consensus algorithms being explored for blockchains. We reviewed three of them. When you study a new blockchain platform, here is a question to ask. What is the consensus algorithm used and how does it work?