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