拜占庭容错的三个基本理论

1) CAP理论 - "如果网路发生阻断(partition)时,你只能选择资料的一致性(consistency)或可用性(availability),无法两者兼得"。论点比较真观:如果网路因阻断而分隔为二,在其中一边我送出一笔交易:"将我的十元给A";在另一半我送出另一笔交易:"将我的十元给B "。则此时系统要不是,a)无可用性,即这两笔交易至少会有一笔交易不会被接受;要不就是,b)无一致性,一半看到的是A多了十元而另一半则看到B多了十元。要注意的是,CAP理论和扩展性(scalability)是无关的,在分片(sharded)或非分片的系统皆适用。

2)FLP impossibility (O网页链接)-在异步的环境中,如果节点间的网路延迟没有上限,只要有一个恶意的节点存在,就没有算法能在有限的时间内达成共识。但值得注意的是, "Las Vegas" algorithms(这个算法又叫撞大运算法,其保证结果正确,只是在运算时所用资源上进行赌博。一个简单的例子是随机快速排序,他的pivot是随机选的,但排序结果永远一致)在每一轮皆有一定机率达成共识,随着时间增加,机率会越趋近于1。而这也是许多成功的共识演算法会采用的解决办法。

3)容错的上限-由DLS论文(O网页链接)我们可以得到以下结论: (1)在部分同步(partially synchronous)的网路环境中(即网路延迟有一定的上限,但我们无法事先知道上限是多少),协议可以容忍最多1/3的拜占庭故障(Byzantine fault)。(2)在异步(asynchronous)的网路环境中,具确定性质的协议无法容忍任何错误,但这篇论文并没有提及randomized algorithms在这种情况可以容忍最多1/3的拜占庭故障。(3)在同步(synchronous)的网路环境中(即网路延迟有上限且上限是已知的),协议可以容忍100%的拜占庭故障,但当超过1/2的节点为恶意节点时,会有一些限制条件。要注意的是,我们考虑的是"具认证特性的拜占庭模型(authenticated Byzantine)",而不是"一般的拜占庭模型";具认证特性指的是将如今已经过大量研究且成本低廉的公私钥加密机制应用在我们的演算法中。

以上描述来自以太坊的官方Wiki - Proof of Stake FAQ (https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ)

  • CAP theorem - "in the cases that a network partition takes place, you have to choose either consistency or availability, you cannot have both". The intuitive argument is simple: if the network splits in half, and in one half I send a transaction "send my 10 coins to A" and in the other I send a transaction "send my 10 coins to B", then either the system is unavailable, as one or both transactions will not be processed, or it becomes inconsistent, as one half of the network will see the first transaction completed and the other half will see the second transaction completed. Note that the CAP theorem has nothing to do with scalability; it applies to sharded and non-sharded systems equally. See also https://github.com/ethereum/wiki/wiki/Sharding-FAQs#but-doesnt-the-cap-theorem-mean-that-fully-secure-distributed-systems-are-impossible-and-so-sharding-is-futile.
  • FLP impossibility - in an asynchronous setting (i.e. there are no guaranteed bounds on network latency even between correctly functioning nodes), it is not possible to create an algorithm which is guaranteed to reach consensus in any specific finite amount of time if even a single faulty/dishonest node is present. Note that this does NOT rule out "Las Vegas" algorithms that have some probability each round of achieving consensus and thus will achieve consensus within T seconds with probability exponentially approaching 1 as T grows; this is in fact the "escape hatch" that many successful consensus algorithms use.
  • Bounds on fault tolerance - from the DLS paper we have: (i) protocols running in a partially synchronous network model (i.e. there is a bound on network latency but we do not know ahead of time what it is) can tolerate up to 1/3 arbitrary (i.e. "Byzantine") faults, (ii) deterministic protocols in an asynchronous model (i.e. no bounds on network latency) cannot tolerate faults (although their paper fails to mention that randomized algorithms can with up to 1/3 fault tolerance), (iii) protocols in a synchronous model (i.e. network latency is guaranteed to be less than a known d) can, surprisingly, tolerate up to 100% fault tolerance, although there are restrictions on what can happen when more than or equal to 1/2 of nodes are faulty. Note that the "authenticated Byzantine" model is the one worth considering, not the "Byzantine" one; the "authenticated" part essentially means that we can use public key cryptography in our algorithms, which is in modern times very well-researched and very cheap.

=>更多文章请参考:《中国互联网业务研发体系架构指南》

=>更多行业权威架构案例及领域标准、技术趋势请关注微信公众号 '软件真理与光':

