<oembed><type>rich</type><version>1.0</version><author_name>npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd</author_name><author_url>https://nostr.ae/npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2022-11-02&#xA;📝 Original message:Hi list,&#xA;&#xA;Reading Suhas&#39;s post on mempool policy consistency rules, and the grounded&#xA;suggestion that as protocol developers we should work on special policy&#xA;rules to support each reasonable use case on the network rather to arbiter&#xA;between class of use-cases in the design of an&#xA;unified set of rules, reminded me there is another solution to solve&#xA;multi-party funding pinning rather than wide deployment of fullrbf. This&#xA;was communicated to me a while back, and it was originally dismissed&#xA;because of the privacy trade-offs (and potential slight fees overhead&#xA;cost). However, if widely adopted, they might sound acceptable to&#xA;contracting protocol developers and operators.&#xA;&#xA;## The Problem: Pinning Contracting Protocols Funding Flows with Opt-out&#xA;Double-Spend&#xA;&#xA;As originally laid out [0], multi-party collaborative flows&#xA;(coinjoin/dual-funding/swaps/splicing/etc), where every participant&#xA;contributes at least one input, are suffering from a low-cost and&#xA;high-success DoS vector with asymmetric damages. E.g with lightning&#xA;interactive transaction construction protocols limits of 252 inputs, 1&#xA;single input can bleed the timevalue of the remaining 251 inputs, or engage&#xA;in a MEV attack where the fee-bumping entity is lured to inflate feerate&#xA;beyond the current blockspace demand. The attack can be hidden and a&#xA;posteriori assigning blame consistently stays an open question in the lack&#xA;of a consensus mechanism between participants on the network mempools&#xA;states.&#xA;&#xA;The issue lies in the fact that participants joining inputs together don&#39;t&#xA;have control, or even view, of the replacement signaling of any potential&#xA;double-spend of the other participants inputs. Indeed the opt-in fullrbf&#xA;signaling is enforced based on the nSequence field, and this one is fully&#xA;malleable by the UTXO spender. There is no current mechanism to require&#xA;replacement signaling provable to a third-party only on the knowledge of&#xA;the UTXO spents.&#xA;&#xA;# The Solution: Opt-in Full-Replace-by-Fee Spent-nVersion Signaling&#xA;&#xA;A new policy is specified in a new way a transaction can signal that it is&#xA;replaceable.&#xA;&#xA;1. A confirmed transaction is considered to have opted in to allowing&#xA;replacement of any of its spends (or their descendants), if the last bit of&#xA;the nVersion field is set.&#xA;&#xA;Rational: The future replacement status of any UTXO spend can be determined&#xA;by inspecting the nVersion, therefore protecting the collaborative&#xA;participants of a multi-party flows that the target transaction should&#xA;propagate to the miners, if the fee/feerate offered are the best ones&#xA;without opt-out based pinning. It can be required the UTXOs to have few&#xA;confirmations in case of shallow reorgs to increase DoS protection.&#xA;&#xA;## Solution trade-offs&#xA;&#xA;On the validation-side, there is one engineering issue, as I think there is&#xA;no access to the spent nversion fields by the mempool logic. This would&#xA;presume we add some new cache of all the confirmed UTXOs, so ~50M * 4bytes,&#xA;300 MB of additional state for policy-enforcing full-nodes. I don&#39;t know if&#xA;there is another strong drawback, even the reorg logic the replaceable&#xA;spends shouldn&#39;t be evicted if the confirmed ancestor is back to the&#xA;mempool, as mempool validity shouldn&#39;t be reevaluated before a replacement&#xA;candidate shows up. A fee penalty could be requested for nVersion-signaling&#xA;transactions to compensate for the additional state stored by full-node&#xA;operators (even if obviously they&#39;re not the ones earning the fees).&#xA;&#xA;For the contracting protocols wallets, as you don&#39;t know in advance which&#xA;coins are going to be used for a collaborative flow, you&#39;re better off to&#xA;mark all your coins nVersion fields opting fullrbf. Otherwise, you will&#xA;have to go through an on-chain fee cost to change the replacement status of&#xA;the spends of your coins. However, this policy bookmarking comes as a&#xA;protocol fingerprint leak for an observer of the transaction logs. If all&#xA;the second-layers used by default, this is constituting a single anonymity&#xA;set, though it might still be the privacy gains we&#39;re harvesting from&#xA;Taproot output usage in the optimistic case (e.g in Lightning no commitment&#xA;+ HTLC transactions broadcast).&#xA;&#xA;For the zeroconf operators, assuming they have access to the UTXO set, they&#xA;can inspect the receiving transactions ancestors nVersion fields, and sort&#xA;those transactions in the wider set of the replaceable ones, as they&#39;re&#xA;currently doing for BIP125 opt-in ones.&#xA;&#xA;Long-term, the annoying privacy issue and the assumption that any wallet&#xA;will be a Lightning one could lead to the majority of wallets signaling RBF&#xA;for their spends. Therefore making those wallets incompatible with zeroconf&#xA;services, slowly economically outlawing them. From my perspective, though&#xA;it might be a simplification, it sounds an alternative full rbf way&#xA;forward, where rather than having miners deciding on the policy&#xA;enforcement, we let the users decide with their coins. However, this new&#xA;policy enforcement efficiency is still dependent on the existence of relay&#xA;paths and support at the endpoints that matter, the miner mempools. So in&#xA;fine we might have to realize incentive alignment with hashrate is what&#xA;matters in terms of transaction-relay rules ?&#xA;&#xA;Credit to Greg Maxwell for this idea.&#xA;&#xA;Cheers,&#xA;Antoine&#xA;&#xA;[0]&#xA;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.html&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20221101/7190a0df/attachment-0001.html&gt;</html></oembed>