【通读EOS白皮书】DPOS共识机制-02
今年币圈链圈一个重大事件就是:EOS在6.1日正式发布,但是还有非常多的人从未阅读过EOS技术白皮书。在此我准备做一个通读EOS白皮书系列,主要是翻译官方原文并加入个人解释的形式展现,水平有限,欢迎大家讨论交流。
微信公众号:blockd-public
微信号:点击查看
交易确认
通常DPOS区块链100%有区块生产都参与。一笔交易在广播之后平均1.5秒就可以认为99.9%是可靠的。
一些极端情况除外:软件bug,网络阻塞,或者恶意的区块生产都创作两个或更多分支。为了完全确保交易不可逆,节点可以选择等到15个(21个之中,后面相同省略)区块生产者确认之。根据EOS.IO软件的典型配置,正常情况下,15个确认需求45秒。默认情况下,所有节点都认为经过15个区块生产者确认过的区块是无法逆转的并且不会切换到没有这一区块的链上(无论此链长度如何)。
解释:就像交易所存币、提币经常会等几个确认一样。
在分叉开始的9秒内,节点可以警告用户他们极有可能是在一个小分叉链上。2次连续丢块,有95%可能处在小分叉链上。3次连续丢块,有99%可能在小分叉链上。利用哪些节点丢失、最近参与率以及其他因素可以生成一个强大的预测模型用于快速警告操作者出现错误.
对这种警告的处理完全取决于业务交易的性质,不过最简单的处理就是等到15个确认之后停止警告。
解释:对于可能不成功的交易,应该如何处理。一般交易越重要越需求高的可靠性。而EOS一般15个确认就被算法认为是正常的了。
交易权益证明(TaPoS)
EOS.IO 软件要求每笔交易包含上一个区块的头信息的哈希值。这个值有2个用途:
- 防止在不包含参考区块的分叉上“双花”
- 通行网络特定的用户以及相应的权益是在具体的分叉链上。
随着时间推移,所有用户最终直接确认区块链,这样使得难以伪造伪链,因为伪链上的交易无法与合法链进行转移。
解释:每笔交易要包含一些信息,用这些信息来保证交易的合法性。
原文如下
Transaction Confirmation
Typical DPOS blockchains have 100% block producer participation. A transaction can be considered confirmed with 99.9% certainty after an average of 1.5 seconds from time of broadcast.
There are some extraordinary cases where a software bug, Internet congestion, or a malicious block producer will create two or more forks. For absolute certainty that a transaction is irreversible, a node may choose to wait for confirmation by 15 out of the 21 block producers. Based on a typical configuration of the EOS.IO software, this will take an average of 45 seconds under normal circumstances. By default all nodes will consider a block confirmed by 15 of 21 producers irreversible and will not switch to a fork that excludes such a block regardless of length.
It is possible for a node to warn users that there is a high probability that they are on a minority fork within 9 seconds of the start of a fork. After 2 consecutive missed blocks there is a 95% probability a node is on a minority fork. With 3 consecutive missed blocks there is a 99% certainty of being on a minority fork. It is possible to generate a robust predictive model that will utilize information about which nodes missed, recent participation rates, and other factors to quickly warn operators that something is wrong.
The response to such a warning depends entirely upon the nature of the business transactions, but the simplest response is to wait for 15/21 confirmations until the warning stops.
Transaction as Proof of Stake (TaPoS)
The EOS.IO software requires every transaction to include the hash of a recent block header. This hash serves two purposes:
- prevents a replay of a transaction on forks that do not include the referenced block; and
- signals the network that a particular user and their stake are on a specific fork.
Over time all users end up directly confirming the blockchain which makes it difficult to forge counterfeit chains as the counterfeit would not be able to migrate transactions from the legitimate chain.
Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://steemit.com/eos/@eosio/eos-io-technical-white-paper
请接受cn区点赞机器人 @cnbuddy 对你作为cn区一员的感谢。如果我打扰到你,请回复“取消”。
区块链需要一段时间才能完全沉淀下来,现在市场对他的期望值太高了。