官术网_书友最值得收藏!

Understanding the consensus protocol mechanism

As stated before, for the miners to validate a block and, hence, the transactions, they have to solve a mathematical problem. To solve it, there is a need for a specific resource. In Bitcoin, the resource is computing power. The more computing power a miner has, the faster he/she can solve the mathematical problem, therefore the faster he/she completes a block and the more likely he/she will receive Bitcoins as a reward. This mining process is called proof-of-work and is inherent to Bitcoin. It is a protocol that all of the miners of the Bitcoin blockchain should follow to demonstrate that they have done an appropriate work for validating the transactions. This ensures a selection process in which every miner uses computational power to find the correct nonce that will return a hash starting with a predefined number of zeros. Of course, not all miners have the same computing power, so it is not fairly random.

The computing power of a machine is measured by the number of guesses per second.

The most powerful miners will have more chances to solve the problem compared to sole computers with less computing power. However, even if one owns 10% of the computing power of the entire network and the 90% remaining are provided by thousands of other miners, one will still have a 1 in 10 chance of finding the correct answer. This is how randomness ensures that no one can control the validation of the blocks and, hence, the blockchain. This also means that if one miner, or one organization of miners, came to control 51% or more of the computing power of the network, they would be the first to solve the problem in 51% of the cases. In other words, they would be able, in 51% of the cases, to validate or modify the transactions at their will. 

There is one important issue behind the proof-of-work protocol that, as a decision-maker, you should be aware of—it is a very energy-consuming process that leverages questions on its sustainability. Since it takes a tremendous amount of computing power to find the proper hash of the block and since there are a lot of miners in the network, the consumption of electricity for validating the transactions on the Bitcoin blockchain has become a worldwide concern to the point that it has exceeded the consumption of electricity of Switzerland (https://www.bbc.com/news/technology-48853230). The following diagram shows Bitcoin's energy consumption as of June 2019:

Of course, other protocols can replace the energy-consuming proof-of-work. One of the most well known is proof-of-stake, which is being implemented in the Ethereum blockchain. But more on that in the next chapter, Chapter 3, Ethereum and Smart Contracts.

主站蜘蛛池模板: 沽源县| 康平县| 夹江县| 玉门市| 惠水县| 高唐县| 宁蒗| 宾阳县| 安庆市| 锦州市| 甘孜| 嘉鱼县| 山东| 平潭县| 从江县| 灵寿县| 松阳县| 蒲江县| 抚州市| 广州市| 龙州县| 云林县| 泌阳县| 伊春市| 安塞县| 枣强县| 南陵县| 巫山县| 犍为县| 辽阳县| 景东| 武清区| 梅河口市| 洪泽县| 廊坊市| 波密县| 廉江市| 武夷山市| 古蔺县| 二连浩特市| 家居|