什么是拜占庭将军问题(The Byzantine Generals Problem)

请添加图片描述

更新日期:2022年1月21日 


​​​​​​​​​​​​​​​​​​​​​​​​​

拜占庭将军难题

在一项由NASA管理的项目中,Leslie Lamport、Robert Shostak和Marshall Pease首次提出了拜占庭将军难题,这个难题就是解决如何在无领导的且互不连接的多点网络中确定情况和进行指挥。它在某种程度上很适合描述比特币网络所存在的问题,你可以点击这里阅读拜占庭将军难题的原始论文。

这个难题定义了将军们应该如何在一个无中心化的通信网络里发号命令,以及如何在有恶意方向军队发布虚假消息时依然保障自身的安全。

拜占庭的军队分成几个师,在城市外部不同的位置扎营,每个师由一名将军控制。将军们之间只能通过信使交流。军队中有一些叛变的将军,他们会试图阻止忠诚的将军就合理的计划达成共识,所以通信协议必须确保信息接收者能够知道该消息是否来自忠诚的将军。

由于任何人都可以向一位将军发送一条消息,并声称这是来自另一位将军的,因此协议必须有办法让将军们确定地知道这个消息确实是来自一个将军。这就需要一种密码来证明这个消息是来自于真正的将军。在比特币中,工作量证明(Proof of Work)就是“中本聪共识”的核心要素,它能够证明某个节点具备在账本上构造区块的权限。

有时两个将军同时收到了两种不同的有效指令,由于指令的传播需要一点时间,因此将军们便开始采取不同的行动,军队就产生了分裂。

如果军队开始分头行动,落后于前线的将军们就会停止正在做的事情,迎头赶上。这就是网络重组中所发生的情况,而行动被废弃就是网络上产生了孤块

将军们都想要时刻站在军队最前线,这就激励着最优秀的将军们彼此之间形成直接的通信线路,从而实现更快的通信速度。在比特币中,这种激励促使矿工们找到彼此之间最佳的连接方式,推动比特币核心网络成员形成一个高度连接的小世界网络。这个核心网络趋向于一个近完全图,即几乎所有节点都直接连接到其它节点。

通常来说,六个节点当中,每一个小时就存在一个节点能够找到工作量证明的有效解,因此曼达拉图的中心将趋向于受梅特卡夫定律限制的最大尺寸。随着越来越多的节点加入竞争,维持连接变得越来越昂贵,因此矿商会出于本能地切断与不生产区块的矿工之间的联系,同时去连接更新、更强大的节点。这种通过不断构造新区块以维持自身地位的情形可以被描述为红皇后比赛,即参与者必须不断增加实力,以维持他们在网络中的地位。


The Byzantine Generals Problem

The Byzantine Generals Problem was first proposed by Leslie Lamport, Robert Shostak, and Marshall Pease as part of research being conducted at NASA. The problem deals with, how to define, how to direct a network of disconnected units in a leaderless situation. It has been somewhat adapted to the problem of Bitcoin for this description, however the original paper can be found here.

The problem defines how Generals can issue commands without a centralised communication structure, while remaining robust in the face of bad actors who might try to issue malicious commands to the army.

The Byzantine army is encamped outside a city broken into divisions, each controlled by a General. Generals have no means to communicate other than through messengers. There are traitorous Generals in the army who will try to issue commands that prevent the loyal Generals from reaching agreement on a reasonable plan forward, so the messaging protocol must ensure that message receivers can know that they are from a loyal General.

Anyone can present a message to a General claiming it to be from another General, so the protocol must have a means for Generals to know with certainty, that any proposed moves are from another General. A cipher that demonstrates the message is from a real General is needed. In Bitcoin, Proof of Work demonstrates a node's authority to write blocks to the ledger. This is a core element of Nakamoto Consensus.

The army sometimes becomes divided when two Generals find valid moves at around the same time. It takes a short period of time for orders to be propagated so the Generals may end up following divergent moves.

If the army starts moving apart, Generals in the group that falls behind the front will stop what they are doing and catch up. This is what happens in a network Re-org, with the abandoned move creating an Orphan Block.

The need for Generals to always be at the front of the army incentivizes the best Generals to form direct lines of communication with each other, leading to much faster communication. In Bitcoin, this incentive drives Miners to find the best way to connect to each other, driving the Bitcoin Core Network members into forming a Small World Network with large highly connected systems. This core trends towards a Nearly Complete Graph where all nodes are connected to almost all other nodes.

Finding valid solutions to proof of work, is generally limited to 6 nodes an hour, so the centre of the mandala trends towards a size maxima constrained by Metcalfes law. As more nodes join the competition, it becomes more expensive to maintain connections, so Miners will instinctively cut ties with non-performing Miners to connect with newer, more powerful nodes. This element of constant building to maintain position can be described as a Red Queen's race where participants must continuously accelerate in order to maintain their position in the field.

声明:

BSV知识库​​​​​​​项目由BSV区块链发起并支持,更多信息请参见知识库官网:BSV Wiki


目前,全球已有超过400个项目构建于BSV区块链之上。凭借坚如磐石的协议及超高的网络性能,BSV生态系统迅猛发展,我们期待未来出现更多前所未有的商业应用。


  • 对BSV区块链开发感兴趣的朋友可以通过CSDN站内私信联系我们,申请加入BSV开发者交流群。
  • 同时,您也可以扫描下方二维码,关注BSV区块链官方微信公众号,了解更多区块链领域的实时资讯。

    Alt

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值