<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:&gt; If you spent your change from transaction A, that would be safe. There&#39;d be no way you John could end up with 2 BTC from you then.&#xA;&#xA;Yes, that&#39;s what the following paragraph says -- along with it&#39;s limitations =)&#xA;&#xA;-Ryan&#xA;&#xA;-------- Original Message --------&#xA;On January 22, 2018 1:16 PM, Alan Evans &lt;thealanevans at gmail.com&gt; wrote:&#xA;&#xA;&gt;&gt; So now I still owe John 1 BTC, however it&#39;s not immediately clear if it&#39;s safe to send to him&#xA;&gt;&#xA;&gt; If you spent your change from transaction A, that would be safe. There&#39;d be no way you John could end up with 2 BTC from you then.&#xA;&gt;&#xA;&gt; On Mon, Jan 22, 2018 at 1:40 PM, Rhavar via bitcoin-dev &lt;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; So my half-baked idea is very simple:&#xA;&gt;&gt;&#xA;&gt;&gt; Allow users to merge multiple unconfirmed transactions, stripping extraneous inputs and change as they go.&#xA;&gt;&gt;&#xA;&gt;&gt; This is currently not possible because of the bip125 rule:&#xA;&gt;&gt; &#34;The replacement transaction pays an absolute fee of at least the sum paid by the original transactions.&#34;&#xA;&gt;&gt;&#xA;&gt;&gt; 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;&gt;&gt;&#xA;&gt;&gt; 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;&gt;&gt;&#xA;&gt;&gt; ---&#xA;&gt;&gt; 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;&gt;&gt;&#xA;&gt;&gt; From a &#34;coin selection&#34; point of view, this was significantly easier than&#xA;&gt;&gt; I had anticipated. I was able to encode the rules in my linear model and&#xA;&gt;&gt; feed in all my unspent and in-flight transactions and it can solve it without difficulty.&#xA;&gt;&gt;&#xA;&gt;&gt; However, the real problem is tracking the mess. Consider this sequence of events:&#xA;&gt;&gt; 1) I have unconfirmed transaction A&#xA;&gt;&gt; 2) I replace it with B, which pays John 1 BTC&#xA;&gt;&gt; 3) Transaction A gets confirmed&#xA;&gt;&gt;&#xA;&gt;&gt; So now I still owe John 1 BTC, however it&#39;s not immediately clear if&#xA;&gt;&gt; it&#39;s safe to send to him without waiting $n transactions. However even&#xA;&gt;&gt; for a small $n, this breaks my promise to pay him immediately.&#xA;&gt;&gt;&#xA;&gt;&gt; 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;&gt;&gt;&#xA;&gt;&gt; However, this will only work &lt;50% of the time for me (most transactions&#xA;&gt;&gt; don&#39;t have change) and opens a pandora&#39;s box of complexity.&#xA;&gt;&gt;&#xA;&gt;&gt; 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;&gt;&gt;&#xA;&gt;&gt; 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;&gt;&gt;&#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; bitcoin-dev mailing list&#xA;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180122/f0b58cf0/attachment-0001.html&gt;</html></oembed>