回复:比特币零食售货机(快速交易问题)
原始发布页
打开来源页面查看 1 个交叉存档
我相信,支付处理公司将有可能提供这样一种服务:在 10 秒左右或更短时间内快速分发交易,并进行足够可靠的检查。
网络节点只接受自己最先收到的交易版本,将其纳入正在尝试生成的区块。当你广播一笔交易时,如果其他人同时广播一笔双重支付,双方就会竞相争取率先传播到最多的节点。如果其中一方稍微领先,它就会以几何级数更快地传遍网络,并占据大多数节点。
一个粗略的估算示例: 1 0 4 1 16 4 64 16 80% 20%
所以,如果双重支付哪怕必须等上一秒,它也会处于极大的劣势。
支付处理商与许多节点都有连接。当它收到一笔交易时,会立即将其广泛发出,同时监控网络中是否出现双重支付。如果它的众多监听节点中有任何一个收到双重支付,它就会发出警报,指出这笔交易有问题。一笔被双重支付的交易不可能传播得太远而不被某个监听节点听到。双重支付者必须等到监听阶段结束,但到那时,支付处理商广播的交易已经抵达大多数节点,或者在传播上已经领先太多,以至于双重支付者不可能再夺取剩余节点中的显著比例。
英文原文
展开英文原文
I believe it'll be possible for a payment processing company to provide as a service the rapid distribution of transactions with good-enough checking in something like 10 seconds or less.
The network nodes only accept the first version of a transaction they receive to incorporate into the block they're trying to generate. When you broadcast a transaction, if someone else broadcasts a double-spend at the same time, it's a race to propagate to the most nodes first. If one has a slight head start, it'll geometrically spread through the network faster and get most of the nodes.
A rough back-of-the-envelope example: 1 0 4 1 16 4 64 16 80% 20%
So if a double-spend has to wait even a second, it has a huge disadvantage.
The payment processor has connections with many nodes. When it gets a transaction, it blasts it out, and at the same time monitors the network for double-spends. If it receives a double-spend on any of its many listening nodes, then it alerts that the transaction is bad. A double-spent transaction wouldn't get very far without one of the listeners hearing it. The double-spender would have to wait until the listening phase is over, but by then, the payment processor's broadcast has reached most nodes, or is so far ahead in propagating that the double-spender has no hope of grabbing a significant percentage of the remaining nodes.