{"type":"rich","version":"1.0","author_name":"npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd","author_url":"https://nostr.ae/npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2022-09-25\n📝 Original message:Hi Gloria,\n\nThanks for the progress on package RBF, few early questions.\n\n\u003e 2. Any descendant of an unconfirmed V3 transaction must also be V3.\n\n\u003e 3. An unconfirmed V3 transaction cannot have more than 1 descendant.\n\nIf you're a miner and you receive a non-V3, second descendant of an\nunconfirmed V3 transaction, if the offered fee is in the top mempool\nbacklog, I think you would have an interest to accept such a transaction.\n\nSo I'm not sure if those two rules are compatible with miners incentives...\n\n\u003e 4. A V3 transaction that has an unconfirmed V3 ancestor cannot be\n\u003e    larger than 1000 virtual bytes.\n\nIf I understand correctly the 1000 vb upper bound rational, it would be to\nconstraint the pinning counterparty to attach a high fee to a child due to\nthe limited size, if they would like this transaction to be stuck in the\nnetwork mempools. By doing so  this child has high odds to confirm.\n\nI still wonder if this compatible with miner incentives in period of empty\nmempools, in the sense that if you've already a V3 transaction of size\n100Kvb offering 2 sat/vb, it's more interesting than a V3 replacement\ncandidate of size 1000 vb offering 10 sat/vb. It could be argued the former\nshould be conserved.\n\n(That said, the hard thing with any replacement strategy we might evict a\nparent transaction *now* to which is attached a high-feerate child *latter*\nmaking for a utxo considered the best ancestor set. Maybe in the long-term\nminers should keep every transaction ever accepted...)\n\n\u003e (Lower bound) the smaller this limit, the fewer UTXOs a child may use\n\u003e to fund this fee-bump. For example, only allowing the V3 child to have\n\u003e 2 inputs would require L2 protocols to manage a wallet with high-value\n\u003e UTXOs and make batched fee-bumping impossible. However, as the\n\u003e fee-bumping child only needs to fund fees (as opposed to payments),\n\u003e just a few UTXOs should suffice.\n\nReminder for L2 devs, batched fee-bumping of time-sensitive confirmations\nof commitment transactions is unsafe, as the counterparty could enter in a\n\"cat-and-mouse\" game to replace one of the batch element at each block to\ndelay confirmation of the remaining elements in the batch, I think.\n\nOn the other hand, I wonder if we wouldn't want a higher bound. LN wallets\nare likely to have one big UTXO in their fee-bumping reserve pool, as the\ncost of acquiring UTXO is non-null and in the optimistic case, you don't\nneed to do unilateral closure. Let's say you close dozens of channels at\nthe same time, a UTXO pool management strategy might be to fan-out the\nfirst spends UTXOs in N fan-out outputs ready to feed the remaining\nin-flight channels.\n\n\u003e 1. The rule around unconfirmed inputs was\n\u003e originally \"A package may include new unconfirmed inputs, but the\n\u003e ancestor feerate of the child must be at least as high as the ancestor\n\u003e feerates of every transaction being replaced.\"\n\nNote, I think we would like this new RBF rule to also apply to single\ntransaction package, e.g second-stage HTLC transactions, where a\ncounterparty pins a HTLC-preimage by abusing rule 3. In that case, the\nhonest LN node should be able to broadcast a \"at least as high ancestor\nfeerate\" HTLC-timeout transaction. With `option_anchor_outputs\" there is no\nunconfirmed ancestor to replace, as the commitment transaction, whatever\nthe party it is originating from, should already be confirmed.\n\n\u003e \"Is this a privacy issue, i.e. doesn't it allow fingerprinting LN\ntransactions based on nVersion?\"\n\nAs of today, I think yes you can already fingerprint LN transactions on\nthe  spec-defined amount value of the anchor outputs, 330 sats. There is\nalways one of them on post-anchor commitment transactions. And sadly I\nwould say we'll always have tricky fingerprints leaking from unilateral LN\nclosures such as HTLC/PTLC timelocks...\n\n\u003e \"Can a V2 transaction replace a V3 transaction and vice versa?\"\n\nIIUC, a V3 package could replace a V2 package, with the benefit of the new\npackage RBF rules applied. I think this would be a significant advantage\nfor LN, as for the current ~85k of opened channels, the old V2 states\nshouldn't be pinning vectors. Currently, commitment transactions signal\nreplaceability.\n\nLe ven. 23 sept. 2022 à 11:26, Gloria Zhao via bitcoin-dev \u003c\nbitcoin-dev at lists.linuxfoundation.org\u003e a écrit :\n\n\u003e Hi everyone,\n\u003e\n\u003e I'm writing to propose a very simple set of mempool/transaction relay\n\u003e policies intended to aid L2/contract protocols. I realized that\n\u003e the previously proposed Package Mempool Accept package RBF [1]\n\u003e had a few remaining problems after digging into the RBF logic more [2].\n\u003e This additional set of policies solves them without requiring a huge RBF\n\u003e overhaul.\n\u003e\n\u003e I've written an implementation (and docs) for Bitcoin Core:\n\u003e https://github.com/bitcoin/bitcoin/pull/25038\n\u003e\n\u003e (You may notice that this proposal incorporates feedback on the PR -\n\u003e thanks Suhas Daftuar, Gregory Sanders, Bastien Teinturier, Anthony Towns,\n\u003e and others.)\n\u003e\n\u003e If you are interested in using package RBF/relay to bump presigned\n\u003e transactions, I think you may be interested in reviewing this proposal.\n\u003e This should solve Rule 3 pinning and perhaps allow us\n\u003e to get rid of CPFP carve-out (yay!). I'm keen to hear if people find\n\u003e the 1-anchor-output, 1000vB child limit too restrictive. Also, if you find\n\u003e a\n\u003e pinning attack or something that makes it unusable for you, I would\n\u003e really really like to know.\n\u003e\n\u003e Note that transactions with nVersion=3 (\"V3 transactions\") are\n\u003e currently non-standard in Bitcoin Core. That means **anything that was\n\u003e standard before this policy change would still be standard\n\u003e afterwards.** If you don't want your transactions to be subject to\n\u003e these rules, just continue whatever you're doing and don't use\n\u003e nVersion=3. AFAICT this shouldn't break anything, but let me know if\n\u003e this would be disruptive for you?\n\u003e\n\u003e **New Policies:**\n\u003e\n\u003e This includes:\n\u003e - a set of additional policy rules applying to V3 transactions\n\u003e - modifications to package RBF rules\n\u003e\n\u003e **V3 transactions:**\n\u003e\n\u003e Existing standardness rules apply to V3 (e.g. min/max tx weight,\n\u003e standard output types, cleanstack, etc.). The following additional\n\u003e rules apply to V3:\n\u003e\n\u003e 1. A V3 transaction can be replaced, even if it does not signal BIP125\n\u003e    replaceability. (It must also meet the other RBF rules around fees,\n\u003e etc. for replacement to happen).\n\u003e\n\u003e 2. Any descendant of an unconfirmed V3 transaction must also be V3.\n\u003e\n\u003e *Rationale*: Combined with Rule 1, this gives us the property of\n\u003e \"inherited\" replaceability signaling when descendants of unconfirmed\n\u003e transactions are created. Additionally, checking whether a transaction\n\u003e signals replaceability this way does not require mempool traversal,\n\u003e and does not change based on what transactions are mined. It also\n\u003e makes subsequent rules about descendant limits much easier to check.\n\u003e\n\u003e *Note*: The descendant of a *confirmed* V3 transaction does not need to be\n\u003e V3.\n\u003e\n\u003e 3. An unconfirmed V3 transaction cannot have more than 1 descendant.\n\u003e\n\u003e *Rationale*: (Upper bound) the larger the descendant limit, the more\n\u003e transactions may need to be replaced. This is a problematic pinning\n\u003e attack, i.e., a malicious counterparty prevents the transaction from\n\u003e being replaced by adding many descendant transactions that aren't\n\u003e fee-bumping.\n\u003e\n\u003e (Lower bound) at least 1 descendant is required to allow CPFP of the\n\u003e presigned transaction. The contract protocol can create presigned\n\u003e transactions paying 0 fees and 1 output for attaching a CPFP at\n\u003e broadcast time (\"anchor output\"). Without package RBF, multiple anchor\n\u003e outputs would be required to allow each counterparty to fee-bump any\n\u003e presigned transaction. With package RBF, since the presigned\n\u003e transactions can replace each other, 1 anchor output is sufficient.\n\u003e\n\u003e 4. A V3 transaction that has an unconfirmed V3 ancestor cannot be\n\u003e    larger than 1000 virtual bytes.\n\u003e\n\u003e *Rationale*: (Upper bound) the larger the descendant size limit, the\n\u003e more vbytes may need to be replaced. With default limits, if the child\n\u003e is e.g. 100,000vB, that might be an additional 100,000sats (at\n\u003e 1sat/vbyte) or more, depending on the feerate.\n\u003e\n\u003e (Lower bound) the smaller this limit, the fewer UTXOs a child may use\n\u003e to fund this fee-bump. For example, only allowing the V3 child to have\n\u003e 2 inputs would require L2 protocols to manage a wallet with high-value\n\u003e UTXOs and make batched fee-bumping impossible. However, as the\n\u003e fee-bumping child only needs to fund fees (as opposed to payments),\n\u003e just a few UTXOs should suffice.\n\u003e\n\u003e With a limit of 1000 virtual bytes, depending on the output types, the\n\u003e child can have 6-15 UTXOs, which should be enough to fund a fee-bump\n\u003e without requiring a carefully-managed UTXO pool. With 1000 virtual\n\u003e bytes as the descendant limit, the cost to replace a V3 transaction\n\u003e has much lower variance.\n\u003e\n\u003e *Rationale*: This makes the rule very easily \"tacked on\" to existing\n\u003e logic for policy and wallets. A transaction may be up to 100KvB on its\n\u003e own (`MAX_STANDARD_TX_WEIGHT`) and 101KvB with descendants\n\u003e (`DEFAULT_DESCENDANT_SIZE_LIMIT_KVB`). If an existing V3 transaction\n\u003e in the mempool is 100KvB, its descendant can only be 1000vB, even if\n\u003e the policy is 10KvB.\n\u003e\n\u003e **Package RBF modifications:**\n\u003e\n\u003e 1. The rule around unconfirmed inputs was\n\u003e originally \"A package may include new unconfirmed inputs, but the\n\u003e ancestor feerate of the child must be at least as high as the ancestor\n\u003e feerates of every transaction being replaced.\"\n\u003e\n\u003e The package may still include new unconfirmed inputs. However,\n\u003e the new rule is modified to be \"The minimum between package feerate\n\u003e and ancestor feerate of the child is not lower than the individual\n\u003e feerates of all directly conflicting transactions and the ancestor\n\u003e feerates of all original transactions.\"\n\u003e\n\u003e *Rationale*: We are attempting to ensure that the replacement\n\u003e transactions are not less incentive-compatible to mine. However, a\n\u003e package/transaction's ancestor feerate is not perfectly representative\n\u003e of its incentive compatibility; it may overestimate (some subset of\n\u003e the ancestors could be included by itself if it has other high-feerate\n\u003e descendants or are themselves higher feerate than this\n\u003e package/transaction). Instead, we use the minimum between the package\n\u003e feerate and ancestor feerate of the child as a more conservative value\n\u003e than what was proposed originally.\n\u003e\n\u003e 2. A new rule is added, requiring that all package transactions with\n\u003e mempool conflicts to be V3. This also means the \"sponsoring\"\n\u003e child transaction must be V3.\n\u003e\n\u003e *Note*: Combined with the V3 rules, this means the package must be\n\u003e a child-with-parents package. Since package validation is only\n\u003e attempted if the transactions do not pay sufficient fees to be\n\u003e accepted on their own, this effectively means that only V3\n\u003e transactions can pay to replace their ancestors' conflicts, and only\n\u003e V3 transactions' replacements may be paid for by a descendant.\n\u003e\n\u003e *Rationale*: The fee-related rules are economically rational for\n\u003e ancestor packages, but not necessarily other types of packages.\n\u003e A child-with-parents package is a type of ancestor package. It\n\u003e may be fine to allow any ancestor package, but it's more difficult\n\u003e to account for all of the possibilities. For example, it gets much\n\u003e harder to see that we're applying the descendant limits correctly if\n\u003e the package has a gnarly, many-generation, non-tree shape. I'm also\n\u003e not sure if this policy is 100% incentive-compatible if the sponsor\n\u003e is not a direct descendant of the sponsee.\n\u003e\n\u003e Please see doc/policy/version3_transactions.md and\n\u003e doc/policy/packages.md in the PR for the full set of rules.\n\u003e\n\u003e **Intended usage for LN:**\n\u003e\n\u003e Commitment transactions should be V3 and have 1 anchor output. They\n\u003e can be signed with 0 fees (or 1sat/vbyte) once package relay is deployed\n\u003e on a significant portion of the network. If the commitment tx must\n\u003e be broadcast, determine the desired feerate at broadcast time and\n\u003e spend the anchor output in a high feerate transaction. I'm going to\n\u003e call the broadcasted commitment tx \"the parent\" and the attached\n\u003e fee-bumping tx \"the child.\"\n\u003e\n\u003e - This child must be V3.\n\u003e - This child must be at most 1000vB. Note this restricts the\n\u003e   number of inputs you can use to fund the fee bump. Depending\n\u003e on the output types, this is around 6-15.\n\u003e - One child may fund fees for multiple commitment tx (\"batched\n\u003e   fee-bumping\").\n\u003e - To do a second fee-bump to add more fees, replace the\n\u003e   *child* with a higher-feerate tx. Do not try to attach a grandchild.\n\u003e\n\u003e Otherwise, never try to spend from an unconfirmed V3 transaction. The\n\u003e descendant limits for V3 transactions are very restrictive.\n\u003e\n\u003e **Expected Questions:**\n\u003e\n\u003e \"Does this fix Rule 3 Pinning?\"\n\u003e Yes. The V3 descendant limit restricts both you and your counterparty.\n\u003e Assuming nodes adopted this policy, you may reasonably assume that you\n\u003e only need to replace the commitment transaction + up to 1000vB.\n\u003e\n\u003e \"Only 1 anchor output? What if I need to bump counterparty's commitment tx\n\u003e in mempool?\"\n\u003e You won't need to fee-bump a counterparty's commitment tx using CPFP.\n\u003e You would just package RBF it by attaching a high-feerate child to\n\u003e your commitment tx.\n\u003e\n\u003e \"Is this a privacy issue, i.e. doesn't it allow fingerprinting LN\n\u003e transactions based on nVersion?\"\n\u003e Indeed it may be unrealistic to assume V3 transactions will be in\n\u003e widespread use outside of L2. IIUC, unilateral closes are already\n\u003e obvious LN transactions because of the HTLC inputs. For e.g.\n\u003e cooperative closes and opens, I think it makes sense to continue using\n\u003e V2. So, unless I'm missing something, this shouldn't make it worse.\n\u003e\n\u003e \"So a V3 transaction that doesn't signal BIP125 replaceability is\n\u003e replaceable? Is that a backward compatibility issue?\"\n\u003e Yes it's replaceable. It's not an issue AFAICT because,\n\u003e under previous policy, the V3 transaction wouldn't have been\n\u003e in the mempool in the first place.\n\u003e\n\u003e \"Can a V2 transaction replace a V3 transaction and vice versa?\"\n\u003e Yes, otherwise someone can use V3 transactions to censor V2\n\u003e transactions spending shared inputs. Note if the\n\u003e original V3 transaction has an unconfirmed V3 parent, this would\n\u003e violate the \"inherited V3\" rule and would be rejected.\n\u003e\n\u003e Thanks for reading! Feedback and review would be much appreciated.\n\u003e\n\u003e [1]:\n\u003e https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-September/019464.html\n\u003e [2]:\n\u003e https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019817.html\n\u003e\n\u003e Best,\n\u003e Gloria\n\u003e _______________________________________________\n\u003e bitcoin-dev mailing list\n\u003e bitcoin-dev at lists.linuxfoundation.org\n\u003e https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev\n\u003e\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220925/a8ab458a/attachment-0001.html\u003e"}
