{"type":"rich","version":"1.0","author_name":"npub1pmw4p7tz6s8k62zrpdpxc93ajlmpxe0s03j275dcmcejv8wazz9qhe5c0r","author_url":"https://nostr.ae/npub1pmw4p7tz6s8k62zrpdpxc93ajlmpxe0s03j275dcmcejv8wazz9qhe5c0r","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2018-01-23\n📝 Original message:Interesting. I didn't think about this before, but it seems like bip125 is rather incentive incompatible right now? If we're assuming a competitive mempool, it really doesn't seem generally rational to accept a replacement transaction of a lower fee rate.\n\nSo how about if we change the fee requirement to bet at least:\n\nMIN(\n         $ORIGINAL_FEE_RATE * $REPLACEMENT_TX_SIZE + $RELAY_FEE * ( REPLACEMENT_TX_SIZE + $ORIGINAL_SIZE),\n        $ORIGINAL_ABS_FEE  / 3\n)  in fees\n\nThis could make it:\n* More incentive compatible\n* Support more use-cases (my transaction merging example)\n* Be resistant to any attacks (that I can see, there's no doubt cases I haven't thought about)\n\n-Ryan\n\n-------- Original Message --------\nOn January 23, 2018 4:56 PM, Moral Agent \u003cethan.scruples at gmail.com\u003e wrote:\n\n\u003e Another way to limit abuse would be to have the fee *rate* be required to increase, which is kind of the spirit of RBF, applied to this situation.\n\u003e\n\u003e That is to say, if you wished to replace transactions A and B with C which spends the same inputs as A and B, then the following must be true before C will be relayed:\n\u003e\n\u003e (Fee_A + Fee_B) / (Weight_A + Weight_B) \u003c Fee_C / Weight_C\n\u003e\n\u003e On Tue, Jan 23, 2018 at 11:31 AM, Rhavar via bitcoin-dev \u003cbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\u003e\n\u003e\u003e Getting back on topic:\n\u003e\u003e\n\u003e\u003e\u003e It would definitely introduce DoS vectors by making it much cheaper to use\n\u003e\u003e\u003e relay bandwidth.\n\u003e\u003e\n\u003e\u003e I think I'm missing something, as I don't really understand this DoS vector. Relay bandwidth is already very cheap and easy to use by repeatedly fee bumping. And it's not obvious to me that requiring an absolute higher fee actually makes such an attack more expensive.\n\u003e\u003e\n\u003e\u003e I can see that my \"proposed\" change would make it cheaper to evict low-fee transactions from other node's mempool. Maybe I'm being naive, but I don't really see why this would be such a big deal.\n\u003e\u003e\n\u003e\u003e But what about a compromise, and require that the absolute fee must be \u003e= half the original fees. I know everyone hates magic values, but I think in practice it will allow legitimate and useful use of \"retroactive transaction merging\" without much downside.\n\u003e\u003e\n\u003e\u003e And really the great thing about \"retroactive transaction merging\" is just how easy it is to implement. In fact, right now it's quite possible to do -- but because of the \"higher absolute fee\" rule the benefits are pretty muted (although if you can compress 2 change into 1, that's still likely worthwhile)\n\u003e\u003e\n\u003e\u003e -Ryan\n\u003e\u003e\n\u003e\u003e -------- Original Message --------\n\u003e\u003e On January 22, 2018 3:00 PM, Peter Todd \u003cpete at petertodd.org\u003e wrote:\n\u003e\u003e\n\u003e\u003e\u003e On Mon, Jan 22, 2018 at 12:40:31PM -0500, Rhavar via bitcoin-dev wrote:\n\u003e\u003e\u003e\n\u003e\u003e\u003e\u003e So my half-baked idea is very simple:\n\u003e\u003e\u003e\u003e Allow users to merge multiple unconfirmed transactions, stripping extraneous inputs and change as they go.\n\u003e\u003e\u003e\u003e This is currently not possible because of the bip125 rule:\n\u003e\u003e\u003e\u003e \"The replacement transaction pays an absolute fee of at least the sum paid by the original transactions.\"\n\u003e\u003e\u003e\u003e Because the size of the merged transaction is smaller than the original transactions, unless there is a considerable feerate bump, this rule isn't possible to observe.\n\u003e\u003e\u003e\u003e I my question is: is it possible or reasonable to relax this rule? If this rule was removed in its entirety, does it introduce any DoS vectors? Or can it be changed to allow my use-case?\n\u003e\u003e\u003e\n\u003e\u003e\u003e It would definitely introduce DoS vectors by making it much cheaper to use\n\u003e\u003e\u003e relay bandwidth. You'd also be able to push others' txs out of the mempool.\n\u003e\u003e\u003e\n\u003e\u003e\u003e\u003e ---------------------------------------------------------------\n\u003e\u003e\u003e\u003e Full backstory: I have been trying to use bip125 (Opt-in Full Replace-by-Fee) to do \"transaction merging\" on the fly. Let's say that I owe John 1 bitcoin, and have promised to pay him immediately: Instead of creating a whole new transaction if I have an in-flight (unconfirmed) transaction, I can follow the rules of bip125 to create a replacement that accomplishes this goal.\n\u003e\u003e\u003e\u003e From a \"coin selection\" point of view, this was significantly easier than\n\u003e\u003e\u003e\u003e I had anticipated. I was able to encode the rules in my linear model and\n\u003e\u003e\u003e\u003e feed in all my unspent and in-flight transactions and it can solve it without difficulty.\n\u003e\u003e\u003e\u003e However, the real problem is tracking the mess. Consider this sequence of events:\n\u003e\u003e\u003e\u003e\n\u003e\u003e\u003e\u003e - I have unconfirmed transaction A\n\u003e\u003e\u003e\u003e - I replace it with B, which pays John 1 BTC\n\u003e\u003e\u003e\u003e - Transaction A gets confirmed\n\u003e\u003e\u003e\u003e So now I still owe John 1 BTC, however it's not immediately clear if\n\u003e\u003e\u003e\u003e it's safe to send to him without waiting $n transactions. However even\n\u003e\u003e\u003e\u003e for a small $n, this breaks my promise to pay him immediately.\n\u003e\u003e\u003e\u003e One possible solution is to only consider a transaction \"replaceable\" if it has change, so if the original transaction confirms -- payments can immediately be made that source the change, and provide safety in a reorg.\n\u003e\u003e\u003e\u003e However, this will only work \u003c50% of the time for me (most transactions\n\u003e\u003e\u003e\u003e don't have change) and opens a pandora's box of complexity.\n\u003e\u003e\u003e\n\u003e\u003e\u003e Most transactions don't have change?! Under what circumstance? For most\n\u003e\u003e\u003e use-cases the reverse is true: almost all all transactions have change, because\n\u003e\u003e\u003e it's rare for the inputs to exactly math the requested payment.\n\u003e\u003e\u003e\n\u003e\u003e\u003e https://petertodd.org 'peter'[:-1]@petertodd.org\n\u003e\u003e\n\u003e\u003e _______________________________________________\n\u003e\u003e bitcoin-dev mailing list\n\u003e\u003e bitcoin-dev at lists.linuxfoundation.org\n\u003e\u003e https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180123/42431dec/attachment.html\u003e"}
