<oembed><type>rich</type><version>1.0</version><title>Antoine Riard [ARCHIVE] wrote</title><author_name>Antoine Riard [ARCHIVE] (npub1vj…4x8dd)</author_name><author_url>https://yabu.me/npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2021-05-28&#xA;📝 Original message:&gt; Unfortunately, ACP | SINGLE is trivially pinable [0] (TL;DR: i can just&#xA;attach an output paying immediately to me, and construct a tx chain&#xA;spending it). We are using ACP | ALL for Revault,&#xA;&gt; which is the reason why we need a well laid-out pool of fee-bumping UTXOs&#xA;(as you need to consume them entirely).&#xA;&#xA;Oh yes, I should have mentioned this pinning vector. The witnessScript I&#39;ve&#xA;in mind to make secure that type of chain of transactions would be one&#xA;MuSig key for all contract participants, where signature are committed with&#xA;SIGHASH_ANYPREVOUT | SIGHASH_IOMAP, one pubkey per participant to lockdown&#xA;the transaction with SIGHASH_ALL. I think it works and prevents malicious&#xA;in-flight attachment of input/output to a multi-party transaction ?&#xA;&#xA;&gt; I believe that it&#39;s better to broadcast a single fan-out transaction&#xA;creating your entire UTXO pool in advance. You could create one coin per&#xA;contract you are watching which value would be&#xA;&gt; used to bump your transaction feerate from the presigned one to -say- the&#xA;average feerate over the past month, and then have smaller coins that you&#xA;could attach to any transaction to bump&#xA;&gt; by a certain threshold (say, 10sat/vbyte). You would create as many small&#xA;coin as your reserve algorithm tells you (which could be &#34;i need to be&#xA;able, worst case, to close all my contracts&#xA;&gt; with the worst historical feerate.&#34; or (fractional reserve version) &#34;i&#xA;need to be able, worst case, to close 10% of my contracts at the average&#xA;feerate of the past year, the remaining ones sorry&#xA;&gt; for my loss&#34;). [1]&#xA;&#xA;&gt; This method is both much more optimal (though you need to sometimes incur&#xA;the cost of many small additional inputs) and also makes sure that your&#xA;feebump does not depend on the confirmation of a first stage transaction&#xA;(as you can only RBF with new inputs if they are confirmed).&#xA;&#xA;I see, so you spread your bumping UTXO pool in two ranges : at least one&#xA;bumping utxo per contract, and a subpool of emergency smaller coins, ready&#xA;to be attached on any contract. I think this strategy makes sense for&#xA;vaults as you can afford a bunch of small coins at different feerates,&#xA;spending the ones not used afterwards. And higher cells of feerate reserve&#xA;as the worst historical feerate are relatively not that much compared to&#xA;locked-in vaults value. That said, I&#39;m more dubious about LN, where node&#xA;operators might not keep the worst-case fee-bumping reserve, as the time&#xA;value of the coins aren&#39;t worth the channel liquidity at stake.&#xA;&#xA;&gt; Why not just attaching it at the tail of the chain? Bumping the last&#xA;child with additional input would effectively be a CPFP for the entire&#xA;chain in this case.&#xA;&#xA;Yes, input-based bumping targeting the tail of the chain works at the&#xA;transaction level. But if you assume bounded visibility of network&#xA;mempools, one of your counterparties might have broadcast a concurrent&#xA;state, thus making your CPFP irrelevant for propagation. Though smarter&#xA;tx-relay techniques such as &#34;attach-on-contract-utxo-root&#34; CPFP (or also&#xA;known as &#34;blinded CPFP&#34;) might solve this issue.&#xA;&#xA;Le jeu. 27 mai 2021 à 17:45, darosior &lt;darosior at protonmail.com&gt; a écrit :&#xA;&#xA;&gt; Hi,&#xA;&gt;&#xA;&gt; ## Input-Based&#xA;&gt;&#xA;&gt; I think input-based fee-bumping has been less studied as fee-bumping&#xA;&gt; primitive for L2s [1]. One variant of input-based fee-bumping usable today&#xA;&gt; is the leverage of the SIGHASH_ANYONECANPAY/SIGHASH_SINGLE malleability&#xA;&gt; flags. If the transaction is the latest stage of the contract, a bumping&#xA;&gt; input can be attached just-in-time, thus increasing the feerate of the&#xA;&gt; whole package.&#xA;&gt;&#xA;&gt;&#xA;&gt; Unfortunately, ACP | SINGLE is trivially pinable [0] (TL;DR: i can just&#xA;&gt; attach an output paying immediately to me, and construct a tx chain&#xA;&gt; spending it). We are using ACP | ALL for Revault,&#xA;&gt; which is the reason why we need a well laid-out pool of fee-bumping UTXOs&#xA;&gt; (as you need to consume them entirely).&#xA;&gt;&#xA;&gt; Input-based (today): If the bumping utxo is offering an adequate feerate&#xA;&gt; point in function of network mempools congestion at time of broadcast, only&#xA;&gt; 1 input. If a preliminary fan-out transaction to adjust feerate point must&#xA;&gt; be broadcasted first, 1 input and 2 outputs more must be accounted for.&#xA;&gt; Onchain footprint: 2 inputs + 3 outputs.&#xA;&gt;&#xA;&gt;&#xA;&gt; I believe that it&#39;s better to broadcast a single fan-out transaction&#xA;&gt; creating your entire UTXO pool in advance. You could create one coin per&#xA;&gt; contract you are watching which value would be&#xA;&gt; used to bump your transaction feerate from the presigned one to -say- the&#xA;&gt; average feerate over the past month, and then have smaller coins that you&#xA;&gt; could attach to any transaction to bump&#xA;&gt; by a certain threshold (say, 10sat/vbyte). You would create as many small&#xA;&gt; coin as your reserve algorithm tells you (which could be &#34;i need to be&#xA;&gt; able, worst case, to close all my contracts&#xA;&gt; with the worst historical feerate.&#34; or (fractional reserve version) &#34;i&#xA;&gt; need to be able, worst case, to close 10% of my contracts at the average&#xA;&gt; feerate of the past year, the remaining ones sorry&#xA;&gt; for my loss&#34;). [1]&#xA;&gt;&#xA;&gt; This method is both much more optimal (though you need to sometimes incur&#xA;&gt; the cost of many small additional inputs) and also makes sure that your&#xA;&gt; feebump does not depend on the confirmation&#xA;&gt; of a first stage transaction (as you can only RBF with new inputs if they&#xA;&gt; are confirmed).&#xA;&gt;&#xA;&gt; Input-based (today): In case of rebroadcast, the fee-bumping input is&#xA;&gt; attached to the root of the chain of transactions and as such breaks the&#xA;&gt; chain validity in itself. Beyond the rebroadcast of the updated root under&#xA;&gt; replacement policy, the remaining transactions must be updated and&#xA;&gt; rebroadcast. Rebroadcast footprint: the whole chain of transactions.&#xA;&gt;&#xA;&gt;&#xA;&gt; Why not just attaching it at the tail of the chain? Bumping the last child&#xA;&gt; with additional input would effectively be a CPFP for the entire chain in&#xA;&gt; this case.&#xA;&gt;&#xA;&gt;&#xA;&gt; Thanks for starting this discussion :)&#xA;&gt; Antoine&#xA;&gt;&#xA;&gt; [0]&#xA;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&#xA;&gt; [1] Credits to Jacob Swambo, who came up with the single fan-out&#xA;&gt; transaction and with whom i&#39;m discussing how to practically apply these&#xA;&gt; ideas to Revault.&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210528/00cce027/attachment.html&gt;</html></oembed>