<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-16&#xA;📝 Original message:Hi alicexbt,&#xA;&#xA;&#xA;Thanks for taking time to review the pull request,&#xA;&#xA;&#xA;&gt; 1)If something relies on a policy which can be changed without breaking&#xA;consensus rules, how is it secure in any case with or without full rbf?&#xA;&#xA;&#xA;Your Lightning node software relies on far more software and hardware&#xA;components than the transaction-relay p2p network. One could list the&#xA;operating system on which is running your Lightning process or the compiler&#xA;toolchain turning out your Lightning source code in a binary artifact. Some&#xA;weird kernel&#39;s memory mapping change could allow access to your channel&#xA;funding keys, _without_ breaking the Bitcoin consensus rules [0]. Moreover,&#xA;your Lightning node is also relying on the existence of a global Internet&#xA;allowing your HTLC transaction to flow from your physical host to the crowd&#xA;of transactions confirming in the blockchain. Due to this &#34;protocol&#xA;assumption&#34; your channel balance would be vulnerable to any change in your&#xA;ISP routing policy, e.g refusing to accept your IPV4 traffic by a&#xA;sudden desiderata&#xA;to impose an IPV6 supremacy. Still _without_ breaking the Bitcoin consensus&#xA;rules. Of course, the odds of your ISP operator adopting this behavior are&#xA;really low, mostly because your operator has to bind to social and economic&#xA;constraints to stay in business.&#xA;&#xA;&#xA;And I believe this imperative to stay in business is certainly not absent&#xA;in the incentives of the Bitcoin node operators. You&#39;re free to run any&#xA;policy on your node, especially one hardening the safety of your&#xA;operations beyond&#xA;the default one. However, if you start to a transaction-relay&#xA;non-compatible with miner incentives, you won&#39;t have an efficient view of&#xA;the blockspace demand, and from then won&#39;t be able to offer compelling&#xA;feerates to execute your business transactions to satisfy your client&#xA;needs. Or you won&#39;t consolidate your wallet UTXOs at times of low-demand.&#xA;Indeed, a sane visibility of the mempools might not be critical now for your&#xA;Bitcoin operations, but this is not likely to become true with miner&#39;s&#xA;coinbase reward lowering with time and the system security relying on a&#xA;fruitful fee market.&#xA;&#xA;&#xA;So assuming there is a significant number of economically rational entities&#xA;running p2p nodes, I think it&#39;s a reasonable assumption for Lightning&#xA;developers that a policy maximizing miner&#39;s income and economic nodes&#xA;operations&#xA;will be widely run on the p2p network, and therefore lay its security model&#xA;on that. When there is a gap between the economically optimal policy&#xA;(full-rbf) and the effectively deployed one (optin), and this gap constitutes&#xA;a flaw for exploitation, I believe it&#39;s better to fix it.&#xA;&#xA;&#xA;If you have a different mode of thinking w.r.t how we should design&#xA;protocol in a trust-minimized, open, adversarial environment such as&#xA;Bitcoin, I&#39;m curious to listen to it.&#xA;&#xA;&#xA;&gt; If I write a python script that expects user to enter char &#39;a&#39; or &#39;b&#39; but&#xA;user can enter &#39;c&#39; and there is no code to handle exceptions or other&#xA;chars, will it be secure?&#xA;&#xA;&#xA;Of course not. If you deliver any critical software, you should attach a&#xA;solid manual explaining all the corner cases and rough edges. Even better&#xA;would be to enshrine the manual directly in your software API to minimize&#xA;the footgunish behaviors. E.g, with any ECC library, forbidding to reuse&#xA;nonces. If your user still ignores or misread the manual and provides an&#xA;insecure input, there is not that much you can do.&#xA;&#xA;&#xA;By analogy, I believe that&#39;s the same with Lightning. One recommendation of&#xA;the deployment manual would be to be always connected to a full-rbf&#xA;transaction-relay topology. Defaulting to this rule and your node exposes&#xA;far more surface of attacks. Assuming the manual has been well-written (big&#xA;assumption!), I don&#39;t think the system designer would be to blame.&#xA;&#xA;&#xA;That said, one issue to confess with current Lightning is our lack of&#xA;understanding of what should be figured out in the LN user manual for safe&#xA;operations. I would say that&#39;s an active area of research [1] [2] [3]&#xA;&#xA;&#xA;&gt; 2)full-rbf is not default in the 2 open pull requests, so this experiment&#xA;still relies on users changing RBF policies manually. If majority of nodes&#xA;use default opt-in policy, how would this affect vulnerable projects?&#xA;&#xA;&#xA;If we define the goal as ensuring there is a significant number of&#xA;transaction-relay routes between the L2s nodes requiring full-rbf and the&#xA;set of miners supporting this policy, and the set of miners is populated&#xA;enough, there is no need to convince the majority of nodes operators to&#xA;switch to full-rbf.&#xA;&#xA;&#xA;Beyond landing the &#39;full-rbf&#39; pull request, in pursuit of a partial&#xA;full-rbf deployment, I&#39;m thinking of reaching out to Lightning vendors to&#xA;recommend running LN nodes operators run their full-node with the setting&#xA;enabled. And also to few mining pool operators to advocate the potential&#xA;increase in their income.&#xA;&#xA;&#xA;Given there are like 17000 public LN nodes, if half of them adopt full-rbf&#xA;it should give already a good number of full-rbf transaction-relay routes&#xA;across the p2p network graph. When we&#39;re there, we can measure and think&#xA;more about how to tune the full-rbf sub-topology.&#xA;&#xA;&#xA;&gt; 2-3% transactions are replaced with opt-in RBF, if someone did not&#xA;replace earlier why would they do it with full RBF?&#xA;&#xA;&#xA;Because it&#39;s breaking the reliability and security of their use-cases.&#xA;Use-cases which didn&#39;t exist a few years ago. The mempool DoS vector is&#xA;described here [4]. To the best of my understanding, it might affect a&#xA;bunch of use-cases, such as dual-funded channels, on-chain DLCs, p2p&#xA;coinjoins, batched submarine swaps out. With the attack described, the&#xA;honest set of users might not have visibility of the network mempools that&#xA;there is a malicious, low-cost, opt-out double-spend preventing the&#xA;propagation of their multi-party transaction. With the existence of a&#xA;full-rbf transaction-relay topology, the multi-party transaction is able to&#xA;replace the optout.&#xA;&#xA;&#xA;None of those use-cases were deployed a few years ago, and the&#xA;understanding of the interactions with the mempool policy is still nascent&#xA;among their operators. However, if we assume that layering is a way to grow the&#xA;Bitcoin ecosystem, as I do, it is reasonable to expect they will constitute&#xA;a notable share of the Bitcoin transaction traffic during the next decade.&#xA;&#xA;&#xA;&gt; I am not opposed to full-rbf; rather, I am opposed to the notion that&#xA;full-rbf will solve all problems&#xA;&#xA;&#xA;I wished we had a magic Silver Bullet (tm) solving all the Bitcoin&#xA;problems...&#xA;&#xA;&#xA;I&#39;m only advocating a partial full-rbf deployment to solve a real precise&#xA;security issue affecting multi-party funded transactions. That said,&#xA;full-rbf is far from solving the known set of problems affecting the L2s&#xA;due to interactions with network mempools. E,g, see package relay&#xA;motivation [5]&#xA;&#xA;&#xA;&gt; I would suggest users to try Bitcoin Knots instead which already has an&#xA;option to disable all RBF policies if required, opt-in and full RBF policy.&#xA;&#xA;&#xA;Selecting a full-node to underpin any serious Bitcoin infrastructure or&#xA;secure a significant stack of coins should be submitted to a fully-fledged&#xA;decision-making process. Many factors are likely to matter such as the&#xA;level of activity of the contributor community, the chain of trust w.r.t&#xA;dependencies, the security incident track records, the quality of the&#xA;documentation, the exhaustivity and robustness of the set of features, ...&#xA;&#xA;&#xA;This process might take tens of hours, to be duplicated by the number of&#xA;node operators who would have to do the full-node vending switch. If you&#xA;consider the cognitive cost at the level of the Bitcoin ecosystem, it&#39;s far&#xA;less costly to implement and review a few lines of codes in Bitcoin Core.&#xA;&#xA;&#xA;&gt; Developers should provide basic RBF policy options rather than attempting&#xA;to define what constitutes a good policy and removing the ability to&#xA;disable something when necessary.&#xA;&#xA;&#xA;Of course, this statement assumes there is a clear line between the&#xA;developers and the users. Developers are also Bitcoin users, and they&#39;re&#xA;modifying the software to suit their use-case needs. And that&#39;s exactly the&#xA;purpose of the &#39;full-rbf&#39; PR I&#39;m proposing, aiming to propose a &#34;good&#34;&#xA;policy for a Lightning node, without actually seeking to change the&#xA;default. If they&#39;re parties interested in implementing more RBF policy&#xA;options in Bitcoin Core, I think they&#39;re free to propose such changes and&#xA;invest the engineering effort to do so. If you&#39;re interested in advancing&#xA;the state of policy options in Bitcoin Core, there are a lot of interesting&#xA;resources available and communities to encourage you in the learning&#xA;process to contribute to the codebase [6].&#xA;&#xA;&#xA;Antoine&#xA;&#xA;&#xA;[0] https://dirtycow.ninja&#xA;&#xA;[1] https://github.com/t-bast/lightning-docs/blob/master/pinning-attacks.md&#xA;&#xA;[2] https://arxiv.org/pdf/2006.01418.pdf&#xA;&#xA;[3] https://arxiv.org/pdf/2006.08513.pdf&#xA;&#xA;[4]&#xA;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.html&#xA;&#xA;[5]&#xA;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-May/020493.html&#xA;&#xA;[6] https://www.summerofbitcoin.org&#xA;&#xA;&#xA;Le jeu. 16 juin 2022 à 00:15, alicexbt &lt;alicexbt at protonmail.com&gt; a écrit :&#xA;&#xA;&gt; Hi Antoine,&#xA;&gt;&#xA;&gt;&#xA;&gt; Thanks for opening the pull request to add support for full-rbf in Bitcoin&#xA;&gt; Core. I have a disagreements with the approach and questions.&#xA;&gt;&#xA;&gt; Recent discussions among LN devs have brought back on the surface concerns&#xA;&gt; about the security of multi-party funded transactions (coinjoins,&#xA;&gt; dual-funded LN channels, on-chain DLCs, ...). It turns out there is a&#xA;&gt; low-fruit, naive DoS vector playable against the funding flow of any such&#xA;&gt; construction due to the lack of existent full-rbf transaction-relay&#xA;&gt; topology on today&#39;s p2p network [0] [1].&#xA;&gt;&#xA;&gt;&#xA;&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? If&#xA;&gt; I write a python script that expects user to enter char &#39;a&#39; or &#39;b&#39; but user&#xA;&gt; can enter &#39;c&#39; and there is no code to handle exceptions or other chars,&#xA;&gt; will it be secure?&#xA;&gt;&#xA;&gt; 2)full-rbf is not default in the 2 open pull requests, so this experiment&#xA;&gt; still relies on users changing RBF policies manually. If majority of nodes&#xA;&gt; use default opt-in policy, how would this affect vulnerable projects?&#xA;&gt;&#xA;&gt; If you&#39;re a mining operator looking to increase your income, you might be&#xA;&gt; interested to experiment with full-rbf as a policy.&#xA;&gt;&#xA;&gt;&#xA;&gt; Miners can only increase their income if users replace transactions. 2-3%&#xA;&gt; transactions are replaced with opt-in RBF, if someone did not replace&#xA;&gt; earlier why would they do it now even with full RBF? Or even if we add some&#xA;&gt; users in it who could not signal for some reasons, do you think it would be&#xA;&gt; anything above 5%?&#xA;&gt;&#xA;&gt; If you&#39;re a Bitcoin user or business and you don&#39;t like full-rbf, please&#xA;&gt; express an opinion on how it might affect your software/operations. I&#39;m&#xA;&gt; always interested to learn more about mempool and transaction-relay&#xA;&gt; interactions with upper-layers and applications and to listen to feedback&#xA;&gt; in those areas, and I guess a lot of other Bitcoin researchers/devs too. I&#xA;&gt; know there have been a lot of concerns about full-rbf in the past, however&#xA;&gt; I believe the Bitcoin ecosystem has matured a lot since then.&#xA;&gt;&#xA;&gt;&#xA;&gt; I am not opposed to full-rbf; rather, I am opposed to the notion that&#xA;&gt; full-rbf will solve all problems and the lack of basic options in Bitcoin&#xA;&gt; Core to employ/disable different RBF policies. There is also a speculation&#xA;&gt; about making full RBF default in an year which isn&#39;t relevant to discuss at&#xA;&gt; this point without trying different RBF policies.&#xA;&gt;&#xA;&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; This can also be done using GUI if not familiar with config option&#xA;&gt; mempoolreplacement​.&#xA;&gt;&#xA;&gt; The rationale in PR #16171 was insufficient to justify removing it in the&#xA;&gt; first place, had 2 NACKs and was reopened to merge it. Why bother with a&#xA;&gt; few lines of code that may allow someone disable it if required in local&#xA;&gt; mempool since it&#39;s only useful when a big percentage of miners utilize it&#xA;&gt; and essentially underused according to the PR author? Developers should&#xA;&gt; provide basic RBF policy options rather than attempting to define what&#xA;&gt; constitutes a good policy and removing the ability to disable something&#xA;&gt; when necessary.&#xA;&gt;&#xA;&gt;&#xA;&gt; /dev/fd0&#xA;&gt;&#xA;&gt; Sent with Proton Mail &lt;https://proton.me/&gt; secure email.&#xA;&gt;&#xA;&gt; ------- Original Message -------&#xA;&gt; On Tuesday, June 14th, 2022 at 5:55 AM, Antoine Riard via bitcoin-dev &lt;&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt;&#xA;&gt; Hi list,&#xA;&gt;&#xA;&gt; Recent discussions among LN devs have brought back on the surface concerns&#xA;&gt; about the security of multi-party funded transactions (coinjoins,&#xA;&gt; dual-funded LN channels, on-chain DLCs, ...). It turns out there is a&#xA;&gt; low-fruit, naive DoS vector playable against the funding flow of any such&#xA;&gt; construction due to the lack of existent full-rbf transaction-relay&#xA;&gt; topology on today&#39;s p2p network [0] [1]. While it does not consist in a&#xA;&gt; direct loss of funds, if exploited well I think it&#39;s annoying enough to&#xA;&gt; inflict significant timevalue loss or fee-bumping waste&#xA;&gt; to the future providers or distributed swarm of users doing multi-party&#xA;&gt; funded transactions. Of course, it can be fixed one layer above by&#xA;&gt; introducing either fidelity bonds or a reliable centralized coordinator,&#xA;&gt; though at the price of an overhead per-participant ressources cost and loss&#xA;&gt; in system openness [1].&#xA;&gt;&#xA;&gt; For that reason, I believe it would be beneficial to the flourishing of&#xA;&gt; multi-party funded transactions to fix the Dos vector by seeing a subset of&#xA;&gt; the network running full-rbf and enabling propagation of honest multi-party&#xA;&gt; transactions to the interested miners, replacing potential non-signaling&#xA;&gt; double-spend from a malicious counterparty. Moving towards that direction,&#xA;&gt; I&#39;ve submitted a small patch against Bitcoin Core enabling it to turn on&#xA;&gt; full-rbf as a policy, still under review [3]. The default setting stays&#xA;&gt; **false**, i.e keeping opt-in RBF as a default replacement policy. I&#39;ve&#xA;&gt; started to run the patch on a public node at 146.190.224.15.&#xA;&gt;&#xA;&gt; If you&#39;re a node operator curious to play with full-rbf, feel free to&#xA;&gt; connect to this node or spawn up a toy, public node yourself. There is a&#xA;&gt; ##uafrbf libera chat if you would like information on the settings or&#xA;&gt; looking for full-rbf friends (though that step could be automated in the&#xA;&gt; future by setting up a dedicated network bit and reserving a few outbound&#xA;&gt; slots for them).&#xA;&gt;&#xA;&gt; If you&#39;re a mining operator looking to increase your income, you might be&#xA;&gt; interested to experiment with full-rbf as a policy. Indeed, in the future I&#xA;&gt; believe the multi-party transactions issuers who need full-rbf to secure&#xA;&gt; their funding flow should connect by default to full-rbf peers. One can&#xA;&gt; conjecture that their transactions are likely to be more compelling in&#xA;&gt; their feerate as their liquidity needs are higher than the simple&#xA;&gt; transaction. For today, I think we have really few standards and bitcoin&#xA;&gt; softwares relying on multi-party funded transactions [4].&#xA;&gt;&#xA;&gt; If you&#39;re a Bitcoin user or business and you don&#39;t like full-rbf, please&#xA;&gt; express an opinion on how it might affect your software/operations. I&#39;m&#xA;&gt; always interested to learn more about mempool and transaction-relay&#xA;&gt; interactions with upper-layers and applications and to listen to feedback&#xA;&gt; in those areas, and I guess a lot of other Bitcoin researchers/devs too. I&#xA;&gt; know there have been a lot of concerns about full-rbf in the past, however&#xA;&gt; I believe the Bitcoin ecosystem has matured a lot since then.&#xA;&gt;&#xA;&gt; Any mistakes or missing context is my own.&#xA;&gt;&#xA;&gt; Cheers,&#xA;&gt; Antoine&#xA;&gt;&#xA;&gt; [0] For more info about replace-by-fee, see&#xA;&gt; https://bitcoinops.org/en/topics/replace-by-fee/&#xA;&gt;&#xA;&gt; [1] For more details about the DoS vector, see&#xA;&gt; https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-May/003033.html&#xA;&gt;&#xA;&gt; [2] E.g I think it does not affect the Lightning Pool service, as there is&#xA;&gt; a preliminary step where the participant funds are locked first in a 2-of-2&#xA;&gt; with the coordinator before being committed in the multi-party batch&#xA;&gt; transaction.&#xA;&gt;&#xA;&gt; [3] https://github.com/bitcoin/bitcoin/pull/25353&#xA;&gt;&#xA;&gt; [4] E.g DLCs :&#xA;&gt; https://github.com/discreetlogcontracts/dlcspecs/blob/master/Transactions.md&#xA;&gt; ; Lightning dual-funded channel :&#xA;&gt; https://github.com/lightning/bolts/pull/851&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220617/6775746f/attachment-0001.html&gt;</html></oembed>