Consensus mechanism of blockchain

The following are the most common and popular consensus mechanisms at present

1. POW: (Proof of Work): Proof of Work Mechanism.

Bitcoin uses the POW mechanism in the block generation process. A block Hash that meets the requirements consists of N leading zeros, and the number of zeros depends on the difficulty value of the network. To get a reasonable Block Hash requires a lot of trial and calculation, and the calculation time depends on the hash operation speed of the machine. When a node provides a reasonable Block Hash value, it means that the node has indeed undergone a large number of attempts to calculate. Of course, the absolute value of the number of calculations cannot be obtained, because finding a reasonable hash is a probabilistic event. When a node has n% of the computing power of the entire network, the node has a probability of n/100 to find the Block Hash.

Fundamentals: The first-generation consensus mechanism, the foundation of Bitcoin. To understand, it is very simple, it is "pay according to work", how much work you pay, you will get how much compensation (Bitcoin and other cryptocurrencies). In the online world, the labor here is the computing service (computing power x time) you provide to the network, and the process of providing this service is "mining". If it is a real mining farm, obviously under the premise of uniform distribution, the proportion of people "mining" is proportional to the computing power provided by each.

advantage:

The mechanism itself is of course very complex, with many details, such as: automatic adjustment of mining difficulty, gradual halving of block rewards, etc. These factors are based on economic principles and can attract and encourage more people to participate. Ideally, this mechanism can attract many users to participate in it, especially the more people who participate first, the more they will get, which will promote the rapid development of the initial stage of cryptocurrency and the rapid expansion of the node network. In the era of CPU mining, Bitcoin has attracted many people to participate in "mining", which is a good proof. New coins are issued through "mining", and bitcoins are distributed to individuals, which achieves relative fairness.

shortcoming:

Computing power is provided by computer hardware (CPU, GPU, etc.), and it consumes electricity, which is a direct consumption of energy, which is contrary to the human pursuit of energy saving, cleanliness, and environmental protection. However, if you have to find the meaning of "currency value" for "cryptocurrency", then this aspect should be the most powerful evidence. This mechanism has developed to this day, and the provision of computing power is no longer purely CPU, but gradually developed to GPU, FPGA, and even ASIC mining machines. Users have also developed from personal mining to large mining pools and mining farms, and the concentration of computing power is becoming more and more obvious. This is contrary to the direction of decentralization, and the security of the network is gradually threatened. There is evidence that Ghash (a mining pool) has performed a double-spend attack on gambling sites (simply put, one money is spent twice). The Bitcoin block reward will be halved every 4 years. When the cost of mining is higher than the mining revenue, people’s enthusiasm for mining will decrease, and a large amount of computing power will be reduced, further worrying about the security of the Bitcoin network.


2.POS: Proof of Stake, proof of stake.

POS: Also known as proof of stake, similar to property being stored in a bank, this model will assign you corresponding interest based on the amount and time of digital currency you hold. 

To put it simply, it is a system that pays you interest based on the amount and time of currency you hold. In the proof-of-stake POS mode, there is a term called currency age, and each coin generates 1 coin age per day. There are 100 coins, which are held for a total of 30 days. Then, your coin age is 3000 at this time. At this time, if you find a POS block, your coin age will be cleared to 0. For every 365 coins you are emptied, you will get 0.05 coins in interest from the block (assuming the interest can be understood as an annual interest rate of 5%), in this case, interest = 3000 * 5% / 365 = 0.41 coins , holding the currency has interest.

Fundamental

This is the innovation of Peercoin (PPC). There is no mining process, the equity allocation ratio is written in the genesis block, and then gradually distributed to users through transfer and transaction (usually IPO), and new currency is added through "interest" to achieve Rewards for nodes. Ethereum is a combination of POW and pos.

Simply put, it is a system that pays interest according to the amount and time (currency age) of the currency held by the user. The most typical example in reality is stocks, or bank deposits. If the user wants to get more currency, then open the client, keep it online, and benefit from "interest" while keeping the network secure.

advantage:

Energy saving. No mining, no need to consume a lot of electricity and energy. more decentralized. First of all, decentralization is relative. Compared with PoW-type cryptocurrencies such as Bitcoin, PoS-based cryptocurrencies basically have no high requirements for computer hardware, and everyone can mine (earn interest) without worrying about the centralization caused by the concentration of computing power (single user The purchase gets 51% of the currency volume, the cost is higher), and the network is more secure and guaranteed. Avoid crunch. The cryptocurrency of the PoW mechanism may lead to deflation due to various reasons such as loss of users, but the cryptocurrency of the PoS mechanism adds currency at a certain annual interest rate, which can effectively avoid the occurrence of deflation and maintain basic stability. After Bitcoin, many new coins adopt the PoS mechanism, and many old coins that use the proof-of-work mechanism have also revised their protocols one after another, and the "hard fork" has been upgraded to the PoS mechanism.

shortcoming:

Cryptocurrencies with a pure PoS mechanism can only be issued through IPOs, which leads to "a few people" (usually developers) getting a large number of cryptocurrencies with extremely low costs. In the face of interests, it is difficult to guarantee that they will not sell in large quantities. The encrypted currency of PoS mechanism, the credit foundation is not strong enough. To solve this problem, many adopt the dual mechanism of PoW+PoS, issue cryptocurrencies through PoW mining, and use PoS to maintain network stability. Or use the DPoS mechanism to enhance trust through community elections.



3. DPOS: Delegated Proof of Stake, authorized stake proof mechanism

比特股的DPoS机制,中文名叫做股份授权证明机制(又称受托人机制),它的原理是让每一个持有比特股的人进行投票,由此产生101位代表 , 我们可以将其理解为101个超级节点或者矿池,而这101个超级节点彼此的权利是完全相等的。从某种角度来看,DPOS有点像是议会制度或人民代表大会制度。如果代表不能履行他们的职责(当轮到他们时,没能生成区块),他们会被除名,网络会选出新的超级节点来取代他们。DPOS的出现最主要还是因为矿机的产生,大量的算力在不了解也不关心比特币的人身上,类似演唱会的黄牛,大量囤票而丝毫不关心演唱会的内容。

基本原理

无人控制的公司发行股份,产生利润,并将利润分配给股东。实现这一切不需要信任任何人,因为每件事都是被硬编码到软件中的。通俗点讲就是:公司股份制,股东持有这些公司的股份,公司为股东产生回报,无需挖矿。

优点:

能耗更低。DPoS机制将节点数量进一步减少到101个,在保证网络安全的前提下,整个网络的能耗进一步降低,网络运行成本最低。更加去中心化。目前,对于比特币而言,个人挖矿已经不现实了,比特币的算力都集中在几个大的矿池手里,每个矿池都是中心化的,就像DPoS的一个受托人,因此DPoS机制的加密货币更加去中心化。PoS机制的加密货币(比如未来币),要求用户开着客户端,事实上用户并不会天天开着电脑,因此真正的网络节点是由几个股东保持的,去中心化程度也不能与DPoS机制的加密货币相比。更快的确认速度。每个块的时间为10秒,一笔交易(在得到6-10个确认后)大概1分钟,一个完整的101个块的周期大概仅仅需要16分钟。而比特币(PoW机制)产生一个区块需要10分钟,一笔交易完成(6个区块确认后)需要1个小时。点点币(PoS机制)确认一笔交易大概也需要1小时。

缺点:

投票的积极性并不高。绝大多数持股人(90%+)从未参与投票。这是因为投票需要时间、精力以及技能,而这恰恰是大多数投资者所缺乏的。对于坏节点的处理存在诸多困难。社区选举不能及时有效的阻止一些破坏节点的出现,给网络造成安全隐患。

4.PBFTPractical Byzantine Fault Tolerance,实用拜占庭容错算法。

拜占庭共识算法(Practical Byzantine Fault Tolerance- PBFT)也是一种常见的共识证明。它与之前两种都不相同,PBFT以计算为基础,也没有代币奖励。由链上所有人参与投票,少于(N-1)/3个节点反对时就获得公示信息的权利。

优点: 算法的可靠性有严格的数学证明,具备(n-1)/3容错性

缺点:当有1/3或以上记账人停止工作后,系统将无法提供服务。



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324728279&siteId=291194637