<oembed><type>rich</type><version>1.0</version><author_name>npub1pmw4p7tz6s8k62zrpdpxc93ajlmpxe0s03j275dcmcejv8wazz9qhe5c0r</author_name><author_url>https://nostr.ae/npub1pmw4p7tz6s8k62zrpdpxc93ajlmpxe0s03j275dcmcejv8wazz9qhe5c0r</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2018-01-22&#xA;📝 Original message:So my half-baked idea is very simple:&#xA;&#xA;Allow users to merge multiple unconfirmed transactions, stripping extraneous inputs and change as they go.&#xA;&#xA;This is currently not possible because of the bip125 rule:&#xA;&#34;The replacement transaction pays an absolute fee of at least the sum paid by the original transactions.&#34;&#xA;&#xA;Because the size of the merged transaction is smaller than the original transactions, unless there is a considerable feerate bump, this rule isn&#39;t possible to observe.&#xA;&#xA;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?&#xA;&#xA;---&#xA;Full backstory: I have been trying to use bip125 (Opt-in Full Replace-by-Fee) to do &#34;transaction merging&#34; on the fly. Let&#39;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.&#xA;&#xA;From a &#34;coin selection&#34; point of view, this was significantly easier than&#xA;I had anticipated. I was able to encode the rules in my linear model and&#xA;feed in all my unspent and in-flight transactions and it can solve it without difficulty.&#xA;&#xA;However, the real problem is tracking the mess. Consider this sequence of events:&#xA;1) I have unconfirmed transaction A&#xA;2) I replace it with B, which pays John 1 BTC&#xA;3) Transaction A gets confirmed&#xA;&#xA;So now I still owe John 1 BTC, however it&#39;s not immediately clear if&#xA;it&#39;s safe to send to him without waiting $n transactions. However even&#xA;for a small $n, this breaks my promise to pay him immediately.&#xA;&#xA;One possible solution is to only consider a transaction &#34;replaceable&#34; 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.&#xA;&#xA;However, this will only work &lt;50% of the time for me (most transactions&#xA;don&#39;t have change) and opens a pandora&#39;s box of complexity.&#xA;&#xA;There&#39;s a few other hacks you can do to make it work in a few more cases, but nothing that is realistic to expect anyone to implement any time soon.&#xA;&#xA;However, if there was a straight foward way to merge N unconfirmed transactions, it would be easy get into production, and potentially offer some pretty nice savings for everyone.&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180122/75c4190e/attachment.html&gt;</html></oembed>