比特币:点对点电子现金论文
原始发布页
打开来源页面查看 1 个交叉存档
James A. Donald 写道:
好吧,假设一个节点把一批交易纳入自己的工作量证明,它们都是诚实、合法的单次支付;另一个节点把另一批同样诚实、合法的单次支付纳入自己的工作量证明;而且两个证明几乎同时生成。
那会发生什么?
他们都会广播自己的区块。所有节点都收到并保留两者,但只会在先收到的那个上继续工作。假设恰好一半节点先收到一个,另一半先收到另一个。
很快,所有交易都会传播完毕,大家都拥有完整集合。两边工作的节点会尝试加入自己那一边缺少的交易。当下一个工作量证明找到时,该节点当时正在其上工作的前一个区块所在分支会变长,平局被打破。无论是哪一边,新区块都会包含另一半交易,所以无论哪条分支胜出,都会包含全部交易。即使极不可能地连续发生两次分裂,第二次分裂的两边也已经都包含完整集合。
交易必须多等一个或几个周期才能进入区块,并不是问题。
中本聪
英文原文
展开英文原文
James A. Donald wrote:
OK, suppose one node incorporates a bunch of transactions in its proof of work, all of them honest legitimate single spends and another node incorporates a different bunch of transactions in its proof of work, all of them equally honest legitimate single spends, and both proofs are generated at about the same time.
What happens then?
They both broadcast their blocks. All nodes receive them and keep both, but only work on the one they received first. We'll suppose exactly half received one first, half the other.
In a short time, all the transactions will finish propagating so that everyone has the full set. The nodes working on each side will be trying to add the transactions that are missing from their side. When the next proof-of-work is found, whichever previous block that node was working on, that branch becomes longer and the tie is broken. Whichever side it is, the new block will contain the other half of the transactions, so in either case, the branch will contain all transactions. Even in the unlikely event that a split happened twice in a row, both sides of the second split would contain the full set of transactions anyway.
It's not a problem if transactions have to wait one or a few extra cycles to get into a block.
Satoshi Nakamoto