揭秘!UBTC高级IT经理首谈POW+POS混合共识机制

原标题:Consensus Mechanisms on the Blockchain (区块链的共识机制)

原文链接:https://ubpay.io/consensus-mechanisms-on-the-blockchain/,原作者:Maarten SwemmerUBTC Senior IT Manager高级IT经理)

翻译:币圈张三丰

 

The decentralization aspect of the blockchain alleviates the need of any singular controlling authority and places the power in hands of all the members present in the blockchain network. The blockchain is a database that keeps the track of all the transactions taking place between the members of the network.

区块链的去中心化减轻了对任何单一控制权威的需要,并将权力交到区块链网络中的所有成员的手中。区块链是一个数据库,用于跟踪网络成员之间发生的所有交易。

 

In traditional transaction systems, one single authority handles all transactions, including verifying the transactions and storing them in a database. This traditional model introduces a dependency on a central system as well as a security risk: in order to disrupt the complete system, including the database with account balances, bad actors only need to succeed in tampering with one single system. Blockchain overcomes this problem through decentralization: by removing the existence of a single control centre, users on the network hold joint responsibility in the maintenance of all personal records and confirmations of transactions.

在传统的交易系统中,仅由单一权限处理所有交易,包括验证交易并将它们存储在数据库中。这种传统模型导致了对中央系统的依赖和安全风险:为了破坏完整的系统(包括有账户余额的数据库),作恶者只需要成功篡改一个系统。区块链通过去中心化解决了这个问题:通过消除单一控制中心,网络上的用户在维护所有个人记录和确认交易方面负有共同责任。

 

A challenge that bitcoin, being the first blockchain system, overcame is how pseudonymous users can be relied on to perform credible verifications of transactions happening in the transaction system.

作为第一个区块链系统,比特币克服的挑战是如何依赖匿名用户来对交易系统中发生的交易进行可靠的验证。

 

The solution to this involves an incentivised consensus mechanism.

这个挑战的解决方案涉及一种激励的共识机制。

 

What is consensus? 什么是共识?

 

Consensus is a decision-making process which happens in a group in such a way that all the members present in the group are satisfied with it. Unlike voting system, consensus does not focus on imposing the majority’s decision on the group but arriving at a point where everyone agrees with the decision.

共识是一个决策过程,它在一个群体中发生,使群体中的所有成员都对其感到满意。与投票制度不同,共识不是把多数人的决定强加给集体,而是达成一个每个人都同意的共识。

 

In blockchains different players are granted from time to time the task of verifying and confirming a number of transactions and registering them into a block. They are assigned this task based on the amount of risk they have been willing to take to earn the right to perform this task. In turn, they receive a reward (the block reward). The next player that earns the task of forming a block of new transactions will base his block on the last block that he agrees with. If a player’s block is not accepted by subsequent players (because of some fraudulent transaction), his block will be ignored and his block reward will be forfeited. Since the player already put some risk in earning the right to form a block, it is not economically attractive to include fraudulent transactions in the block to begin with. Because each block needs to follow the last valid block in the blockchain, over time this mechanism results in consensus.

在区块链中,不同的用户时不时地被授予任务,即验证和确认多个交易并将它们注册到一个区块中。他们被分配这项任务的依据是,他们为获得执行这项任务的权利而愿意承担的风险。作为回报,他们会收到奖励(区块奖励)。下一个负责创建新交易区块的用户将把他的区块建立在他同意的上一个区块上。如果一个用户的区块不被后续用户接受(因为一些欺诈交易),他的区块将被忽略,而且他的区块奖励将被没收。由于用户已经冒一些风险来获取创建区块的权利,因此在区块中包含欺诈性交易在经济上并不具有吸引力。因为每个区块都需要遵循区块链中的最后一个有效区块,随着时间的推移,这种机制会就产生共识。

 

The term ‘risk’ used above refers to the amount of resources spent or temporarily made inaccessible while earning the right to form a block. Because this plays a pivotal role in the long-term consensus on the block chain, this is called the consensus mechanism.

上面使用的“风险”一词是指在获得创建一个区块的权利时的花费或暂时冻结的资源量。因为这在区块链的长期共识中起着关键作用,这被称为共识机制。

 

Types of Consensus on the Blockchain区块链上的共识类型

 

There are various methods by which a group on the blockchain network can reach long term consensus.

区块链网络上的一个群组可以通过各种方法达成长期共识。

 

1.     Proof-of-Work (PoW): 工作量证明(PoW):

 

Proof-of-Work involves solving a complicated puzzle that includes the transactions you want to include in a block to show that you have put a certain amount of computational power at work. When a puzzle is solved, other members of the blockchain double check the solution. The one who solved the calculation first presents it to the group to confirm if the answers match. If the answers are indeed the same, the process of solving the puzzle starts over for a new block with new transactions. The now solved block is confirmed by others by including (a reference to it) in the next block.

工作量证明涉及解决一个复杂的难题,其中包括你想要包含在区块中的交易,以表明你已经在工作中投入了一定的算力。当一个难题解决后,区块链上的其他成员会认真检查该解决方案。第一个解决计算难题的人会将计算结果提交给区块链,以确定答案是否匹配。如果答案确实相同,则解决难题的过程将从具有新交易的新区块开始。现在解决的区块由其他人通过在下一个区块中包括(对它的引用)来确认。

 

