<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-06-21&#xA;📝 Original message:HI alicexbt,&#xA;&#xA;&gt; Lets consider there are 2 users with name Bob (normal LN user) and Carol&#xA;(attacker running LN node) which I will use in this email for examples. In&#xA;this case Bob and Carol can manage security of their OS and it is not&#xA;affected by others using vulnerable systems or OS.&#xA;&#xA;Yes, I believe my argument was the set of components making the security of&#xA;your LN node is far beyond Bitcoin softwares. Of course, you might review&#xA;by yourself the millions lines of code entering in the trusted computing&#xA;base (OS, bootloader, BIOS, device firmwares, essential utilities, ...) on&#xA;which your cryptocurrency software stack lays out, and as such exercise an&#xA;extended span of control on your personal computation. Though, while I hope&#xA;we&#39;ll have more LN node operators doing so, I&#39;m not sure it&#39;s realistic to&#xA;expect it will be the behavior standard among them..&#xA;&#xA;&gt; The odds are low as you said, this can be managed by Bob and Carol&#xA;because they can use a better ISP. Others using ISP with some issues may&#xA;not affect their LN usage.&#xA;&#xA;Sure, though as I would like to underscore being dependent on a Bitcoin&#xA;node policy and being dependent on a ISP internet traffic routing policy&#xA;could be analyzed as logically equivalent, all things are equal. That said,&#xA;if your personal risk aversion is too high for the Lightning security&#xA;model, once it&#39;s well-understood there is a strong reliance on a&#xA;censorship-resistant tx-relay network back to economically-rational miners,&#xA;you&#39;re free to not use it and satisfy yourself with the Bitcoin base layer.&#xA;&#xA;&gt; Bob might use full-rbf as its suggested by LN developers for secure LN&#xA;usage and better for miners. Carol could use a different RBF policy for&#xA;some nodes and mining. In this case Bob may get affected at some point&#xA;because of Carol&#39;s choice to use a different RBF policy which was not true&#xA;above.&#xA;&#xA;Indeed, your secure LN usage is going to be dependent of the number of p2p&#xA;network nodes running an economically-rational policy like full-rbf. That&#xA;said, I think it&#39;s reasonable to assume that the players of the Bitcoin&#xA;game are economically-rational, and as such incentived to pick up a policy&#xA;such as full-rbf. I know the term &#34;economically-rational&#34; is poorly defined&#xA;here, and I think it could be interesting for any academic with an economic&#xA;background to study the incentives of Bitcoin actors.&#xA;&#xA;&gt; Allowing users to create different mempool policies is great. My thought&#xA;process is to code for happy path, where X policy is expected for&#xA;replacement and edge cases where Y policy or no policy would be used. Users&#xA;can try out different policies and even act as attackers. This is also true&#xA;for other things in mempool, &#39;spkreuse=conflict&#39; prevents address reuse in&#xA;the mempool when using knots. If I assume that address reuse is always&#xA;relayed, this could become a problem if some users and miners adopt this&#xA;setting in their mempool.&#xA;&#xA;Agree, I&#39;m all in for people to experiment with mempool policies. Though at&#xA;the end it&#39;s a software engineering resource question. If users are&#xA;interested in more features, they&#39;re always free to implement themselves.&#xA;Really, the binary distinction developers-vs-users doesn&#39;t make sense and&#xA;if we would like Bitcoin to be successful in the long-term, we should&#xA;promote high degree of software literacy among bitcoiners.&#xA;&#xA;&gt; This makes sense and I would be interested to follow two things once&#xA;full-rbf is available in a bitcoin core release: 1. Percentage of&#xA;transaction getting replaced 2. Miners profit (Fee for replaced Tx - Fee&#xA;for original Tx)&#xA;&#xA;Yes, I would be interested too to have those metrics once full-rbf is&#xA;available in a bitcoin core release. I think that&#39;s something every&#xA;full-rbf curious node operator could observe on its own with a few more&#xA;loggers, at least for the first metric.&#xA;&#xA;&gt; Can you explain how p2p coinjoin is affected with mempool DoS vector with&#xA;some examples? What is considered a p2p coinjoin? Joinmarket or&#xA;[Stonewall][1]?&#xA;&#xA;I don&#39;t remember the Joinmarket code right now and I don&#39;t know the ins and&#xA;outs of Samourai coinjoin as I&#39;m not sure the code is open source. Though&#xA;let&#39;s say for a p2p coinjoin as one you can build once you have implemented&#xA;LN&#39;s interactive construction protocol [0].&#xA;&#xA;[0] https://github.com/lightning/bolts/pull/851&#xA;&#xA;Here the DoS attack situation :&#xA;- Alice, Bob and Caroll would like to coinjoin 3 inputs to 3 outputs&#xA;- Each of the input is singly controlled by one party, e.g Alice owns input&#xA;A, Bob owns input B, ...&#xA;- Alice, Bob and Caroll exchanges a PSBT to build a multi-party funded&#xA;transaction (the coinjoin_tx)&#xA;- Alice is elected as the multi-party transaction broadcaster once the&#xA;signatures have been exchanged&#xA;- The block feerate is around 10sat/vb&#xA;- One of the transaction input signals opt-in RBF, the transaction is&#xA;attached a compelling feerate 10sat/vb&#xA;- Caroll broadcasts a double-spend of her own input C, the double-spend is&#xA;attached with a low-fee (1sat/vb) and it does _not_ signal opt-in RBF&#xA;- Alice broadcasts the multi-party transaction, it is rejected by the&#xA;network mempools because Alice double-spend is already present&#xA;- Two alternatives are offered to the coinjoin participants :&#xA;&#xA;Alternative A)&#xA;- They estimate the multi-party feerate as not high enough&#xA;- They fee-bump at 20sat/vb&#xA;- Caroll double-spend one of the input of her malicious double-spend to&#xA;eject it from the network mempools&#xA;- The multi-party transaction is confirmed at a block feerare far above&#xA;what was necessary&#xA;- Alice, Bob, Caroll have loss fee-bumping value without compensation&#xA;- Note, even if Caroll is attacker and assuming the fee-bumping burden is&#xA;fairly spread among participants, the economic loss inflicted is asymmetric&#xA;&#xA;Alternative B)&#xA;- They wait until some time-out&#xA;- They double-spend their own inputs, Alice double-spend utxo A, Bob&#xA;double-spend utxo B&#xA;- They wasted the timevalue of their inputs for the time-out delay&#xA;- Note, even if Caroll is attacker and loss some timevalue too, the&#xA;economic loss inflicted is asymmetric&#xA;&#xA;Let me know if you see any error or wrong in this DoS scenario exposure. I&#xA;believe it&#39;s fairly simple to execute&#xA;for a medium-skilled attacker.&#xA;&#xA;Antoine&#xA;&#xA;Le ven. 17 juin 2022 à 00:54, alicexbt &lt;alicexbt at protonmail.com&gt; a écrit :&#xA;&#xA;&gt; Hi Antoine,&#xA;&gt;&#xA;&gt;&#xA;&gt; One could list the operating system on which is running your Lightning&#xA;&gt; process or the compiler toolchain turning out your Lightning source code&#xA;&gt; in a binary artifact. Some weird kernel&#39;s memory mapping change could allow&#xA;&gt; access to your channel funding keys, _without_ breaking the Bitcoin&#xA;&gt; consensus rules [0].&#xA;&gt;&#xA;&gt;&#xA;&gt; Lets consider there are 2 users with name Bob (normal LN user) and Carol&#xA;&gt; (attacker running LN node) which I will use in this email for examples. In&#xA;&gt; this case Bob and Carol can manage security of their OS and it is not&#xA;&gt; affected by others using vulnerable systems or OS.&#xA;&gt;&#xA;&gt; Moreover, your Lightning node is also relying on the existence of a&#xA;&gt; global Internet allowing your HTLC transaction to flow from your physical&#xA;&gt; host to the crowd of transactions confirming in the blockchain. Due to&#xA;&gt; this &#34;protocol assumption&#34; your channel balance would be vulnerable to&#xA;&gt; any change in your ISP routing policy, e.g refusing to accept your IPV4&#xA;&gt; traffic by a sudden desiderata to impose an IPV6 supremacy. Still&#xA;&gt; _without_ breaking the Bitcoin consensus rules. Of course, the odds of your&#xA;&gt; ISP operator adopting this behavior are really low, mostly because your&#xA;&gt; operator has to bind to social and economic constraints to stay in&#xA;&gt; business.&#xA;&gt;&#xA;&gt;&#xA;&gt; The odds are low as you said, this can be managed by Bob and Carol because&#xA;&gt; they can use a better ISP. Others using ISP with some issues may not affect&#xA;&gt; their LN usage.&#xA;&gt;&#xA;&gt; And I believe this imperative to stay in business is certainly not absent&#xA;&gt; in the incentives of the Bitcoin node operators. You&#39;re free to run any&#xA;&gt; policy on your node, especially one hardening the safety of your operations&#xA;&gt;  beyond the default one. However, if you start to a transaction-relay&#xA;&gt; non-compatible with miner incentives, you won&#39;t have an efficient view of&#xA;&gt; the blockspace demand, and from then won&#39;t be able to offer compelling&#xA;&gt; feerates to execute your business transactions to satisfy your client&#xA;&gt; needs. Or you won&#39;t consolidate your wallet UTXOs at times of low-demand.&#xA;&gt; Indeed, a sane visibility of the mempools might not be critical now for your&#xA;&gt; Bitcoin operations, but this is not likely to become true with miner&#39;s&#xA;&gt; coinbase reward lowering with time and the system security relying on a&#xA;&gt; fruitful fee market.&#xA;&gt;&#xA;&gt;&#xA;&gt; Bob might use full-rbf as its suggested by LN developers for secure LN&#xA;&gt; usage and better for miners. Carol could use a different RBF policy for&#xA;&gt; some nodes and mining. In this case Bob may get affected at some point&#xA;&gt; because of Carol&#39;s choice to use a different RBF policy which was not true&#xA;&gt; above.&#xA;&gt;&#xA;&gt;&#xA;&gt; So assuming there is a significant number of economically rational&#xA;&gt; entities running p2p nodes, I think it&#39;s a reasonable assumption for&#xA;&gt; Lightning developers that a policy maximizing miner&#39;s income and economic&#xA;&gt; nodes operations will be widely run on the p2p network, and therefore lay&#xA;&gt; its security model on that. When there is a gap between the economically&#xA;&gt; optimal policy (full-rbf) and the effectively deployed one (optin), and&#xA;&gt; this gap constitutes a flaw for exploitation, I believe it&#39;s better to&#xA;&gt; fix it.&#xA;&gt;&#xA;&gt;&#xA;&gt; Agree with the assumption there is nothing wrong in experimenting with a&#xA;&gt; new RBF policy (non-default) if that helps some users and projects.&#xA;&gt;&#xA;&gt; If you have a different mode of thinking w.r.t how we should design&#xA;&gt; protocol in a trust-minimized, open, adversarial environment such as&#xA;&gt; Bitcoin, I&#39;m curious to listen to it.&#xA;&gt;&#xA;&gt;&#xA;&gt; Allowing users to create different mempool policies is great. My thought&#xA;&gt; process is to code for happy path, where X policy is expected for&#xA;&gt; replacement and edge cases where Y policy or no policy would be used. Users&#xA;&gt; can try out different policies and even act as attackers. This is also true&#xA;&gt; for other things in mempool, &#39;spkreuse=conflict&#39; prevents address reuse in&#xA;&gt; the mempool when using knots. If I assume that address reuse is always&#xA;&gt; relayed, this could become a problem if some users and miners adopt this&#xA;&gt; setting in their mempool.&#xA;&gt;&#xA;&gt; Of course not. If you deliver any critical software, you should attach a&#xA;&gt; solid manual explaining all the corner cases and rough edges. Even better&#xA;&gt; would be to enshrine the manual directly in your software API to minimize&#xA;&gt; the footgunish behaviors. E.g, with any ECC library, forbidding to reuse&#xA;&gt; nonces. If your user still ignores or misread the manual and provides an&#xA;&gt; insecure input, there is not that much you can do.&#xA;&gt;&#xA;&gt;&#xA;&gt; Agree with the documentation as it helps users.&#xA;&gt;&#xA;&gt; Given there are like 17000 public LN nodes, if half of them adopt full-rbf&#xA;&gt; it should give already a good number of full-rbf transaction-relay routes&#xA;&gt; across the p2p network graph. When we&#39;re there, we can measure and think&#xA;&gt; more about how to tune the full-rbf sub-topology.&#xA;&gt;&#xA;&gt;&#xA;&gt; Sounds good.&#xA;&gt;&#xA;&gt; Because it&#39;s breaking the reliability and security of their use-cases.&#xA;&gt; Use-cases which didn&#39;t exist a few years ago. The mempool DoS vector is&#xA;&gt; described here [4]. To the best of my understanding, it might affect a&#xA;&gt; bunch of use-cases, such as dual-funded channels, on-chain DLCs, p2p&#xA;&gt; coinjoins, batched submarine swaps out. With the attack described, the&#xA;&gt; honest set of users might not have visibility of the network mempools&#xA;&gt; that there is a malicious, low-cost, opt-out double-spend preventing the&#xA;&gt; propagation of their multi-party transaction. With the existence of a&#xA;&gt; full-rbf transaction-relay topology, the multi-party transaction is able&#xA;&gt; to replace the optout.&#xA;&gt;&#xA;&gt;&#xA;&gt; This makes sense and I would be interested to follow two things once&#xA;&gt; full-rbf is available in a bitcoin core release: 1. Percentage of&#xA;&gt; transaction getting replaced 2. Miners profit (Fee for replaced Tx - Fee&#xA;&gt; for original Tx)&#xA;&gt;&#xA;&gt; Can you explain how p2p coinjoin is affected with mempool DoS vector with&#xA;&gt; some examples? What is considered a p2p coinjoin? Joinmarket or&#xA;&gt; [Stonewall][1]?&#xA;&gt;&#xA;&gt; Selecting a full-node to underpin any serious Bitcoin infrastructure or&#xA;&gt; secure a significant stack of coins should be submitted to a&#xA;&gt; fully-fledged decision-making process. Many factors are likely to matter such&#xA;&gt; as the level of activity of the contributor community, the chain of trust&#xA;&gt; w.r.t dependencies, the security incident track records, the quality of&#xA;&gt; the documentation, the exhaustivity and robustness of the set of features,&#xA;&gt; ...&#xA;&gt;&#xA;&gt;&#xA;&gt; I agree that contributor community and documentation could be improved in&#xA;&gt; Knots.&#xA;&gt;&#xA;&gt; Developers are also Bitcoin users, and they&#39;re modifying the software to&#xA;&gt; suit their use-case needs. And that&#39;s exactly the purpose of the&#xA;&gt; &#39;full-rbf&#39; PR I&#39;m proposing, aiming to propose a &#34;good&#34; policy for a&#xA;&gt; Lightning node, without actually seeking to change the default.&#xA;&gt;&#xA;&gt;&#xA;&gt; I like that default still remains opt-in and cool with different policies&#xA;&gt; being tried out if that helps some users.&#xA;&gt;&#xA;&gt;  If they&#39;re parties interested in implementing more RBF policy options in&#xA;&gt; Bitcoin Core, I think they&#39;re free to propose such changes and invest the&#xA;&gt; engineering effort to do so. If you&#39;re interested in advancing the state of&#xA;&gt;  policy options in Bitcoin Core, there are a lot of interesting resources available&#xA;&gt; and communities to encourage you in the learning process to contribute to&#xA;&gt; the codebase [6].&#xA;&gt;&#xA;&gt;&#xA;&gt; Thanks for sharing the link. I would love to see 5 RBF policies available&#xA;&gt; to use in bitcoin core. I have already tried experimenting with a few on&#xA;&gt; regtest and will try to open pull request if there are enough people&#xA;&gt; interested to test it on other chains (testnet3, signet, mainnet)&#xA;&gt;&#xA;&gt;&#xA;&gt; [1]: https://docs.samourai.io/spend-tools&#xA;&gt;&#xA;&gt;&#xA;&gt; /dev/fd0&#xA;&gt;&#xA;&gt;&#xA;&gt; Sent with Proton Mail &lt;https://proton.me/&gt; secure email.&#xA;&gt;&#xA;&gt; ------- Original Message -------&#xA;&gt; On Friday, June 17th, 2022 at 7:04 AM, Antoine Riard &lt;&#xA;&gt; antoine.riard at gmail.com&gt; wrote:&#xA;&gt;&#xA;&gt; Hi alicexbt,&#xA;&gt;&#xA;&gt;&#xA;&gt; Thanks for taking time to review the pull request,&#xA;&gt;&#xA;&gt;&#xA;&gt; &gt; 1)If something relies on a policy which can be changed without breaking&#xA;&gt; consensus rules, how is it secure in any case with or without full rbf?&#xA;&gt;&#xA;&gt;&#xA;&gt; Your Lightning node software relies on far more software and hardware&#xA;&gt; components than the transaction-relay p2p network. One could list the&#xA;&gt; operating system on which is running your Lightning process or the compiler&#xA;&gt; toolchain turning out your Lightning source code in a binary artifact.&#xA;&gt; Some weird kernel&#39;s memory mapping change could allow access to your&#xA;&gt; channel funding keys, _without_ breaking the Bitcoin consensus rules [0].&#xA;&gt; Moreover, your Lightning node is also relying on the existence of a&#xA;&gt; global Internet allowing your HTLC transaction to flow from your physical&#xA;&gt; host to the crowd of transactions confirming in the blockchain. Due to&#xA;&gt; this &#34;protocol assumption&#34; your channel balance would be vulnerable to&#xA;&gt; any change in your ISP routing policy, e.g refusing to accept your IPV4&#xA;&gt; traffic by a sudden desiderata to impose an IPV6 supremacy. Still&#xA;&gt; _without_ breaking the Bitcoin consensus rules. Of course, the odds of your&#xA;&gt; ISP operator adopting this behavior are really low, mostly because your&#xA;&gt; operator has to bind to social and economic constraints to stay in&#xA;&gt; business.&#xA;&gt;&#xA;&gt;&#xA;&gt; And I believe this imperative to stay in business is certainly not absent&#xA;&gt; in the incentives of the Bitcoin node operators. You&#39;re free to run any&#xA;&gt; policy on your node, especially one hardening the safety of your operations beyond&#xA;&gt; the default one. However, if you start to a transaction-relay&#xA;&gt; non-compatible with miner incentives, you won&#39;t have an efficient view of&#xA;&gt; the blockspace demand, and from then won&#39;t be able to offer compelling&#xA;&gt; feerates to execute your business transactions to satisfy your client&#xA;&gt; needs. Or you won&#39;t consolidate your wallet UTXOs at times of low-demand.&#xA;&gt; Indeed, a sane visibility of the mempools might not be critical now for your&#xA;&gt; Bitcoin operations, but this is not likely to become true with miner&#39;s&#xA;&gt; coinbase reward lowering with time and the system security relying on a&#xA;&gt; fruitful fee market.&#xA;&gt;&#xA;&gt;&#xA;&gt; So assuming there is a significant number of economically rational&#xA;&gt; entities running p2p nodes, I think it&#39;s a reasonable assumption for&#xA;&gt; Lightning developers that a policy maximizing miner&#39;s income and economic&#xA;&gt; nodes operations will be widely run on the p2p network, and therefore lay&#xA;&gt; its security model on that. When there is a gap between the economically&#xA;&gt; optimal policy (full-rbf) and the effectively deployed one (optin), and&#xA;&gt; this gap constitutes a flaw for exploitation, I believe it&#39;s better to&#xA;&gt; fix it.&#xA;&gt;&#xA;&gt;&#xA;&gt; If you have a different mode of thinking w.r.t how we should design&#xA;&gt; protocol in a trust-minimized, open, adversarial environment such as&#xA;&gt; Bitcoin, I&#39;m curious to listen to it.&#xA;&gt;&#xA;&gt;&#xA;&gt; &gt; If I write a python script that expects user to enter char &#39;a&#39; or &#39;b&#39;&#xA;&gt; but user can enter &#39;c&#39; and there is no code to handle exceptions or other&#xA;&gt; chars, will it be secure?&#xA;&gt;&#xA;&gt;&#xA;&gt; Of course not. If you deliver any critical software, you should attach a&#xA;&gt; solid manual explaining all the corner cases and rough edges. Even better&#xA;&gt; would be to enshrine the manual directly in your software API to minimize&#xA;&gt; the footgunish behaviors. E.g, with any ECC library, forbidding to reuse&#xA;&gt; nonces. If your user still ignores or misread the manual and provides an&#xA;&gt; insecure input, there is not that much you can do.&#xA;&gt;&#xA;&gt;&#xA;&gt; By analogy, I believe that&#39;s the same with Lightning. One recommendation&#xA;&gt; of the deployment manual would be to be always connected to a full-rbf&#xA;&gt; transaction-relay topology. Defaulting to this rule and your node exposes&#xA;&gt; far more surface of attacks. Assuming the manual has been well-written (big&#xA;&gt; assumption!), I don&#39;t think the system designer would be to blame.&#xA;&gt;&#xA;&gt;&#xA;&gt; That said, one issue to confess with current Lightning is our lack of&#xA;&gt; understanding of what should be figured out in the LN user manual for&#xA;&gt; safe operations. I would say that&#39;s an active area of research [1] [2] [3]&#xA;&gt;&#xA;&gt;&#xA;&gt; &gt; 2)full-rbf is not default in the 2 open pull requests, so this&#xA;&gt; experiment still relies on users changing RBF policies manually. If&#xA;&gt; majority of nodes use default opt-in policy, how would this affect&#xA;&gt; vulnerable projects?&#xA;&gt;&#xA;&gt;&#xA;&gt; If we define the goal as ensuring there is a significant number of&#xA;&gt; transaction-relay routes between the L2s nodes requiring full-rbf and the&#xA;&gt; set of miners supporting this policy, and the set of miners is populated&#xA;&gt; enough, there is no need to convince the majority of nodes operators to&#xA;&gt; switch to full-rbf.&#xA;&gt;&#xA;&gt;&#xA;&gt; Beyond landing the &#39;full-rbf&#39; pull request, in pursuit of a partial&#xA;&gt; full-rbf deployment, I&#39;m thinking of reaching out to Lightning vendors to&#xA;&gt; recommend running LN nodes operators run their full-node with the setting&#xA;&gt; enabled. And also to few mining pool operators to advocate the potential&#xA;&gt; increase in their income.&#xA;&gt;&#xA;&gt;&#xA;&gt; Given there are like 17000 public LN nodes, if half of them adopt full-rbf&#xA;&gt; it should give already a good number of full-rbf transaction-relay routes&#xA;&gt; across the p2p network graph. When we&#39;re there, we can measure and think&#xA;&gt; more about how to tune the full-rbf sub-topology.&#xA;&gt;&#xA;&gt;&#xA;&gt; &gt; 2-3% transactions are replaced with opt-in RBF, if someone did not&#xA;&gt; replace earlier why would they do it with full RBF?&#xA;&gt;&#xA;&gt;&#xA;&gt; Because it&#39;s breaking the reliability and security of their use-cases.&#xA;&gt; Use-cases which didn&#39;t exist a few years ago. The mempool DoS vector is&#xA;&gt; described here [4]. To the best of my understanding, it might affect a&#xA;&gt; bunch of use-cases, such as dual-funded channels, on-chain DLCs, p2p&#xA;&gt; coinjoins, batched submarine swaps out. With the attack described, the&#xA;&gt; honest set of users might not have visibility of the network mempools&#xA;&gt; that there is a malicious, low-cost, opt-out double-spend preventing the&#xA;&gt; propagation of their multi-party transaction. With the existence of a&#xA;&gt; full-rbf transaction-relay topology, the multi-party transaction is able&#xA;&gt; to replace the optout.&#xA;&gt;&#xA;&gt;&#xA;&gt; None of those use-cases were deployed a few years ago, and the&#xA;&gt; understanding of the interactions with the mempool policy is still&#xA;&gt; nascent among their operators. However, if we assume that layering is a way&#xA;&gt; to grow the Bitcoin ecosystem, as I do, it is reasonable to expect they&#xA;&gt; will constitute a notable share of the Bitcoin transaction traffic during&#xA;&gt; the next decade.&#xA;&gt;&#xA;&gt;&#xA;&gt; &gt; I am not opposed to full-rbf; rather, I am opposed to the notion that&#xA;&gt; full-rbf will solve all problems&#xA;&gt;&#xA;&gt;&#xA;&gt; I wished we had a magic Silver Bullet (tm) solving all the Bitcoin&#xA;&gt; problems...&#xA;&gt;&#xA;&gt;&#xA;&gt; I&#39;m only advocating a partial full-rbf deployment to solve a real precise&#xA;&gt; security issue affecting multi-party funded transactions. That said,&#xA;&gt; full-rbf is far from solving the known set of problems affecting the L2s&#xA;&gt; due to interactions with network mempools. E,g, see package relay&#xA;&gt; motivation [5]&#xA;&gt;&#xA;&gt;&#xA;&gt; &gt; I would suggest users to try Bitcoin Knots instead which already has an&#xA;&gt; option to disable all RBF policies if required, opt-in and full RBF policy.&#xA;&gt;&#xA;&gt;&#xA;&gt; Selecting a full-node to underpin any serious Bitcoin infrastructure or&#xA;&gt; secure a significant stack of coins should be submitted to a&#xA;&gt; fully-fledged decision-making process. Many factors are likely to matter&#xA;&gt; such as the level of activity of the contributor community, the chain of&#xA;&gt; trust w.r.t dependencies, the security incident track records, the&#xA;&gt; quality of the documentation, the exhaustivity and robustness of the set of&#xA;&gt; features, ...&#xA;&gt;&#xA;&gt;&#xA;&gt; This process might take tens of hours, to be duplicated by the number of&#xA;&gt; node operators who would have to do the full-node vending switch. If you&#xA;&gt; consider the cognitive cost at the level of the Bitcoin ecosystem, it&#39;s&#xA;&gt; far less costly to implement and review a few lines of codes in Bitcoin&#xA;&gt; Core.&#xA;&gt;&#xA;&gt;&#xA;&gt; &gt; Developers should provide basic RBF policy options rather than&#xA;&gt; attempting to define what constitutes a good policy and removing the&#xA;&gt; ability to disable something when necessary.&#xA;&gt;&#xA;&gt;&#xA;&gt; Of course, this statement assumes there is a clear line between the&#xA;&gt; developers and the users. Developers are also Bitcoin users, and they&#39;re&#xA;&gt; modifying the software to suit their use-case needs. And that&#39;s exactly the&#xA;&gt; purpose of the &#39;full-rbf&#39; PR I&#39;m proposing, aiming to propose a &#34;good&#34;&#xA;&gt; policy for a Lightning node, without actually seeking to change the&#xA;&gt; default. If they&#39;re parties interested in implementing more RBF policy&#xA;&gt; options in Bitcoin Core, I think they&#39;re free to propose such changes and&#xA;&gt; invest the engineering effort to do so. If you&#39;re interested in advancing&#xA;&gt; the state of policy options in Bitcoin Core, there are a lot of&#xA;&gt; interesting resources available and communities to encourage you in the&#xA;&gt; learning process to contribute to the codebase [6].&#xA;&gt;&#xA;&gt;&#xA;&gt; Antoine&#xA;&gt;&#xA;&gt;&#xA;&gt; [0] https://dirtycow.ninja&#xA;&gt;&#xA;&gt; [1]&#xA;&gt; https://github.com/t-bast/lightning-docs/blob/master/pinning-attacks.md&#xA;&gt;&#xA;&gt; [2] https://arxiv.org/pdf/2006.01418.pdf&#xA;&gt;&#xA;&gt; [3] https://arxiv.org/pdf/2006.08513.pdf&#xA;&gt;&#xA;&gt; [4]&#xA;&gt; https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.html&#xA;&gt;&#xA;&gt; [5]&#xA;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-May/020493.html&#xA;&gt;&#xA;&gt; [6] https://www.summerofbitcoin.org&#xA;&gt;&#xA;&gt;&#xA;&gt; Le jeu. 16 juin 2022 à 00:15, alicexbt &lt;alicexbt at protonmail.com&gt; a écrit :&#xA;&gt;&#xA;&gt;&gt; Hi Antoine,&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Thanks for opening the pull request to add support for full-rbf in&#xA;&gt;&gt; Bitcoin Core. I have a disagreements with the approach and questions.&#xA;&gt;&gt;&#xA;&gt;&gt; Recent discussions among LN devs have brought back on the surface&#xA;&gt;&gt; concerns about the security of multi-party funded transactions (coinjoins,&#xA;&gt;&gt; dual-funded LN channels, on-chain DLCs, ...). It turns out there is a&#xA;&gt;&gt; low-fruit, naive DoS vector playable against the funding flow of any such&#xA;&gt;&gt; construction due to the lack of existent full-rbf transaction-relay&#xA;&gt;&gt; topology on today&#39;s p2p network [0] [1].&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; 1)If something relies on a policy which can be changed without breaking&#xA;&gt;&gt; consensus rules, how is it secure in any case with or without full rbf? If&#xA;&gt;&gt; I write a python script that expects user to enter char &#39;a&#39; or &#39;b&#39; but user&#xA;&gt;&gt; can enter &#39;c&#39; and there is no code to handle exceptions or other chars,&#xA;&gt;&gt; will it be secure?&#xA;&gt;&gt;&#xA;&gt;&gt; 2)full-rbf is not default in the 2 open pull requests, so this experiment&#xA;&gt;&gt; still relies on users changing RBF policies manually. If majority of nodes&#xA;&gt;&gt; use default opt-in policy, how would this affect vulnerable projects?&#xA;&gt;&gt;&#xA;&gt;&gt; If you&#39;re a mining operator looking to increase your income, you might be&#xA;&gt;&gt; interested to experiment with full-rbf as a policy.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Miners can only increase their income if users replace transactions. 2-3%&#xA;&gt;&gt; transactions are replaced with opt-in RBF, if someone did not replace&#xA;&gt;&gt; earlier why would they do it now even with full RBF? Or even if we add some&#xA;&gt;&gt; users in it who could not signal for some reasons, do you think it would be&#xA;&gt;&gt; anything above 5%?&#xA;&gt;&gt;&#xA;&gt;&gt; If you&#39;re a Bitcoin user or business and you don&#39;t like full-rbf, please&#xA;&gt;&gt; express an opinion on how it might affect your software/operations. I&#39;m&#xA;&gt;&gt; always interested to learn more about mempool and transaction-relay&#xA;&gt;&gt; interactions with upper-layers and applications and to listen to feedback&#xA;&gt;&gt; in those areas, and I guess a lot of other Bitcoin researchers/devs too. I&#xA;&gt;&gt; know there have been a lot of concerns about full-rbf in the past, however&#xA;&gt;&gt; I believe the Bitcoin ecosystem has matured a lot since then.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; I am not opposed to full-rbf; rather, I am opposed to the notion that&#xA;&gt;&gt; full-rbf will solve all problems and the lack of basic options in Bitcoin&#xA;&gt;&gt; Core to employ/disable different RBF policies. There is also a speculation&#xA;&gt;&gt; about making full RBF default in an year which isn&#39;t relevant to discuss at&#xA;&gt;&gt; this point without trying different RBF policies.&#xA;&gt;&gt;&#xA;&gt;&gt; I would suggest users to try Bitcoin Knots instead which already has an&#xA;&gt;&gt; option to disable all RBF policies if required, opt-in and full RBF policy.&#xA;&gt;&gt; This can also be done using GUI if not familiar with config option&#xA;&gt;&gt; mempoolreplacement​.&#xA;&gt;&gt;&#xA;&gt;&gt; The rationale in PR #16171 was insufficient to justify removing it in the&#xA;&gt;&gt; first place, had 2 NACKs and was reopened to merge it. Why bother with a&#xA;&gt;&gt; few lines of code that may allow someone disable it if required in local&#xA;&gt;&gt; mempool since it&#39;s only useful when a big percentage of miners utilize it&#xA;&gt;&gt; and essentially underused according to the PR author? Developers should&#xA;&gt;&gt; provide basic RBF policy options rather than attempting to define what&#xA;&gt;&gt; constitutes a good policy and removing the ability to disable something&#xA;&gt;&gt; when necessary.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; /dev/fd0&#xA;&gt;&gt;&#xA;&gt;&gt; Sent with Proton Mail &lt;https://proton.me/&gt; secure email.&#xA;&gt;&gt;&#xA;&gt;&gt; ------- Original Message -------&#xA;&gt;&gt; On Tuesday, June 14th, 2022 at 5:55 AM, Antoine Riard via bitcoin-dev &lt;&#xA;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt;&gt;&#xA;&gt;&gt; Hi list,&#xA;&gt;&gt;&#xA;&gt;&gt; Recent discussions among LN devs have brought back on the surface&#xA;&gt;&gt; concerns about the security of multi-party funded transactions (coinjoins,&#xA;&gt;&gt; dual-funded LN channels, on-chain DLCs, ...). It turns out there is a&#xA;&gt;&gt; low-fruit, naive DoS vector playable against the funding flow of any such&#xA;&gt;&gt; construction due to the lack of existent full-rbf transaction-relay&#xA;&gt;&gt; topology on today&#39;s p2p network [0] [1]. While it does not consist in a&#xA;&gt;&gt; direct loss of funds, if exploited well I think it&#39;s annoying enough to&#xA;&gt;&gt; inflict significant timevalue loss or fee-bumping waste&#xA;&gt;&gt; to the future providers or distributed swarm of users doing multi-party&#xA;&gt;&gt; funded transactions. Of course, it can be fixed one layer above by&#xA;&gt;&gt; introducing either fidelity bonds or a reliable centralized coordinator,&#xA;&gt;&gt; though at the price of an overhead per-participant ressources cost and loss&#xA;&gt;&gt; in system openness [1].&#xA;&gt;&gt;&#xA;&gt;&gt; For that reason, I believe it would be beneficial to the flourishing of&#xA;&gt;&gt; multi-party funded transactions to fix the Dos vector by seeing a subset of&#xA;&gt;&gt; the network running full-rbf and enabling propagation of honest multi-party&#xA;&gt;&gt; transactions to the interested miners, replacing potential non-signaling&#xA;&gt;&gt; double-spend from a malicious counterparty. Moving towards that direction,&#xA;&gt;&gt; I&#39;ve submitted a small patch against Bitcoin Core enabling it to turn on&#xA;&gt;&gt; full-rbf as a policy, still under review [3]. The default setting stays&#xA;&gt;&gt; **false**, i.e keeping opt-in RBF as a default replacement policy. I&#39;ve&#xA;&gt;&gt; started to run the patch on a public node at 146.190.224.15.&#xA;&gt;&gt;&#xA;&gt;&gt; If you&#39;re a node operator curious to play with full-rbf, feel free to&#xA;&gt;&gt; connect to this node or spawn up a toy, public node yourself. There is a&#xA;&gt;&gt; ##uafrbf libera chat if you would like information on the settings or&#xA;&gt;&gt; looking for full-rbf friends (though that step could be automated in the&#xA;&gt;&gt; future by setting up a dedicated network bit and reserving a few outbound&#xA;&gt;&gt; slots for them).&#xA;&gt;&gt;&#xA;&gt;&gt; If you&#39;re a mining operator looking to increase your income, you might be&#xA;&gt;&gt; interested to experiment with full-rbf as a policy. Indeed, in the future I&#xA;&gt;&gt; believe the multi-party transactions issuers who need full-rbf to secure&#xA;&gt;&gt; their funding flow should connect by default to full-rbf peers. One can&#xA;&gt;&gt; conjecture that their transactions are likely to be more compelling in&#xA;&gt;&gt; their feerate as their liquidity needs are higher than the simple&#xA;&gt;&gt; transaction. For today, I think we have really few standards and bitcoin&#xA;&gt;&gt; softwares relying on multi-party funded transactions [4].&#xA;&gt;&gt;&#xA;&gt;&gt; If you&#39;re a Bitcoin user or business and you don&#39;t like full-rbf, please&#xA;&gt;&gt; express an opinion on how it might affect your software/operations. I&#39;m&#xA;&gt;&gt; always interested to learn more about mempool and transaction-relay&#xA;&gt;&gt; interactions with upper-layers and applications and to listen to feedback&#xA;&gt;&gt; in those areas, and I guess a lot of other Bitcoin researchers/devs too. I&#xA;&gt;&gt; know there have been a lot of concerns about full-rbf in the past, however&#xA;&gt;&gt; I believe the Bitcoin ecosystem has matured a lot since then.&#xA;&gt;&gt;&#xA;&gt;&gt; Any mistakes or missing context is my own.&#xA;&gt;&gt;&#xA;&gt;&gt; Cheers,&#xA;&gt;&gt; Antoine&#xA;&gt;&gt;&#xA;&gt;&gt; [0] For more info about replace-by-fee, see&#xA;&gt;&gt; https://bitcoinops.org/en/topics/replace-by-fee/&#xA;&gt;&gt;&#xA;&gt;&gt; [1] For more details about the DoS vector, see&#xA;&gt;&gt; https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.html&#xA;&gt;&gt;&#xA;&gt;&gt; [2] E.g I think it does not affect the Lightning Pool service, as there&#xA;&gt;&gt; is a preliminary step where the participant funds are locked first in a&#xA;&gt;&gt; 2-of-2 with the coordinator before being committed in the multi-party batch&#xA;&gt;&gt; transaction.&#xA;&gt;&gt;&#xA;&gt;&gt; [3] https://github.com/bitcoin/bitcoin/pull/25353&#xA;&gt;&gt;&#xA;&gt;&gt; [4] E.g DLCs :&#xA;&gt;&gt; https://github.com/discreetlogcontracts/dlcspecs/blob/master/Transactions.md&#xA;&gt;&gt; ; Lightning dual-funded channel :&#xA;&gt;&gt; https://github.com/lightning/bolts/pull/851&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220621/721b7e8e/attachment-0001.html&gt;</html></oembed>