更多权威内容关注公众号:软件真理与光

拜占庭容错的三个基本理论(CAP/FLP/DLS)相关推荐

  1. 权益证明协议中的拜占庭容错

    如果您遵循以太坊基金会的Casper研究,您将会听到许多术语,如"异步安全性"和"异步时序模型中的容错阈值".我想概述基础拜占庭容错理论中的重要概念因此您可以在 ...

  2. PBFT实用拜占庭容错算法详解

    分布式架构遭遇的问题 分布式架构会遭遇到以下问题: 1.异构环境的分布式架构首先可能遇到网络传输问题,比如数据丢失.延迟.重复.乱序. 2.欺骗攻击和重播攻击 3.操纵多个失效节点,延迟通讯,制造混乱 ...

  3. 分布式之cap、base理论、flp不可能原理、一致性问题、共识算法

    一.CAP理论 CAP理论:在一个分布式系统中,最多只能满足C.A.P中的2个. CAP含义: C:Consistency 一致性:同一数据的多个副本是否实时相同.all nodes see the ...

  4. 5.1 拜占庭容错技术

    拜占庭容错技术(Byzantine Fault Tolerance,BFT)是一类分布式计算领域的容错技术.拜占庭假设是对现实世界的模型化,由于硬件错误.网络拥塞或中断以及遭到恶意攻击等原因, 计算机 ...

  5. 区块链时代的拜占庭容错:Tendermint(四)

    2019独角兽企业重金招聘Python工程师标准>>> 原文题目:<Tendermint: Byzantine Fault Tolerance in the Age of Bl ...

  6. 区块链共识算法 PBFT(拜占庭容错)、PAXOS、RAFT简述

    共识算法 区块链中最重要的便是共识算法,比特币使用的是POS(Proof of Work,工作量证明),以太币使用的是POS(Proof of Stake,股权证明)使得算理便的不怎么重要了,而今PO ...

  7. 区块链时代的拜占庭容错:Tendermint(五)

    2019独角兽企业重金招聘Python工程师标准>>> 原文题目:<Tendermint: Byzantine Fault Tolerance in the Age of Bl ...

  8. CAP 理论、BASE 理论、FLP 理论

    CAP 理论.BASE 理论.FLP 理论 CAP 理论.BASE 理论.FLP 理论 1.CAP 理论 C(Consistency) 一致性: 在写操作之后的所有读操作,必须要返回写入的值. A(A ...

  9. 非拜占庭容错共识算法

    目录 一.Raft 算法 二.KRaft 算法 参考文献 一.Raft 算法 三种角色不同的节点:跟随者(follower).候选者(candidate).领导者(leader) 两个阶段: 1.领导 ...

最新文章

  1. 计算机教师40辞职能做什么,干了二十多年老师,四十多岁了,嫌累想辞职,还能有更好的出路吗...
  2. 《Node.js开发指南》书评汇总
  3. 互联网1分钟 |1123
  4. 【Python】局部变量和全局变量以及组合数据(列表)类型
  5. 如何选型商业智能和分析平台,Gartner给了这些建议!
  6. (转)使用C#开发ActiveX控件
  7. 数据挖掘:模型选择——SVM
  8. .NET面试基础知识
  9. 水利数据中心建设初探
  10. 微信小程序下拉刷新不回弹
  11. 关于Unable to read additional data from server sessionid 0x0问题的解决
  12. jpeg图片格式详解
  13. openffice安装(windows和linux)
  14. 2021-07-08图书借阅管理系统
  15. 用山脊图展示后验分布
  16. mysql dba工具_Github推荐:MySQL DBA不可错过的五大开源管理工具!
  17. 五笔打字:速成手册---半小时学会五笔打字
  18. 欧盟委员会发布英国数据充分性决定草案
  19. 有没有测试硬盘的软件,检测硬盘有什么好软件
  20. 一分钟教你如何识别图片文字

热门文章

  1. 饭卡充值系统c语言,求助,单位食堂饭卡充值系统出问题了
  2. consul集群安装以及服务的注册和发现
  3. httpd内存占用居高不下的问题
  4. 计算机软件知识产权权属,计算机软件著作权怎么确定归属
  5. 图像细节增强与成绩开根号乘以10
  6. 怎么以管理员身份运行cmd?以管理员身份运行cmd方法介绍
  7. 2021年Android面经分享,面试总结
  8. Centos7 更换国内源
  9. 海神平台Crash监控SDK(Android)开发经验总结
  10. js构造函数的实例成员和静态成员