Advantage:It works every time and ensures that the block validated is 100 per cent genuine. Moreover, the participation of all nodes is desirable but not necessary.

优点:它每次都有效,并确保验证的区块是100%真实的。此外,所有节点的参与是理想但非必需的。

 

Disadvantage: To ensure a steady flow of blocks, the difficulty of the puzzles increases automatically with the amount of competing computer power. It takes more and more computational power and memory to confirm the same amount of transactions this way, which makes the blockchain network not very environmentally friendly.

缺点:为了保证区块的稳定流动,难题的难度会随着竞争的算力增加而自动增加。通过这种方式,需要越来越多的算力和内存来确认相同数量的交易,这使得区块链网络不是非常环保。

 

2.     Proof of Stake (PoS): 权益证明(PoS):

 

In this method, instead of earning the right to validating the block by applying computing power, the difficulty of the puzzle an individual needs to solve depends on how many crypto coins he puts at stake. There is an analogy with buying lottery tickets: the more you buy the bigger your chance to win. With one exception: if you don’t win, you will not lose your bet, although it might be locked up for a while. In this case, people who own a lot of coins have an interest to keep the network reliable, as an unreliable network would render their coins worthless. Therefore they will only confirm valid transactions. In some versions of PoS stakes are actually lost if the rest of the network does not confirm your block.

在这种方法中,一个人需要解决的难题的难度取决于他投入了多少加密货币,而不是通过使用算力获得验证区块的权利。这与买彩票有些类似:买得越多,赢的机会就越大。但有一点不同的是:如果你不赢,你不会输掉你的赌注,尽管它可能会被锁定一段时间。在这种情况下,拥有大量代币的人有兴趣保持区块链网络的可靠性,因为一个不可靠的网络会使他们的代币变得一文不值。因此他们只会确认有效的交易。在某些版本的PoS中,如果网络的其它部分不确认你的区块,实际上你会丢失你的筹码(代币)。

 

Advantage: Employs less computational power and takes up less memory.

优点:使用更少的算力,占用更少的内存。

 

Disadvantage:Since nothing is exactly put at stake, there possibly remains a question in the credibility of the tokens or the currency used to make the bet.

缺点:由于没有任何实质上的投入,因此用来押注的代币的可信度存疑。

 

3.     Delegated Proof of Stake (DPoS): 委托权益证明(PDoS

 

Delegated Proof of Stake involves members of the blockchain electing delegates that will validate the blocks (instead of members validating the block themselves).

委托权益证明指的是区块链的成员选举代表来验证区块(而不是成员自己去验证区块)。

 

Advantage:This method is easy to scale and effective on cost and computational energy. Although returns on investment might be the same in the long run, it enables owners of small amounts of currency to get regular (smaller) paid rewards.

优点:该方法易于扩展,且在成本和算力上都是有效的。尽管从长期来看,投资回报可能是相同的,但它使持有少量货币的人能够获得规律(较少)的奖励。

 

Disadvantage: DPoS can be considered partly centralized, which can in some senses detract from one of the blockchain’s key advantages.

缺点:DPoS可能被认为是部分中心化的,在某种意义上,它可能会削弱区块链的一个关键优势。

 

Hybrid Consensus 混合共识

 

Also known as Proof of Activity, the hybrid consensus method is an amalgamation of two consensus methods. UnitedBitcoin is implementing a hybrid consensus mechanism that is split between Proof-of-Work (50%) and Proof-of-Stake (50%).

混合共识方法也被称为活动量证明,它是两种共识方法的合并。UnitedBitcoinUBTC比特联储)正在实施一种混合共识机制,这种机制分为工作量证明和权益证明(各50%)。

 

This hybrid consensus method gives all Workers and all Stakers together equal chances of winning a block. While Proof of Workers increase their chances by working harder, Proof of Stakers increase their chances by staking more. Each group has a 50% chance to win.

这种混合的共识方法为所有矿工(工作量证明法支持者)和代币持有人(权益证明法支持者)提供了赢得区块的平等机会。矿工可以通过增加工作量来提升赢得区块的机会,代币持有者也可以通过持有更多代币来增加他们(赢得区块)的机会。每个群体都有50%的机会获胜。

 

Once the block is mined, the process starts over. In the way UnitedBitcoin implements this, there is no fixed order in which blocks need to be mined by either of the groups. On average 50% will be mined by PoS and 50% will be mined, but through either method a few subsequent blocks could be mined.

一旦区块被挖出来,该过程就会重新开始。UnitedBitcoinUBTC比特联储)实现这一点的方式中,没有固定的顺序,其中任何一个群体都可以挖矿。平均50%的区块将由PoS挖出,50%将由PoW挖出,但一个区块的后续区块可以由任意一种方法被挖出来。


免责声明:本文仅为传播消息之用,不代表知链立场,如需转载,请务必注明文章原作者以及来源,部分图片来源于网络,我们尊重版权,如有疑问敬请联系,我们将核实并删除。