{"type":"rich","version":"1.0","author_name":"npub15s37yxwtrf7cd83sujzneprwsjtvhjjxcygutpqk5f966093utms6htj94","author_url":"https://nostr.ae/npub15s37yxwtrf7cd83sujzneprwsjtvhjjxcygutpqk5f966093utms6htj94","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2018-01-22\n📝 Original message:\u003e So now I still owe John 1 BTC, however it's not immediately clear if it's\nsafe to send to him\n\nIf you spent your change from transaction A, that would be safe. There'd be\nno way you John could end up with 2 BTC from you then.\n\nOn Mon, Jan 22, 2018 at 1:40 PM, Rhavar via bitcoin-dev \u003c\nbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\n\u003e So my half-baked idea is very simple:\n\u003e\n\u003e Allow users to merge multiple unconfirmed transactions, stripping\n\u003e extraneous inputs and change as they go.\n\u003e\n\u003e This is currently not possible because of the bip125 rule:\n\u003e \"The replacement transaction pays an absolute fee of at least the sum paid\n\u003e by the original transactions.\"\n\u003e\n\u003e Because the size of the merged transaction is smaller than the original\n\u003e transactions, unless there is a considerable feerate bump, this rule isn't\n\u003e possible to observe.\n\u003e\n\u003e\n\u003e I my question is: is it possible or reasonable to relax this rule? If this\n\u003e rule was removed in its entirety, does it introduce any DoS vectors? Or can\n\u003e it be changed to allow my use-case?\n\u003e\n\u003e\n\u003e ---\n\u003e Full backstory: I have been trying to use bip125 (Opt-in Full\n\u003e Replace-by-Fee) to do \"transaction merging\" on the fly. Let's say that I\n\u003e owe John 1 bitcoin, and have promised to pay him immediately: Instead of\n\u003e creating a whole new transaction if I have an in-flight (unconfirmed)\n\u003e transaction, I can follow the rules of bip125 to create a replacement that\n\u003e accomplishes this goal.\n\u003e\n\u003e From a \"coin selection\" point of view, this was significantly easier than\n\u003e I had anticipated. I was able to encode the rules in my linear model and\n\u003e feed in all my unspent and in-flight transactions and it can solve it\n\u003e without difficulty.\n\u003e\n\u003e However, the real problem is tracking the mess. Consider this sequence of\n\u003e events:\n\u003e 1) I have unconfirmed transaction A\n\u003e 2) I replace it with B, which pays John 1 BTC\n\u003e 3) Transaction A gets confirmed\n\u003e\n\u003e So now I still owe John 1 BTC, however it's not immediately clear if\n\u003e it's safe to send to him without waiting $n transactions. However even\n\u003e for a small $n, this breaks my promise to pay him immediately.\n\u003e\n\u003e One possible solution is to only consider a transaction \"replaceable\" if\n\u003e it has change, so if the original transaction confirms -- payments can\n\u003e immediately be made that source the change, and provide safety in a reorg.\n\u003e\n\u003e However, this will only work \u003c50% of the time for me (most transactions\n\u003e don't have change) and opens a pandora's box of complexity.\n\u003e\n\u003e There's a few other hacks you can do to make it work in a few more cases,\n\u003e but nothing that is realistic to expect anyone to implement any time soon.\n\u003e\n\u003e However, if there was a straight foward way to merge N unconfirmed\n\u003e transactions, it would be easy get into production, and potentially offer\n\u003e some pretty nice savings for everyone.\n\u003e\n\u003e _______________________________________________\n\u003e bitcoin-dev mailing list\n\u003e bitcoin-dev at lists.linuxfoundation.org\n\u003e https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\n\u003e\n\u003e\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180122/b5749d54/attachment.html\u003e"}
