原始文献 / 论坛帖 / Re: Bitcoin snack machine (fast transaction problem)
Re: Bitcoin snack machine (fast transaction problem)
Bitcointalk · 2010-07-17 22:29:13 UTC
我相信支付处理公司有可能把这做成一项服务:在 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.
