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

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.

主站蜘蛛池模板: 苏尼特右旗| 阜南县| 罗源县| 密云县| 德阳市| 南昌县| 奎屯市| 山东省| 北碚区| 左贡县| 永春县| 中方县| 富民县| 伊宁市| 通山县| 武义县| 奈曼旗| 神池县| 乌鲁木齐市| 敦化市| 玛多县| 开远市| 兰州市| 静安区| 广东省| 大冶市| 旺苍县| 铜鼓县| 杨浦区| 密山市| 边坝县| 高平市| 南漳县| 平遥县| 涡阳县| 万载县| 凭祥市| 镇巴县| 绿春县| 句容市| 海淀区|