<oembed><type>rich</type><version>1.0</version><author_name>npub1cnrnujx86le38yu2jrt3la0yhewsrh2p2lucakv6mu28x7lm0rsq9qyeq0</author_name><author_url>https://nostr.ae/npub1cnrnujx86le38yu2jrt3la0yhewsrh2p2lucakv6mu28x7lm0rsq9qyeq0</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2022-09-29&#xA;📝 Original message:Hi Bastien,&#xA;&#xA;&gt;The other change mentioned (making OP_TRUE standard and allowing outputs&#xA;that are below dust) can be added later, as those won&#39;t be standard until&#xA;we start allowing them, so there shouldn&#39;t be any backwards-compatibility&#xA;issue with postponing this change. But maybe it&#39;s still worth having from&#xA;the get-go, even though it may take a bit more time? Again, I&#39;m curious to&#xA;have other people&#39;s opinion here&#xA;&#xA;I&#39;m sensitive to not wanting to overload the current discussion but this&#xA;also interests me, provided it can be done in a way that is acceptable&#xA;(i.e. minimizing the potential UTXO set impact). It would solve a big cost&#xA;issue in my spacechains design if transactions could be 0 fees and have a 0&#xA;sat output that could be used in order to pay all the fees with CPFP.&#xA;&#xA;My current view is that a tx containing a single 0 sat OP_TRUE output&#xA;should only get relayed if it is a package where the OP_TRUE output is&#xA;currently being spent in a way that increases the overall fee rate. But&#xA;even then, one theoretical edge case remains:&#xA;- Another CPFP tx can feebump the package on a different (non-OP_TRUE)&#xA;output with an even higher fee rate&#xA;- Subsequently, the tx that is spending the OP_TRUE might fall out of the&#xA;mempool if the mempool fee rate rises&#xA;- This could cause the 0 sat output to enter the UTXO set (specifically,&#xA;rational miners wouldn&#39;t refuse to mine such a tx)&#xA;&#xA;It doesn&#39;t seem like this would happen much in practice (nor is there an&#xA;incentive to do it on purpose), but the chance isn&#39;t 0.&#xA;&#xA;Cheers,&#xA;Ruben&#xA;&#xA;&#xA;&#xA;On Thu, Sep 29, 2022 at 4:50 PM Greg Sanders via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; &gt; Right, good catch, this does require new logic to handle this case.&#xA;&gt; As Gloria points out, this should be doable, and is definitely worth&#xA;&gt; adding (those CSV 1 on every other output are really hacky, glad to&#xA;&gt; find a way to get rid of them).&#xA;&gt;&#xA;&gt; For the record, it turns out ephemeral anchors + v3 solves this already,&#xA;&gt; as the anchor must be spent, and the parent tx may only have one child.&#xA;&gt; Somehow I missed this implication for a few months. It&#39;s great news if we&#xA;&gt; can directly source fees from any output claimable, including HTLCs!&#xA;&gt;&#xA;&gt; On Thu, Sep 29, 2022 at 5:15 AM Bastien TEINTURIER &lt;bastien at acinq.fr&gt;&#xA;&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; Hi Gloria, Greg,&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; I interpret most of the discussion around limitations as ideas for&#xA;&gt;&gt; &gt; future improvements rather than criticisms of the proposal&#xA;&gt;&gt;&#xA;&gt;&gt; As far as I&#39;m concerned, definitely!&#xA;&gt;&gt;&#xA;&gt;&gt; My current understanding is that the main change/improvement that would&#xA;&gt;&gt; make sense here is restricting the whole v3 package&#39;s size (instead of&#xA;&gt;&gt; just the child) via committing to a specific value in the taproot annex&#xA;&gt;&gt; (also note that it&#39;s probably not just the v3 package&#39;s size, it should&#xA;&gt;&gt; be the whole unconfirmed package including potential v2 unconfirmed&#xA;&gt;&gt; ancestors).&#xA;&gt;&gt;&#xA;&gt;&gt; While I think this would be very valuable and would like to see this&#xA;&gt;&gt; happen, I believe that can be done in a second, separate step since this&#xA;&gt;&gt; would make relay policy stricter (some v3 transactions that previously&#xA;&gt;&gt; propagated wouldn&#39;t propagate under this new rule). As long as you are&#xA;&gt;&gt; able to find a path to miners through upgraded peers that use this annex&#xA;&gt;&gt; approach, you should be able to resolve ACP pinning issues?&#xA;&gt;&gt;&#xA;&gt;&gt; I&#39;m curious to know how other people feel about that: is it ok to do&#xA;&gt;&gt; later or should we try to implement this for the first release of v3&#xA;&gt;&gt; transactions?&#xA;&gt;&gt;&#xA;&gt;&gt; The other change mentioned (making OP_TRUE standard and allowing outputs&#xA;&gt;&gt; that are below dust) can be added later, as those won&#39;t be standard until&#xA;&gt;&gt; we start allowing them, so there shouldn&#39;t be any backwards-compatibility&#xA;&gt;&gt; issue with postponing this change. But maybe it&#39;s still worth having from&#xA;&gt;&gt; the get-go, even though it may take a bit more time? Again, I&#39;m curious to&#xA;&gt;&gt; have other people&#39;s opinion here, I&#39;d be happy to get all of those&#xA;&gt;&gt; directly&#xA;&gt;&gt; in the first release of v3 transactions, but I don&#39;t know how much&#xA;&gt;&gt; implementation will have to go into that.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; For clarification, package RBF is ParentTx*s*(plural), and&#xA;&gt;&gt; ChildTx(singular),&#xA;&gt;&gt; &gt; so it might be a bit more complicated than we&#39;re thinking&#xA;&gt;&gt;&#xA;&gt;&gt; Right, good catch, this does require new logic to handle this case.&#xA;&gt;&gt; As Gloria points out, this should be doable, and is definitely worth&#xA;&gt;&gt; adding (those CSV 1 on every other output are really hacky, glad to&#xA;&gt;&gt; find a way to get rid of them).&#xA;&gt;&gt;&#xA;&gt;&gt; Thanks,&#xA;&gt;&gt; Bastien&#xA;&gt;&gt;&#xA;&gt;&gt; Le lun. 26 sept. 2022 à 18:48, Gloria Zhao &lt;gloriajzhao at gmail.com&gt; a&#xA;&gt;&gt; écrit :&#xA;&gt;&gt;&#xA;&gt;&gt;&gt; Hi Greg, Antoine, Bastien,&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Thanks very much for the feedback! I interpret most of the discussion&#xA;&gt;&gt;&gt; around limitations as ideas for future improvements rather than criticisms&#xA;&gt;&gt;&gt; of the proposal (please correct me if I&#39;m wrong). I&#39;ll try to respond to as&#xA;&gt;&gt;&gt; much as possible.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Also I realize that I didn&#39;t contextualize this proposal clearly enough;&#xA;&gt;&gt;&gt; it is very tailored for LN Penalty and definitely doesn&#39;t close all pinning&#xA;&gt;&gt;&gt; attacks possible (sorry for confusing anyone). I also agree that some bits&#xA;&gt;&gt;&gt; can be a little ugly or tack-on; I would definitely prefer a comprehensive&#xA;&gt;&gt;&gt; RBF revamp to fix all our problems and enable other fee-bumping strategies&#xA;&gt;&gt;&gt; such as&#xA;&gt;&gt;&gt; sign-ANYONECANPAY-then-bring-your-own-fees-by-adding-inputs-at-broadcast. I&#xA;&gt;&gt;&gt; was hoping to get some ideas with the &#34;RBF Improvements&#34; post in January,&#xA;&gt;&gt;&gt; but it doesn&#39;t seem like we&#39;re much closer to a workable proposal. I think&#xA;&gt;&gt;&gt; this is a minimally-invasive step that works for Lightning today, a small&#xA;&gt;&gt;&gt; fix similar to CPFP carve out.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt; As you likely know from previous discussions the biggest scenario this&#xA;&gt;&gt;&gt; does not fix in my estimation is ANYONECANPAY situations. If the parent&#xA;&gt;&gt;&gt; transaction can be &#34;inflated&#34; by tacking on additional inputs, this means&#xA;&gt;&gt;&gt; the total weight of the parent tx lowers the effective feerate of the&#xA;&gt;&gt;&gt; package.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; (For more context to other readers I wrote an explanation for this in&#xA;&gt;&gt;&gt; &#34;SIGHASH_ANYONECANPAY Pinning&#34; section of RBF ML post).  Yes, this&#xA;&gt;&gt;&gt; unfortunately doesn&#39;t fix any of the existing pinning attacks for single&#xA;&gt;&gt;&gt; transaction RBF but also doesn&#39;t make them worse. This boils down to adding&#xA;&gt;&gt;&gt; an incentive compatibility rule that ensures you can&#39;t replace a&#xA;&gt;&gt;&gt; transaction with something that will confirm slower. Package RBF has an&#xA;&gt;&gt;&gt; ancestor feerate-based rule for this (note it is quite conservative and not&#xA;&gt;&gt;&gt; perfect).&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; So in the scenario above with the &#34;inflated&#34; parent that was signed ACP,&#xA;&gt;&gt;&gt; the replacement would be rejected because the package ancestor feerate is&#xA;&gt;&gt;&gt; lower than the feerate of what is being replaced. But it is imperfect&#xA;&gt;&gt;&gt; (explained below) and thus I wouldn&#39;t recommend it for single transaction&#xA;&gt;&gt;&gt; replacement. So that attack still exists for single transactions, yes.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; The strategy of using ACP to bring-your-own-fees has its own challenges&#xA;&gt;&gt;&gt; but hopefully has no current use cases as you say. AFAIK LN Penalty is not&#xA;&gt;&gt;&gt; affected by this since it doesn&#39;t use ACP, though obviously I agree we&#xA;&gt;&gt;&gt; should fix it for the future.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; So when I said &#34;this is intended for fee-bumping presigned txns in&#xA;&gt;&gt;&gt; contracting protocols,&#34; I should have said &#34;this is intended for&#xA;&gt;&gt;&gt; fee-bumping presigned txns specifically using CPFP and anchor outputs.&#34;&#xA;&gt;&gt;&gt; Apologies for forgetting to contextualize, I&#39;ve been sitting on this for&#xA;&gt;&gt;&gt; too long.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt; The other scenario it doesn&#39;t really fix is where HTLC/commitment-like&#xA;&gt;&gt;&gt; transactions are being resolved in a batch, but due to relative time&#xA;&gt;&gt;&gt; constraints, you may want to accelerate some and not others. Now you must&#xA;&gt;&gt;&gt; pay higher rates to replace all of the transaction bumps. This is a&#xA;&gt;&gt;&gt; &#34;self-pin&#34; and &#34;get good at utxos noob&#34; type problem, but it&#39;s something&#xA;&gt;&gt;&gt; that axing rule#3 in favor of a Replace-by-ancestor-feerate system would&#xA;&gt;&gt;&gt; get us.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; I understand you to mean &#34;if you don&#39;t have enough UTXOs and you&#39;re&#xA;&gt;&gt;&gt; forced to batch-bump, you over-pay because you need to bring them all to&#xA;&gt;&gt;&gt; the highest target feerate.&#34; Isn&#39;t this kind of separate, wallet-related&#xA;&gt;&gt;&gt; problem? Contracting or not, surely every wallet needs to have enough UTXOs&#xA;&gt;&gt;&gt; to not batch transactions that shouldn&#39;t be batched... I don&#39;t see how a&#xA;&gt;&gt;&gt; replace-by-ancestor-feerate policy would make any difference for this?&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Also in general I&#39;d like to reiterate that ancestor feerate is not a&#xA;&gt;&gt;&gt; panacea to all our RBF incentive compatibility concerns. Like individual&#xA;&gt;&gt;&gt; feerate, unless we run the mining algorithm, it cannot tell us exactly how&#xA;&gt;&gt;&gt; quickly this transaction would be mined.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; We&#39;re estimating the incentive compatibility of the original&#xA;&gt;&gt;&gt; transaction(s) and replacement transaction(s), with the goal of not letting&#xA;&gt;&gt;&gt; a transaction replace something that would have been more incentive&#xA;&gt;&gt;&gt; compatible to mine. As such, we don&#39;t want to overestimate how good the&#xA;&gt;&gt;&gt; replacement is, and we don&#39;t want to underestimate how good the original&#xA;&gt;&gt;&gt; transactions are. This rule &#34;The minimum between package feerate and&#xA;&gt;&gt;&gt; ancestor feerate of the child is not lower than the individual feerates of&#xA;&gt;&gt;&gt; all directly conflicting transactions and the ancestor feerates of all&#xA;&gt;&gt;&gt; original transactions&#34; is a conservative estimate.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt; Would kind of be nice if package RBF would detect a &#34;sibling output&#xA;&gt;&gt;&gt; spend&#34; conflict, and knock it out of the mempool via the other replacement&#xA;&gt;&gt;&gt; rules? Getting rid of the requirement to 1 block csv lock every output&#xA;&gt;&gt;&gt; would be quite nice from a smart contracting composability point of view.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Interesting, so when a transaction hits a mempool tx&#39;s descendant limit,&#xA;&gt;&gt;&gt; we consider evicting one of its descendants in favor of this transaction,&#xA;&gt;&gt;&gt; based on the RBF rules.&#xA;&gt;&gt;&gt; Cool idea! After chewing on this for a bit, I think this *also* just&#xA;&gt;&gt;&gt; boils down to the fact that RBF should require replacements to be better&#xA;&gt;&gt;&gt; mining candidates. As in, if we added this policy and it can make us evict&#xA;&gt;&gt;&gt; the sibling and accept a transaction with a bunch of low-feerate ancestor&#xA;&gt;&gt;&gt; junk, it would be a new pinning vector.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt; If you&#39;re a miner and you receive a non-V3, second descendant of an&#xA;&gt;&gt;&gt; unconfirmed V3 transaction, if the offered fee is in the top mempool&#xA;&gt;&gt;&gt; backlog, I think you would have an interest to accept such a transaction.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt; So I&#39;m not sure if those two rules are compatible with miners&#xA;&gt;&gt;&gt; incentives...&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; The same argument can be made for the 26th descendant of a mempool&#xA;&gt;&gt;&gt; transaction; it&#39;s also not entirely incentive-compatible to reject it, but&#xA;&gt;&gt;&gt; that is not the *only* design goal in mempool policy. Of course, the&#xA;&gt;&gt;&gt; difference here is that the 25-descendant limit rule is a sensible DoS&#xA;&gt;&gt;&gt; protection, while this 1-descendant limit rule is more of a &#34;help the&#xA;&gt;&gt;&gt; Bitcoin ecosystem&#34; policy, just like CPFP carve-out, dust limit, etc. I can&#xA;&gt;&gt;&gt; of course understand why not everyone would be in favor of this, but I do&#xA;&gt;&gt;&gt; think it&#39;s worth it.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt; &gt; 4. A V3 transaction that has an unconfirmed V3 ancestor cannot be&#xA;&gt;&gt;&gt; &gt; &gt;    larger than 1000 virtual bytes.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt; If I understand correctly the 1000 vb upper bound rational, it would&#xA;&gt;&gt;&gt; be to constraint the pinning counterparty to attach a high fee to a child&#xA;&gt;&gt;&gt; due to the limited size, if they would like this transaction to be stuck in&#xA;&gt;&gt;&gt; the network mempools. By doing so  this child has high odds to confirm.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Yeah exactly, the &#34;Rule 3 pin&#34; is done by adding a child that&#39;s high-fee&#xA;&gt;&gt;&gt; (so you have to pay that much to evict it). Because they *don&#39;t* want this&#xA;&gt;&gt;&gt; tx to confirm, normally, this child would be really large. If they only&#xA;&gt;&gt;&gt; have 1000vB for the child, they can&#39;t increase the replacement cost without&#xA;&gt;&gt;&gt; also fee-bumping the transaction to make it confirm faster.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt; As of today, I think yes you can already fingerprint LN transactions&#xA;&gt;&gt;&gt; on the  spec-defined amount value of the anchor outputs, 330 sats. There is&#xA;&gt;&gt;&gt; always one of them on post-anchor commitment transactions. And sadly I&#xA;&gt;&gt;&gt; would say we&#39;ll always have tricky fingerprints leaking from unilateral LN&#xA;&gt;&gt;&gt; closures such as HTLC/PTLC timelocks...&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; &gt; I agree with you, this isn&#39;t worse than today, unilateral closes will&#xA;&gt;&gt;&gt; probably always be identifiable on-chain.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Great to hear that there is no privacy worsening!&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Best,&#xA;&gt;&gt;&gt; Gloria&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; On Mon, Sep 26, 2022 at 5:02 PM Greg Sanders &lt;gsanders87 at gmail.com&gt;&#xA;&gt;&gt;&gt; wrote:&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt; Bastien,&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt; &gt; This may be already covered by the current package RBF logic, in that&#xA;&gt;&gt;&gt;&gt; scenario we are simply replacing [ParentTx, ChildTx1] with&#xA;&gt;&gt;&gt;&gt; [ParentTx, ChildTx2] that pays more fees, right?&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt; For clarification, package RBF is ParentTx*s*(plural), and&#xA;&gt;&gt;&gt;&gt; ChildTx(singular), so it might be a bit more complicated than we&#39;re&#xA;&gt;&gt;&gt;&gt; thinking, and currently the V3 proposal would first de-duplicate the&#xA;&gt;&gt;&gt;&gt; ParentTx based on what is in the mempool, then look at the &#34;rest&#34; of the&#xA;&gt;&gt;&gt;&gt; transactions as a package, then individually. Not the same, not sure how&#xA;&gt;&gt;&gt;&gt; different. I&#39;ll defer to experts.&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt; Best,&#xA;&gt;&gt;&gt;&gt; Greg&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt; On Mon, Sep 26, 2022 at 11:48 AM Bastien TEINTURIER via bitcoin-dev &lt;&#xA;&gt;&gt;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; Thanks Gloria for this great post.&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; This is very valuable work for L2 contracts, and will greatly improve&#xA;&gt;&gt;&gt;&gt;&gt; their security model.&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; &gt; &#34;Only 1 anchor output? What if I need to bump counterparty&#39;s&#xA;&gt;&gt;&gt;&gt;&gt; commitment tx in mempool?&#34;&#xA;&gt;&gt;&gt;&gt;&gt; &gt; You won&#39;t need to fee-bump a counterparty&#39;s commitment tx using CPFP.&#xA;&gt;&gt;&gt;&gt;&gt; &gt; You would just package RBF it by attaching a high-feerate child to&#xA;&gt;&gt;&gt;&gt;&gt; &gt; your commitment tx.&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; Note that we can also very easily make that single anchor spendable by&#xA;&gt;&gt;&gt;&gt;&gt; both participants (or even anyone), so if you see your counterparty&#39;s&#xA;&gt;&gt;&gt;&gt;&gt; commitment in your mempool, you can bump it without publishing your&#xA;&gt;&gt;&gt;&gt;&gt; own commitment, which is quite desirable (your own commitment tx has&#xA;&gt;&gt;&gt;&gt;&gt; CSV delays on your outputs, whereas your counterparty&#39;s commitment tx&#xA;&gt;&gt;&gt;&gt;&gt; doesn&#39;t).&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; &gt; &#34;Is this a privacy issue, i.e. doesn&#39;t it allow fingerprinting LN&#xA;&gt;&gt;&gt;&gt;&gt; transactions based on nVersion?&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; I agree with you, this isn&#39;t worse than today, unilateral closes will&#xA;&gt;&gt;&gt;&gt;&gt; probably always be identifiable on-chain.&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; &gt; Would kind of be nice if package RBF would detect a &#34;sibling output&#xA;&gt;&gt;&gt;&gt;&gt; spend&#34;&#xA;&gt;&gt;&gt;&gt;&gt; &gt; conflict, and knock it out of the mempool via the other replacement&#xA;&gt;&gt;&gt;&gt;&gt; rules?&#xA;&gt;&gt;&gt;&gt;&gt; &gt; Getting rid of the requirement to 1 block csv lock every output&#xA;&gt;&gt;&gt;&gt;&gt; would be&#xA;&gt;&gt;&gt;&gt;&gt; &gt; quite nice from a smart contracting composability point of view.&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; +1, that would be very neat!&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; This may be already covered by the current package RBF logic, in that&#xA;&gt;&gt;&gt;&gt;&gt; scenario we are simply replacing [ParentTx, ChildTx1] with&#xA;&gt;&gt;&gt;&gt;&gt; [ParentTx, ChildTx2] that pays more fees, right?&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; &gt; 1) I do think that we should seriously consider allowing OP_TRUE to&#xA;&gt;&gt;&gt;&gt;&gt; become&#xA;&gt;&gt;&gt;&gt;&gt; &gt; a standard script type as part of this policy update. If pinning is&#xA;&gt;&gt;&gt;&gt;&gt; solved,&#xA;&gt;&gt;&gt;&gt;&gt; &gt; then there&#39;s no reason to require all those extra bytes for&#xA;&gt;&gt;&gt;&gt;&gt; &#34;binding&#34; an&#xA;&gt;&gt;&gt;&gt;&gt; &gt; anchor to a specific wallet/user. We can save quite a few bytes by&#xA;&gt;&gt;&gt;&gt;&gt; having&#xA;&gt;&gt;&gt;&gt;&gt; &gt; the input be empty of witness data.&#xA;&gt;&gt;&gt;&gt;&gt; &gt; 2) If we allow for a single dust-value(0 on up) output which is&#xA;&gt;&gt;&gt;&gt;&gt; immediately&#xA;&gt;&gt;&gt;&gt;&gt; &gt; spent by the package, anchors become even easier to to design. No&#xA;&gt;&gt;&gt;&gt;&gt; value has&#xA;&gt;&gt;&gt;&gt;&gt; &gt; to be &#34;sapped&#34; from contract participants to make an anchor output.&#xA;&gt;&gt;&gt;&gt;&gt; There&#39;s&#xA;&gt;&gt;&gt;&gt;&gt; &gt; more complications for this, such as making sure the parent&#xA;&gt;&gt;&gt;&gt;&gt; transaction is&#xA;&gt;&gt;&gt;&gt;&gt; &gt; dropped if the child spend is dropped, but maybe it&#39;s worth the&#xA;&gt;&gt;&gt;&gt;&gt; squeeze.&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; I also think both of these could be quite useful. This would probably&#xA;&gt;&gt;&gt;&gt;&gt; always&#xA;&gt;&gt;&gt;&gt;&gt; be used in combination with a parent transaction that pays 0 fees, so&#xA;&gt;&gt;&gt;&gt;&gt; the&#xA;&gt;&gt;&gt;&gt;&gt; 0-value output would always be spent in the same block.&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; But this means we could end up with 0-value outputs in the utxo set,&#xA;&gt;&gt;&gt;&gt;&gt; if for&#xA;&gt;&gt;&gt;&gt;&gt; some reason the parent tx is CPFP-ed via another output than the&#xA;&gt;&gt;&gt;&gt;&gt; 0-value one,&#xA;&gt;&gt;&gt;&gt;&gt; which would be a utxo set bloat issue. But I&#39;d argue that we&#39;re&#xA;&gt;&gt;&gt;&gt;&gt; probably&#xA;&gt;&gt;&gt;&gt;&gt; already creating utxo set bloat with the 330 sat anchor outputs&#xA;&gt;&gt;&gt;&gt;&gt; (especially&#xA;&gt;&gt;&gt;&gt;&gt; since we use two of them, but only one is usually spent), so it would&#xA;&gt;&gt;&gt;&gt;&gt; probably be *better* than what we&#39;re doing today.&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; Thanks,&#xA;&gt;&gt;&gt;&gt;&gt; Bastien&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; Le lun. 26 sept. 2022 à 03:22, Antoine Riard via bitcoin-dev &lt;&#xA;&gt;&gt;&gt;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&gt; a écrit :&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; Hi Gloria,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; Thanks for the progress on package RBF, few early questions.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; 2. Any descendant of an unconfirmed V3 transaction must also be V3.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; 3. An unconfirmed V3 transaction cannot have more than 1 descendant.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; If you&#39;re a miner and you receive a non-V3, second descendant of an&#xA;&gt;&gt;&gt;&gt;&gt;&gt; unconfirmed V3 transaction, if the offered fee is in the top mempool&#xA;&gt;&gt;&gt;&gt;&gt;&gt; backlog, I think you would have an interest to accept such a transaction.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; So I&#39;m not sure if those two rules are compatible with miners&#xA;&gt;&gt;&gt;&gt;&gt;&gt; incentives...&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; 4. A V3 transaction that has an unconfirmed V3 ancestor cannot be&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt;    larger than 1000 virtual bytes.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; If I understand correctly the 1000 vb upper bound rational, it would&#xA;&gt;&gt;&gt;&gt;&gt;&gt; be to constraint the pinning counterparty to attach a high fee to a child&#xA;&gt;&gt;&gt;&gt;&gt;&gt; due to the limited size, if they would like this transaction to be stuck in&#xA;&gt;&gt;&gt;&gt;&gt;&gt; the network mempools. By doing so  this child has high odds to confirm.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; I still wonder if this compatible with miner incentives in period of&#xA;&gt;&gt;&gt;&gt;&gt;&gt; empty mempools, in the sense that if you&#39;ve already a V3 transaction of&#xA;&gt;&gt;&gt;&gt;&gt;&gt; size 100Kvb offering 2 sat/vb, it&#39;s more interesting than a V3 replacement&#xA;&gt;&gt;&gt;&gt;&gt;&gt; candidate of size 1000 vb offering 10 sat/vb. It could be argued the former&#xA;&gt;&gt;&gt;&gt;&gt;&gt; should be conserved.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; (That said, the hard thing with any replacement strategy we might&#xA;&gt;&gt;&gt;&gt;&gt;&gt; evict a parent transaction *now* to which is attached a high-feerate child&#xA;&gt;&gt;&gt;&gt;&gt;&gt; *latter* making for a utxo considered the best ancestor set. Maybe in the&#xA;&gt;&gt;&gt;&gt;&gt;&gt; long-term miners should keep every transaction ever accepted...)&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; (Lower bound) the smaller this limit, the fewer UTXOs a child may&#xA;&gt;&gt;&gt;&gt;&gt;&gt; use&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; to fund this fee-bump. For example, only allowing the V3 child to&#xA;&gt;&gt;&gt;&gt;&gt;&gt; have&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; 2 inputs would require L2 protocols to manage a wallet with&#xA;&gt;&gt;&gt;&gt;&gt;&gt; high-value&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; UTXOs and make batched fee-bumping impossible. However, as the&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; fee-bumping child only needs to fund fees (as opposed to payments),&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; just a few UTXOs should suffice.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; Reminder for L2 devs, batched fee-bumping of time-sensitive&#xA;&gt;&gt;&gt;&gt;&gt;&gt; confirmations of commitment transactions is unsafe, as the counterparty&#xA;&gt;&gt;&gt;&gt;&gt;&gt; could enter in a &#34;cat-and-mouse&#34; game to replace one of the batch element&#xA;&gt;&gt;&gt;&gt;&gt;&gt; at each block to delay confirmation of the remaining elements in the batch,&#xA;&gt;&gt;&gt;&gt;&gt;&gt; I think.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; On the other hand, I wonder if we wouldn&#39;t want a higher bound. LN&#xA;&gt;&gt;&gt;&gt;&gt;&gt; wallets are likely to have one big UTXO in their fee-bumping reserve pool,&#xA;&gt;&gt;&gt;&gt;&gt;&gt; as the cost of acquiring UTXO is non-null and in the optimistic case, you&#xA;&gt;&gt;&gt;&gt;&gt;&gt; don&#39;t need to do unilateral closure. Let&#39;s say you close dozens of channels&#xA;&gt;&gt;&gt;&gt;&gt;&gt; at the same time, a UTXO pool management strategy might be to fan-out the&#xA;&gt;&gt;&gt;&gt;&gt;&gt; first spends UTXOs in N fan-out outputs ready to feed the remaining&#xA;&gt;&gt;&gt;&gt;&gt;&gt; in-flight channels.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; 1. The rule around unconfirmed inputs was&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; originally &#34;A package may include new unconfirmed inputs, but the&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; ancestor feerate of the child must be at least as high as the&#xA;&gt;&gt;&gt;&gt;&gt;&gt; ancestor&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; feerates of every transaction being replaced.&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; Note, I think we would like this new RBF rule to also apply to single&#xA;&gt;&gt;&gt;&gt;&gt;&gt; transaction package, e.g second-stage HTLC transactions, where a&#xA;&gt;&gt;&gt;&gt;&gt;&gt; counterparty pins a HTLC-preimage by abusing rule 3. In that case, the&#xA;&gt;&gt;&gt;&gt;&gt;&gt; honest LN node should be able to broadcast a &#34;at least as high ancestor&#xA;&gt;&gt;&gt;&gt;&gt;&gt; feerate&#34; HTLC-timeout transaction. With `option_anchor_outputs&#34; there is no&#xA;&gt;&gt;&gt;&gt;&gt;&gt; unconfirmed ancestor to replace, as the commitment transaction, whatever&#xA;&gt;&gt;&gt;&gt;&gt;&gt; the party it is originating from, should already be confirmed.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; &#34;Is this a privacy issue, i.e. doesn&#39;t it allow fingerprinting LN&#xA;&gt;&gt;&gt;&gt;&gt;&gt; transactions based on nVersion?&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; As of today, I think yes you can already fingerprint LN transactions&#xA;&gt;&gt;&gt;&gt;&gt;&gt; on the  spec-defined amount value of the anchor outputs, 330 sats. There is&#xA;&gt;&gt;&gt;&gt;&gt;&gt; always one of them on post-anchor commitment transactions. And sadly I&#xA;&gt;&gt;&gt;&gt;&gt;&gt; would say we&#39;ll always have tricky fingerprints leaking from unilateral LN&#xA;&gt;&gt;&gt;&gt;&gt;&gt; closures such as HTLC/PTLC timelocks...&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &gt; &#34;Can a V2 transaction replace a V3 transaction and vice versa?&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; IIUC, a V3 package could replace a V2 package, with the benefit of&#xA;&gt;&gt;&gt;&gt;&gt;&gt; the new package RBF rules applied. I think this would be a significant&#xA;&gt;&gt;&gt;&gt;&gt;&gt; advantage for LN, as for the current ~85k of opened channels, the old V2&#xA;&gt;&gt;&gt;&gt;&gt;&gt; states shouldn&#39;t be pinning vectors. Currently, commitment transactions&#xA;&gt;&gt;&gt;&gt;&gt;&gt; signal replaceability.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; Le ven. 23 sept. 2022 à 11:26, Gloria Zhao via bitcoin-dev &lt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&gt; a écrit :&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi everyone,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I&#39;m writing to propose a very simple set of mempool/transaction relay&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; policies intended to aid L2/contract protocols. I realized that&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the previously proposed Package Mempool Accept package RBF [1]&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; had a few remaining problems after digging into the RBF logic more&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; [2].&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; This additional set of policies solves them without requiring a huge&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; RBF overhaul.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I&#39;ve written an implementation (and docs) for Bitcoin Core:&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; https://github.com/bitcoin/bitcoin/pull/25038&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; (You may notice that this proposal incorporates feedback on the PR -&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; thanks Suhas Daftuar, Gregory Sanders, Bastien Teinturier, Anthony Towns,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; and others.)&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If you are interested in using package RBF/relay to bump presigned&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transactions, I think you may be interested in reviewing this&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; proposal.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; This should solve Rule 3 pinning and perhaps allow us&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; to get rid of CPFP carve-out (yay!). I&#39;m keen to hear if people find&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the 1-anchor-output, 1000vB child limit too restrictive. Also, if&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; you find a&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; pinning attack or something that makes it unusable for you, I would&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; really really like to know.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Note that transactions with nVersion=3 (&#34;V3 transactions&#34;) are&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; currently non-standard in Bitcoin Core. That means **anything that&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; was&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; standard before this policy change would still be standard&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; afterwards.** If you don&#39;t want your transactions to be subject to&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; these rules, just continue whatever you&#39;re doing and don&#39;t use&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; nVersion=3. AFAICT this shouldn&#39;t break anything, but let me know if&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; this would be disruptive for you?&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; **New Policies:**&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; This includes:&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; - a set of additional policy rules applying to V3 transactions&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; - modifications to package RBF rules&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; **V3 transactions:**&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Existing standardness rules apply to V3 (e.g. min/max tx weight,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; standard output types, cleanstack, etc.). The following additional&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; rules apply to V3:&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 1. A V3 transaction can be replaced, even if it does not signal&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; BIP125&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;    replaceability. (It must also meet the other RBF rules around&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fees,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; etc. for replacement to happen).&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 2. Any descendant of an unconfirmed V3 transaction must also be V3.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *Rationale*: Combined with Rule 1, this gives us the property of&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &#34;inherited&#34; replaceability signaling when descendants of unconfirmed&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transactions are created. Additionally, checking whether a&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transaction&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; signals replaceability this way does not require mempool traversal,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; and does not change based on what transactions are mined. It also&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; makes subsequent rules about descendant limits much easier to check.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *Note*: The descendant of a *confirmed* V3 transaction does not need&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; to be V3.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 3. An unconfirmed V3 transaction cannot have more than 1 descendant.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *Rationale*: (Upper bound) the larger the descendant limit, the more&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transactions may need to be replaced. This is a problematic pinning&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; attack, i.e., a malicious counterparty prevents the transaction from&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; being replaced by adding many descendant transactions that aren&#39;t&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fee-bumping.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; (Lower bound) at least 1 descendant is required to allow CPFP of the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; presigned transaction. The contract protocol can create presigned&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transactions paying 0 fees and 1 output for attaching a CPFP at&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; broadcast time (&#34;anchor output&#34;). Without package RBF, multiple&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; anchor&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; outputs would be required to allow each counterparty to fee-bump any&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; presigned transaction. With package RBF, since the presigned&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transactions can replace each other, 1 anchor output is sufficient.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 4. A V3 transaction that has an unconfirmed V3 ancestor cannot be&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;    larger than 1000 virtual bytes.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *Rationale*: (Upper bound) the larger the descendant size limit, the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; more vbytes may need to be replaced. With default limits, if the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; child&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; is e.g. 100,000vB, that might be an additional 100,000sats (at&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 1sat/vbyte) or more, depending on the feerate.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; (Lower bound) the smaller this limit, the fewer UTXOs a child may use&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; to fund this fee-bump. For example, only allowing the V3 child to&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; have&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 2 inputs would require L2 protocols to manage a wallet with&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; high-value&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; UTXOs and make batched fee-bumping impossible. However, as the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fee-bumping child only needs to fund fees (as opposed to payments),&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; just a few UTXOs should suffice.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; With a limit of 1000 virtual bytes, depending on the output types,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; child can have 6-15 UTXOs, which should be enough to fund a fee-bump&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; without requiring a carefully-managed UTXO pool. With 1000 virtual&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; bytes as the descendant limit, the cost to replace a V3 transaction&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; has much lower variance.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *Rationale*: This makes the rule very easily &#34;tacked on&#34; to existing&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; logic for policy and wallets. A transaction may be up to 100KvB on&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; its&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; own (`MAX_STANDARD_TX_WEIGHT`) and 101KvB with descendants&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; (`DEFAULT_DESCENDANT_SIZE_LIMIT_KVB`). If an existing V3 transaction&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; in the mempool is 100KvB, its descendant can only be 1000vB, even if&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the policy is 10KvB.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; **Package RBF modifications:**&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 1. The rule around unconfirmed inputs was&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; originally &#34;A package may include new unconfirmed inputs, but the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ancestor feerate of the child must be at least as high as the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ancestor&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; feerates of every transaction being replaced.&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; The package may still include new unconfirmed inputs. However,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the new rule is modified to be &#34;The minimum between package feerate&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; and ancestor feerate of the child is not lower than the individual&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; feerates of all directly conflicting transactions and the ancestor&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; feerates of all original transactions.&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *Rationale*: We are attempting to ensure that the replacement&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transactions are not less incentive-compatible to mine. However, a&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; package/transaction&#39;s ancestor feerate is not perfectly&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; representative&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; of its incentive compatibility; it may overestimate (some subset of&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the ancestors could be included by itself if it has other&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; high-feerate&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; descendants or are themselves higher feerate than this&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; package/transaction). Instead, we use the minimum between the package&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; feerate and ancestor feerate of the child as a more conservative&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; value&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; than what was proposed originally.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 2. A new rule is added, requiring that all package transactions with&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; mempool conflicts to be V3. This also means the &#34;sponsoring&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; child transaction must be V3.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *Note*: Combined with the V3 rules, this means the package must be&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; a child-with-parents package. Since package validation is only&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; attempted if the transactions do not pay sufficient fees to be&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; accepted on their own, this effectively means that only V3&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transactions can pay to replace their ancestors&#39; conflicts, and only&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; V3 transactions&#39; replacements may be paid for by a descendant.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; *Rationale*: The fee-related rules are economically rational for&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ancestor packages, but not necessarily other types of packages.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; A child-with-parents package is a type of ancestor package. It&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; may be fine to allow any ancestor package, but it&#39;s more difficult&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; to account for all of the possibilities. For example, it gets much&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; harder to see that we&#39;re applying the descendant limits correctly if&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the package has a gnarly, many-generation, non-tree shape. I&#39;m also&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; not sure if this policy is 100% incentive-compatible if the sponsor&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; is not a direct descendant of the sponsee.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Please see doc/policy/version3_transactions.md and&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; doc/policy/packages.md in the PR for the full set of rules.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; **Intended usage for LN:**&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Commitment transactions should be V3 and have 1 anchor output. They&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; can be signed with 0 fees (or 1sat/vbyte) once package relay is&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; deployed&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; on a significant portion of the network. If the commitment tx must&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; be broadcast, determine the desired feerate at broadcast time and&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; spend the anchor output in a high feerate transaction. I&#39;m going to&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; call the broadcasted commitment tx &#34;the parent&#34; and the attached&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fee-bumping tx &#34;the child.&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; - This child must be V3.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; - This child must be at most 1000vB. Note this restricts the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;   number of inputs you can use to fund the fee bump. Depending&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; on the output types, this is around 6-15.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; - One child may fund fees for multiple commitment tx (&#34;batched&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;   fee-bumping&#34;).&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; - To do a second fee-bump to add more fees, replace the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;   *child* with a higher-feerate tx. Do not try to attach a&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; grandchild.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Otherwise, never try to spend from an unconfirmed V3 transaction. The&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; descendant limits for V3 transactions are very restrictive.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; **Expected Questions:**&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &#34;Does this fix Rule 3 Pinning?&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Yes. The V3 descendant limit restricts both you and your&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; counterparty.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Assuming nodes adopted this policy, you may reasonably assume that&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; you&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; only need to replace the commitment transaction + up to 1000vB.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &#34;Only 1 anchor output? What if I need to bump counterparty&#39;s&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; commitment tx in mempool?&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; You won&#39;t need to fee-bump a counterparty&#39;s commitment tx using CPFP.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; You would just package RBF it by attaching a high-feerate child to&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; your commitment tx.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &#34;Is this a privacy issue, i.e. doesn&#39;t it allow fingerprinting LN&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transactions based on nVersion?&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Indeed it may be unrealistic to assume V3 transactions will be in&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; widespread use outside of L2. IIUC, unilateral closes are already&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; obvious LN transactions because of the HTLC inputs. For e.g.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; cooperative closes and opens, I think it makes sense to continue&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; using&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; V2. So, unless I&#39;m missing something, this shouldn&#39;t make it worse.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &#34;So a V3 transaction that doesn&#39;t signal BIP125 replaceability is&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; replaceable? Is that a backward compatibility issue?&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Yes it&#39;s replaceable. It&#39;s not an issue AFAICT because,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; under previous policy, the V3 transaction wouldn&#39;t have been&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; in the mempool in the first place.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &#34;Can a V2 transaction replace a V3 transaction and vice versa?&#34;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Yes, otherwise someone can use V3 transactions to censor V2&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; transactions spending shared inputs. Note if the&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; original V3 transaction has an unconfirmed V3 parent, this would&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; violate the &#34;inherited V3&#34; rule and would be rejected.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Thanks for reading! Feedback and review would be much appreciated.&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; [1]:&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-September/019464.html&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; [2]:&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019817.html&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Best,&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Gloria&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; bitcoin-dev mailing list&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________&#xA;&gt;&gt;&gt;&gt;&gt;&gt; bitcoin-dev mailing list&#xA;&gt;&gt;&gt;&gt;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt;&gt;&gt;&gt;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&gt; _______________________________________________&#xA;&gt;&gt;&gt;&gt;&gt; bitcoin-dev mailing list&#xA;&gt;&gt;&gt;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt;&gt;&gt;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&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;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220930/a5096f54/attachment-0001.html&gt;</html></oembed>