回复:BitDNS 中关于费用的困惑
原始发布页
打开来源页面查看 1 个交叉存档
不是锁定时间。
在遥远的未来,有一种可能的设计:
你故意写一笔双重支付交易。你使用相同的输入和输出,但这次附带一笔费用。当你的双重支付交易进入某个区块时,第一次支付就会失效。收款人其实不会察觉,因为就在新交易生效的那一刻,旧交易会失效,而新交易只是取代了它的位置。
说起来容易,实现起来却难。要做出一个能正确写入双重支付交易、在其中一个版本被选中之前管理钱包里的两个版本,并处理所有边界情况的客户端,需要做相当多的工作。现有代码中的每一个假设都是你不会试图写入双重支付交易。
比特币矿工一侧也需要做一些改动,使其有可能接受双重支付交易进入交易池,但仅限输入和输出严格匹配且交易费更高的情况。目前,双重支付交易绝不会被交易池接受,所以每个节点都会通过努力把自己最先看到的交易放进区块,来见证它最先看到的是哪一笔交易。
英文原文
展开英文原文
Not locktime.
There's a possible design for far in the future:
You intentionally write a double-spend. You write it with the same inputs and outputs, but this time with a fee. When your double-spend gets into a block, the first spend becomes invalid. The payee does not really notice, because at the moment the new transaction becomes valid, the old one becomes invalid, and the new transaction simply takes its place.
It's easier said than implemented. There would be a fair amount of work to make a client that correctly writes the double-spend, manages the two versions in the wallet until one is chosen, handles all the corner cases. Every assumption in the existing code is that you're not trying to write double-spends.
There would need to be some changes on the Bitcoin Miner side also, to make the possibility to accept a double-spend into the transaction pool, but only strictly if the inputs and outputs match and the transaction fee is higher. Currently, double-spends are never accepted into the transaction pool, so every node bears witness to which transaction it saw first by working to put it into a block.