<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated>2023-06-09T12:21:30Z</updated>
  <generator>https://yabu.me</generator>

  <title>Nostr notes by darosior [ARCHIVE]</title>
  <author>
    <name>darosior [ARCHIVE]</name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://yabu.me/npub1pj9022f74rzq7d5x7gnxje6wpsgk4r5jgeck8y5awd423ydhan3q7x22xp.rss" />
  <link href="https://yabu.me/npub1pj9022f74rzq7d5x7gnxje6wpsgk4r5jgeck8y5awd423ydhan3q7x22xp" />
  <id>https://yabu.me/npub1pj9022f74rzq7d5x7gnxje6wpsgk4r5jgeck8y5awd423ydhan3q7x22xp</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://yabu.me/nevent1qqsx8qehhq7vu4wk332emyt5plk5earru82t8vq7sjvq02c9n5gqk5gzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy97x4t0</id>
    
      <title type="html">📅 Original date posted:2022-02-19 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsx8qehhq7vu4wk332emyt5plk5earru82t8vq7sjvq02c9n5gqk5gzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy97x4t0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs97cpa6cskdqysr4pvgs5qxp90lm5vcs74yug8kshanfrgcudvhcs0kgyw0&#39;&gt;nevent1q…gyw0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-19&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt; Necromancing might be a reasonable name for attacks that work by getting an&lt;br/&gt;&amp;gt; out-of-date version of a tx mined.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s not an &amp;#34;attack&amp;#34;? There is no such thing as an out-of-date transaction, if&lt;br/&gt;you signed and broadcasted it in the first place. You can&amp;#39;t rely on the fact that&lt;br/&gt;a replacement transaction would somehow invalidate a previous version of it.&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;&lt;br/&gt;Le samedi 19 février 2022 à 10:39 AM, Peter Todd &amp;lt;pete at petertodd.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; On Fri, Feb 18, 2022 at 04:38:27PM -0800, Jeremy Rubin wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; As I said, it&amp;#39;s a new kind of pinning attack, distinct from other types&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; of pinning attack.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I think pinning is &amp;#34;formally defined&amp;#34; as sequences of transactions which&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; prevent or make it less likely for you to make any progress (in terms of&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; units of computation proceeding).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Mentioning &amp;#34;computation&amp;#34; when talking about transactions is misleading:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; blockchain transactions have nothing to do with computation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Something that only increases possibility to make progress cannot be&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; pinning.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It is incorrect to say that all use-cases have the property that any version of&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; a transaction being mined is progress.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If you want to call it something else, with a negative connotation, maybe&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; call it &amp;#34;necromancing&amp;#34; (bringing back txns that would otherwise be&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; feerate/fee irrational).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Necromancing might be a reasonable name for attacks that work by getting an&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; out-of-date version of a tx mined.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In particular, for the use case you mentioned &amp;#34;Eg a third party could mess&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; up OpenTimestamps calendars at relatively low cost by delaying the mining&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; of timestamp txs.&amp;#34;, this is incorrect. A third party can only accelerate&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; the mining on the timestamp transactions, but they can accelerate the&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; mining of any such timestamp transaction. If you have a single output chain&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; that you&amp;#39;re RBF&amp;#39;ing per block, then at most they can cause you to shift the&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; calendar commits forward one block. But again, they cannot pin you. If you&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; want to shift it back one block earlier, just offer a higher fee for the&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; later RBF&amp;#39;d calendar. Thus the interference is limited by how much you wish&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; to pay to guarantee your commitment is in this block as opposed to the next.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Your understanding of how OpenTimestamps calendars work appears to be&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; incorrect. There is no chain of unconfirmed transactions. Rather, OTS calendars&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; use RBF to update the timestamp tx with a new merkle tip hash for to all&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; outstanding per-second commitments once per new block. In high fee situations&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; it&amp;#39;s normal for there to be dozens of versions of that same tx, each with a&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; slightly higher feerate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OTS calendars can handle any of those versions getting mined. But older&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; versions getting mined wastes money, as the remaining commitments still need to&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; get mined in a subsequent transaction. Those remaining commitments are also&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; delayed by the time it takes for the next tx to get mined.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are many use-cases beyond OTS with this issue. For example, some entities&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; use &amp;#34;in-place&amp;#34; replacement for update low-time-preference settlement&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; transactions by adding new txouts and updating existing ones. Older versions of&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; those settlement transactions getting mined rather than the newer version&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; wastes money and delays settlement for the exact same reason it does in OTS.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If fee accounts or any similar mechanism get implemented, they absolutely&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; should be opt-in. Obviously, using a currently non-standard nVersion bit is a&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; possible approach. Conversely, with CPFP it may be desirable in the settlement&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; case to be able to prevent outputs from being spent in the same block. Again,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; an nVersion bit is a possible approach.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; By the way, you can already do out-of-band transaction fees to a very&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; similar effect, google &amp;#34;BTC transaction accelerator&amp;#34;. If the attack were at&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; all valuable to perform, it could happen today.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I just checked: all the BTC transaction accellerator services I could find look&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; to be either scams, or very expensive. We need compelling reasons to make this&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; nuisance attack significantly cheaper.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Lastly, if you do get &amp;#34;necromanced&amp;#34; on an earlier RBF&amp;#39;d transaction by a&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; third party for OTS, you should be relatively happy because it cost you&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; less fees overall, since the undoing of your later RBF surely returned some&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; satoshis to your wallet.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As I said above, no it doesn&amp;#39;t.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ----------------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://petertodd.org&#34;&gt;https://petertodd.org&lt;/a&gt; &amp;#39;peter&amp;#39;[:-1]@petertodd.org&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;
    </content>
    <updated>2023-06-09T13:05:09Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsymmy6qnl2y29s5t3nayad48e6ytdprlgrft49ykkcdw44zewkf7gzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyt6556g</id>
    
      <title type="html">📅 Original date posted:2020-10-05 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsymmy6qnl2y29s5t3nayad48e6ytdprlgrft49ykkcdw44zewkf7gzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyt6556g" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvkdpdy64ewpmfr2gxcgmcv2y5f7uxy3jyfg4j65002su7n4azvrgfh9lrk&#39;&gt;nevent1q…9lrk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Bastien,&lt;br/&gt;&lt;br/&gt;&amp;gt; I think that *in some cases*, fundees should be paying a portion of the commit-tx on-chain fees,&lt;br/&gt;&amp;gt; otherwise we may end up with a web-of-trust network where channels would only exist between peers&lt;br/&gt;&amp;gt; that trust each other, which is quite limiting (I&amp;#39;m hoping we can do better).&lt;br/&gt;&lt;br/&gt;Agreed.&lt;br/&gt;However in an anchor outputs future the funder only pays for the &amp;#34;backbone&amp;#34; fees of the channel and the fees necessary to secure the confirmation of transactions is paid in second stage by each interested party (*). It seems to me to be a reasonable middle-ground.&lt;br/&gt;&lt;br/&gt;(*) Credits to ZmnSCPxj for pointing this out to me on IRC.&lt;br/&gt;&lt;br/&gt;Darosior&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201005/1f406e21/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201005/1f406e21/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T13:00:59Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsrwhfpr2k5cdcfkn4tqlqud6t5zsqlhey2exqedqk5ys8l43as7tszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy8hc35l</id>
    
      <title type="html">📅 Original date posted:2020-02-11 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsrwhfpr2k5cdcfkn4tqlqud6t5zsqlhey2exqedqk5ys8l43as7tszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy8hc35l" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0u7mpm89hhkuh8g9vvwmmu3d5gwz5ndgwsmg5s7fp8gc5ga5m4zqjwaxeg&#39;&gt;nevent1q…axeg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi niftynei and list,&lt;br/&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;Le mardi, février 11, 2020 12:11 AM, lisa neigut &amp;lt;niftynei at gmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Here&amp;#39;s some thoughts I had on PoDLE&amp;#39;s and lightning. An enormous tip-of-the-hat is due to ZmnSCPxj for surfacing the work that JoinMarket has done here already.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - The initiating message (in the case of open channel, this would be `open_channel2`) is extended to include an &amp;#39;H2&amp;#39; field in its TLV, a 32-byte hash commitment to the P2 key.&lt;br/&gt;&amp;gt; - Only one H2 commitment is required.&lt;br/&gt;&amp;gt; - The `tx_add_input` message, as specified previously, is extended to an include a TLV type. This must be present on the input addition that corresponds with the UTXO used for the originally transmitted commitment&lt;br/&gt;&amp;gt; - The non-initiator SHOULD wait to send any `tx_add_input` messages of their own until after receiving a `tx_add_input` message with a valid PoDLE TLV extension.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. tlvs: `add_input_tlvs`&lt;br/&gt;&amp;gt; 2. types:&lt;br/&gt;&amp;gt;     1. type: 1 (`proof_of_dle`)&lt;br/&gt;&amp;gt;     2. data:&lt;br/&gt;&amp;gt;         *[`64*byte`:`s||e`]&lt;br/&gt;&amp;gt;         *[`33*byte`:pubkey`]&lt;br/&gt;&amp;gt;         *[`33*byte`:pubkey2`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - If the proof is incorrect, the non-initiator MAY fail the transaction collaboration or respond with `tx_complete`. There is no need for them to publish the PoDLE.&lt;br/&gt;&amp;gt; - If the proof is correct, the non-initiator verifies that the commitment (hash of pubkey2) has not been communicated to them via gossip.&lt;br/&gt;&amp;gt; - If the proof is not in their gossip store, the transaction collaboration continues. It is considered &amp;#39;safe&amp;#39; for the non-initiator to send `tx_add_input` to their peer.&lt;br/&gt;&amp;gt; - If the proof IS in their gossip store, the transaction collaboration SHOULD reply with `tx_complete`. It is considered &amp;#39;unsafe&amp;#39; for the non-initiator to send `tx_add_input`. (This allows errored/erroring initiators to use blacklisted utxos, however it prevents them from privy to any other nodes&amp;#39; UTXO set.)&lt;br/&gt;&lt;br/&gt;We could agree on an acceptable number of reuse in case on a non-malicious failure from the initiator after a valid PoDLE exchange ? (credits ZmnSCPxj)&lt;br/&gt;&lt;br/&gt;&amp;gt; - The initiator MUST NOT remove the committed to UTXO from the collaboration set.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - If the transaction collaboration fails/is errored by the initiator,&lt;br/&gt;&amp;gt;     - the non-initiator SHOULD broadcast the original PoDLE commitment to the gossip network.&lt;br/&gt;&amp;gt;     - the non-initiator MAY delay broadcast to allow the initiating node to re-attempt the open.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; The gossip message for a PoDLE blacklist entry is as follows:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type: 259 (`podle_blacklist`)&lt;br/&gt;&amp;gt; 2. data: &lt;br/&gt;&amp;gt;     *[`signature`:`signature`]&lt;br/&gt;&amp;gt;     *[`32*byte`:`H2`]&lt;br/&gt;&amp;gt;     *[`point`:`node_id`]&lt;br/&gt;&amp;gt;     *[`u32`:`timestamp`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; Note that the `node_id` is the id of the node that signs (and broadcasts) the blacklisted PoDLE. h/t to ZmnSCPxj for the gossip construction.&lt;br/&gt;&amp;gt; The timestamp is added as a convenience for peers to trim/discard blacklist participants as they wish depending on time/staleness.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; ## Some Notes:&lt;br/&gt;&amp;gt; - The JoinMarket protocol allows nodes to use any of a range of secondary points for J. Since the lightning version of this allows blacklisted UTXOs to still open channels, albeit without participation from the peer, it seems unnecessary to allow for more than one valid J point. I&amp;#39;d propose fixing the J the same zero-index point used by JoinMarket. This reduces the number of valid H2&amp;#39;s that are available for any given utxo set, while also keeping blacklisted H2&amp;#39;s compatible with the blacklist set generated by JoinMarket implementations.&lt;br/&gt;&amp;gt; - The blacklist originates from the &amp;#39;non-initiating&amp;#39; peer, and does not reveal the offending node&amp;#39;s id. &lt;br/&gt;&amp;gt; - Assuming that every node honestly participates in the blacklist, only verified H2&amp;#39;s will be submitted to the blacklist&lt;br/&gt;&amp;gt; - A malicious non-initiator can only prevent an honest initiator from using the committed UTXO for collaborative transactions; they won&amp;#39;t prevent them from successfully initiating a one-sided transaction with honest peers.&lt;br/&gt;&amp;gt; - Only nodes that have at least one public channel will be able to contribute to the public PoDLE blacklist. This means it&amp;#39;s possible for a malicious initiator to grief non-public nodes without much consequence, however this requires the ability to send inbound messages to private nodes, i.e. more likely for a close or splice interaction.&lt;br/&gt;&amp;gt; - As ZmnSCPxj has pointed out elsewhere, a malicious peer could broadcast junk H2&amp;#39;s; it is acceptable to rate-limit the number of PoDLE blacklists generated by a peer.peer&lt;br/&gt;&amp;gt; - It is possible for a malicious peer to fail to relay their `H2` entries in the blacklisted gossip set.&lt;br/&gt;&amp;gt; - Duplicate H2 gossip should replace older timestamped versions.&lt;br/&gt;&amp;gt; - Elsewhere we&amp;#39;ve had a discussion/concern over floods of PoDLE blacklist messages. It&amp;#39;s possible for gossip message floods to originate from a malicious peer; they also might signal an ongoing probe attempt. Given a timestamp and a rough measure of the number of utxos&amp;#39; currently outstanding in the mempool, however, it should be possible to distinguish the two.&lt;br/&gt;&lt;br/&gt;Ok, so knowing where PoDLE originate from mitigates the flood we talked about with ZmnSCPxj.&lt;br/&gt;However I don&amp;#39;t see how the number of utxos in the mempool is useful here, as you cannot distinguish which PoDLE is the real one out of the load you are receiving in case of a flood ?&lt;br/&gt;&lt;br/&gt;&amp;gt; ## Open Questions:&lt;br/&gt;&amp;gt; - Should PoDLE be required for every collaborative transaction (opens, splices &#43; closes), or only for opens? It seems reasonable to limit them just to opens, as for all others you&amp;#39;ll already have a shared UTXO with the peer.&lt;br/&gt;&amp;gt; - Is fixing the generator point too restrictive? JoinMarket allows for a range of acceptable NUMS (J) points (up to 256). The smaller the pool of eligible J&amp;#39;s, the smaller the pool of potential blacklisted PoDLE&amp;#39;s (up to no. NUMs * current utxo count). One upside to allowing a larger pool of J&amp;#39;s means that the same UTXO can be retried on failure. One downside to allowing a pool of J&amp;#39;s means that a single UTXO can be validly retried in a probe attack against a variety of peers.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; On Thu, Jan 30, 2020 at 5:32 PM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Good morning darosior, ariard, niftynei, and list,&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; We could also consider PoDLE as used in JoinMarket, which solves a similar problem.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &lt;a href=&#34;https://gist.github.com/AdamISZ/9cbba5e9408d23813ca8#defence-2-committing-to-a-utxo-in-publicplaintext-at-the-start-of-the-handshake&#34;&gt;https://gist.github.com/AdamISZ/9cbba5e9408d23813ca8#defence-2-committing-to-a-utxo-in-publicplaintext-at-the-start-of-the-handshake&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Basically, a PoDLE commits to a UTXO, without being trivially grindable from the UTXO set and also including a proof that the creator of the PoDLE knows the secret key behind it.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; It can later be opened to reveal which UTXO the opener allocated.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; If the opener aborts (i.e. does not provide its signatures to the funding transaction) then the acceptor can gossip the UTXO and the revealed PoDLE as well to the rest of Lightning, so that the opener at least cannot reuse the same UTXO to probe other potential acceptors.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; (though, my understanding, there is no clear way to determine when we can safely delete old PoDLEs: maybe each node can keep it around for a month, which might be good enough to limit the practical ability of a snoop to probe other nodes)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I believe JoinMarket also has solved the issue of allowing a UTXO to be used at most N times (for example due to &amp;#34;honest&amp;#34; failures, such as connectivity interruptions which might cause an abort of the protocol); I think it involves appending a single byte to something that is hashed, and ensuring its value is less than N, so that it can only be used from 0 to N - 1 (and thus allow a UTXO to be used at most N times).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Getting into contact with waxwing / Adam Gibson for this might be useful to fill out how PoDLE works and so on; basically, I believe this issue is a practically solved problem already for JoinMarket, though waxwing may be able to provide a more nuanced opinion.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I communicated with waxwing, and he said:&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; * See also: &lt;a href=&#34;https://joinmarket.me/blog/blog/poodle&#34;&gt;https://joinmarket.me/blog/blog/poodle&lt;/a&gt; \[sic\].&lt;br/&gt;&amp;gt; &amp;gt; * The counter I mentioned is implemented using the second generator point.&lt;br/&gt;&amp;gt; &amp;gt;   * The PoDLE construction requires the standard base point `G`, and another generator point `J`.&lt;br/&gt;&amp;gt; &amp;gt;   * To create the generator point `J`, JoinMarket appends the counter byte (the one used to limit N number of uses of the same UTXO) to `G`, hashes it, then uses a coerce-to-point.&lt;br/&gt;&amp;gt; &amp;gt; * PoDLE is sometimes called DLEQ elsewhere.&lt;br/&gt;&amp;gt; &amp;gt; * There is no concrete answer on &amp;#34;when to delete old PoDLE&amp;#34;; JoinMarket never deletes (though they might if throughput increases).&lt;br/&gt;&amp;gt; &amp;gt; * Watermarks like `nLockTime`, `nSequence`, `nVersion` are currently fixed values; JoinMarket sees no reason to change this since equal-valued CoinJoins are otherwise obvious to chain analysis anyway.&lt;br/&gt;&amp;gt; &amp;gt;   * But note: JoinMarket implements PayJoin, which is not otherwise obvious onchain, and does indeed do anti-fee-sniping emulation for PayJoin.&lt;br/&gt;&amp;gt; &amp;gt;   * JoinMarket also strives to make similar feerates across users.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; In any case, for myself, my thoughts are:&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; * I observe that our use-case is quite similar to a PayJoin:&lt;br/&gt;&amp;gt; &amp;gt;   * The opener proposes to make a payment (to a channel between the opener and the acceptor, rather than outright giving control to the acceptor as in PayJoin).&lt;br/&gt;&amp;gt; &amp;gt;   * The acceptor adds some UTXOs which will contribute to the payment output (i.e. the channel).&lt;br/&gt;&amp;gt; &amp;gt;   * This probably does mean we want to later consider `nLockTime` anti-fee-sniping as well in multi-funded channel opens.&lt;br/&gt;&amp;gt; &amp;gt; * Speaking of multi-funded channel opens, it seems to me this interactive tx construction mechanism as well can be later used for channel factories.&lt;br/&gt;&amp;gt; &amp;gt;   * Similarly, PoDLE techniques would be useful as well to multi-funded channel factories.&lt;br/&gt;&amp;gt; &amp;gt; * It would probably be a good idea to share PoDLE format with JoinMarket so we can share PoDLE with them (there could be bridges that share PoDLE between a JoinMarket maker and a Lightning node, and each network already has its own gossip protocols, so LN just needs a gossip protocol for sharing PoDLEs as well).&lt;br/&gt;&amp;gt; &amp;gt; * Probably we can mandate in some BOLT spec to retain PoDLE for at least a year or a month or two weeks or so, which should be enough to slow down probe attempts.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt; &amp;gt; ZmnSCPxj&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200211/32163fb0/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200211/32163fb0/attachment-0001.html&amp;gt&lt;/a&gt;;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 477 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200211/32163fb0/attachment-0001.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200211/32163fb0/attachment-0001.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:58:42Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsgeasej7pn8ytnpdnamryc07en2xl9yenzlxs3q8q9hevl2cph6ygzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwykvq5va</id>
    
      <title type="html">📅 Original date posted:2020-02-02 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsgeasej7pn8ytnpdnamryc07en2xl9yenzlxs3q8q9hevl2cph6ygzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwykvq5va" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsf2342wer0ayvu0c8q3n9ekdqftdhgqcdzpvlxsahr25tkkxyatkg60rg9s&#39;&gt;nevent1q…rg9s&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-02&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Pavol,&lt;br/&gt;&lt;br/&gt;&amp;gt; 1) Is c-lightning going to support Sphinx or other form of spontaneous payments?&lt;br/&gt;&lt;br/&gt;I think cdecker is working on integrating keysend to his noise plugin (&lt;a href=&#34;https://github.com/lightningd/plugins/pull/68&#34;&gt;https://github.com/lightningd/plugins/pull/68&lt;/a&gt;).&lt;br/&gt;&lt;br/&gt;&amp;gt; 2) Can a lightning node (such as lnd or c-lightning) send a push notification (e.g. to a webhook) when it receives or routes a payment? If yes, is this notification cryptographically signed (for example with the node&amp;#39;s private key)? Is this documented somewhere?&lt;br/&gt;&lt;br/&gt;C-lightning sends notifications (and hooks, but it doesn&amp;#39;t seem to be your usecase here) for typical events such as &amp;#34;I received an HTLC !&amp;#34;. You can make a plugin which registers to these lightningd notifications sends encrypted push notifs. Doc here &lt;a href=&#34;https://lightning.readthedocs.io/PLUGINS.html#event-notifications&#34;&gt;https://lightning.readthedocs.io/PLUGINS.html#event-notifications&lt;/a&gt; :-).&lt;br/&gt;&lt;br/&gt;Darosior&lt;br/&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;Le dimanche, février 2, 2020 1:39 PM, Pavol Rusnak via Lightning-dev &amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi all!&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; I have a couple of unrelated questions, hope you can give me some pointers.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1) Is c-lightning going to support Sphinx or other form of spontaneous payments?&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2) Can a lightning node (such as lnd or c-lightning) send a push notification (e.g. to a webhook) when it receives or routes a payment? If yes, is this notification cryptographically signed (for example with the node&amp;#39;s private key)? Is this documented somewhere?&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; Thanks!&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Best Regards / S pozdravom,&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; Pavol &amp;#34;stick&amp;#34; Rusnak&lt;br/&gt;&amp;gt; CTO, SatoshiLabs&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200202/49a4ac78/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200202/49a4ac78/attachment.html&amp;gt&lt;/a&gt;;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 477 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200202/49a4ac78/attachment.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200202/49a4ac78/attachment.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:58:30Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqstmas2c845fxsr4wa0lym5xyf6rcmvduqmmc2dnlsmarhwzthwwkgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwym59m84</id>
    
      <title type="html">📅 Original date posted:2020-01-31 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqstmas2c845fxsr4wa0lym5xyf6rcmvduqmmc2dnlsmarhwzthwwkgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwym59m84" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxul5uvvlx5ajh8hscyn99q9uswtu3h0h0q5du5y6k4rhtnhrx9ps2qx5np&#39;&gt;nevent1q…x5np&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-01-31&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;Using joinmarket&amp;#39;s PoDLEs is a great idea, and it seems preferable to using a transaction chain with a distinguishable SIGHASH.&lt;br/&gt;&lt;br/&gt;Just a naive question, what is described in &lt;a href=&#34;https://gist.github.com/AdamISZ/9cbba5e9408d23813ca8#defence-2-committing-to-a-utxo-in-publicplaintext-at-the-start-of-the-handshake&#34;&gt;https://gist.github.com/AdamISZ/9cbba5e9408d23813ca8#defence-2-committing-to-a-utxo-in-publicplaintext-at-the-start-of-the-handshake&lt;/a&gt; and &lt;a href=&#34;https://joinmarket.me/blog/blog/poodle/&#34;&gt;https://joinmarket.me/blog/blog/poodle/&lt;/a&gt; uses Schnorr signature. Can we use this protocol with ECDSA ?&lt;br/&gt;&lt;br/&gt;I&amp;#39;m now thinking about how this could be integrated into niftynei&amp;#39;s work on the dual-funded channel proposal. The PoDLE broadcast protocol seems to be the bigger part.&lt;br/&gt;&lt;br/&gt;*Imagining the size of the monster PR if PoDLEs ever get integrated*&lt;br/&gt;Regards,&lt;br/&gt;Darosior&lt;br/&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;Le vendredi, janvier 31, 2020 12:31 AM, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning darosior, ariard, niftynei, and list,&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; We could also consider PoDLE as used in JoinMarket, which solves a similar problem.&lt;br/&gt;&amp;gt; &amp;gt; &lt;a href=&#34;https://gist.github.com/AdamISZ/9cbba5e9408d23813ca8#defence-2-committing-to-a-utxo-in-publicplaintext-at-the-start-of-the-handshake&#34;&gt;https://gist.github.com/AdamISZ/9cbba5e9408d23813ca8#defence-2-committing-to-a-utxo-in-publicplaintext-at-the-start-of-the-handshake&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; Basically, a PoDLE commits to a UTXO, without being trivially grindable from the UTXO set and also including a proof that the creator of the PoDLE knows the secret key behind it.&lt;br/&gt;&amp;gt; &amp;gt; It can later be opened to reveal which UTXO the opener allocated.&lt;br/&gt;&amp;gt; &amp;gt; If the opener aborts (i.e. does not provide its signatures to the funding transaction) then the acceptor can gossip the UTXO and the revealed PoDLE as well to the rest of Lightning, so that the opener at least cannot reuse the same UTXO to probe other potential acceptors.&lt;br/&gt;&amp;gt; &amp;gt; (though, my understanding, there is no clear way to determine when we can safely delete old PoDLEs: maybe each node can keep it around for a month, which might be good enough to limit the practical ability of a snoop to probe other nodes)&lt;br/&gt;&amp;gt; &amp;gt; I believe JoinMarket also has solved the issue of allowing a UTXO to be used at most N times (for example due to &amp;#34;honest&amp;#34; failures, such as connectivity interruptions which might cause an abort of the protocol); I think it involves appending a single byte to something that is hashed, and ensuring its value is less than N, so that it can only be used from 0 to N - 1 (and thus allow a UTXO to be used at most N times).&lt;br/&gt;&amp;gt; &amp;gt; Getting into contact with waxwing / Adam Gibson for this might be useful to fill out how PoDLE works and so on; basically, I believe this issue is a practically solved problem already for JoinMarket, though waxwing may be able to provide a more nuanced opinion.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; I communicated with waxwing, and he said:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; -   See also: &lt;a href=&#34;https://joinmarket.me/blog/blog/poodle&#34;&gt;https://joinmarket.me/blog/blog/poodle&lt;/a&gt; \[sic\].&lt;br/&gt;&amp;gt; -   The counter I mentioned is implemented using the second generator point.&lt;br/&gt;&amp;gt;     -   The PoDLE construction requires the standard base point `G`, and another generator point `J`.&lt;br/&gt;&amp;gt;     -   To create the generator point `J`, JoinMarket appends the counter byte (the one used to limit N number of uses of the same UTXO) to `G`, hashes it, then uses a coerce-to-point.&lt;br/&gt;&amp;gt; -   PoDLE is sometimes called DLEQ elsewhere.&lt;br/&gt;&amp;gt; -   There is no concrete answer on &amp;#34;when to delete old PoDLE&amp;#34;; JoinMarket never deletes (though they might if throughput increases).&lt;br/&gt;&amp;gt; -   Watermarks like `nLockTime`, `nSequence`, `nVersion` are currently fixed values; JoinMarket sees no reason to change this since equal-valued CoinJoins are otherwise obvious to chain analysis anyway.&lt;br/&gt;&amp;gt;     -   But note: JoinMarket implements PayJoin, which is not otherwise obvious onchain, and does indeed do anti-fee-sniping emulation for PayJoin.&lt;br/&gt;&amp;gt;     -   JoinMarket also strives to make similar feerates across users.&lt;br/&gt;&amp;gt;         &lt;br/&gt;&lt;br/&gt;&amp;gt;         In any case, for myself, my thoughts are:&lt;br/&gt;&amp;gt;         &lt;br/&gt;&lt;br/&gt;&amp;gt; -   I observe that our use-case is quite similar to a PayJoin:&lt;br/&gt;&amp;gt;     -   The opener proposes to make a payment (to a channel between the opener and the acceptor, rather than outright giving control to the acceptor as in PayJoin).&lt;br/&gt;&amp;gt;     -   The acceptor adds some UTXOs which will contribute to the payment output (i.e. the channel).&lt;br/&gt;&amp;gt;     -   This probably does mean we want to later consider `nLockTime` anti-fee-sniping as well in multi-funded channel opens.&lt;br/&gt;&amp;gt; -   Speaking of multi-funded channel opens, it seems to me this interactive tx construction mechanism as well can be later used for channel factories.&lt;br/&gt;&amp;gt;     -   Similarly, PoDLE techniques would be useful as well to multi-funded channel factories.&lt;br/&gt;&amp;gt; -   It would probably be a good idea to share PoDLE format with JoinMarket so we can share PoDLE with them (there could be bridges that share PoDLE between a JoinMarket maker and a Lightning node, and each network already has its own gossip protocols, so LN just needs a gossip protocol for sharing PoDLEs as well).&lt;br/&gt;&amp;gt; -   Probably we can mandate in some BOLT spec to retain PoDLE for at least a year or a month or two weeks or so, which should be enough to slow down probe attempts.&lt;br/&gt;&amp;gt;     &lt;br/&gt;&lt;br/&gt;&amp;gt;     Regards,&lt;br/&gt;&amp;gt;     ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 477 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200131/4b9c0503/attachment.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200131/4b9c0503/attachment.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:58:28Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqszm7rq5kkgjzw3ljclmlwu5j0rx9htzwq2lpq28m7s0jnh92gcnvczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwywy6xep</id>
    
      <title type="html">📅 Original date posted:2020-01-30 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqszm7rq5kkgjzw3ljclmlwu5j0rx9htzwq2lpq28m7s0jnh92gcnvczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwywy6xep" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyt5e0w92uvdzql2l5zs9pcxm8ff9xl8m3sd35tezntus08dc7gwqyu3kzy&#39;&gt;nevent1q…3kzy&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-01-30&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Lisa and all,&lt;br/&gt;&lt;br/&gt;Given the discussion about utxos snooping, I wondered if there was any obvious drawbacks of using a transaction chain construction ?&lt;br/&gt;&lt;br/&gt;Since the obvious target of the probing is the accepter, it seems that the opener needs to at least have something at stake in order to be revealed some of the accepter&amp;#39;s utxos.&lt;br/&gt;Thus, the opener giving the accepter a signed transaction commited to the channel opening is one way of avoiding the opener to probe gratuitously. I was thinking of something like:&lt;br/&gt;&lt;br/&gt;A is opener, B is accepter.&lt;br/&gt;A could sign the first input (and accordingly the 2of2 output) with SIGHASH_SINGLE|SIGHASH_ANYONECANPAY. Unfortunately this doesn&amp;#39;t handle A&amp;#39;s change, but it can be solved using a chain of transaction.&lt;br/&gt;A creates a first transaction txA1:&lt;br/&gt;&lt;br/&gt;    txA1 (SIGHASH_ALL)&lt;br/&gt;     _________________ __________________________&lt;br/&gt;    | A&amp;#39;s input 1    | A&amp;#39;s channel participation |&lt;br/&gt;    |----------------|---------------------------&lt;br/&gt;    | A&amp;#39;s input 2    | A&amp;#39;s change                |&lt;br/&gt;    |----------------|---------------------------&lt;br/&gt;    | A&amp;#39;s input n    |&lt;br/&gt;    |________________|&lt;br/&gt;    &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;And then creates /signs the funding transaction out of the first output of txA1:&lt;br/&gt;&lt;br/&gt;    txA2 (SIGHASH_SINGLE|SIGHASH_ANYONECANPAY)&lt;br/&gt;     _________________ _______________&lt;br/&gt;    | txA1 vout 0    | 2of2 with B    |&lt;br/&gt;    |________________|________________&lt;br/&gt;&lt;br/&gt;Since txA2 is signed with SINGLE|ANYONECANPAY, B can add inputs to fulfill the value requirement of the 2of2, and add outputs for its own change.&lt;br/&gt;&lt;br/&gt;This comes at the cost of more setup fees opener-side, but avoids the accepter to be gratuitously probed, so this is arguably a far lesser evil.&lt;br/&gt;Is there any other downside I&amp;#39;m missing here ?&lt;br/&gt;&lt;br/&gt;Antoine&lt;br/&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;Le mardi, janvier 28, 2020 2:51 AM, lisa neigut &amp;lt;niftynei at gmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Some of the feedback I received from the check-in for the dual-funding proposal this past Monday was along the lines that we look at simplifying for breaking it into smaller, more manageable chunks.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; The biggest piece of the dual-funding protocol update is definitely the move from a single peer constructing a transaction to two participants. We&amp;#39;re also going to likely want to reuse this portion of the protocol for batched closings and splicing. To that extent, it seemed useful to highlight it in a separate email.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; This is a change from the existing proposal in the dual-funding PR #524 -- it allows for the removal of inputs and outputs.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; The set of messages are as follows.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; Note that the &amp;#39;initiation&amp;#39; of this protocol will be different depending on the case of the transaction (open, close or splice):&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type:   440 `tx_add_input`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`32*byte`:`channel_identifier`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u64`:`sats`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`sha256`:`prevtx_txid`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u32`:`prevtx_vout`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`prevtx_scriptpubkey_len`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`prevtx_scriptpubkey_len*byte`:`prevtx_scriptpubkey`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`max_witness_len`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`scriptlen`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`scriptlen*byte`:`script`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`byte`:`signal_rbf`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type: 442 `tx_add_output`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`32*byte`:`channel_identifier`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u64`:`sats`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`scriptlen`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`scriptlen*byte`:`script`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type: 444 `tx_remove_input`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`32*byte`:`channel_identifier`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`sha256`:`prevtx_txid`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u32`:`prevtx_vout`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type: 446 `tx_remove_output`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`32*byte`:`channel_identifier`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u64`:`sats`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`scriptlen`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`scriptlen*byte`:`script`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type: 448 `tx_complete`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`32*byte`:`channel_identifier`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`num_inputs`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`num_outputs`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type:  448 `tx_sigs`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`channel_id`:`channel_identifier`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`num_witnesses`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`num_witnesses*witness_stack`:`witness_stack`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. subtype: `witness_stack`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`sha256`:`prevtx_txid`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u32`:`prevtx_vout`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`num_input_witness`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`num_input_witness*witness_element`:`witness_element`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. subtype: `witness_element`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`u16`:`len`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     * [`len*byte`:`witness`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; ## General Notes&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Validity of inputs/outputs is not checked until both peers have sent consecutive `tx_complete`  messages.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Duplicate inputs or outputs is a protocol error.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Feerate is set by the initiator, or in the case of a closing transaction, negotiated before the transaction construction is initiated.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Every peer pays fees for the inputs &#43; outputs they contribute, plus enough to cover the maximum estimate of their witnesses. Overpayment of fees is permissible.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Initiator is responsible for contributing the output/input in question, i.e. the &lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   funding output in the case of an opening, or the funding input in the case of a close. &lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   (This means that the opener will pay for the opening output). In the case of a splice,&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   the initiator of the splice pays for the funding tx&amp;#39;s inclusion as an input and the&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   new &amp;#39;funding tx&amp;#39; output.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Any contributor may signal that their input is RBF&amp;#39;able. The nSequence for this input should be set to 0xFEFF FFFF, 0xFFFFFFFF otherwise.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - The initiating peer is understood to be paying the fee for the shared transaction fields (nVersion [4], segwit marker &#43; flag [2], input &#43; output counts [2-18], witness count [1-9], nLocktime [4]; total [13-40bytes])&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Inputs MUST be segwit compatible (PW* or P2SH-PW*)&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - All output scripts must be standard&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - nLocktime is always set to 0x00000000.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - The `num_inputs` and `num_outputs` in `tx_complete` is a count of that peer’s final input and output contributions, net any removals.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Either peer may add or remove inputs and outputs until both peers have successfully&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   exchanged a `tx_complete` message in succession.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Either peer may only add or remove their own input or output.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - In the case that a `tx_complete` agreement cannot be reached, either peer may&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   fail the channel or open protocol (whatever is reasonable for the particular case)&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   - In the case of a splice, this would be a soft error (channel returns to normal operation until      &lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     otherwise failed or closed.)&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   - In the case of an open, this would be a failure to open the channel.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   - In the case of a close, a failed collaborative close would result in an error and a unilateral close.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; ### Considering the Simple Open case (2 parties)&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Both peers signal `opt_dual_fund`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Opener initiates a channel open with `open_channel2` message, indicating the feerate for the opening transaction&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Accepter signals acceptance of channel open as proposed, including proposed feerate, via `accept_channel2`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Opener sends `tx_add_output`, with the funding output for the sum of both peer’s funding_amount&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Opener sends `tx_add_input` for each input the wish to add to the funding transaction&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Opener sends `tx_add_output` for their change &lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Opener sends `tx_complete`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Accepter sends `tx_add_input` for each input they wish to add to the funding transaction&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Accepter sends `tx_add_output` for their change.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Accepter sends `tx_complete`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Opener sends `tx_complete`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Opener and accepter exchange commitment signatures; etc.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; ### Considering the Splice case:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Both peers signal `opt_splice_ok`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - One peer initiates a splice, also signaling the feerate for the transaction. Exact protocol unspecified herein.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Initiator sends `tx_add_input` with the original funding output&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Initiator sends `tx_add_output` with the new, post-splice funding output&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Initiator sends `tx_add_input/output` as needed to add all desired inputs &#43; outputs&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Initiator sends `tx_complete`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Peer sends `tx_add_input/output` as needed to add all desired inputs &#43; outputs&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Initiator sends `tx_complete`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Peer sends `tx_complete`&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Initiator &#43; peer exchange commitment signatures, etc.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; ### Considering the Close case:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Both peers signal `opt_collaborative_close` in their `node_announcement`.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - A peer initiates a close sending a `shutdown`, as per usual. &lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - A feerate is negotiated. Out of band for this particular portion of the protocol.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; -The closing initiator (peer which first sent `shutdown`), sends `tx_add_input` to spend the funding output and `tx_add_output` to add their output for the channel closure.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - The peer responds with `tx_add_output`, adding their output to the close transaction.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - If `option_upfront_shutdown_script` is flagged but no such output with a value at or within a reasonable feerate gap of the peer&amp;#39;s funding output is present, then the peer must fail the channel. &lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; ## Updating a collaborative transaction with RBF:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - If any input is flagged as RBF’able, then the transaction is considered eligible for RBF&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - RBF can be initiated by either party, and serves as an initiation for another round of transaction composition, as outlined above.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; - Note that this section has been cribbed and re-purposed from the original RBF proposal for splicing, see &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-November/001621.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-November/001621.html&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type: 45 (`init_rbf`) (`option_collaborative_rbf`)&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;    * [`4`:`fee_step`]&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; Each `fee_step` adds 1/4 (rounded down) to the initial &lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; transaction feerate. eg. if the initial feerate was 512 satoshis per kiloweight, `fee_step` 1&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; is  512 &#43; 512 / 4 = 640, `fee_step` 2 is 640 &#43; 640 / 4 = 800.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; The sender:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   - MUST set `fee_step` greater than zero and greater than any prior `fee_step`.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; The recipient:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;   - if the new fee exceeds the sender&amp;#39;s current balance minus reserve&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     after it is applied to the splice transaction:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;     - MUST error.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; NOTES:&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 1. 1/4 is a reasonable minimal RBF, but as each one requires more&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt;    tracking by the recipient, serves to limit the number you can create.&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 2. Rule 4 of BIP125 requires a feerate increase to at least surpass the minimum transaction relay setting. Ratcheting by 25% should satisfy this requirement&lt;br/&gt;&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;gt; 3. An additional rule will be added to the checks of an RBF transaction that it must include at least one identical, replaceable input as the original transaction.&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/d137558a/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/d137558a/attachment-0001.html&amp;gt&lt;/a&gt;;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 477 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/d137558a/attachment-0001.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/d137558a/attachment-0001.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:58:26Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsvj42fmd6lrthwt9exx3g56n0crjf25njcyvnnzxqj9hc4qns55rszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyvayewl</id>
    
      <title type="html">📅 Original date posted:2020-01-30 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsvj42fmd6lrthwt9exx3g56n0crjf25njcyvnnzxqj9hc4qns55rszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyvayewl" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst639r6njhex7gmv74e83g5mjr8uqtzvzrj9m5z6q7vxqe48z0q7gvj57sg&#39;&gt;nevent1q…57sg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-01-30&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt; Yes that&amp;#39;s the reason I wrote the initiator can just announce its own and receiver use it to sign the funding tx, even if receiver tip is backward. Funding tx won&amp;#39;t propagate from receiver mempool but that&amp;#39;s fine if it does from the initiator one.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Ah, then we are back to my first response where niftynei proposed to accord on setting it to tip-6 so that reorg is not a problem (or if it is, there are bigger).&lt;br/&gt;\-------- Original Message --------&lt;br/&gt;On Jan 30, 2020, 19:45, Antoine Riard &amp;lt; antoine.riard at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The funding transaction sig would actually fail verification if tip differs between funder and fundee&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes that&amp;#39;s the reason I wrote the initiator can just&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; announce its own and receiver use it to sign the funding tx,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; even if receiver tip is backward. Funding tx won&amp;#39;t propagate&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; from receiver mempool but that&amp;#39;s fine if it does from the initiator&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; one.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or are you talking about the commitment tx (different issue and there is&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; broader privacy leaks there) ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Darosior ( i&amp;#39;ll stick with my pseudo, first names definitely don&amp;#39;t have enough entropy :-) )&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ahaha yeah this pseudo-random-name-generator is definitely not trustworthy :p&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le jeu. 30 janv. 2020 à 13:19, darosior &amp;lt;[darosior at protonmail.com][darosior_protonmail.com]&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Sorry I wasn&amp;#39;t clear enough in the \`(cdecker)\` paragraph.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The funding transaction sig would actually fail verification if tip differs between funder and fundee.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Darosior ( i&amp;#39;ll stick with my pseudo, first names definitely don&amp;#39;t have enough entropy :-) )&lt;br/&gt;&amp;gt; &amp;gt; \-------- Original Message --------&lt;br/&gt;&amp;gt; &amp;gt; On Jan 30, 2020, 19:09, Antoine Riard &amp;lt; [antoine.riard at gmail.com][antoine.riard_gmail.com]&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Hey Darosior,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; You don&amp;#39;t need a strict synchronization between both peers,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; just let nLocktime picked up by initiator and announce it at&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; same time than feerate or at \`tx\_complete\`. Worst-case,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; a slow-block-processing receiver may not be able to get&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; the transaction accepted by its local mempool, but IMO that&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; fine if at least the initiator is able to do so. We are requiring peers&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; to be weakly in sync before operating channel anyway (\`funding\_locked\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; exchange).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Funding\_tx can already be drop from mempool for others&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; reasons like mempool shrinks or expiry so broadcaster&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; should always be ready to re-send it or bump feerate.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Or are you describing another issue ?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Le jeu. 30 janv. 2020 à 04:06, darosior &amp;lt;[darosior at protonmail.com][darosior_protonmail.com]&amp;gt; a écrit :&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Hi Antoine and all,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; About nLockTime fun thing is Lisa, Cdecker and I had this conversation to integrate it to C-lightning just yesterday.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Unfortunately you need to add a &amp;#34;My tip is xxxx&amp;#34; to the openchannel msg, otherwise if you set nLockTime to tip. (cdecker)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Moreover in case of reorg the funding tx (now non-final) would be dropped from mempool ? But you could set nLockTime to, say, tip - 6. (niftynei)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Antoine&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \-------- Original Message --------&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; On Jan 30, 2020, 01:21, Antoine Riard &amp;lt; [antoine.riard at gmail.com][antoine.riard_gmail.com]&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Hey thanks for this proposal!&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2 high-level questions:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; What about multi-party tx construction ? By multi-party, let&amp;#39;s define&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Alice initiate a tx construction to Bob and then Bob announce a&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; construction to Caroll and &amp;#34;bridge&amp;#34; all inputs/outputs additions/substractions&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; in both directions. I think the current proposal hold, if you are a bit more&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; tolerant and bridge peer don&amp;#39;t send a tx\_complete before receiving ones&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; from all its peers.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; What about transactions format ? I think we should coordinate with Coinjoin&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; people to converge to a common one to avoid leaking protocol usage when&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; we can hinder under Taproot. Like setting the nLocktime or sorting inputs&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; in some protocol-specific fashion. Ideally we should have a BIP for format&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; but every layer 2 protocols its own set of messages concerning the construction.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; nLocktime is always set to 0x000000&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Maybe we can implement anti-fee sniping and mask among wallet core&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; txn set: [&lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/aabec94541e23a67a9f30dc2c80dab3383a01737/src/wallet/wallet.cpp\#L2519&#34;&gt;https://github.com/bitcoin/bitcoin/blob/aabec94541e23a67a9f30dc2c80dab3383a01737/src/wallet/wallet.cpp\#L2519&lt;/a&gt;][https_github.com_bitcoin_bitcoin_blob_aabec94541e23a67a9f30dc2c80dab3383a01737_src_wallet_wallet.cpp_L2519] ?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; In the case of a close, a failed collaborative close would result in an error and a uninlateral close&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Or can we do first a mutual closing tx, hold tx broadcast for a bit if &amp;#34;opt\_dual\_fund&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; is signaled to see if a tx\_construction &#43; add\_funding\_input for the channel is received&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; soon ? At least that would be a dual opt-in to know than one party can submit a funding-outpoint&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; as part of a composed tx ?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Antoine&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Le lun. 27 janv. 2020 à 20:51, lisa neigut &amp;lt;[niftynei at gmail.com][niftynei_gmail.com]&amp;gt; a écrit :&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Some of the feedback I received from the check-in for the dual-funding proposal this past Monday was along the lines that we look at simplifying for breaking it into smaller, more manageable chunks.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; The biggest piece of the dual-funding protocol update is definitely the move from a single peer constructing a transaction to two participants. We&amp;#39;re also going to likely want to reuse this portion of the protocol for batched closings and splicing. To that extent, it seemed useful to highlight it in a separate email.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; This is a change from the existing proposal in the dual-funding [PR \#524][PR _524] \-- it allows for the removal of inputs and outputs.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; The set of messages are as follows.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Note that the &amp;#39;initiation&amp;#39; of this protocol will be different depending on the case of the transaction (open, close or splice):&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type:   440 \`tx\_add\_input\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u64\`:\`sats\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`sha256\`:\`prevtx\_txid\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u32\`:\`prevtx\_vout\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`prevtx\_scriptpubkey\_len\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`prevtx\_scriptpubkey\_len\*byte\`:\`prevtx\_scriptpubkey\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`max\_witness\_len\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`scriptlen\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`scriptlen\*byte\`:\`script\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`byte\`:\`signal\_rbf\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 442 \`tx\_add\_output\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u64\`:\`sats\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`scriptlen\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`scriptlen\*byte\`:\`script\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 444 \`tx\_remove\_input\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`sha256\`:\`prevtx\_txid\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u32\`:\`prevtx\_vout\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 446 \`tx\_remove\_output\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u64\`:\`sats\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`scriptlen\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`scriptlen\*byte\`:\`script\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 448 \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`num\_inputs\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`num\_outputs\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type:  448 \`tx\_sigs\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`channel\_id\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`num\_witnesses\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`num\_witnesses\*witness\_stack\`:\`witness\_stack\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. subtype: \`witness\_stack\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`sha256\`:\`prevtx\_txid\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u32\`:\`prevtx\_vout\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`num\_input\_witness\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`num\_input\_witness\*witness\_element\`:\`witness\_element\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. subtype: \`witness\_element\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`len\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`len\*byte\`:\`witness\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\# General Notes&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Validity of inputs/outputs is not checked until both peers have sent consecutive \`tx\_complete\`  messages.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Duplicate inputs or outputs is a protocol error.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Feerate is set by the initiator, or in the case of a closing transaction, negotiated before the transaction construction is initiated.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Every peer pays fees for the inputs &#43; outputs they contribute, plus enough to cover the maximum estimate of their witnesses. Overpayment of fees is permissible.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator is responsible for contributing the output/input in question, i.e. the &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   funding output in the case of an opening, or the funding input in the case of a close. &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   (This means that the opener will pay for the opening output). In the case of a splice,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   the initiator of the splice pays for the funding tx&amp;#39;s inclusion as an input and the&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   new &amp;#39;funding tx&amp;#39; output.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Any contributor may signal that their input is RBF&amp;#39;able. The nSequence for this input should be set to 0xFEFF FFFF, 0xFFFFFFFF otherwise.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- The initiating peer is understood to be paying the fee for the shared transaction fields (nVersion \[4\], segwit marker &#43; flag \[2\], input &#43; output counts \[2-18\], witness count \[1-9\], nLocktime \[4\]; total \[13-40bytes\])&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Inputs MUST be segwit compatible (PW\* or P2SH-PW\*)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- All output scripts must be standard&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- nLocktime is always set to 0x00000000.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- The \`num\_inputs\` and \`num\_outputs\` in \`tx\_complete\` is a count of that peer’s final input and output contributions, net any removals.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Either peer may add or remove inputs and outputs until both peers have successfully&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   exchanged a \`tx\_complete\` message in succession.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Either peer may only add or remove their own input or output.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- In the case that a \`tx\_complete\` agreement cannot be reached, either peer may&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   fail the channel or open protocol (whatever is reasonable for the particular case)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   - In the case of a splice, this would be a soft error (channel returns to normal operation until      &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     otherwise failed or closed.)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   - In the case of an open, this would be a failure to open the channel.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   - In the case of a close, a failed collaborative close would result in an error and a unilateral close.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\#\# Considering the Simple Open case (2 parties)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Both peers signal \`opt\_dual\_fund\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener initiates a channel open with \`open\_channel2\` message, indicating the feerate for the opening transaction&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Accepter signals acceptance of channel open as proposed, including proposed feerate, via \`accept\_channel2\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_add\_output\`, with the funding output for the sum of both peer’s funding\_amount&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_add\_input\` for each input the wish to add to the funding transaction&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_add\_output\` for their change &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Accepter sends \`tx\_add\_input\` for each input they wish to add to the funding transaction&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Accepter sends \`tx\_add\_output\` for their change.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Accepter sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener and accepter exchange commitment signatures; etc.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\#\# Considering the Splice case:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Both peers signal \`opt\_splice\_ok\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- One peer initiates a splice, also signaling the feerate for the transaction. Exact protocol unspecified herein.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_add\_input\` with the original funding output&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_add\_output\` with the new, post-splice funding output&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_add\_input/output\` as needed to add all desired inputs &#43; outputs&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Peer sends \`tx\_add\_input/output\` as needed to add all desired inputs &#43; outputs&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Peer sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator &#43; peer exchange commitment signatures, etc.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\#\# Considering the Close case:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Both peers signal \`opt\_collaborative\_close\` in their \`node\_announcement\`.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- A peer initiates a close sending a \`shutdown\`, as per usual. &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- A feerate is negotiated. Out of band for this particular portion of the protocol.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \-The closing initiator (peer which first sent \`shutdown\`), sends \`tx\_add\_input\` to spend the funding output and \`tx\_add\_output\` to add their output for the channel closure.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- The peer responds with \`tx\_add\_output\`, adding their output to the close transaction.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- If \`option\_upfront\_shutdown\_script\` is flagged but no such output with a value at or within a reasonable feerate gap of the peer&amp;#39;s funding output is present, then the peer must fail the channel. &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\# Updating a collaborative transaction with RBF:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- If any input is flagged as RBF’able, then the transaction is considered eligible for RBF&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- RBF can be initiated by either party, and serves as an initiation for another round of transaction composition, as outlined above.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Note that this section has been cribbed and re-purposed from the original RBF proposal for splicing, see &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-November/001621.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-November/001621.html&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 45 (\`init\_rbf\`) (\`option\_collaborative\_rbf\`)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;    \* \[\`32\`:\`channel\_id\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;    \* \[\`4\`:\`fee\_step\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Each \`fee\_step\` adds 1/4 (rounded down) to the initial &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; transaction feerate. eg. if the initial feerate was 512 satoshis per kiloweight, \`fee\_step\` 1&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; is  512 &#43; 512 / 4 = 640, \`fee\_step\` 2 is 640 &#43; 640 / 4 = 800.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; The sender:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   - MUST set \`fee\_step\` greater than zero and greater than any prior \`fee\_step\`.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; The recipient:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   - if the new fee exceeds the sender&amp;#39;s current balance minus reserve&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     after it is applied to the splice transaction:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     - MUST error.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;   &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; NOTES:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. 1/4 is a reasonable minimal RBF, but as each one requires more&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;    tracking by the recipient, serves to limit the number you can create.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. Rule 4 of BIP125 requires a feerate increase to at least surpass the minimum transaction relay setting. Ratcheting by 25% should satisfy this requirement&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; 3. An additional rule will be added to the checks of an RBF transaction that it must include at least one identical, replaceable input as the original transaction.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; [Lightning-dev at lists.linuxfoundation.org][Lightning-dev_lists.linuxfoundation.org]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[darosior_protonmail.com]: mailto:darosior at protonmail.com&lt;br/&gt;[antoine.riard_gmail.com]: mailto:antoine.riard at gmail.com&lt;br/&gt;[https_github.com_bitcoin_bitcoin_blob_aabec94541e23a67a9f30dc2c80dab3383a01737_src_wallet_wallet.cpp_L2519]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/aabec94541e23a67a9f30dc2c80dab3383a01737/src/wallet/wallet.cpp#L2519&#34;&gt;https://github.com/bitcoin/bitcoin/blob/aabec94541e23a67a9f30dc2c80dab3383a01737/src/wallet/wallet.cpp#L2519&lt;/a&gt;&lt;br/&gt;[niftynei_gmail.com]: mailto:niftynei at gmail.com&lt;br/&gt;[PR _524]: &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/524&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/524&lt;/a&gt;&lt;br/&gt;[Lightning-dev_lists.linuxfoundation.org]: mailto:Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/3aac971c/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/3aac971c/attachment-0001.html&amp;gt&lt;/a&gt;;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 489 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/3aac971c/attachment-0001.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/3aac971c/attachment-0001.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:58:24Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs0pd8rc7zdsrxtw5uwdt2vnpeffr84lj45cxxxktgkvjnnm9pegrczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy36anf4</id>
    
      <title type="html">📅 Original date posted:2020-01-30 📝 Original message: Sorry ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs0pd8rc7zdsrxtw5uwdt2vnpeffr84lj45cxxxktgkvjnnm9pegrczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy36anf4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqdfpuj25d038d5znkt6rfljzadrkrjtds25kq4q9ekrcrpyge65cgjh6ua&#39;&gt;nevent1q…h6ua&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-01-30&lt;br/&gt;📝 Original message:&lt;br/&gt;Sorry I wasn&amp;#39;t clear enough in the \`(cdecker)\` paragraph.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;The funding transaction sig would actually fail verification if tip differs between funder and fundee.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Darosior ( i&amp;#39;ll stick with my pseudo, first names definitely don&amp;#39;t have enough entropy :-) )&lt;br/&gt;\-------- Original Message --------&lt;br/&gt;On Jan 30, 2020, 19:09, Antoine Riard &amp;lt; antoine.riard at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hey Darosior,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You don&amp;#39;t need a strict synchronization between both peers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; just let nLocktime picked up by initiator and announce it at&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; same time than feerate or at \`tx\_complete\`. Worst-case,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; a slow-block-processing receiver may not be able to get&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; the transaction accepted by its local mempool, but IMO that&amp;#39;s&lt;br/&gt;&amp;gt; fine if at least the initiator is able to do so. We are requiring peers&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; to be weakly in sync before operating channel anyway (\`funding\_locked\`&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; exchange).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Funding\_tx can already be drop from mempool for others&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; reasons like mempool shrinks or expiry so broadcaster&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; should always be ready to re-send it or bump feerate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or are you describing another issue ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le jeu. 30 janv. 2020 à 04:06, darosior &amp;lt;[darosior at protonmail.com][darosior_protonmail.com]&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hi Antoine and all,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; About nLockTime fun thing is Lisa, Cdecker and I had this conversation to integrate it to C-lightning just yesterday.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Unfortunately you need to add a &amp;#34;My tip is xxxx&amp;#34; to the openchannel msg, otherwise if you set nLockTime to tip. (cdecker)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Moreover in case of reorg the funding tx (now non-final) would be dropped from mempool ? But you could set nLockTime to, say, tip - 6. (niftynei)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Antoine&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; \-------- Original Message --------&lt;br/&gt;&amp;gt; &amp;gt; On Jan 30, 2020, 01:21, Antoine Riard &amp;lt; [antoine.riard at gmail.com][antoine.riard_gmail.com]&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Hey thanks for this proposal!&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 2 high-level questions:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; What about multi-party tx construction ? By multi-party, let&amp;#39;s define&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Alice initiate a tx construction to Bob and then Bob announce a&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; construction to Caroll and &amp;#34;bridge&amp;#34; all inputs/outputs additions/substractions&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; in both directions. I think the current proposal hold, if you are a bit more&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; tolerant and bridge peer don&amp;#39;t send a tx\_complete before receiving ones&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; from all its peers.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; What about transactions format ? I think we should coordinate with Coinjoin&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; people to converge to a common one to avoid leaking protocol usage when&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; we can hinder under Taproot. Like setting the nLocktime or sorting inputs&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; in some protocol-specific fashion. Ideally we should have a BIP for format&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; but every layer 2 protocols its own set of messages concerning the construction.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; nLocktime is always set to 0x000000&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Maybe we can implement anti-fee sniping and mask among wallet core&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; txn set: [&lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/aabec94541e23a67a9f30dc2c80dab3383a01737/src/wallet/wallet.cpp\#L2519&#34;&gt;https://github.com/bitcoin/bitcoin/blob/aabec94541e23a67a9f30dc2c80dab3383a01737/src/wallet/wallet.cpp\#L2519&lt;/a&gt;][https_github.com_bitcoin_bitcoin_blob_aabec94541e23a67a9f30dc2c80dab3383a01737_src_wallet_wallet.cpp_L2519] ?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In the case of a close, a failed collaborative close would result in an error and a uninlateral close&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Or can we do first a mutual closing tx, hold tx broadcast for a bit if &amp;#34;opt\_dual\_fund&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; is signaled to see if a tx\_construction &#43; add\_funding\_input for the channel is received&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; soon ? At least that would be a dual opt-in to know than one party can submit a funding-outpoint&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; as part of a composed tx ?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Antoine&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Le lun. 27 janv. 2020 à 20:51, lisa neigut &amp;lt;[niftynei at gmail.com][niftynei_gmail.com]&amp;gt; a écrit :&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Some of the feedback I received from the check-in for the dual-funding proposal this past Monday was along the lines that we look at simplifying for breaking it into smaller, more manageable chunks.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The biggest piece of the dual-funding protocol update is definitely the move from a single peer constructing a transaction to two participants. We&amp;#39;re also going to likely want to reuse this portion of the protocol for batched closings and splicing. To that extent, it seemed useful to highlight it in a separate email.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This is a change from the existing proposal in the dual-funding [PR \#524][PR _524] \-- it allows for the removal of inputs and outputs.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The set of messages are as follows.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Note that the &amp;#39;initiation&amp;#39; of this protocol will be different depending on the case of the transaction (open, close or splice):&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type:   440 \`tx\_add\_input\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u64\`:\`sats\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`sha256\`:\`prevtx\_txid\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u32\`:\`prevtx\_vout\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`prevtx\_scriptpubkey\_len\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`prevtx\_scriptpubkey\_len\*byte\`:\`prevtx\_scriptpubkey\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`max\_witness\_len\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`scriptlen\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`scriptlen\*byte\`:\`script\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`byte\`:\`signal\_rbf\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 442 \`tx\_add\_output\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u64\`:\`sats\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`scriptlen\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`scriptlen\*byte\`:\`script\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 444 \`tx\_remove\_input\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`sha256\`:\`prevtx\_txid\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u32\`:\`prevtx\_vout\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 446 \`tx\_remove\_output\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u64\`:\`sats\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`scriptlen\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`scriptlen\*byte\`:\`script\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 448 \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`32\*byte\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`num\_inputs\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`num\_outputs\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type:  448 \`tx\_sigs\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`channel\_id\`:\`channel\_identifier\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`num\_witnesses\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`num\_witnesses\*witness\_stack\`:\`witness\_stack\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. subtype: \`witness\_stack\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`sha256\`:\`prevtx\_txid\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u32\`:\`prevtx\_vout\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`num\_input\_witness\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`num\_input\_witness\*witness\_element\`:\`witness\_element\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. subtype: \`witness\_element\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`u16\`:\`len\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     \* \[\`len\*byte\`:\`witness\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\# General Notes&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Validity of inputs/outputs is not checked until both peers have sent consecutive \`tx\_complete\`  messages.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Duplicate inputs or outputs is a protocol error.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Feerate is set by the initiator, or in the case of a closing transaction, negotiated before the transaction construction is initiated.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Every peer pays fees for the inputs &#43; outputs they contribute, plus enough to cover the maximum estimate of their witnesses. Overpayment of fees is permissible.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator is responsible for contributing the output/input in question, i.e. the &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   funding output in the case of an opening, or the funding input in the case of a close. &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   (This means that the opener will pay for the opening output). In the case of a splice,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   the initiator of the splice pays for the funding tx&amp;#39;s inclusion as an input and the&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   new &amp;#39;funding tx&amp;#39; output.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Any contributor may signal that their input is RBF&amp;#39;able. The nSequence for this input should be set to 0xFEFF FFFF, 0xFFFFFFFF otherwise.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- The initiating peer is understood to be paying the fee for the shared transaction fields (nVersion \[4\], segwit marker &#43; flag \[2\], input &#43; output counts \[2-18\], witness count \[1-9\], nLocktime \[4\]; total \[13-40bytes\])&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Inputs MUST be segwit compatible (PW\* or P2SH-PW\*)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- All output scripts must be standard&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- nLocktime is always set to 0x00000000.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- The \`num\_inputs\` and \`num\_outputs\` in \`tx\_complete\` is a count of that peer’s final input and output contributions, net any removals.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Either peer may add or remove inputs and outputs until both peers have successfully&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   exchanged a \`tx\_complete\` message in succession.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Either peer may only add or remove their own input or output.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- In the case that a \`tx\_complete\` agreement cannot be reached, either peer may&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   fail the channel or open protocol (whatever is reasonable for the particular case)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   - In the case of a splice, this would be a soft error (channel returns to normal operation until      &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     otherwise failed or closed.)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   - In the case of an open, this would be a failure to open the channel.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   - In the case of a close, a failed collaborative close would result in an error and a unilateral close.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\#\# Considering the Simple Open case (2 parties)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Both peers signal \`opt\_dual\_fund\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener initiates a channel open with \`open\_channel2\` message, indicating the feerate for the opening transaction&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Accepter signals acceptance of channel open as proposed, including proposed feerate, via \`accept\_channel2\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_add\_output\`, with the funding output for the sum of both peer’s funding\_amount&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_add\_input\` for each input the wish to add to the funding transaction&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_add\_output\` for their change &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Accepter sends \`tx\_add\_input\` for each input they wish to add to the funding transaction&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Accepter sends \`tx\_add\_output\` for their change.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Accepter sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Opener and accepter exchange commitment signatures; etc.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\#\# Considering the Splice case:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Both peers signal \`opt\_splice\_ok\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- One peer initiates a splice, also signaling the feerate for the transaction. Exact protocol unspecified herein.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_add\_input\` with the original funding output&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_add\_output\` with the new, post-splice funding output&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_add\_input/output\` as needed to add all desired inputs &#43; outputs&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Peer sends \`tx\_add\_input/output\` as needed to add all desired inputs &#43; outputs&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Peer sends \`tx\_complete\`&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Initiator &#43; peer exchange commitment signatures, etc.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\#\# Considering the Close case:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Both peers signal \`opt\_collaborative\_close\` in their \`node\_announcement\`.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- A peer initiates a close sending a \`shutdown\`, as per usual. &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- A feerate is negotiated. Out of band for this particular portion of the protocol.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \-The closing initiator (peer which first sent \`shutdown\`), sends \`tx\_add\_input\` to spend the funding output and \`tx\_add\_output\` to add their output for the channel closure.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- The peer responds with \`tx\_add\_output\`, adding their output to the close transaction.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- If \`option\_upfront\_shutdown\_script\` is flagged but no such output with a value at or within a reasonable feerate gap of the peer&amp;#39;s funding output is present, then the peer must fail the channel. &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \#\# Updating a collaborative transaction with RBF:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- If any input is flagged as RBF’able, then the transaction is considered eligible for RBF&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- RBF can be initiated by either party, and serves as an initiation for another round of transaction composition, as outlined above.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \- Note that this section has been cribbed and re-purposed from the original RBF proposal for splicing, see &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-November/001621.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-November/001621.html&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. type: 45 (\`init\_rbf\`) (\`option\_collaborative\_rbf\`)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;    \* \[\`32\`:\`channel\_id\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;    \* \[\`4\`:\`fee\_step\`\]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Each \`fee\_step\` adds 1/4 (rounded down) to the initial &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; transaction feerate. eg. if the initial feerate was 512 satoshis per kiloweight, \`fee\_step\` 1&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; is  512 &#43; 512 / 4 = 640, \`fee\_step\` 2 is 640 &#43; 640 / 4 = 800.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The sender:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   - MUST set \`fee\_step\` greater than zero and greater than any prior \`fee\_step\`.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The recipient:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   - if the new fee exceeds the sender&amp;#39;s current balance minus reserve&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     after it is applied to the splice transaction:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     - MUST error.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   &lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; NOTES:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1. 1/4 is a reasonable minimal RBF, but as each one requires more&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;    tracking by the recipient, serves to limit the number you can create.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2. Rule 4 of BIP125 requires a feerate increase to at least surpass the minimum transaction relay setting. Ratcheting by 25% should satisfy this requirement&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 3. An additional rule will be added to the checks of an RBF transaction that it must include at least one identical, replaceable input as the original transaction.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; [Lightning-dev at lists.linuxfoundation.org][Lightning-dev_lists.linuxfoundation.org]&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[darosior_protonmail.com]: mailto:darosior at protonmail.com&lt;br/&gt;[antoine.riard_gmail.com]: mailto:antoine.riard at gmail.com&lt;br/&gt;[https_github.com_bitcoin_bitcoin_blob_aabec94541e23a67a9f30dc2c80dab3383a01737_src_wallet_wallet.cpp_L2519]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/aabec94541e23a67a9f30dc2c80dab3383a01737/src/wallet/wallet.cpp#L2519&#34;&gt;https://github.com/bitcoin/bitcoin/blob/aabec94541e23a67a9f30dc2c80dab3383a01737/src/wallet/wallet.cpp#L2519&lt;/a&gt;&lt;br/&gt;[niftynei_gmail.com]: mailto:niftynei at gmail.com&lt;br/&gt;[PR _524]: &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/524&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/524&lt;/a&gt;&lt;br/&gt;[Lightning-dev_lists.linuxfoundation.org]: mailto:Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/462dc521/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/462dc521/attachment-0001.html&amp;gt&lt;/a&gt;;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 489 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/462dc521/attachment-0001.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200130/462dc521/attachment-0001.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:58:22Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsxrhcuccqjqr9t9cfzscpmlsx34y9zugg6sz58yj6cw599098wz6szyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyqlw9s6</id>
    
      <title type="html">📅 Original date posted:2020-01-02 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsxrhcuccqjqr9t9cfzscpmlsx34y9zugg6sz58yj6cw599098wz6szyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyqlw9s6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsy400n5j6svhqzcavg8t8lpd5zlm4dw3r9zvshp7dexzu80j9h2pstfltph&#39;&gt;nevent1q…ltph&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-01-02&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;Just a nit to add for reference to this great writeup.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; -   Add random tweaks to your channel traversal costs.&lt;br/&gt;&amp;gt;     -   This is done currently by the C-Lightning route randomization feature, but note that it is currently set to up to a &#43;/-5% tweak.&lt;br/&gt;&amp;gt;         -   [This paper](&lt;a href=&#34;https://arxiv.org/pdf/1909.06890&#34;&gt;https://arxiv.org/pdf/1909.06890&lt;/a&gt;) evaluates the C-Lightning route randomization as well.&lt;br/&gt;&amp;gt;             It suggest adding random tweaks to the costs of entire routes instead, though it may not be easy for normal pathfinding algorithms to implement this.&lt;br/&gt;&lt;br/&gt;Since the authors made this analysis, the total fuzzing has been replaced by a tweak of both the base and proportional fees, added along the CTLV during the shadow route random walk.&lt;br/&gt;&lt;a href=&#34;https://github.com/ElementsProject/lightning/blob/8c387932c0095ffbe7314a73004337f5cc15ece0/plugins/pay.c#L827&#34;&gt;https://github.com/ElementsProject/lightning/blob/8c387932c0095ffbe7314a73004337f5cc15ece0/plugins/pay.c#L827&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;Darosior&lt;br/&gt;-------------- next part --------------&lt;br/&gt;A non-text attachment was scrubbed...&lt;br/&gt;Name: signature.asc&lt;br/&gt;Type: application/pgp-signature&lt;br/&gt;Size: 477 bytes&lt;br/&gt;Desc: OpenPGP digital signature&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200102/91b4ba7b/attachment-0001.sig&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200102/91b4ba7b/attachment-0001.sig&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T12:57:54Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs0mq98rxpyu02nf69f806fd3zl4ulcf0znfm0v4zflqpe3hd0exkgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwylzafmp</id>
    
      <title type="html">📅 Original date posted:2021-06-01 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs0mq98rxpyu02nf69f806fd3zl4ulcf0znfm0v4zflqpe3hd0exkgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwylzafmp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9p8jzx8yfqh8lpca6f3u9xy8fealuk5szse00qf332f792hpw6esjfkm9q&#39;&gt;nevent1q…km9q&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-06-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi all,&lt;br/&gt;&lt;br/&gt;It&amp;#39;s been almost 9 months since Tor v2 hidden services have been deprecated.&lt;br/&gt;The Tor project will drop v2 support in about a month in the latest release. It will then be entirely be dropped from all supported releases by October.&lt;br/&gt;More at &lt;a href=&#34;https://blog.torproject.org/v2-deprecation-timeline&#34;&gt;https://blog.torproject.org/v2-deprecation-timeline&lt;/a&gt; .&lt;br/&gt;&lt;br/&gt;Bitcoin Core defaults to v3 since 0.21.0 (&lt;a href=&#34;https://bitcoincore.org/en/releases/0.21.0/&#34;&gt;https://bitcoincore.org/en/releases/0.21.0/&lt;/a&gt;) and is planning to drop the v2 support for 0.22 (&lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/22050&#34;&gt;https://github.com/bitcoin/bitcoin/pull/22050&lt;/a&gt;), which means that v2 onions will gradually stop being gossiped on the Bitcoin network.&lt;br/&gt;&lt;br/&gt;I think we should do the same for the Lightning network, and the timeline is rather tight. Also, the configuration is user-facing (as opposed to Bitcoin Core, which generates ephemeral services) which i expect to make the transition trickier.&lt;br/&gt;C-lightning is deprecating the configuration of Tor v2 services starting next release, according to our deprecation policy we should be able to entirely drop its support 3 releases after this one, which should be not so far from the October deadline.&lt;br/&gt;&lt;br/&gt;Opinions? What is the state of other implementations with regard to Tor v2 support?&lt;br/&gt;&lt;br/&gt;Antoine
    </content>
    <updated>2023-06-09T12:40:07Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqstw20499mwwx3vp5dspr8ftfj5uvsgwujq7jezpjhh57e6gy30jkczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyzm2q6e</id>
    
      <title type="html">📅 Original date posted:2023-01-26 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqstw20499mwwx3vp5dspr8ftfj5uvsgwujq7jezpjhh57e6gy30jkczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyzm2q6e" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0df2q6n9xdvfxhxe0y8z9mthlmljaa42tm5v4xarvv6xypyda67c95hte9&#39;&gt;nevent1q…hte9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-26&lt;br/&gt;🗒️ Summary of this message: The email discusses a simple instantiation of Revault, which has advantages but two major issues that can be solved with covenants.&lt;br/&gt;📝 Original message:Hello Billy,&lt;br/&gt;&lt;br/&gt;Yes it&amp;#39;s basically a (simple) instantiation of Revault. You can find more at [&lt;a href=&#34;https://github.com/revault&#34;&gt;https://github.com/revault&lt;/a&gt;](&lt;a href=&#34;https://github.com/revault/&#34;&gt;https://github.com/revault/&lt;/a&gt;) (you most likely want the `practical-revault` repo). There is a description of the concept, the specification of a communication protocol between the participants as well as the implementation of the whole.&lt;br/&gt;&lt;br/&gt;Such a design presents some advantages, but it has two major issues:&lt;br/&gt;&lt;br/&gt;- You need to make sure all your watchtowers received the Cancel signature before you sign the Unvault transaction. But how can you get this guarantee in the usual (and reasonable) model of an untrusted laptop?&lt;br/&gt;- You can only have policies on the Unvault transaction (eg &amp;#34;You can only Unvault up to X BTC during working hours&amp;#34;), not on the Spend transaction (eg &amp;#34;You can only send coins to a Script with pubkey Y required in all spending paths&amp;#34;). Revault allows to use cosigning servers that act as anti-replay oracles to have policies on the spend, but this is obviously *very* suboptimal.&lt;br/&gt;&lt;br/&gt;Both issues are solvable with covenants.&lt;br/&gt;&lt;br/&gt;Antoine Poinsot&lt;br/&gt;------- Original Message -------&lt;br/&gt;Le lundi 23 janvier 2023 à 6:39 PM, Billy Tetrud via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; In the discussion around James&amp;#39; OP_VAULT proposal, it was implied that precomputed vaults must use ephemeral keys that must be deleted as part of the vaulting protocol, like [Bryan Bishop&amp;#39;s proposal](&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-August/017229.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-August/017229.html&lt;/a&gt;). Looking around, I haven&amp;#39;t been able to find any wallet vault proposal that doesn&amp;#39;t require ephemeral keys, so at the risk of posting something that&amp;#39;s obvious to everyone, I wanted to share a simple way to do a wallet vault without requiring any key deletion.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The basic idea is to create an N-of-N multisig address, and pre-sign some transactions from it with N-1 keys to an address with several timelocked spend paths. This has the fallback that funds can always be spent immediately if you use all the keys, just like a normal N-of-N multisig address (since that&amp;#39;s what it is at its core), but the usage of any of the pre-signed transactions leads to an address that guarantees a clawback within a time window. Here&amp;#39;s a 3-of-3 example:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Vault Initialization:&lt;br/&gt;&amp;gt; 1. Create 3 of 3 Vault Address&lt;br/&gt;&amp;gt; 2. Create an Interim Address that can send with:&lt;br/&gt;&amp;gt; * 1 of 3 keys after a timelock of 1 month&lt;br/&gt;&amp;gt; * 2 of 3 keys after a timelock of 1 week&lt;br/&gt;&amp;gt; * 3 of 3 keys with no timelock&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Vaulting:&lt;br/&gt;&amp;gt; 1. Create a transaction sending an output to the Vault Address&lt;br/&gt;&amp;gt; 2. Create a transaction spending that Vault Address output to the Interim Address&lt;br/&gt;&amp;gt; 3. Presign one copy of the step-2 transaction for each of the three combinations of two keys.&lt;br/&gt;&amp;gt; 4. Store seeds separately, store the wallet config as well as the three presigned transactions with each seed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Unvaulting:&lt;br/&gt;&amp;gt; 1. Sign one of the pre-signed transactions with the missing signature.&lt;br/&gt;&amp;gt; 2. Broadcast&lt;br/&gt;&amp;gt; 3. Wait the appropriate timelock for the number of keys you want to sign with.&lt;br/&gt;&amp;gt; 4. Create a transaction sending from the Interim Address.&lt;br/&gt;&amp;gt; 5. Broadcast&lt;br/&gt;&amp;gt; Recovering (after unvaulting step 2 after the broadcasted transaction to the Interim Address has been mined):&lt;br/&gt;&amp;gt; 1. Sign the utxo with all three keys to any destination. Alternatively sign with two keys, wait 1 week.&lt;br/&gt;&amp;gt; 2. Broadcast it&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This has the usual downsides of pre-signed vaults that you need to backup these transactions for each vaulting, complications involving the flexibility (or lack thereof) of fees, and inflexibility in how much to unvault (must be the whole utxo, no change). This could of course be augmented with various techniques to make fee handling more flexible (anchor outputs, multiple versions of the presigned transactions with different fees, etc). More complicated presigning schemes could allow for some flexibility in unvaulting amount (eg by sending change back into the vault, and creating additional pre-signed transactions for that new output).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It also has the same downside that OP_CTV vaults have, where a stolen key can steal funds from the interim address by racing the owner with their own transaction once the necessary delay has passed. Note that James&amp;#39; OP_VAULT opcode wouldn&amp;#39;t have this problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But not requiring any toxic waste keys seems like a pretty good benefit over Bryan Bishop&amp;#39;s original proposal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Anyways sorry if this was already on people&amp;#39;s radar and just too obvious to post about.&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230126/01be3f93/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230126/01be3f93/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:18:41Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsxu7f5kehthzxrn4m5t34sv6yv8q2ewd565heakerr26z4he2y2yczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy93wxfl</id>
    
      <title type="html">📅 Original date posted:2022-04-29 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsxu7f5kehthzxrn4m5t34sv6yv8q2ewd565heakerr26z4he2y2yczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy93wxfl" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxv5q0s3e23q04tyv9klutna2mu75ykxd256gd0gkuvtwzzg372jclcfnuj&#39;&gt;nevent1q…fnuj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-29&lt;br/&gt;📝 Original message:Hi Shesek,&lt;br/&gt;&lt;br/&gt;&amp;gt; 1. The resulting txids are not stable.&lt;br/&gt;&lt;br/&gt;This is *literally* what the post you are replying to is proposing to solve.&lt;br/&gt;&lt;br/&gt;&amp;gt; This property could be important for some of the proposed CTV use-cases, like channel factories.&lt;br/&gt;&lt;br/&gt;Hmm? You can&amp;#39;t have channel factories without Eltoo. (Well, you can in theory but good luck.)&lt;br/&gt;Maybe you are refering to non-interactive channel creation? The case for stable txids is less strong if wehave APO (and therefore Eltoo). [0]&lt;br/&gt;&lt;br/&gt;&amp;gt; 2. APO will only be available on Taproot, which some people might prefer to avoid for long-term multi-decade vault storage due to QC concerns. (also see my previous post on this thread [0])&lt;br/&gt;&lt;br/&gt;This has been addressed over and over and over again. If a QC is able overnight to spend a large fraction of&lt;br/&gt;the supply, your coins in your super non-QC-vulnerable-bare-CTV-covenant (that would eventually become&lt;br/&gt;vulnerable when trying to use it) are worthless.[1]&lt;br/&gt;&lt;br/&gt;Sorry for being sarcastic, but at this point it&amp;#39;s not fair to use quantum-computer FUD to justify theactivation of CTV over APO, or encourage the use of legacy transactions over Taproot ones.&lt;br/&gt;&lt;br/&gt;&amp;gt; 3. Higher witness satisfaction cost of roughly 3x vbytes vs CTV-in-Taproot (plus 33 extra vbytes vs CTV-in-segwitv0 in the case of a single CTV branch, for the taproot control block. with more branches CTV-in-taproot eventually becomes preferable).&lt;br/&gt;&lt;br/&gt;Again, this is what my post discusses. Here are the arguments from my post about why i don&amp;#39;t think it&amp;#39;s a big deal:&lt;br/&gt;&lt;br/&gt;1. You can in this case see CTV as an optimization of (tweaked) APOAS. A lot of us are doubtful about CTV&lt;br/&gt;usecases for real people. So much that it was even proposed to temporarily activate it to see if it would&lt;br/&gt;ever have any real traction! [2]&lt;br/&gt;My point with this post was: what if we do (a slightly tweaked) BIP118, that is otherwise useful. And&lt;br/&gt;if this use of covenants is really getting traction then we can roll out an optimization in the form of&lt;br/&gt;CTV (or better covenants, as we&amp;#39;d have had more research put into it by this time).&lt;br/&gt;2. CTV is mainly sold for its usage inside vaults. While i&amp;#39;m not convinced, a few more vbytes should not&lt;br/&gt;matter for this usecase.&lt;br/&gt;&lt;br/&gt;Also, it&amp;#39;s not 33 extra vbytes vs CTV-in-segwitv0, but 33 extra * witness units* (8.25 vbytes).&lt;br/&gt;Aside, you can also use the internal key optimization with APO. But i don&amp;#39;t think it&amp;#39;s desirable just to save32 WU, as you can&amp;#39;t have NUMS-ness then. [3]&lt;br/&gt;&lt;br/&gt;&amp;gt; 4. Higher network-wide full-node validation costs (checking a signature is quite more expensive than hashing, and the hashing is done in both cases).&lt;br/&gt;&lt;br/&gt;Are APO signatures more expensive to verify? If not i don&amp;#39;t think this should be a reason to constrain us to a&lt;br/&gt;much less useful construction, as the cost for the network of validating signatures already exists today. Evenif it didn&amp;#39;t, the tradeoff of cost/usefulness needs to be considered.&lt;br/&gt;&lt;br/&gt;&amp;gt; 5. As APO is currently spec&amp;#39;d, it would suffer from the half-spend problem: if you have multiple outputs encumbered under an APO covenant that requires the same tx sigmsg hash, it becomes possible to spend all of them together as multiple inputs in a single transaction and burn the extra to mining fees.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If I&amp;#39;m not mistaken, I believe this makes the simple-apo-vault implementation [1] vulnerable to spending multiple vaulted outputs of the same denomination together and burning all but the first one. I asked the author for a more definitive answer on twitter [2].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Fixing this requires amending BIP 118 with some new sigmsg flags (making the ANYONECANPAY behaviour optional, as mentioned in the OP).&lt;br/&gt;&lt;br/&gt;Yes! And as i mentioned on Twitter also committing to the input index which i forgot to add in the OP here.&lt;br/&gt;&lt;br/&gt;While i don&amp;#39;t think the specific points are valid, i appreciate your reply and your efforts to explore the&lt;br/&gt;tradeoffs between the two approaches.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Antoine&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019813.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019813.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://bitcoin.stackexchange.com/a/91050/101498&#34;&gt;https://bitcoin.stackexchange.com/a/91050/101498&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-April/020242.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-April/020242.html&lt;/a&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://twitter.com/darosior/status/1518979155362254849?s=20&amp;amp;t=mGkw7K8mcyQwdLImFvdebw&#34;&gt;https://twitter.com/darosior/status/1518979155362254849?s=20&amp;amp;t=mGkw7K8mcyQwdLImFvdebw&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; This is definitely possible but also means that APO as-is isn&amp;#39;t a CTV-replacement candidate, without first going through some more design and review iterations.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; shesek&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-April/020326.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-April/020326.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] &lt;a href=&#34;https://github.com/darosior/simple-anyprevout-vault&#34;&gt;https://github.com/darosior/simple-anyprevout-vault&lt;/a&gt;&lt;br/&gt;&amp;gt; [2] &lt;a href=&#34;https://twitter.com/shesek/status/1519874493434544128&#34;&gt;https://twitter.com/shesek/status/1519874493434544128&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Fri, Apr 22, 2022 at 2:23 PM darosior via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I would like to know people&amp;#39;s sentiment about doing (a very slightly tweaked version of) BIP118 in place of&lt;br/&gt;&amp;gt;&amp;gt; (or before doing) BIP119.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; SIGHASH_ANYPREVOUT and its precedent iterations have been discussed for over 6 years. It presents proven and&lt;br/&gt;&amp;gt;&amp;gt; implemented usecases, that are demanded and (please someone correct me if i&amp;#39;m wrong) more widely accepted than&lt;br/&gt;&amp;gt;&amp;gt; CTV&amp;#39;s.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; SIGHASH_ANYPREVOUTANYSCRIPT, if its &amp;#34;ANYONECANPAY&amp;#34; behaviour is made optional [0], can emulate CTV just fine.&lt;br/&gt;&amp;gt;&amp;gt; Sure then you can&amp;#39;t have bare or Segwit v0 CTV, and it&amp;#39;s a bit more expensive to use. But we can consider CTV&lt;br/&gt;&amp;gt;&amp;gt; an optimization of APO-AS covenants.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; CTV advocates have been presenting vaults as the flagship usecase. Although as someone who&amp;#39;ve been trying to&lt;br/&gt;&amp;gt;&amp;gt; implement practical vaults for the past 2 years i doubt CTV is necessary nor sufficient for this (but still&lt;br/&gt;&amp;gt;&amp;gt; useful!), using APO-AS covers it. And it&amp;#39;s not a couple dozen more virtual bytes that are going to matter for&lt;br/&gt;&amp;gt;&amp;gt; a potential vault user.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; If after some time all of us who are currently dubious about CTV&amp;#39;s stated usecases are proven wrong by onchain&lt;br/&gt;&amp;gt;&amp;gt; usage of a less efficient construction to achieve the same goal, we could roll-out CTV as an optimization. In&lt;br/&gt;&amp;gt;&amp;gt; the meantime others will have been able to deploy new applications leveraging ANYPREVOUT (Eltoo, blind&lt;br/&gt;&amp;gt;&amp;gt; statechains, etc..[1]).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Given the interest in, and demand for, both simple covenants and better offchain protocols it seems to me that&lt;br/&gt;&amp;gt;&amp;gt; BIP118 is a soft fork candidate that could benefit more (if not most of) Bitcoin users.&lt;br/&gt;&amp;gt;&amp;gt; Actually i&amp;#39;d also be interested in knowing if people would oppose the APO-AS part of BIP118, since it enables&lt;br/&gt;&amp;gt;&amp;gt; CTV&amp;#39;s features, for the same reason they&amp;#39;d oppose BIP119.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [0] That is, to not commit to the other inputs of the transaction (via `sha_sequences` and maybe also&lt;br/&gt;&amp;gt;&amp;gt; `sha_amounts`). Cf &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&lt;/a&gt;.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [1] &lt;a href=&#34;https://anyprevout.xyz/&#34;&gt;https://anyprevout.xyz/&lt;/a&gt; &amp;#34;Use Cases&amp;#34; section&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220429/54863559/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220429/54863559/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:08:03Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs8ukl98s6fgujhfhzj9qdqh4qgw3vn6qh65sfsyykap4q7h9x9aqgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyau2wn3</id>
    
      <title type="html">📅 Original date posted:2022-04-25 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs8ukl98s6fgujhfhzj9qdqh4qgw3vn6qh65sfsyykap4q7h9x9aqgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyau2wn3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfufad57w2hxtasnv5lqt4tghx99n0c0v6nw25g26f5ud4kp5c3jqtgxc2h&#39;&gt;nevent1q…xc2h&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-25&lt;br/&gt;📝 Original message:Hi Richard,&lt;br/&gt;&lt;br/&gt;&amp;gt; Sounds good to me. Although from an activation perspective it may not be either/or, both proposals do&lt;br/&gt;compete for scarce reviewer time&lt;br/&gt;&lt;br/&gt;Yes, of course. Let&amp;#39;s say i was more interested in knowing if people who oppose CTV would oppose&lt;br/&gt;SIGHASH_ANYPREVOUT too. I think talking about activation of anything at this point is premature.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; For someone not as versed in CTV, why is it necessary that ANYONECANPAY be optional to emulate CTV? Is there&lt;br/&gt;a write-up that explains how APO-AS w/out ANYONECANPAY approximates CTV?&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not aware of any specific to CTV. It&amp;#39;s just that the fields covered in the CTV hash are very close to what&lt;br/&gt;ANYPREVOUT_ANYSCRIPT&amp;#39;s signature hash covers [0]. The two things that CTV commits to that APO_AS does not are&lt;br/&gt;the number of inputs and the hash of the inputs&amp;#39; sequences [1].&lt;br/&gt;Not committing to the number of inputs and other inputs&amp;#39; data is today&amp;#39;s behaviour of ANYONECANPAY that can&lt;br/&gt;be combined with other signature hash types [1]. Thus APO_AS makes ACP mandatory, and to emulate CTV&lt;br/&gt;completely it should be optional.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Antoine&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki#Detailed_Specification&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki#Detailed_Specification&lt;/a&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/10a626a1d6776447525f50d3e1a97b3c5bbad7d6/src/script/interpreter.cpp#L1327&#34;&gt;https://github.com/bitcoin/bitcoin/blob/10a626a1d6776447525f50d3e1a97b3c5bbad7d6/src/script/interpreter.cpp#L1327&lt;/a&gt;, &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/10a626a1d6776447525f50d3e1a97b3c5bbad7d6/src/script/interpreter.cpp#L1517-L1522&#34;&gt;https://github.com/bitcoin/bitcoin/blob/10a626a1d6776447525f50d3e1a97b3c5bbad7d6/src/script/interpreter.cpp#L1517-L1522&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;Le dimanche 24 avril 2022 à 10:41 PM, Richard Myers &amp;lt;remyers at yakshaver.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi darosior,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for sharing your thoughts on this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I would like to know people&amp;#39;s sentiment about doing (a very slightly tweaked version of) BIP118 in place of&lt;br/&gt;&amp;gt; &amp;gt; (or before doing) BIP119.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sounds good to me. Although from an activation perspective it may not be either/or, both proposals do compete for scarce reviewer time so their ordering will necessarily be driven by reviewer&amp;#39;s priorities. My priority is eltoo which is why I focus on BIP-118.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; SIGHASH_ANYPREVOUTANYSCRIPT, if its &amp;#34;ANYONECANPAY&amp;#34; behaviour is made optional [0], can emulate CTV just fine.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For someone not as versed in CTV, why is it necessary that ANYONECANPAY be optional to emulate CTV? Is there a write-up that explains how APO-AS w/out ANYONECANPAY approximates CTV?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the case of eltoo commit txs, we use bring-your-own-fee (BYOF) to late-bind fees; that means ANYONECANPAY will always be paired with APO-AS for eltoo. Settlement txs in eltoo use just APO and do not necessarily need to be paired with ANYONECANPAY.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I would guess making ANYONECANPAY the default for APO-AS was a way to squeeze in one more sighash flag. Perhaps there&amp;#39;s another way to do it?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Including SIGHASH_GROUP with APO for eltoo is also tempting. Specifically so the counter-party who commits a settlement tx can use for fees their settled to_self balance. How to rejigger the sighash flags to accommodate both APO and GROUP may be worth some discussion.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The BIP-118 proposal will certainly benefit from having input from reviewers looking at other protocols than eltoo.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Richard
    </content>
    <updated>2023-06-07T23:08:00Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs8x0cks4veye9cnn388luha7twduxpdz2u68qzpjp2wupkngrud9gzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwymj4prp</id>
    
      <title type="html">📅 Original date posted:2022-04-25 📝 Original message:Just a ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs8x0cks4veye9cnn388luha7twduxpdz2u68qzpjp2wupkngrud9gzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwymj4prp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8ukl98s6fgujhfhzj9qdqh4qgw3vn6qh65sfsyykap4q7h9x9aqgsn763k&#39;&gt;nevent1q…763k&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-25&lt;br/&gt;📝 Original message:Just a correction to my previous mail. Sorry for the non-attribution, i didn&amp;#39;t recall APO covenants had been discussed in the context of CTV.&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; a write-up that explains how APO-AS w/out ANYONECANPAY approximates CTV?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not aware of any specific to CTV. It&amp;#39;s just that the fields covered in the CTV hash are very close to what&lt;br/&gt;&lt;br/&gt;The comparison was already done by Anthony Towns.&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-June/017036.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-June/017036.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Jeremy Rubin already pointed out that it missed committing to the nSequences hash and number of inputs (and optionally scriptSigs).&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-June/017038.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-June/017038.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;Le lundi 25 avril 2022 à 3:35 PM, darosior via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Richard,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Sounds good to me. Although from an activation perspective it may not be either/or, both proposals do&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; compete for scarce reviewer time&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes, of course. Let&amp;#39;s say i was more interested in knowing if people who oppose CTV would oppose&lt;br/&gt;&amp;gt; SIGHASH_ANYPREVOUT too. I think talking about activation of anything at this point is premature.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; For someone not as versed in CTV, why is it necessary that ANYONECANPAY be optional to emulate CTV? Is there&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; a write-up that explains how APO-AS w/out ANYONECANPAY approximates CTV?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not aware of any specific to CTV. It&amp;#39;s just that the fields covered in the CTV hash are very close to what&lt;br/&gt;&amp;gt; ANYPREVOUT_ANYSCRIPT&amp;#39;s signature hash covers [0]. The two things that CTV commits to that APO_AS does not are&lt;br/&gt;&amp;gt; the number of inputs and the hash of the inputs&amp;#39; sequences [1].&lt;br/&gt;&amp;gt; Not committing to the number of inputs and other inputs&amp;#39; data is today&amp;#39;s behaviour of ANYONECANPAY that can&lt;br/&gt;&amp;gt; be combined with other signature hash types [1]. Thus APO_AS makes ACP mandatory, and to emulate CTV&lt;br/&gt;&amp;gt; completely it should be optional.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Antoine&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0] &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki#Detailed_Specification&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki#Detailed_Specification&lt;/a&gt;&lt;br/&gt;&amp;gt; [1] &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&lt;/a&gt;&lt;br/&gt;&amp;gt; [2] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/10a626a1d6776447525f50d3e1a97b3c5bbad7d6/src/script/interpreter.cpp#L1327&#34;&gt;https://github.com/bitcoin/bitcoin/blob/10a626a1d6776447525f50d3e1a97b3c5bbad7d6/src/script/interpreter.cpp#L1327&lt;/a&gt;, &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/10a626a1d6776447525f50d3e1a97b3c5bbad7d6/src/script/interpreter.cpp#L1517-L1522&#34;&gt;https://github.com/bitcoin/bitcoin/blob/10a626a1d6776447525f50d3e1a97b3c5bbad7d6/src/script/interpreter.cpp#L1517-L1522&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ------- Original Message -------&lt;br/&gt;&amp;gt; Le dimanche 24 avril 2022 à 10:41 PM, Richard Myers remyers at yakshaver.org a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hi darosior,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks for sharing your thoughts on this.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I would like to know people&amp;#39;s sentiment about doing (a very slightly tweaked version of) BIP118 in place of&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; (or before doing) BIP119.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Sounds good to me. Although from an activation perspective it may not be either/or, both proposals do compete for scarce reviewer time so their ordering will necessarily be driven by reviewer&amp;#39;s priorities. My priority is eltoo which is why I focus on BIP-118.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; SIGHASH_ANYPREVOUTANYSCRIPT, if its &amp;#34;ANYONECANPAY&amp;#34; behaviour is made optional [0], can emulate CTV just fine.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; For someone not as versed in CTV, why is it necessary that ANYONECANPAY be optional to emulate CTV? Is there a write-up that explains how APO-AS w/out ANYONECANPAY approximates CTV?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In the case of eltoo commit txs, we use bring-your-own-fee (BYOF) to late-bind fees; that means ANYONECANPAY will always be paired with APO-AS for eltoo. Settlement txs in eltoo use just APO and do not necessarily need to be paired with ANYONECANPAY.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I would guess making ANYONECANPAY the default for APO-AS was a way to squeeze in one more sighash flag. Perhaps there&amp;#39;s another way to do it?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Including SIGHASH_GROUP with APO for eltoo is also tempting. Specifically so the counter-party who commits a settlement tx can use for fees their settled to_self balance. How to rejigger the sighash flags to accommodate both APO and GROUP may be worth some discussion.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The BIP-118 proposal will certainly benefit from having input from reviewers looking at other protocols than eltoo.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; -- Richard&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;
    </content>
    <updated>2023-06-07T23:08:00Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsf8j9z3anygwx0xxkfnat7ujqcn3yjx8j4xr82cyxm0ff9x0rf7fgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyfssnmw</id>
    
      <title type="html">📅 Original date posted:2022-04-22 📝 Original message:Hi, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsf8j9z3anygwx0xxkfnat7ujqcn3yjx8j4xr82cyxm0ff9x0rf7fgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyfssnmw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0ug2e2d05t3mtwfrz9q58p7v5v87np2d2g5dy8j7fszyk3nftnfsa7jgs7&#39;&gt;nevent1q…jgs7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-22&lt;br/&gt;📝 Original message:Hi,&lt;br/&gt;&lt;br/&gt;Richard Myers has an implementation of Eltoo using Bitcoin Core&amp;#39;s functional test framework: &lt;a href=&#34;https://github.com/remyers/bitcoin/blob/eltoo-anyprevout/test/functional/simulate_eltoo.py&#34;&gt;https://github.com/remyers/bitcoin/blob/eltoo-anyprevout/test/functional/simulate_eltoo.py&lt;/a&gt;.&lt;br/&gt;He blogged about it, too. &lt;a href=&#34;https://yakshaver.org/2021/07/26/first.html&#34;&gt;https://yakshaver.org/2021/07/26/first.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;He seems to have something similar for covenants, but it&amp;#39;s WIP: &lt;a href=&#34;https://github.com/remyers/bitcoin/blob/covenant-anyprevout/test/functional/feature_apocovenant.py&#34;&gt;https://github.com/remyers/bitcoin/blob/covenant-anyprevout/test/functional/feature_apocovenant.py&lt;/a&gt;. &lt;a href=&#34;https://yakshaver.org/2021/11/18/covenants.html&#34;&gt;https://yakshaver.org/2021/11/18/covenants.html&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;His APO page looks like a good reference on the topic: &lt;a href=&#34;https://yakshaver.org/bitcoin/#anyprevout&#34;&gt;https://yakshaver.org/bitcoin/#anyprevout&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;Le vendredi 22 avril 2022 à 1:44 PM, rot13maxi &amp;lt;rot13maxi at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning darosior,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Do you know if there is a working implementation of APO somewhere that people can use to try out some of the proposed usecases? For example, it would be great to see what eltoo would actually look like on an APO signet. Or to see some working code for a vault using covenants in an APO world.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I haven’t seen much in the way of APO implementations recently, but I also haven’t gone looking, so would appreciate any links!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Fri, Apr 22, 2022 at 7:11 AM, darosior via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I would like to know people&amp;#39;s sentiment about doing (a very slightly tweaked version of) BIP118 in place of&lt;br/&gt;&amp;gt;&amp;gt; (or before doing) BIP119.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; SIGHASH_ANYPREVOUT and its precedent iterations have been discussed for over 6 years. It presents proven and&lt;br/&gt;&amp;gt;&amp;gt; implemented usecases, that are demanded and (please someone correct me if i&amp;#39;m wrong) more widely accepted than&lt;br/&gt;&amp;gt;&amp;gt; CTV&amp;#39;s.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; SIGHASH_ANYPREVOUTANYSCRIPT, if its &amp;#34;ANYONECANPAY&amp;#34; behaviour is made optional [0], can emulate CTV just fine.&lt;br/&gt;&amp;gt;&amp;gt; Sure then you can&amp;#39;t have bare or Segwit v0 CTV, and it&amp;#39;s a bit more expensive to use. But we can consider CTV&lt;br/&gt;&amp;gt;&amp;gt; an optimization of APO-AS covenants.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; CTV advocates have been presenting vaults as the flagship usecase. Although as someone who&amp;#39;ve been trying to&lt;br/&gt;&amp;gt;&amp;gt; implement practical vaults for the past 2 years i doubt CTV is necessary nor sufficient for this (but still&lt;br/&gt;&amp;gt;&amp;gt; useful!), using APO-AS covers it. And it&amp;#39;s not a couple dozen more virtual bytes that are going to matter for&lt;br/&gt;&amp;gt;&amp;gt; a potential vault user.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; If after some time all of us who are currently dubious about CTV&amp;#39;s stated usecases are proven wrong by onchain&lt;br/&gt;&amp;gt;&amp;gt; usage of a less efficient construction to achieve the same goal, we could roll-out CTV as an optimization. In&lt;br/&gt;&amp;gt;&amp;gt; the meantime others will have been able to deploy new applications leveraging ANYPREVOUT (Eltoo, blind&lt;br/&gt;&amp;gt;&amp;gt; statechains, etc..[1]).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Given the interest in, and demand for, both simple covenants and better offchain protocols it seems to me that&lt;br/&gt;&amp;gt;&amp;gt; BIP118 is a soft fork candidate that could benefit more (if not most of) Bitcoin users.&lt;br/&gt;&amp;gt;&amp;gt; Actually i&amp;#39;d also be interested in knowing if people would oppose the APO-AS part of BIP118, since it enables&lt;br/&gt;&amp;gt;&amp;gt; CTV&amp;#39;s features, for the same reason they&amp;#39;d oppose BIP119.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [0] That is, to not commit to the other inputs of the transaction (via `sha_sequences` and maybe also&lt;br/&gt;&amp;gt;&amp;gt; `sha_amounts`). Cf &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&lt;/a&gt;.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [1] &lt;a href=&#34;https://anyprevout.xyz/&#34;&gt;https://anyprevout.xyz/&lt;/a&gt; &amp;#34;Use Cases&amp;#34; section&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220422/424bbc72/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220422/424bbc72/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:07:57Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsgpz2dehq9c49weqtt6kpz5fupc0uznxrft62nhuvjzzf4ac7renqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwypjzwzn</id>
    
      <title type="html">📅 Original date posted:2022-04-22 📝 Original message:I ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsgpz2dehq9c49weqtt6kpz5fupc0uznxrft62nhuvjzzf4ac7renqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwypjzwzn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8gjhzu9tz9qmpwv70wjk0lu6r8ug4g8hgyrlfrpwvwteunzltzxcd0pawz&#39;&gt;nevent1q…pawz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-22&lt;br/&gt;📝 Original message:I would like to know people&amp;#39;s sentiment about doing (a very slightly tweaked version of) BIP118 in place of&lt;br/&gt;(or before doing) BIP119.&lt;br/&gt;&lt;br/&gt;SIGHASH_ANYPREVOUT and its precedent iterations have been discussed for over 6 years. It presents proven and&lt;br/&gt;implemented usecases, that are demanded and (please someone correct me if i&amp;#39;m wrong) more widely accepted than&lt;br/&gt;CTV&amp;#39;s.&lt;br/&gt;&lt;br/&gt;SIGHASH_ANYPREVOUTANYSCRIPT, if its &amp;#34;ANYONECANPAY&amp;#34; behaviour is made optional [0], can emulate CTV just fine.&lt;br/&gt;Sure then you can&amp;#39;t have bare or Segwit v0 CTV, and it&amp;#39;s a bit more expensive to use. But we can consider CTV&lt;br/&gt;an optimization of APO-AS covenants.&lt;br/&gt;&lt;br/&gt;CTV advocates have been presenting vaults as the flagship usecase. Although as someone who&amp;#39;ve been trying to&lt;br/&gt;implement practical vaults for the past 2 years i doubt CTV is necessary nor sufficient for this (but still&lt;br/&gt;useful!), using APO-AS covers it. And it&amp;#39;s not a couple dozen more virtual bytes that are going to matter for&lt;br/&gt;a potential vault user.&lt;br/&gt;&lt;br/&gt;If after some time all of us who are currently dubious about CTV&amp;#39;s stated usecases are proven wrong by onchain&lt;br/&gt;usage of a less efficient construction to achieve the same goal, we could roll-out CTV as an optimization.  In&lt;br/&gt;the meantime others will have been able to deploy new applications leveraging ANYPREVOUT (Eltoo, blind&lt;br/&gt;statechains, etc..[1]).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Given the interest in, and demand for, both simple covenants and better offchain protocols it seems to me that&lt;br/&gt;BIP118 is a soft fork candidate that could benefit more (if not most of) Bitcoin users.&lt;br/&gt;Actually i&amp;#39;d also be interested in knowing if people would oppose the APO-AS part of BIP118, since it enables&lt;br/&gt;CTV&amp;#39;s features, for the same reason they&amp;#39;d oppose BIP119.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[0] That is, to not commit to the other inputs of the transaction (via `sha_sequences` and maybe also&lt;br/&gt;`sha_amounts`). Cf &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://anyprevout.xyz/&#34;&gt;https://anyprevout.xyz/&lt;/a&gt; &amp;#34;Use Cases&amp;#34; section
    </content>
    <updated>2023-06-07T23:07:56Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsgwh4f70jlra3kkres5acx3m92rjfhjvrjfqmzxqhu4hlzwx44jcgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy4ylt5r</id>
    
      <title type="html">📅 Original date posted:2022-03-21 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsgwh4f70jlra3kkres5acx3m92rjfhjvrjfqmzxqhu4hlzwx44jcgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy4ylt5r" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszqpnmp6kgzklypf00aep8kqtnap8ha0rgrf9ured3wtasfnuu7wqmmqmps&#39;&gt;nevent1q…qmps&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-21&lt;br/&gt;📝 Original message:Hi ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;Thanks for the feedback. The DLC idea is interesting but you are centralizing the liveness requirements,&lt;br/&gt;effectively creating a SPOF: in order to bypass the revocation clause no need to make sure to down each and&lt;br/&gt;every watchtower anymore, just down the oracle and you are sure no revocation transaction can be pushed.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Okay, let me see if I understand your concern correctly.&lt;br/&gt;&amp;gt; When using a signature challenge, the concern is that you need to presign multiple versions of a transaction with varying feerates.&lt;br/&gt;&lt;br/&gt;I was thinking of having a hot key (in this case probably shared amongst the monitors) where they would sign&lt;br/&gt;the right fee level at broadcast time. Pre-signing makes it quickly too many signatures (and kills the purpose&lt;br/&gt;of having covenants in the first place).&lt;br/&gt;&lt;br/&gt;&amp;gt; And you have a set of network monitors / watchtowers that are supposed to watch the chain on your behalf in case your ISP suddenly hates you for no reason.&lt;br/&gt;&amp;gt; The more monitors there are, the more likely that one of them will be corrupted by a miner and jump to the highest-feerate version, overpaying fees and making miners very happy.&lt;br/&gt;&amp;gt; Such is third-party trust.&lt;br/&gt;&amp;gt; Is my understanding correct?&lt;br/&gt;&lt;br/&gt;Your understanding of the tradeoff is correct.&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;&lt;br/&gt;Le jeudi 17 mars 2022 à 12:29 AM, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Antoine,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; For &amp;#34;hot contracts&amp;#34; a signature challenge is used to achieve the same. I know the latter is imperfect, since&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; the lower the uptime risk (increase the number of network monitors) the higher the DOS risk (as you duplicate&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; the key).. That&amp;#39;s why i asked if anybody had some thoughts about this and if there was a cleverer way of doing&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Okay, let me see if I understand your concern correctly.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When using a signature challenge, the concern is that you need to presign multiple versions of a transaction with varying feerates.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; And you have a set of network monitors / watchtowers that are supposed to watch the chain on your behalf in case your ISP suddenly hates you for no reason.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The more monitors there are, the more likely that one of them will be corrupted by a miner and jump to the highest-feerate version, overpaying fees and making miners very happy.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Such is third-party trust.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Is my understanding correct?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A cleverer way, which requires consolidating (but is unable to eliminate) third-party trust, would be to use a DLC oracle.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The DLC oracle provides a set of points corresponding to a set of feerate ranges, and commits to publishing the scalar of one of those points at some particular future block height.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ostensibly, the scalar it publishes is the one of the point that corresponds to the feerate range found at that future block height.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You then create adaptor signatures for each feerate version, corresponding to the feerate ranges the DLC oracle could eventually publish.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The adaptor signatures can only be completed if the DLC oracle publishes the corresponding scalar for that feerate range.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You can then send the adaptor signatures to multiple watchtowers, who can only publish one of the feerate versions, unless the DLC oracle is hacked and publishes multiple scalars (at which point the DLC oracle protocol reveals a privkey of the DLC oracle, which should be usable for slashing some bond of the DLC oracle).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This prevents any of them from publishing the highest-feerate version, as the adaptor signature cannot be completed unless that is what the oracle published.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are still drawbacks:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Third-party trust risk: the oracle can still lie.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * DLC oracles are prevented from publishing multiple scalars; they cannot be prevented from publishing a single wrong scalar.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * DLCs must be time bound.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * DLC oracles commit to publishing a particular point at a particular fixed time.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * For &amp;#34;hot&amp;#34; dynamic protocols, you need the ability to invoke the oracle at any time, not a particular fixed time.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The latter probably makes this unusable for hot protocols anyway, so maybe not so clever.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ZmnSCPxj
    </content>
    <updated>2023-06-07T23:06:28Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsqhuehfn5jzlff84mdjy0hewy0uc86crnrar0jyumxz8dmx377ylszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyhe06e7</id>
    
      <title type="html">📅 Original date posted:2022-03-14 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsqhuehfn5jzlff84mdjy0hewy0uc86crnrar0jyumxz8dmx377ylszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyhe06e7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszccnytvuacxrhgyyv0qm9vmvl36gyemuwpajsf8y8t3ypda6grpql64zgu&#39;&gt;nevent1q…4zgu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-14&lt;br/&gt;📝 Original message:Hi Jeremy,&lt;br/&gt;&lt;br/&gt;Thanks for the feedback. I indeed only compared it to existing fee-bumping methods. But sponsors are pretty&lt;br/&gt;similar to CPFP in usage anyways, they &amp;#39;just&amp;#39; get rid of the complexity of managing transaction chains in the&lt;br/&gt;mempool. That&amp;#39;s great, don&amp;#39;t get me wrong, just it&amp;#39;s much less ideal than a solution not requiring additional&lt;br/&gt;UTxOs to be reserved, managed, and additional onchain transactions.&lt;br/&gt;&lt;br/&gt;Regarding chain efficiency. First, you wrote:&lt;br/&gt;&amp;gt; As you&amp;#39;ve noted, an approach like precomitted different fee levels might work, but has substantial costs.&lt;br/&gt;&lt;br/&gt;Well, i noted that it *does* work (at least for vaults). And it does incur a cost, but it&amp;#39;s inferior to the&lt;br/&gt;other solutions. Then, sure sponsors&amp;#39; -like CPFP&amp;#39;s- cost can be amortized. The chain usage would still likely&lt;br/&gt;be superior (depends on a case by case basis i&amp;#39;d say), but even then the &amp;#34;direct&amp;#34; chain usage cost isn&amp;#39;t what&lt;br/&gt;matters most. As mentioned, the cost of using funds not internal to the contract really is.&lt;br/&gt;&lt;br/&gt;Regarding capital efficiency, again as noted in the post, it&amp;#39;s the entire point to use funds internal to the&lt;br/&gt;contract (&amp;#34;pre-committed&amp;#34;). Sure external funding (by the means of sponsors or any other technique) allows you&lt;br/&gt;to allocate funds later on, or never. But we want contracts that are actually enforceable, i guess?&lt;br/&gt;On the other hand, pre-committing to all the possible fee-bumped levels prevents you to dynamically add more&lt;br/&gt;fees eventually. That&amp;#39;s why you need to pre-commit to levels up to your assumed &amp;#34;max feerate before i close&lt;br/&gt;the contract&amp;#34;. For &amp;#34;cold contracts&amp;#34; (vaults), timelocks prevent the DOS of immediately using a large feerate.&lt;br/&gt;For &amp;#34;hot contracts&amp;#34; a signature challenge is used to achieve the same. I know the latter is imperfect, since&lt;br/&gt;the lower the uptime risk (increase the number of network monitors) the higher the DOS risk (as you duplicate&lt;br/&gt;the key).. That&amp;#39;s why i asked if anybody had some thoughts about this and if there was a cleverer way of doing&lt;br/&gt;it.&lt;br/&gt;&lt;br/&gt;&amp;gt; This is also true for vaults where you know you only want to open 1 per month let&amp;#39;s say, and not&lt;br/&gt;&amp;gt; your vaults&amp;gt; per month, which pre-committing requires.&lt;br/&gt;&lt;br/&gt;Huh? Pre-committing here is to pre-commit to levels of the revocation (&amp;#34;Cancel&amp;#34;) transaction. It has nothing&lt;br/&gt;to do with &amp;#34;activating&amp;#34; (using Revault&amp;#39;s terminology) a vault, done by sharing a signature for the Unvault&lt;br/&gt;transaction.&lt;br/&gt;You might have another vault design in mind whereby any deposited fund is unvault-able. In this case, and as&lt;br/&gt;with any other active contract, i think you need to have funds ready to pay for the fees for the contract to&lt;br/&gt;be enforceable. Whether these funds come from the contract&amp;#39;s funds or from externally-reserved UTxOs.&lt;br/&gt;&lt;br/&gt;&amp;gt; you don&amp;#39;t need a salt, you just need a unique payout addr (e.g. hardened derivation) per revocation txn and&lt;br/&gt;&amp;gt; you cannot guess the branch.&lt;br/&gt;&lt;br/&gt;Yeah, i preferred to go with 8 more vbytes. First because relying on never reusing a derivation index is&lt;br/&gt;brittle and also because it would make rescan much harder. Imagine having 256 fee levels, making 5 payments a&lt;br/&gt;day for 200 days in a year. You&amp;#39;d have 256000 derivation indexes per year to scan for if restoring frombackup.&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;Le dimanche 13 mars 2022 à 3:33 AM, Jeremy Rubin &amp;lt;jeremy.l.rubin at gmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Antoine,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I have a few high level thoughts on your post comparing these types of primitive to an explicit soft fork approach:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1) Transaction sponsors *is* a type of covenant. Precisely, it is very similar to an &amp;#34;Impossible Input&amp;#34; covenant in conjunction with a &amp;#34;IUTXO&amp;#34; I defined in my 2017 workshop&lt;a href=&#34;https://rubin.io/public/pdfs/multi-txn-contracts.pdf&#34;&gt;https://rubin.io/public/pdfs/multi-txn-contracts.pdf&lt;/a&gt;(I know, I know... self citation, not cool, but helps with context).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, for Sponsors itself we optimize the properties of how it works &amp;amp; is represented, as well as &amp;#34;tighten the hatches&amp;#34; on binding to specific TX vs merely spend of the outputs (which wouldn&amp;#39;t work as well with APO).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Perhaps thinking of something like sponsors as a form of covenant, rather than a special purpose thing, is helpful?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There&amp;#39;s a lot you could do with a general &amp;#34;observe other txns in {this block, the chain}&amp;#34; primitive. The catch is that for sponsors we don&amp;#39;t *care* to enable people to use this as a &amp;#34;smart contracting primitive&amp;#34;, we want to use it for fee bumping. So we don&amp;#39;t care about programmability, we care about being able to use the covenant to bump fees.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2) On Chain Efficiency.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A) Precommitted Levels&lt;br/&gt;&amp;gt; As you&amp;#39;ve noted, an approach like precomitted different fee levels might work, but has substantial costs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, with sponsors, the minimum viable version of this (not quite what is spec&amp;#39;d in my prior email, but it could be done this way if we care to optimize for bytes) would require 1 in and 1 out with only 32 bytes extra. So that&amp;#39;s around 40 bytes outpoint &#43; 64 bytes signature &#43; 40 bytes output &#43; 32 bytes metadata = 174 bytes per bump. Bumps in this way can also amortize, so bumping &amp;gt;1 txn at the same time would hit the limit of 32 bytes &#43; 144/n bytes to bump more than one thing. You can imagine cases where this might be popular, like &amp;#34;close &amp;gt;1 of my LN channels&amp;#34; or &amp;#34;start withdrawals for 5 of my JamesOB vaulted coins&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; B) Fancy(er) Covenants&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We might also have something with OP_CAT and CSFS where bumps are done as some sort of covenant-y thing that lets you arbitrarily rewrite transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Not too much to say other than that it is difficult to get these down in size as the scripts become more complex, not to mention the (hotly discussed of late) ramifications of those covenants more generally.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Absent a concrete fancy covenant with fee bumping, I can&amp;#39;t comment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 3) On Capital Efficiency&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Something like a precommitted or covenant fee bump requires the fee capital to be pre-committed inside the UTXO, whereas for something like Sponsors you can use capital you get sometime later. In certain models -- e.g., channels -- where you might expect only log(N) of your channels to fail in a given epoch, you don&amp;#39;t need to allocate as much capital as if you were to have to do it in-band. This is also true for vaults where you know you only want to open 1 per month let&amp;#39;s say, and not &amp;lt;all of your vaults&amp;gt; per month, which pre-committing requires.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 4) On Protocol Design&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It&amp;#39;s nice that you can abstract away your protocol design concerns as a &amp;#34;second tier composition check&amp;#34; v.s. having to modify your protocol to work with a fee bumping thing.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are a myriad of ways dynamic txns (e.g. for Eltoo) can lead to RBF pinning and similar, Sponsor type things allow you to design such protocols to not have any native way of paying for fees inside the actual &amp;#34;Transaction Intents&amp;#34; and use an external system to create the intended effect. It seems (to me) more robust that we can prove that a Sponsors mechanism allows any transaction -- regardless of covenant stuff, bugs, pinning, etc -- to move forward.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Still... careful protocol design may permit the use of optimized constructions! For example, in a vault rather than assigning *no fee* maybe you can have a single branch with a reasonable estimated fee. If you are correct or overshot (let&amp;#39;s say 50% chance?) then you don&amp;#39;t need to add a sponsor. If you undershot, not to worry, just add a sponsor. Adopted broadly, this would cut the expected value of using sponsors by &amp;lt;however good you are at estimating future fees&amp;gt;. This basically enables all protocols to try to be more efficient, but backstop that with a guaranteed to work safe mechanism.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There was something else I was going to say but I forgot about it... if it comes to me I&amp;#39;ll send a follow up email.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Jeremy&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; p.s.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course this makes for a perfect DoS: it would be trivial for a miner to infer that you are usinga specific vault standard and guess other leaves and replace the witness to use the highest-feeratespending path. You could require a signature from any of the participants. Or, at the cost of anadditional depth, in the tree you could &amp;#34;salt&amp;#34; each leaf by pairing it with -say- an OP_RETURN leaf.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; you don&amp;#39;t need a salt, you just need a unique payout addr (e.g. hardened derivation) per revocation txn and you cannot guess the branch.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; [@JeremyRubin](&lt;a href=&#34;https://twitter.com/JeremyRubin&#34;&gt;https://twitter.com/JeremyRubin&lt;/a&gt;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Sat, Mar 12, 2022 at 10:34 AM darosior via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The idea of a soft fork to fix dynamic fee bumping was recently put back on the table. It might&lt;br/&gt;&amp;gt;&amp;gt; sound radical, as what prevents today reasonable fee bumping for contracts with presigned&lt;br/&gt;&amp;gt;&amp;gt; transactions (pinning) has to do with nodes&amp;#39; relay policy. But the frustration is understandable&lt;br/&gt;&amp;gt;&amp;gt; given the complexity of designing fee bumping with today&amp;#39;s primitives. [0]&lt;br/&gt;&amp;gt;&amp;gt; Recently too, there was a lot of discussions around covenants. Covenants (conceptually, not talking&lt;br/&gt;&amp;gt;&amp;gt; about any specific proposal) seem to open lots of new use cases and to be desired by (some?) Bitcoin&lt;br/&gt;&amp;gt;&amp;gt; application developers and users.&lt;br/&gt;&amp;gt;&amp;gt; I think that fee bumping using covenants has attractive properties, and it requires a soft fork that&lt;br/&gt;&amp;gt;&amp;gt; is already desirable beyond (trying) to fix fee bumping. However i could not come up with a solution&lt;br/&gt;&amp;gt;&amp;gt; as neat for other protocols than vaults. I&amp;#39;d like to hear from others about 1) taking this route for&lt;br/&gt;&amp;gt;&amp;gt; fee bumping 2) better ideas on applying this to other protocols.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In a vault construction you have a UTxO which can only be spent by an Unvaulting transaction, whose&lt;br/&gt;&amp;gt;&amp;gt; output triggers a timelock before the expiration of which a revocation transaction may be confirmed.&lt;br/&gt;&amp;gt;&amp;gt; The revocation transaction being signed in advance (typically before sharing the signature for the&lt;br/&gt;&amp;gt;&amp;gt; Unvault transaction) you need fee bumping in order for the contract to actually be enforceable.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Now, with a covenant you could commit to the revocation tx instead of presigning it. And using a&lt;br/&gt;&amp;gt;&amp;gt; Taproot tree you could commit to different versions of it with increasing feerate. Any network&lt;br/&gt;&amp;gt;&amp;gt; monitor (the brooadcaster, a watchtower, ..) would be able to RBF the revocation transaction if it&lt;br/&gt;&amp;gt;&amp;gt; doesn&amp;#39;t confirm by spending using a leaf with a higher-feerate transaction being committed to.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course this makes for a perfect DoS: it would be trivial for a miner to infer that you are using&lt;br/&gt;&amp;gt;&amp;gt; a specific vault standard and guess other leaves and replace the witness to use the highest-feerate&lt;br/&gt;&amp;gt;&amp;gt; spending path. You could require a signature from any of the participants. Or, at the cost of an&lt;br/&gt;&amp;gt;&amp;gt; additional depth, in the tree you could &amp;#34;salt&amp;#34; each leaf by pairing it with -say- an OP_RETURN leaf.&lt;br/&gt;&amp;gt;&amp;gt; But this leaves you with a possible internal blackmail for multi-party contracts (although it&amp;#39;s less&lt;br/&gt;&amp;gt;&amp;gt; of an issue for vaults, and not one for single-party vaults).&lt;br/&gt;&amp;gt;&amp;gt; What you could do instead is attaching an increasing relative timelock to each leaf (as the committed&lt;br/&gt;&amp;gt;&amp;gt; revocation feerate increases, so does the timelock). You need to be careful to note wreck miner&lt;br/&gt;&amp;gt;&amp;gt; incentives here (see [0], [1], [2] on &amp;#34;miner harvesting&amp;#34;), but this enables the nice property of a&lt;br/&gt;&amp;gt;&amp;gt; feerate which &amp;#34;adapts&amp;#34; to the block space market. Another nice property of this approach is the&lt;br/&gt;&amp;gt;&amp;gt; integrated anti fee sniping protection if the revocation transaction pays a non-trivial amount of&lt;br/&gt;&amp;gt;&amp;gt; fees.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Paying fees from &amp;#34;shared&amp;#34; funds instead of a per-watchtower fee-bumping wallet opened up the&lt;br/&gt;&amp;gt;&amp;gt; blackmail from the previous section, but the benefits of paying from internal funds shouldn&amp;#39;t be&lt;br/&gt;&amp;gt;&amp;gt; understated.&lt;br/&gt;&amp;gt;&amp;gt; No need to decide on an amount to be refilled. No need to bother the user to refill the fee-bumping&lt;br/&gt;&amp;gt;&amp;gt; wallet (before they can participate in more contracts, or worse before a deadline at which all&lt;br/&gt;&amp;gt;&amp;gt; contracts are closed). No need for a potentially large amount of funds to just sit on a hot wallet&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;just in case&amp;#34;. No need to duplicate this amount as you replicate the number of network monitors&lt;br/&gt;&amp;gt;&amp;gt; (which is critical to the security of such contracts).&lt;br/&gt;&amp;gt;&amp;gt; In addition, note how modifying the feerate of the revocation transaction in place is less expensive&lt;br/&gt;&amp;gt;&amp;gt; than adding a (pair of) new input (and output), let alone adding an entire new transaction to CPFP.&lt;br/&gt;&amp;gt;&amp;gt; Aside, and less importantly, it can be made to work with today&amp;#39;s relay rules (just use fee thresholds&lt;br/&gt;&amp;gt;&amp;gt; adapted to the current RBF thresholds, potentially with some leeway to account for policy changes).&lt;br/&gt;&amp;gt;&amp;gt; Paying from shared funds (in addition to paying from internal funds) also prevents pervert&lt;br/&gt;&amp;gt;&amp;gt; incentives for contracts with more than 2 parties. In case one of the parties breaches it, all&lt;br/&gt;&amp;gt;&amp;gt; remaining parties have an incentive to enforce the contract.. But only one would otherwise pay for&lt;br/&gt;&amp;gt;&amp;gt; it! It would open up the door to some potential sneaky techniques to wait for another party to pay&lt;br/&gt;&amp;gt;&amp;gt; for the fees, which is at odd with the reactive security model.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Let&amp;#39;s examine how it could be concretely designed. Say you have a vault wallet software for a setup&lt;br/&gt;&amp;gt;&amp;gt; with 5 participants. The revocation delay is 144 blocks. You assume revocation to be infrequent (if&lt;br/&gt;&amp;gt;&amp;gt; one happens it&amp;#39;s probably a misconfigured watchtower that needs be fixed before the next&lt;br/&gt;&amp;gt;&amp;gt; unvaulting), so you can afford infrequent overpayments and larger fee thresholds. Participants&lt;br/&gt;&amp;gt;&amp;gt; assume the vault will be spent within a year and assume a maximum possible feerate for this year of&lt;br/&gt;&amp;gt;&amp;gt; 10ksat/vb.&lt;br/&gt;&amp;gt;&amp;gt; They create a Taproot tree of depth 7. First leaf is the spending path (open to whomever the vault&lt;br/&gt;&amp;gt;&amp;gt; pays after the 144 blocks). Then the leaf `i` for `i` in `[1, 127]` is a covenant to the revocation&lt;br/&gt;&amp;gt;&amp;gt; transaction with a feerate `i * 79` sats/vb and a relative timelock of `i - 1` blocks.&lt;br/&gt;&amp;gt;&amp;gt; Assuming the covenant to the revocation transaction is 33 bytes [3], that&amp;#39;s a witness of:&lt;br/&gt;&amp;gt;&amp;gt; 1 &#43; 33 &#43; 1 &#43; 33 &#43; 7 * 32 = 292 WU (73 vb)&lt;br/&gt;&amp;gt;&amp;gt; ^^^^^^ ^^^^^^^^^^^^^^&lt;br/&gt;&amp;gt;&amp;gt; witscript control block&lt;br/&gt;&amp;gt;&amp;gt; for any of the revocation paths. The revocation transaction is 1-input 1-output, so in total it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; 10.5 &#43; 41 &#43; 73 &#43; 43 = 167.5 vb&lt;br/&gt;&amp;gt;&amp;gt; ^^^^ ^^^^^^^^^^^ ^^^^&lt;br/&gt;&amp;gt;&amp;gt; header input|witness output&lt;br/&gt;&amp;gt;&amp;gt; The transaction size is not what you&amp;#39;d necessarily want to optimize for first, still, it is smaller&lt;br/&gt;&amp;gt;&amp;gt; in this case than using other feebumping primitives and has a smaller footprint on the UTxO set. For&lt;br/&gt;&amp;gt;&amp;gt; instance for adding a feebumping input and change output assuming all Taproot inputs and outputs&lt;br/&gt;&amp;gt;&amp;gt; (CPFP is necessarily even larger):&lt;br/&gt;&amp;gt;&amp;gt; 5 * 64 &#43; 1 &#43; 5 * (32 &#43; 1) &#43; 1 &#43; 33 = 520 WU (105 vb)&lt;br/&gt;&amp;gt;&amp;gt; ^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^&lt;br/&gt;&amp;gt;&amp;gt; witness witscript control&lt;br/&gt;&amp;gt;&amp;gt; 10.5 &#43; 41 &#43; 105 &#43; 41 &#43; 16.5 &#43; 2 * 43 = 300 vb&lt;br/&gt;&amp;gt;&amp;gt; ^^^^ ^^^^^^^^ ^^^^^^^^^ ^^^^^^&lt;br/&gt;&amp;gt;&amp;gt; header input|witness fb input|witness outputs&lt;br/&gt;&amp;gt;&amp;gt; From there, you can afford more depths at the tiny cost of 8 more vbytes each. You might want them&lt;br/&gt;&amp;gt;&amp;gt; for:&lt;br/&gt;&amp;gt;&amp;gt; - more granularity (if you can afford large enough timelocks)&lt;br/&gt;&amp;gt;&amp;gt; - optimizing for the spending path rather than the revocation one&lt;br/&gt;&amp;gt;&amp;gt; - adding a hashlock to prevent nuisance (with the above script a third party could malleate a&lt;br/&gt;&amp;gt;&amp;gt; spending path into a revocation one). You can use the OP_RETURN trick from above to prevent that.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Unfortunately, the timelocked-covenant approach to feebumping only applies to bumping the first&lt;br/&gt;&amp;gt;&amp;gt; transaction of a chain (you can&amp;#39;t pay for the parent with a timelock) so for instance it&amp;#39;s not&lt;br/&gt;&amp;gt;&amp;gt; usable for HTLC transactions in Lightning to bump the parent commitment tx. The same goes for&lt;br/&gt;&amp;gt;&amp;gt; bumping the update tx in Coinpool.&lt;br/&gt;&amp;gt;&amp;gt; It could be worked around by having a different covenant per participant (paying the fee from either&lt;br/&gt;&amp;gt;&amp;gt; of the participants&amp;#39; output) behind a signature check. Of course it requires funds to already be in&lt;br/&gt;&amp;gt;&amp;gt; the contract (HTLC, Coinpool leaf) to pay for your own unilateral close, but if you don&amp;#39;t have any&lt;br/&gt;&amp;gt;&amp;gt; fund in the contract it doesn&amp;#39;t make sense to try to feebump it in the first place. The same goes&lt;br/&gt;&amp;gt;&amp;gt; for small amounts: you&amp;#39;d only allocate up to the value of the contract (minus a dust preference) in&lt;br/&gt;&amp;gt;&amp;gt; fees in order to enforce it.&lt;br/&gt;&amp;gt;&amp;gt; This is less nice for external monitors as it requires a private key (or another secret) to be&lt;br/&gt;&amp;gt;&amp;gt; committed to in advance) to be able to bump [4] and does not get rid of the &amp;#34;who&amp;#39;s gonna pay for the&lt;br/&gt;&amp;gt;&amp;gt; enforcement&amp;#34; issue in &amp;gt;2-parties contracts. Still, it&amp;#39;s more optimal and usable than CPFP or adding&lt;br/&gt;&amp;gt;&amp;gt; a pair of input/output for all the reasons mentioned above.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thoughts?&lt;br/&gt;&amp;gt;&amp;gt; Antoine&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-November/019614.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-November/019614.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [1] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-November/019615.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-November/019615.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [2] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-December/019627.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-December/019627.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [3] That&amp;#39;s obviously close to the CTV construction. But using another more flexible (and therefore&lt;br/&gt;&amp;gt;&amp;gt; less optimized) construction would not be a big deal. It might in fact be necessary for more&lt;br/&gt;&amp;gt;&amp;gt; elaborated (realistic?) usecases than the simple one detailed here.&lt;br/&gt;&amp;gt;&amp;gt; [4] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019879.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019879.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220314/dd75a8cb/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220314/dd75a8cb/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:06:27Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsdvf537aryxadx4l7zzww9zlrqzf5zpaxuraxs8ekjyf9h85wgs3gzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy9dgg7l</id>
    
      <title type="html">📅 Original date posted:2022-03-12 📝 Original message:The ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsdvf537aryxadx4l7zzww9zlrqzf5zpaxuraxs8ekjyf9h85wgs3gzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy9dgg7l" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs80ktjau75vpm8hp87du4acke8uprlw78tzrla52z8fk0q0lm2ejga04ryx&#39;&gt;nevent1q…4ryx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-12&lt;br/&gt;📝 Original message:The idea of a soft fork to fix dynamic fee bumping was recently put back on the table. It might&lt;br/&gt;sound radical, as what prevents today reasonable fee bumping for contracts with presigned&lt;br/&gt;transactions (pinning) has to do with nodes&amp;#39; relay policy. But the frustration is understandable&lt;br/&gt;given the complexity of designing fee bumping with today&amp;#39;s primitives. [0]&lt;br/&gt;Recently too, there was a lot of discussions around covenants. Covenants (conceptually, not talking&lt;br/&gt;about any specific proposal) seem to open lots of new use cases and to be desired by (some?) Bitcoin&lt;br/&gt;application developers and users.&lt;br/&gt;I think that fee bumping using covenants has attractive properties, and it requires a soft fork that&lt;br/&gt;is already desirable beyond (trying) to fix fee bumping. However i could not come up with a solution&lt;br/&gt;as neat for other protocols than vaults. I&amp;#39;d like to hear from others about 1) taking this route for&lt;br/&gt;fee bumping 2) better ideas on applying this to other protocols.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;In a vault construction you have a UTxO which can only be spent by an Unvaulting transaction, whose&lt;br/&gt;output triggers a timelock before the expiration of which a revocation transaction may be confirmed.&lt;br/&gt;The revocation transaction being signed in advance (typically before sharing the signature for the&lt;br/&gt;Unvault transaction) you need fee bumping in order for the contract to actually be enforceable.&lt;br/&gt;&lt;br/&gt;Now, with a covenant you could commit to the revocation tx instead of presigning it. And using a&lt;br/&gt;Taproot tree you could commit to different versions of it with increasing feerate. Any network&lt;br/&gt;monitor (the brooadcaster, a watchtower, ..) would be able to RBF the revocation transaction if it&lt;br/&gt;doesn&amp;#39;t confirm by spending using a leaf with a higher-feerate transaction being committed to.&lt;br/&gt;&lt;br/&gt;Of course this makes for a perfect DoS: it would be trivial for a miner to infer that you are using&lt;br/&gt;a specific vault standard and guess other leaves and replace the witness to use the highest-feerate&lt;br/&gt;spending path. You could require a signature from any of the participants. Or, at the cost of an&lt;br/&gt;additional depth, in the tree you could &amp;#34;salt&amp;#34; each leaf by pairing it with -say- an OP_RETURN leaf.&lt;br/&gt;But this leaves you with a possible internal blackmail for multi-party contracts (although it&amp;#39;s less&lt;br/&gt;of an issue for vaults, and not one for single-party vaults).&lt;br/&gt;What you could do instead is attaching an increasing relative timelock to each leaf (as the committed&lt;br/&gt;revocation feerate increases, so does the timelock). You need to be careful to note wreck miner&lt;br/&gt;incentives here (see [0], [1], [2] on &amp;#34;miner harvesting&amp;#34;), but this enables the nice property of a&lt;br/&gt;feerate which &amp;#34;adapts&amp;#34; to the block space market. Another nice property of this approach is the&lt;br/&gt;integrated anti fee sniping protection if the revocation transaction pays a non-trivial amount of&lt;br/&gt;fees.&lt;br/&gt;&lt;br/&gt;Paying fees from &amp;#34;shared&amp;#34; funds instead of a per-watchtower fee-bumping wallet opened up the&lt;br/&gt;blackmail from the previous section, but the benefits of paying from internal funds shouldn&amp;#39;t be&lt;br/&gt;understated.&lt;br/&gt;No need to decide on an amount to be refilled. No need to bother the user to refill the fee-bumping&lt;br/&gt;wallet (before they can participate in more contracts, or worse before a deadline at which all&lt;br/&gt;contracts are closed). No need for a potentially large amount of funds to just sit on a hot wallet&lt;br/&gt;&amp;#34;just in case&amp;#34;. No need to duplicate this amount as you replicate the number of network monitors&lt;br/&gt;(which is critical to the security of such contracts).&lt;br/&gt;In addition, note how modifying the feerate of the revocation transaction in place is less expensive&lt;br/&gt;than adding a (pair of) new input (and output), let alone adding an entire new transaction to CPFP.&lt;br/&gt;Aside, and less importantly, it can be made to work with today&amp;#39;s relay rules (just use fee thresholds&lt;br/&gt;adapted to the current RBF thresholds, potentially with some leeway to account for policy changes).&lt;br/&gt;Paying from shared funds (in addition to paying from internal funds) also prevents pervert&lt;br/&gt;incentives for contracts with more than 2 parties. In case one of the parties breaches it, all&lt;br/&gt;remaining parties have an incentive to enforce the contract.. But only one would otherwise pay for&lt;br/&gt;it! It would open up the door to some potential sneaky techniques to wait for another party to pay&lt;br/&gt;for the fees, which is at odd with the reactive security model.&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s examine how it could be concretely designed. Say you have a vault wallet software for a setup&lt;br/&gt;with 5 participants. The revocation delay is 144 blocks. You assume revocation to be infrequent (if&lt;br/&gt;one happens it&amp;#39;s probably a misconfigured watchtower that needs be fixed before the next&lt;br/&gt;unvaulting), so you can afford infrequent overpayments and larger fee thresholds. Participants&lt;br/&gt;assume the vault will be spent within a year and assume a maximum possible feerate for this year of&lt;br/&gt;10ksat/vb.&lt;br/&gt;They create a Taproot tree of depth 7. First leaf is the spending path (open to whomever the vault&lt;br/&gt;pays after the 144 blocks). Then the leaf `i` for `i` in `[1, 127]` is a covenant to the revocation&lt;br/&gt;transaction with a feerate `i * 79` sats/vb and a relative timelock of `i - 1` blocks.&lt;br/&gt;Assuming the covenant to the revocation transaction is 33 bytes [3], that&amp;#39;s a witness of:&lt;br/&gt;    1 &#43; 33     &#43; 1 &#43; 33 &#43; 7 * 32 = 292 WU (73 vb)&lt;br/&gt;    ^^^^^^       ^^^^^^^^^^^^^^&lt;br/&gt;    witscript     control block&lt;br/&gt;for any of the revocation paths. The revocation transaction is 1-input 1-output, so in total it&amp;#39;s&lt;br/&gt;    10.5 &#43;   41 &#43; 73      &#43; 43    = 167.5 vb&lt;br/&gt;    ^^^^    ^^^^^^^^^^^    ^^^^&lt;br/&gt;    header  input|witness  output&lt;br/&gt;The transaction size is not what you&amp;#39;d necessarily want to optimize for first, still, it is smaller&lt;br/&gt;in this case than using other feebumping primitives and has a smaller footprint on the UTxO set. For&lt;br/&gt;instance for adding a feebumping input and change output assuming all Taproot inputs and outputs&lt;br/&gt;(CPFP is necessarily even larger):&lt;br/&gt;    5 * 64 &#43;  1 &#43; 5 * (32 &#43; 1) &#43; 1 &#43; 33 = 520 WU (105 vb)&lt;br/&gt;    ^^^^^^    ^^^^^^^^^^^^^^^    ^^^^^^&lt;br/&gt;    witness      witscript       control&lt;br/&gt;    10.5  &#43;  41 &#43; 105      &#43; 41 &#43; 16.5         &#43; 2 * 43  = 300 vb&lt;br/&gt;    ^^^^     ^^^^^^^^        ^^^^^^^^^           ^^^^^^&lt;br/&gt;    header   input|witness   fb input|witness    outputs&lt;br/&gt;&amp;gt;From there, you can afford more depths at the tiny cost of 8 more vbytes each. You might want them&lt;br/&gt;for:&lt;br/&gt;- more granularity (if you can afford large enough timelocks)&lt;br/&gt;- optimizing for the spending path rather than the revocation one&lt;br/&gt;- adding a hashlock to prevent nuisance (with the above script a third party could malleate a&lt;br/&gt;  spending path into a revocation one). You can use the OP_RETURN trick from above to prevent that.&lt;br/&gt;&lt;br/&gt;Unfortunately, the timelocked-covenant approach to feebumping only applies to bumping the first&lt;br/&gt;transaction of a chain (you can&amp;#39;t pay for the parent with a timelock) so for instance it&amp;#39;s not&lt;br/&gt;usable for HTLC transactions in Lightning to bump the parent commitment tx. The same goes for&lt;br/&gt;bumping the update tx in Coinpool.&lt;br/&gt;It could be worked around by having a different covenant per participant (paying the fee from either&lt;br/&gt;of the participants&amp;#39; output) behind a signature check. Of course it requires funds to already be in&lt;br/&gt;the contract (HTLC, Coinpool leaf) to pay for your own unilateral close, but if you don&amp;#39;t have any&lt;br/&gt;fund in the contract it doesn&amp;#39;t make sense to try to feebump it in the first place. The same goes&lt;br/&gt;for small amounts: you&amp;#39;d only allocate up to the value of the contract (minus a dust preference) in&lt;br/&gt;fees in order to enforce it.&lt;br/&gt;This is less nice for external monitors as it requires a private key (or another secret) to be&lt;br/&gt;committed to in advance) to be able to bump [4] and does not get rid of the &amp;#34;who&amp;#39;s gonna pay for the&lt;br/&gt;enforcement&amp;#34; issue in &amp;gt;2-parties contracts. Still, it&amp;#39;s more optimal and usable than CPFP or adding&lt;br/&gt;a pair of input/output for all the reasons mentioned above.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Thoughts?&lt;br/&gt;Antoine&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-November/019614.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-November/019614.html&lt;/a&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-November/019615.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-November/019615.html&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-December/019627.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-December/019627.html&lt;/a&gt;&lt;br/&gt;[3] That&amp;#39;s obviously close to the CTV construction. But using another more flexible (and therefore&lt;br/&gt;    less optimized) construction would not be a big deal. It might in fact be necessary for more&lt;br/&gt;    elaborated (realistic?) usecases than the simple one detailed here.&lt;br/&gt;[4] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019879.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019879.html&lt;/a&gt;
    </content>
    <updated>2023-06-07T23:06:25Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsqm5cydlzt5ea9lrjg2hj9kz886qudu0hd4hlszud3yrra59klzvqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwykprghq</id>
    
      <title type="html">📅 Original date posted:2022-02-11 📝 Original message:Well ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsqm5cydlzt5ea9lrjg2hj9kz886qudu0hd4hlszud3yrra59klzvqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwykprghq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv59m926fzpc9phldjsps9dz20ee9eakcp2rsadavrahku5d6flmc6885a9&#39;&gt;nevent1q…85a9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-11&lt;br/&gt;📝 Original message:Well because in the example i gave you this decreases the miner&amp;#39;s reward. The rule of increasing feerate you stated isn&amp;#39;t always economically rationale.&lt;br/&gt;&lt;br/&gt;Note how it can also be extended, for instance if the miner only has 1.5vMB of txs and is not assured to receive enough transactions to fill 2 blocks he might be interested in maximizing absolute fees, not feerate.&lt;br/&gt;&lt;br/&gt;Sure, we could make the argument that long term we need a large backlog of transactions anyways.. But that&amp;#39;d be unfortunately not in phase with today&amp;#39;s reality.&lt;br/&gt;&lt;br/&gt;-------- Original Message --------&lt;br/&gt;On Feb 11, 2022, 00:51, James O&amp;#39;Beirne wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; It&amp;#39;s not that simple. As a miner, if i have less than 1vMB of transactions in my mempool. I don&amp;#39;t want a 10sats/vb transaction paying 100000sats by a 100sats/vb transaction paying only 10000sats.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t understand why the &amp;#34;&amp;lt;1vMB in the mempool&amp;#34; case is even worth consideration because the miner will just include the entire mempool in the next block regardless of feerate.&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220211/82a07832/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220211/82a07832/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:04:13Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs88ymc9j6mxp9jvxku3hwq42zek7z9rad5jk8u088ls59sc62q4lszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwygrypn5</id>
    
      <title type="html">📅 Original date posted:2022-02-18 📝 Original message:James, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs88ymc9j6mxp9jvxku3hwq42zek7z9rad5jk8u088ls59sc62q4lszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwygrypn5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9gdq496psqzt6jh3dc32lvdv7fg65znx62yfhefkfgqarqq6cleg6ayatq&#39;&gt;nevent1q…yatq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-18&lt;br/&gt;📝 Original message:James,&lt;br/&gt;&lt;br/&gt;You seem to imply that the scenario described isn&amp;#39;t prevented today. It is. The mempool acceptance for a replacement not only&lt;br/&gt;depend on the transaction feerate but also the transaction fee [0]. That&amp;#39;s why i raised it in the first place...&lt;br/&gt;&lt;br/&gt;Antoine&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/66636ca438cb65fb18bcaa4540856cef0cee2029/src/validation.cpp#L944-L947&#34;&gt;https://github.com/bitcoin/bitcoin/blob/66636ca438cb65fb18bcaa4540856cef0cee2029/src/validation.cpp#L944-L947&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Of course if you are evicting transactions then you don&amp;#39;t have the issue i mentioned, so it&amp;#39;s fine doing so.&lt;br/&gt;-------- Original Message --------&lt;br/&gt;On Feb 17, 2022, 19:18, James O&amp;#39;Beirne &amp;lt; james.obeirne at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Is it really true that miners do/should care about that?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; De facto, any miner running an unmodified version of bitcoind doesn&amp;#39;t&lt;br/&gt;&amp;gt; care about anything aside from ancestor fee rate, given that the&lt;br/&gt;&amp;gt; BlockAssembler as-written orders transactions for inclusion by&lt;br/&gt;&amp;gt; descending ancestor fee-rate and then greedily adds them to the block&lt;br/&gt;&amp;gt; template. [0]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If anyone has any indication that there are miners running forks of&lt;br/&gt;&amp;gt; bitcoind that change this behavior, I&amp;#39;d be curious to know it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Along the lines of what AJ wrote, optimal transaction selection is&lt;br/&gt;&amp;gt; NP-hard (knapsack problem). Any time that a miner spends deciding how&lt;br/&gt;&amp;gt; to assemble the next block is time not spent grinding on the nonce, and&lt;br/&gt;&amp;gt; so I&amp;#39;m skeptical that miners in practice are currently doing anything&lt;br/&gt;&amp;gt; that isn&amp;#39;t fast and simple like the default implementation: sorting&lt;br/&gt;&amp;gt; fee-rate in descending order and then greedily packing.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But it would be interesting to hear evidence to the contrary.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ---&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You can make the argument that transaction selection is just a function&lt;br/&gt;&amp;gt; of mempool contents, and so mempool maintenance criteria might be the&lt;br/&gt;&amp;gt; thing to look at. Mempool acceptance is gated based on a minimum&lt;br/&gt;&amp;gt; feerate[1]. Mempool eviction (when running low on space) happens on&lt;br/&gt;&amp;gt; the basis of max(self_feerate, descendant_feerate) [2]. So even in the&lt;br/&gt;&amp;gt; mempool we&amp;#39;re still talking in terms of fee rates, not absolute fees.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That presents us with the &amp;#34;is/ought&amp;#34; problem: just because the mempool&lt;br/&gt;&amp;gt; *is* currently gating only on fee rate doesn&amp;#39;t mean that&amp;#39;s optimal. But&lt;br/&gt;&amp;gt; if the whole point of the mempool is to hold transactions that will be&lt;br/&gt;&amp;gt; mined, and if there&amp;#39;s good reason that txns are chosen for mining based&lt;br/&gt;&amp;gt; on fee rate (it&amp;#39;s quick and good enough), then it seems like fee rate&lt;br/&gt;&amp;gt; is the approximation that should ultimately prevail for txn&lt;br/&gt;&amp;gt; replacement.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/master/src/node/miner.cpp#L310-L320&#34;&gt;https://github.com/bitcoin/bitcoin/blob/master/src/node/miner.cpp#L310-L320&lt;/a&gt;&lt;br/&gt;&amp;gt; [1]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/master/src/txmempool.cpp#L1106&#34;&gt;https://github.com/bitcoin/bitcoin/blob/master/src/txmempool.cpp#L1106&lt;/a&gt;&lt;br/&gt;&amp;gt; [2]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/master/src/txmempool.cpp#L1138-L1144&#34;&gt;https://github.com/bitcoin/bitcoin/blob/master/src/txmempool.cpp#L1138-L1144&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220218/1da83193/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220218/1da83193/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:04:11Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsxwnh8j6599q6aqtfp3dqvjmjhn6jwlmflnjndqsdnqg0lkl85lwqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyhkgapv</id>
    
      <title type="html">📅 Original date posted:2022-02-10 📝 Original message:(I ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsxwnh8j6599q6aqtfp3dqvjmjhn6jwlmflnjndqsdnqg0lkl85lwqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyhkgapv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswy9kvr9qvddhlv4hzuhscdxzva525sezkfatz0phypn49rgwyw2qnkc5fs&#39;&gt;nevent1q…c5fs&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-10&lt;br/&gt;📝 Original message:(I have not yet read the recent posts on RBF but i wanted to react on the &amp;#34;additive feerate&amp;#34;.)&lt;br/&gt;&lt;br/&gt;&amp;gt; # Purely additive feerate bumps should never be impossible&lt;br/&gt;&lt;br/&gt;It&amp;#39;s not that simple. As a miner, if i have less than 1vMB of transactions in my mempool. I don&amp;#39;t want a 10sats/vb transaction paying 100000sats by a 100sats/vb transaction paying only 10000sats.&lt;br/&gt;&lt;br/&gt;Apart from that i very much agree with the approach of taking a step back and reframing, with CPFP being inadapted long term (wasteful, not useful for delegating fee bumping (i&amp;#39;m surprised i didn&amp;#39;t mention it publicly but it makes it unsuitable for Revault for instance), and the current carve-out rule makes it only suitable for 2-party protocols), and the `diff` approach.&lt;br/&gt;&lt;br/&gt;All that again with the caveat that i need to update myself on the recent proposals.&lt;br/&gt;&lt;br/&gt;-------- Original Message --------&lt;br/&gt;On Feb 10, 2022, 20:40, James O&amp;#39;Beirne via bitcoin-dev wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; There&amp;#39;s been much talk about fee-bumping lately, and for good reason -&lt;br/&gt;&amp;gt; dynamic fee management is going to be a central part of bitcoin use as&lt;br/&gt;&amp;gt; the mempool fills up (lord willing) and right now fee-bumping is&lt;br/&gt;&amp;gt; fraught with difficulty and pinning peril.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Gloria&amp;#39;s recent post on the topic[0] was very lucid and highlights a&lt;br/&gt;&amp;gt; lot of the current issues, as well as some proposals to improve the&lt;br/&gt;&amp;gt; situation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As others have noted, the post was great. But throughout the course&lt;br/&gt;&amp;gt; of reading it and the ensuing discussion, I became troubled by the&lt;br/&gt;&amp;gt; increasing complexity of both the status quo and some of the&lt;br/&gt;&amp;gt; proposed remedies.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Layering on special cases, more carve-outs, and X and Y percentage&lt;br/&gt;&amp;gt; thresholds is going to make reasoning about the mempool harder than it&lt;br/&gt;&amp;gt; already is. Special consideration for &amp;#34;what should be in the next&lt;br/&gt;&amp;gt; block&amp;#34; and/or the caching of block templates seems like an imposing&lt;br/&gt;&amp;gt; dependency, dragging in a bunch of state and infrastructure to a&lt;br/&gt;&amp;gt; question that should be solely limited to mempool feerate aggregates&lt;br/&gt;&amp;gt; and the feerate of the particular txn package a wallet is concerned&lt;br/&gt;&amp;gt; with.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is bad enough for protocol designers and Core developers, but&lt;br/&gt;&amp;gt; making the situation any more intractable for &amp;#34;end-users&amp;#34; and wallet&lt;br/&gt;&amp;gt; developers feels wrong.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I thought it might be useful to step back and reframe. Here are a few&lt;br/&gt;&amp;gt; aims that are motivated chiefly by the quality of end-user experience,&lt;br/&gt;&amp;gt; constrained to obey incentive compatibility (i.e. miner reward, DoS&lt;br/&gt;&amp;gt; avoidance). Forgive the abstract dalliance for a moment; I&amp;#39;ll talk&lt;br/&gt;&amp;gt; through concretes afterwards.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # Purely additive feerate bumps should never be impossible&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Any user should always be able to add to the incentive to mine any&lt;br/&gt;&amp;gt; transaction in a purely additive way. The countervailing force here&lt;br/&gt;&amp;gt; ends up being spam prevention (a la min-relay-fee) to prevent someone&lt;br/&gt;&amp;gt; from consuming bandwidth and mempool space with a long series of&lt;br/&gt;&amp;gt; infinitesimal fee-bumps.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A fee bump, naturally, should be given the same per-byte consideration&lt;br/&gt;&amp;gt; as a normal Bitcoin transaction in terms of relay and block space,&lt;br/&gt;&amp;gt; although it would be nice to come up with a more succinct&lt;br/&gt;&amp;gt; representation. This leads to another design principle:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # The bandwidth and chain space consumed by a fee-bump should be minimal&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Instead of prompting a rebroadcast of the original transaction for&lt;br/&gt;&amp;gt; replacement, which contains a lot of data not new to the network, it&lt;br/&gt;&amp;gt; makes more sense to broadcast the &amp;#34;diff&amp;#34; which is the additive&lt;br/&gt;&amp;gt; contribution towards some txn&amp;#39;s feerate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This dovetails with the idea that...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # Special transaction structure should not be required to bump fees&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In an ideal design, special structural foresight would not be needed&lt;br/&gt;&amp;gt; in order for a txn&amp;#39;s feerate to be improved after broadcast.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Anchor outputs specified solely for CPFP, which amount to many bytes of&lt;br/&gt;&amp;gt; wasted chainspace, are a hack. It&amp;#39;s probably uncontroversial at this&lt;br/&gt;&amp;gt; point to say that even RBF itself is kind of a hack - a special&lt;br/&gt;&amp;gt; sequence number should not be necessary for post-broadcast contribution&lt;br/&gt;&amp;gt; toward feerate. Not to mention RBF&amp;#39;s seemingly wasteful consumption of&lt;br/&gt;&amp;gt; bandwidth due to the rebroadcast of data the network has already seen.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In a sane design, no structural foresight - and certainly no wasted&lt;br/&gt;&amp;gt; bytes in the form of unused anchor outputs - should be needed in order&lt;br/&gt;&amp;gt; to add to a miner&amp;#39;s reward for confirming a given transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Planning for fee-bumps explicitly in transaction structure also often&lt;br/&gt;&amp;gt; winds up locking in which keys are required to bump fees, at odds&lt;br/&gt;&amp;gt; with the idea that...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # Feerate bumps should be able to come from anywhere&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One of the practical downsides of CPFP that I haven&amp;#39;t seen discussed in&lt;br/&gt;&amp;gt; this conversation is that it requires the transaction to pre-specify the&lt;br/&gt;&amp;gt; keys needed to sign for fee bumps. This is problematic if you&amp;#39;re, for&lt;br/&gt;&amp;gt; example, using a vault structure that makes use of pre-signed&lt;br/&gt;&amp;gt; transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What if the key you specified n the anchor outputs for a bunch of&lt;br/&gt;&amp;gt; pre-signed txns is compromised? What if you&amp;#39;d like to be able to&lt;br/&gt;&amp;gt; dynamically select the wallet that bumps fees? CPFP does you no favors&lt;br/&gt;&amp;gt; here.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There is of course a tension between allowing fee bumps to come from&lt;br/&gt;&amp;gt; anywhere and the threat of pinning-like attacks. So we should venture&lt;br/&gt;&amp;gt; to remove pinning as a possibility, in line with the first design&lt;br/&gt;&amp;gt; principle I discuss.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ---&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Coming down to earth, the &amp;#34;tabula rasa&amp;#34; thought experiment above has led&lt;br/&gt;&amp;gt; me to favor an approach like the transaction sponsors design that Jeremy&lt;br/&gt;&amp;gt; proposed in a prior discussion back in 2020[1].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Transaction sponsors allow feerates to be bumped after a transaction&amp;#39;s&lt;br/&gt;&amp;gt; broadcast, regardless of the structure of the original transaction.&lt;br/&gt;&amp;gt; No rebroadcast (wasted bandwidth) is required for the original txn data.&lt;br/&gt;&amp;gt; No wasted chainspace on only-maybe-used prophylactic anchor outputs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The interface for end-users is very straightforward: if you want to bump&lt;br/&gt;&amp;gt; fees, specify a transaction that contributes incrementally to package&lt;br/&gt;&amp;gt; feerate for some txid. Simple.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the original discussion, there were a few main objections that I noted:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. In Jeremy&amp;#39;s original proposal, only one sponsor txn per txid is&lt;br/&gt;&amp;gt; allowed by policy. A malicious actor could execute a pinning-like&lt;br/&gt;&amp;gt; attack by specifying an only-slightly-helpful feerate sponsor that&lt;br/&gt;&amp;gt; then precludes other larger bumps.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think there are some ways around this shortcoming. For example: what&lt;br/&gt;&amp;gt; if, by policy, sponsor txns had additional constraints that&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - each input must be signed {SIGHASH_SINGLE,SIGHASH_NONE}|ANYONECANPAY,&lt;br/&gt;&amp;gt; - the txn must be specified RBFable,&lt;br/&gt;&amp;gt; - a replacement for the sponsor txn must raise the sponsor feerate,&lt;br/&gt;&amp;gt; including ancestors (maybe this is inherent in &amp;#34;is RBFable,&amp;#34; but&lt;br/&gt;&amp;gt; I don&amp;#39;t want to conflate absolute feerates into this).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That way, there is still at most a single sponsor txn per txid in the&lt;br/&gt;&amp;gt; mempool, but anyone can &amp;#34;mix in&amp;#34; inputs which bump the effective&lt;br/&gt;&amp;gt; feerate of the sponsor.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This may not be the exact solution we want, but I think it demonstrates&lt;br/&gt;&amp;gt; that the sponsors design has some flexibility and merits some thinking.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The second objection about sponsors was&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2. (from Suhas) sponsors break the classic invariant: &amp;#34;once a valid&lt;br/&gt;&amp;gt; transaction is created, it should not become invalid later on unless&lt;br/&gt;&amp;gt; the inputs are double-spent.&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This doesn&amp;#39;t seem like a huge concern to me if you consider the txid&lt;br/&gt;&amp;gt; being sponsored as a sort of spiritual input to the sponsor. While the&lt;br/&gt;&amp;gt; theoretical objection against broadening where one has to look in a txn&lt;br/&gt;&amp;gt; to determine its dependencies is understandable, I don&amp;#39;t see what the&lt;br/&gt;&amp;gt; practical cost here is.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Reorg complexity seems comparable if not identical, especially if we&lt;br/&gt;&amp;gt; broaden sponsor rules to allow blocks to contain sponsor txns that are&lt;br/&gt;&amp;gt; both for txids in the same block _or_ already included in the chain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This theoretical concession seems preferable to heaping more rules onto&lt;br/&gt;&amp;gt; an already labyrinthine mempool policy that is difficult for both&lt;br/&gt;&amp;gt; implementers and users to reason about practically and conceptually.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A third objection that wasn&amp;#39;t posed, IIRC, but almost certainly would&lt;br/&gt;&amp;gt; be:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 3. Transaction sponsors requires a soft-fork.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Soft-forks are no fun, but I&amp;#39;ll tell you what also isn&amp;#39;t fun: being on&lt;br/&gt;&amp;gt; the hook to model (and sometimes implement) a dizzying potpourri of&lt;br/&gt;&amp;gt; mempool policies and special-cases. Expecting wallet implementers to&lt;br/&gt;&amp;gt; abide by a maze of rules faithfully in order to ensure txn broadcast and&lt;br/&gt;&amp;gt; fee management invites bugs for perpetuity and network behavior that is&lt;br/&gt;&amp;gt; difficult to reason about a priori. Use of CPFP in the long-term also&lt;br/&gt;&amp;gt; risks needless chain waste.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If a soft-fork is the cost of cleaning up this essential process,&lt;br/&gt;&amp;gt; consideration should be given to paying it as a one-time cost. This&lt;br/&gt;&amp;gt; topic merits a separate post, but consider that in the 5 years leading&lt;br/&gt;&amp;gt; up to the 2017 SegWit drama, we averaged about a soft-fork a year.&lt;br/&gt;&amp;gt; Uncontroversial, &amp;#34;safe&amp;#34; changes to the consensus protocol shouldn&amp;#39;t be&lt;br/&gt;&amp;gt; out of the question when significant practical benefit is plain to see.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ---&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I hope this message has added some framing to the discussion on fees,&lt;br/&gt;&amp;gt; as well prompting other participants to go back and give the&lt;br/&gt;&amp;gt; transaction sponsor proposal a serious look. The sponsors interface is&lt;br/&gt;&amp;gt; about the simplest I can imagine for wallets, and it seems easy to&lt;br/&gt;&amp;gt; reason about for implementers on Core and elsewhere.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not out to propose soft-forks lightly, but the current complexity&lt;br/&gt;&amp;gt; in fee management feels untenable, and as evidenced by all the&lt;br/&gt;&amp;gt; discussion lately, fees are an increasingly crucial part of the system.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0]: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019817.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019817.html&lt;/a&gt;&lt;br/&gt;&amp;gt; [1]: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220210/b9a80bc9/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220210/b9a80bc9/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:04:09Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs9fvlrj6xesuwzw232pluh6wpx5n7xe34d0eevety8wywuxwxqcvgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy879s7n</id>
    
      <title type="html">📅 Original date posted:2021-12-08 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs9fvlrj6xesuwzw232pluh6wpx5n7xe34d0eevety8wywuxwxqcvgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy879s7n" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq0hn67rakm9vpthjxlr4x09jfqfvv9z933fu8rfesrenusfs3lrqf28rre&#39;&gt;nevent1q…8rre&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-08&lt;br/&gt;📝 Original message:Hi Gloria,&lt;br/&gt;&lt;br/&gt;I agree with regard to the RBF changes. To me, we should (obviously?) do ancestor feerate instead of requiring confirmed inputs (#23121).&lt;br/&gt;However, we are yet to come with a reasonable policy-only fix to &amp;#34;rule 3 pinning&amp;#34;.&lt;br/&gt;&lt;br/&gt;Responses inline!&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; The part of Revault we are interested in for this study is the delegation process, and more&lt;br/&gt;&amp;gt;&amp;gt; specifically the application of spending policies by network monitors (watchtowers).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;d like to better understand how fee-bumping would be used, i.e. how the watchtower model works:&lt;br/&gt;&amp;gt; - Do all of the vault parties both deposit to the vault and a refill/fee to the watchtower, is there a reward the watchtower collects for a successful Cancel, or something else? (Apologies if there&amp;#39;s a thorough explanation somewhere that I haven&amp;#39;t already seen).&lt;br/&gt;&amp;gt; - Do we expect watchtowers tracking multiple vaults to be batching multiple Cancel transaction fee-bumps?&lt;br/&gt;&amp;gt; - Do we expect vault users to be using multiple watchtowers for a better trust model? If so, and we&amp;#39;re expecting batched fee-bumps, won&amp;#39;t those conflict?&lt;br/&gt;&lt;br/&gt;Grossly, it could be described as &amp;#34;enforce spending policied on 10BTC worth of delegated coins by allocating 5mBTC to 3 different watchtowers&amp;#34;.&lt;br/&gt;Each participant that will be delegating coins is expected to run a number of watchtowers. They should ideally be replicated (for full disclosure if&lt;br/&gt;it wasn&amp;#39;t obvious providing replication is the business model of the company behind the Revault project :p).&lt;br/&gt;You can&amp;#39;t batch fee-bumps as you *could* (maybe not *would*) do with anchor outputs channels, since the latter use CPFP and we &amp;#34;sponsor&amp;#34;&lt;br/&gt;(or whatever the name of &amp;#34;supplementing the fees of a transaction by adding inputs&amp;#34; is).&lt;br/&gt;In the current model, watchtowers enforcing the same policy do compete in that they broadcast conflicting transactions since they attach different&lt;br/&gt;fee-bumping inputs. Ideally we could sign the added feebumping inputs themselves with ACP so they are allowed to cooperate. However doing that&lt;br/&gt;would allow anyone on the network to snip the added fees to perform a &amp;#34;RBF rule-3 pinning&amp;#34;.&lt;br/&gt;Finally, there could be concerns around game theory of letting others&amp;#39; watchtowers feebump for you. I&amp;#39;m convinced however that in our case the fee&lt;br/&gt;is completely dwarfed by the value at stake. Trying to delay your own WT&amp;#39;s fee-bump reaction to hope someone else will pay the 10k sats for enforcing&lt;br/&gt;a 1BTC contract, hmmm, i wouldn&amp;#39;t do that.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; For Revault we can afford to introduce malleability in the Cancel transaction since there is no&lt;br/&gt;&amp;gt;&amp;gt; second-stage transaction depending on its txid. Therefore it is pre-signed with ANYONECANPAY. We&lt;br/&gt;&amp;gt;&amp;gt; can&amp;#39;t use ANYONECANPAY|SINGLE since it would open a pinning vector [3]. Note how we can&amp;#39;t leverage&lt;br/&gt;&amp;gt;&amp;gt; the carve out rule, and neither can any other more-than-two-parties contract.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We&amp;#39;ve already talked about this offline, but I&amp;#39;d like to point out here that even transactions signed with ANYONECANPAY|ALL can be pinned by RBF unless we add an ancestor score rule. [0], [1] (numbers are inaccurate, Cancel Tx feerates wouldn&amp;#39;t be that low, but just to illustrate what the attack would look like)&lt;br/&gt;&lt;br/&gt;Thanks for expliciting that, i should have mentioned it. For everyone reading the PR is at &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/23121&#34;&gt;https://github.com/bitcoin/bitcoin/pull/23121&lt;/a&gt; .&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; can&amp;#39;t use ANYONECANPAY|SINGLE since it would open a pinning vector [3]. Note how we can&amp;#39;t leverage&lt;br/&gt;&amp;gt;&amp;gt; the carve out rule, and neither can any other more-than-two-parties contract.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Well stated about CPFP carve out. I suppose the generalization is that allowing n extra ancestorcount=2 descendants to a transaction means it can help contracts with &amp;lt;=n&#43;1 parties (more accurately, outputs)? I wonder if it&amp;#39;s possible to devise a different approach for limiting ancestors/descendants, e.g. by height/width/branching factor of the family instead of count... :shrug:&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think so, because you want any party involved in the contract to be able to unilaterally enforce it. With &amp;gt;2 anchor outputs any 2-parties can&lt;br/&gt;collude against the other one(s) by pinning the transaction using the first party&amp;#39;s output to hit the descendant chain limit and the second one to trigger&lt;br/&gt;the carve-out.&lt;br/&gt;&lt;br/&gt;Ideally i think it&amp;#39;d be better that all contracts move toward using sponsoring (&amp;#34;tx malleation&amp;#34;) when we can (ie for all transactions that are at the end of&lt;br/&gt;the chain, or post-ANYPREVOUT any transaction really) instead of CPFP for fee-bumping because:&lt;br/&gt;1. It&amp;#39;s way easier to reason about wrt mempool DOS protections (the fees don&amp;#39;t depend on a chain of childs, it&amp;#39;s just a function of the transaction alone)&lt;br/&gt;2. It&amp;#39;s more space efficient (and thereby economical): you don&amp;#39;t need to create a new transaction (or a set of new txs) to bump your fees.&lt;br/&gt;&lt;br/&gt;Unfortunately, having to use ACP instead of ACP|SINGLE is a showstopper. Managing a fee-bumping UTxO pool is a massive burden.&lt;br/&gt;On a side note, thinking back about ACP|SINGLE vs ACP i&amp;#39;m not so sure anymore the latter opens up more pinning vectors than the former..&lt;br/&gt;&lt;br/&gt;&amp;gt; IIUC, a Cancel transaction can be generalized as a 1-in-1-out where the input is presigned with counterparties, SIGHASH_ANYONECANPAY. The fan-out UTXO pool approach is a clever solution. I also think this smells like a case where improving lower-level RBF rules is more appropriate than requiring applications to write workarounds and generate extra transactions. Seeing that the BIP125#2 (no new unconfirmed inputs) restriction really hurts in this case, if that rule were removed, would you be able to simply keep the 1 big UTXO per vault and cut out the exact nValue you need to fee-bump Cancel transactions? Would that feel less like &amp;#34;burning&amp;#34; for the sake of fee-bumping?&lt;br/&gt;&lt;br/&gt;I am not sure. It&amp;#39;s a question i raised when i was made aware of your finding of the &amp;#34;no unconfirmed&amp;#34; rule defect and your proposal to move to ancestor&lt;br/&gt;score instead. Without further consideration i&amp;#39;d say yes, but this needs more research. I&amp;#39;m also biased as i really want to get rid of this coin pool for both&lt;br/&gt;the complexity and the social cost..&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; First of all, when to fee-bump? At fixed time intervals? At each block connection? It sounds like,&lt;br/&gt;&amp;gt;&amp;gt; given a large enough timelock, you could try to greed by &amp;#34;trying your luck&amp;#34; at a lower feerate and&lt;br/&gt;&amp;gt;&amp;gt; only re-bumping every N blocks. You would then start aggressively bumping at every block after M&lt;br/&gt;&amp;gt;&amp;gt; blocks have passed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m wondering if you also considered other questions like:&lt;br/&gt;&amp;gt; - Should a fee-bumping strategy be dependent upon the rate of incoming transactions? To me, it seems like the two components are (1) what&amp;#39;s in the mempool and (2) what&amp;#39;s going to trickle into the mempool between now and the target block. The first component is best-effort keeping incentive-compatible mempool; historical data and crystal ball look like the only options for incorporating the 2nd component.&lt;br/&gt;&amp;gt; - Should the fee-bumping strategy depend on how close you are to your timelock expiry? (though this seems like a potential privacy leak, and the game theory could get weird as you mentioned).&lt;br/&gt;&amp;gt; - As long as you have a good fee estimator (i.e. given a current mempool, can get an accurate feerate given a % probability of getting into target block n), is there any reason to devise a fee-bumping strategy beyond picking a time interval?&lt;br/&gt;&lt;br/&gt;I think (again, ideally) applications should take `estimatesmarfee` as a black box, and not look into the mempool by themselves. Now whether we should&lt;br/&gt;take into account the mempool data for short target estimation, i don&amp;#39;t know. The first issue that comes to mind is how to measure whether your mempool&lt;br/&gt;is &amp;#34;up-to-date&amp;#34; (i mean if you have most of the current unconfirmed transactions). Weak blocks were mentionned elsewhere, and i think they can help for&lt;br/&gt;this (you don&amp;#39;t influence your estimate by the rate of new unconfirmed transactions you hear about, but what miners are currently working on). Now, sure,&lt;br/&gt;the expected time before the next block would be 10min. But for a short target estimate it still seems better to base your estimate on the most up-to-date&lt;br/&gt;data you can get? (maybe not? Can a statistician chime in?)&lt;br/&gt;&lt;br/&gt;This section was about arguing that it doesn&amp;#39;t make sense to start low and get to next-block feerate as you approach your timelock expiration. Is your&lt;br/&gt;question about whether it makes sense to start, as you get closer to timelock maturation, feebumping not on the basis of what your fee estimator gives&lt;br/&gt;you but blindly i don&amp;#39;t believe it does. If all you have is a fee-bumping method, all confirmation problems look like a fee-paying one :p.&lt;br/&gt;You are already assuming your fee estimator is working and isn&amp;#39;t being manipulated. If it does, and you don&amp;#39;t get confirmed after X blocks and as many&lt;br/&gt;re-bumping attempts the problem is elsewhere imo.&lt;br/&gt;&lt;br/&gt;&amp;gt; It would be interesting to see stats on the spread of feerates in blocks during periods of fee fluctuation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; In the event that you notice a consequent portion of the block is filled with transactions paying&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; less than your own, you might want to start panicking and bump your transaction fees by a certain&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; percentage with no consideration for your fee estimator. You might skew miners incentives in doing&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; so: if you increase the fees by a factor of N, any miner with a fraction larger than 1/N of the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; network hashrate now has an incentive to censor your transaction at first to get you to panic.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yes I think miner-harvesting attacks should be weighed carefully in the design of offchain contracts fee-bumping strategies, at least in the future when the mining reward exhausts further.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Miner-harvesting (such cool naming!) is interesting, but I want to clarify the value of N - I don&amp;#39;t think it&amp;#39;s the factor by which you increase the fees on just your transaction.&lt;br/&gt;&amp;gt; To codify: your transaction pays a fee of `f1` right now and might pay a fee of `f2` in a later block that the miner expects to mine with 1/N probability. The economically rational miner isn&amp;#39;t incentivized if simply `f2 = N * f1` unless their mempool is otherwise empty.&lt;br/&gt;&amp;gt; By omitting your transaction in this block, the miner can include another transaction/package paying `g1` fees instead, so they lose `f1-g1` in fees right now. In the future block, they have the choice between collecting `f2` or `g2` (from another transaction/package) in fees, so their gain is `max(f2-g2, 0)`.&lt;br/&gt;&amp;gt; So the equation is more like: a miner with 1/N of the hashrate, employing this censorship strategy, gains only if `max(f2-g2, 0) &amp;gt; N * (f1-g1)`. More broadly, the miner only profits if `f2` is significantly higher than `g2` and `f1` is about the same feerate as everything else in your mempool: it seems like they&amp;#39;re betting on how much you _overshoot_, not how much you bump.&lt;br/&gt;&lt;br/&gt;Right. I was talking in the worst case where they don&amp;#39;t have a replacement package with a feerate of `g1`. They are even more incentivized to try that if they do.&lt;br/&gt;Since `f1` is already expected to be the next block feerate, by how much you bump is technically by how much your overshoot. So much for dismissing your fee&lt;br/&gt;estimator!&lt;br/&gt;&lt;br/&gt;&amp;gt; Slightly related question: in contracts, generally, the timelock deadline is revealed in the script, so the miner knows how &amp;#34;desperate&amp;#34; we are right?&lt;br/&gt;&lt;br/&gt;For P2WSH, yes.&lt;br/&gt;&lt;br/&gt;&amp;gt; Is that a problem?&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think so. As long as we don&amp;#39;t bump the feerate by the N factor mentioned above, they have an incentive to try to take the fees while they still can (or someone else will).&lt;br/&gt;&lt;br/&gt;&amp;gt; For Revault, if your Cancel transaction is a keypath spend (I think I remember reading that somewhere?) and you don&amp;#39;t reveal the script, they don&amp;#39;t see your timelock deadline yes?&lt;br/&gt;&lt;br/&gt;It *could* be once we move to Taproot (2weeks). Yep! They would only know about it on a successful spend which would reveal the branch with the timelock. It&amp;#39;s&lt;br/&gt;a good point in that the attack above could be made impractical through privacy. Although i don&amp;#39;t think it&amp;#39;s realistic: due to the necessary script-path spends it would&lt;br/&gt;be trivial to cluster coins managed by a Revault setup and deduce whether a given transaction is a Cancel with very high accuracy.&lt;br/&gt;&lt;br/&gt;&amp;gt; Again, thanks for the digging and sharing. :)&lt;br/&gt;&lt;br/&gt;Thanks for the interest and getting me to re-think through this!&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Antoine&lt;br/&gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Gloria&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Tue, Nov 30, 2021 at 3:27 PM darosior via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi Antoine,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks for your comment. I believe for Lightning it&amp;#39;s simpler with regard to the management of the UTxO pool, but harder with regard to choosing&lt;br/&gt;&amp;gt;&amp;gt; a threat model.&lt;br/&gt;&amp;gt;&amp;gt; Responses inline.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; For any opened channel, ensure the confirmation of a Commitment transaction and the children HTLC-Success/HTLC-Timeout transactions. Note, in the Lightning security game you have to consider (at least) 4 types of players moves and incentives : your node, your channel counterparties, the miners, the crowd of bitcoin users. The number of the last type of players is unknown from your node, however it should not be forgotten you&amp;#39;re in competition for block space, therefore their block demands bids should be anticipated and reacted to in consequence. With that remark in mind, implications for your LN fee-bumping strategy will be raised afterwards.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; For a LN service provider, on-chain overpayments are bearing on your operational costs, thus downgrading your economic competitiveness. For the average LN user, overpayment might price out outside a LN non-custodial deployment, as you don&amp;#39;t have the minimal security budget to be on your own.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think this problem statement can be easily generalised to any offchain contract. And your points stand for all of them.&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;For any opened contract, ensure at any point the confirmation of a (set of) transaction(s) in a given number of blocks&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Same issue with Lightning, we can be pinned today on the basis of replace-by-fee rule 3. We can be also blinded by network mempool partitions, a pinning counterparty can segregate all the full-nodes in as many subsets by broadcasting a revoked Commitment transaction different for each. For Revault, I think you can also do unlimited partitions by mutating the ANYONECANPAY-input of the Cancel.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Well you can already do unlimited partitions by adding different inputs to it. You could malleate the witness, but since we are using Miniscript i&amp;#39;m confident you would only be able in a marginal way.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; That said, if you have a distributed towers deployment, spread across the p2p network topology, and they can&amp;#39;t be clustered together through cross-layers or intra-layer heuristics, you should be able to reliably observe such partitions. I think such distributed monitors are deployed by few L1 merchants accepting 0-conf to detect naive double-spend.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We should aim to more than 0-conf (in)security level..&lt;br/&gt;&amp;gt;&amp;gt; It seems to me the only policy-level mitigation for RBF pinning around the &amp;#34;don&amp;#39;t decrease the abolute fees of a less-than-a-block mempool&amp;#34; would be to drop the requirement on increasing absolute fees if the mempool is &amp;#34;full enough&amp;#34; (and the feerate increases exponentially, of course).&lt;br/&gt;&amp;gt;&amp;gt; Another approach could be by introducing new consensus rules as proposed by Jeremy last year [0]. If we go in the realm of new consensus rules, then i think that simply committing to a maximum tx size would fix pinning by RBF rule 3. Could be in the annex, or in the unused sequence bits (although they currently are by Lightning, meh). You could also check in the output script that the input commits to this.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Have we already discussed a fee-bumping &amp;#34;shared cache&amp;#34;, a CPFP variation ? Strawman idea: Alice and Bob commit collateral inputs to a separate UTXO from the main &amp;#34;offchain contract&amp;#34; one. This UTXO is locked by a multi-sig. For any Commitment transaction pre-signed, also counter-sign a CPFP with top mempool feerate included, spending a Commitment anchor output and the shared-cache UTXO. If the fees spike, you can re-sign a high-feerate CPFP, assuming interactivity. As the CPFP is counter-signed by everyone, the outputs can be CSV-1 encumbered to prevent pinnings. If the share-cache is feeded at parity, there shouldn&amp;#39;t be an incentive to waste or maliciously inflate the feerate. I think this solution can be easily generalized to more than 2 counterparties by using a multi-signature scheme. Big issue, if the feerate is short due to fee spikes and you need to re-sign a higher-feerate CPFP, you&amp;#39;re trusting your counterparty to interact, though arguably not worse than the current update fee mechanism.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; It really looks just like `update_fee`. Except maybe with the property that you have the channel liquidity not depend on the onchain feerate.&lt;br/&gt;&amp;gt;&amp;gt; In any case, for Lightning i think it&amp;#39;s a bad idea to re-introduce trust on this side post anchor outputs. For Revault it&amp;#39;s clearly out of the question to introduce trust in your counterparties (why would you bother having a fee-bumping mechanism in the first place then?). Probably the same holds for all offchain contracts.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For Lightning, it&amp;#39;d mean keeping an equivalent amount of funds as the sum of all your&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; channels balances sitting there unallocated &amp;#34;just in case&amp;#34;. This is not reasonable.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Agree, game-theory wise, you would like to keep a full fee-bumping reserve, ready to burn as much in fees as the contested HTLC value, as it&amp;#39;s the maximum gain of your counterparty. Though perfect equilibrium is hard to achieve because your malicious counterparty might have an edge pushing you to broadcast your Commitment first by witholding HTLC resolution.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Fractional fee-bumping reserves are much more realistic to expect in the LN network. Lower fee-bumping reserve, higher liquidity deployed, in theory higher routing fees. By observing historical feerates, average offchain balances at risk and routing fees expected gains, you should be able to discover an equilibrium where higher levels of reserve aren&amp;#39;t worth the opportunity cost. I guess this equilibrium could be your LN fee-bumping reserve max feerate.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Note, I think the LN approach is a bit different from what suits a custody protocol like Revault, as you compute a direct return of the frozen fee-bumping liquidity. With Revault, if you have numerous bitcoins protected, it&amp;#39;s might be more interesting to adopt a &amp;#34;buy the mempool, stupid&amp;#34; strategy than risking fund safety for few percentages of interest returns.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; True for routing nodes. For wallets (if receiving funds), it&amp;#39;s not about an investment: just users expectations to being able to transact without risking to lose their funds (ie being able to enforce their contract onchain). Although wallets they are much less at risk.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; This is where the &amp;#34;anticipate the crowd of bitcoin users move&amp;#34; point can be laid out. As the crowd of bitcoin users&amp;#39; fee-bumping reserves are ultimately unknown from your node knowledge, you should be ready to be a bit more conservative than the vanilla fee-bumping strategies shipped by default. In case of massive mempool congestion, your additional conservatism might get your time-sensitive transactions and game on the crowd of bitcoin users. First Problem: if all offchain bitcoin software adopt that strategy we might inflate the worst-case feerate rate at the benefit of the miners, without holistically improving block throughput. Second problem : your class of offchain bitcoin softwares might have ridiculous fee-bumping reserve compared&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; to other classes of offchain bitcoin softwares (Revault &amp;gt; Lightning) and just be priced out bydesign in case of mempool congestion. Third problem : as the number of offchain bitcoin applications should go up with time, your fee-bumping reserve levels based from historical data might be always late by one &amp;#34;bank-run&amp;#34; scenario.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Black swan event 2.0? Just rule n°3 is inherent to any kind of fee estimation.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; For Lightning, if you&amp;#39;re short in fee-bumping reserves you might still do preemptive channel closures, either cooperatively or unilaterally and get back the off-chain liquidity to protect the more economically interesting channels. Though again, that kind of automatic behavior might be compelling at the individual node-level, but make the mempol congestion worse holistically.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yeah so we are back to the &amp;#34;fractional reserve&amp;#34; model: you can only enforce X% of the offchain contracts your participate in.. Actually it&amp;#39;s even an added assumption: that you still have operating contracts, with honest counterparties.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; In case of massive mempool congestion, you might try to front-run the crowd of bitcoin users relying on block connections for fee-bumping, and thus start your fee-bumping as soon as you observe feerate groups fluctuations in your local mempool(s).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I don&amp;#39;t think any kind of mempool-based estimate generalizes well, since at any point the expected time before the next block is 10 minutes (and a lot can happen in 10min).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Also you might proceed your fee-bumping ticks on a local clock instead of block connections in case of time-dilation or deeper eclipse attacks of your local node. Your view of the chain might be compromised but not your ability to broadcast transactions thanks to emergency channels (in the non-LN sense...though in fact quid of txn wrapped in onions ?) of communication.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Oh, yeah, i didn&amp;#39;t explicit &amp;#34;not getting eclipsed&amp;#34; (or more generally &amp;#34;data availability&amp;#34;) as an assumption since it&amp;#39;s generally one made by participants of any offchain contract. In this case you can&amp;#39;t even have decent fee estimation, so you are screwed anyways.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Yes, stay open the question on how you enforce this block insurance market. Reputation, which might be to avoid due to the latent centralization effect, might be hard to stack and audit reliably for an emergency mechanism running, hopefully, once in a halvening period. Maybe maybe some cryptographic or economically based mechanism on slashing or swaps could be found...&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Unfortunately, given current mining centralisation, pools are in a very good position to offer pretty decent SLAs around that. With a block space insurance, you of course don&amp;#39;t need all these convoluted fee-bumping hacks.&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;m very concerned that large stakeholders of the &amp;#34;offchain contracts ecosystem&amp;#34; would just go this (easier) way and further increase mining centralisation pressure.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I agree that a cryptography-based scheme around this type of insurance services would be the best way out.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Antoine&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Le lun. 29 nov. 2021 à 09:34, darosior via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi everyone,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Fee-bumping is paramount to the security of many protocols building on Bitcoin, as they require the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; confirmation of a transaction (which might be presigned) before the expiration of a timelock at any&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; point after the establishment of the contract.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The part of Revault using presigned transactions (the delegation from a large to a smaller multisig)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is no exception. We have been working on how to approach this for a while now and i&amp;#39;d like to share&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; what we have in order to open a discussion on this problem so central to what seem to be The Right&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Way [0] to build on Bitcoin but which has yet to be discussed in details (at least publicly).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I&amp;#39;ll discuss what we came up with for Revault (at least for what will be its first iteration) but my&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; intent with posting to the mailing list is more to frame the questions to this problem we are all&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; going to face rather than present the results of our study tailored to the Revault usecase.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The discussion is still pretty Revault-centric (as it&amp;#39;s the case study) but hopefully this can help&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; future protocol designers and/or start a discussion around what everyone&amp;#39;s doing for existing ones.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## 1. Reminder about Revault&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The part of Revault we are interested in for this study is the delegation process, and more&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; specifically the application of spending policies by network monitors (watchtowers).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Coins are received on a large multisig. Participants of this large multisig create 2 [1]&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions. The Unvault, spending a deposit UTxO, creates an output paying either to the small&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; multisig after a timelock or to the large multisig immediately. The Cancel, spending the Unvault&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; output through the non-timelocked path, creates a new deposit UTxO.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Participants regularly exchange the Cancel transaction signatures for each deposit, sharing the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; signatures with the watchtowers they operate. They then optionally [2] sign the Unvault transaction&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and share the signatures with the small multisig participants who can in turn use them to proceed&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with a spending. Watchtowers can enforce spending policies (say, can&amp;#39;t Unvault outside of business&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; hours) by having the Cancel transaction be confirmed before the expiration of the timelock.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## 2. Problem statement&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For any delegated vault, ensure the confirmation of a Cancel transaction in a configured number of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; blocks at any point. In so doing, minimize the overpayments and the UTxO set footprint. Overpayments&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; increase the burden on the watchtower operator by increasing the required frequency of refills of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; fee-bumping wallet, which is already the worst user experience. You are likely to manage a number of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; UTxOs with your number of vaults, which comes at a cost for you as well as everyone running a full&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; node.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Note that this assumes miners are economically rationale, are incentivized by *public* fees and that&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; you have a way to propagate your fee-bumped transaction to them. We also don&amp;#39;t consider the block&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; space bounds.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In the previous paragraph and the following text, &amp;#34;vault&amp;#34; can generally be replaced with &amp;#34;offchain&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; contract&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## 3. With presigned transactions&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; As you all know, the first difficulty is to get to be able to unilaterally enforce your contract&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; onchain. That is, any participant must be able to unilaterally bump the fees of a transaction even&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; if it was co-signed by other participants.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For Revault we can afford to introduce malleability in the Cancel transaction since there is no&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; second-stage transaction depending on its txid. Therefore it is pre-signed with ANYONECANPAY. We&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; can&amp;#39;t use ANYONECANPAY|SINGLE since it would open a pinning vector [3]. Note how we can&amp;#39;t leverage&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the carve out rule, and neither can any other more-than-two-parties contract.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This has a significant implication for the rest, as we are entirely burning fee-bumping UTxOs.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This opens up a pinning vector, or at least a significant nuisance: any other party can largely&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; increase the absolute fee without increasing the feerate, leveraging the RBF rules to prevent you&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; from replacing it without paying an insane fee. And you might not see it in your own mempool and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; could only suppose it&amp;#39;s happening by receiving non-full blocks or with transactions paying a lower&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feerate.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Unfortunately i know of no other primitive that can be used by multi-party (i mean, &amp;gt;2) presigned&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions protocols for fee-bumping that aren&amp;#39;t (more) vulnerable to pinning.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## 4. We are still betting on future feerate&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The problem is still missing one more constraint. &amp;#34;Ensuring confirmation at any time&amp;#34; involves ensuring&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; confirmation at *any* feerate, which you *cannot* do. So what&amp;#39;s the limit? In theory you should be ready&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to burn as much in fees as the value of the funds you want to get out of the contract. So... For us&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it&amp;#39;d mean keeping for each vault an equivalent amount of funds sitting there on the watchtower&amp;#39;s hot&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; wallet. For Lightning, it&amp;#39;d mean keeping an equivalent amount of funds as the sum of all your&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; channels balances sitting there unallocated &amp;#34;just in case&amp;#34;. This is not reasonable.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; So you need to keep a maximum feerate, above which you won&amp;#39;t be able to ensure the enforcement of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; all your contracts onchain at the same time. We call that the &amp;#34;reserve feerate&amp;#34; and you can have&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; different strategies for choosing it, for instance:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - The 85th percentile over the last year of transactions feerates&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - The maximum historical feerate&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - The maximum historical feerate adjusted in dollars (makes more sense but introduces a (set of?)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; trusted oracle(s) in a security-critical component)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - Picking a random high feerate (why not? It&amp;#39;s an arbitrary assumption anyways)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Therefore, even if we don&amp;#39;t have to bet on the broadcast-time feerate market at signing time anymore&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (since we can unilaterally bump), we still need some kind of prediction in preparation of making&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; funds available to bump the fees at broadcast time.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Apart from judging that 500sat/vb is probably more reasonable than 10sat/vbyte, this unfortunately&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; sounds pretty much crystal-ball-driven.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; We currently use the maximum of the 95th percentiles over 90-days windows over historical block chain&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feerates. [4]&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## 5. How much funds does my watchtower need?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; That&amp;#39;s what we call the &amp;#34;reserve&amp;#34;. Depending on your reserve feerate strategy it might vary over&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; time. This is easier to reason about with a per-contract reserve. For Revault it&amp;#39;s pretty&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; straightforward since the Cancel transaction size is static: `reserve_feerate * cancel_size`. For&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; other protocols with dynamic transaction sizes (or even packages of transactions) it&amp;#39;s less so. For&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; your Lightning channel you would probably take the maximum size of your commitment transaction&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; according to your HTLC exposure settings &#43; the size of as many `htlc_success` transaction?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Then you either have your software or your user guesstimate how many offchain contracts the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; watchtower will have to watch, time that by the per-contract reserve and refill this amount (plus&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; some slack in practice). Once again, a UX tradeoff (not even mentioning the guesstimation UX):&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; overestimating leads to too many unallocated funds sitting on a hot wallet, underestimating means&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (at best) inability to participate in new contracts or being &amp;#34;at risk&amp;#34; (not being able to enforce&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; all your contracts onchain at your reserve feerate) before a new refill.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For vaults you likely have large-value UTxOs and small transactions (the Cancel is one-in one-out in&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Revault). For some other applications with large transactions and lower-value UTxOs on average it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; likely that only part of the offchain contracts might be enforceable at a reasonable feerate. Is it&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; reasonable?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## 6. UTxO pool layout&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Now that you somehow managed to settle on a refill amount, how are you going to use these funds?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Also, you&amp;#39;ll need to manage your pool across time (consolidating small coins, and probably fanning&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; out large ones).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; You could keep a single large UTxO and peel it as you need to sponsor transactions. But this means&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; that you need to create a coin of a specific value according to your need at the current feerate&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; estimation, hope to have it confirmed in a few blocks (at least for now! [5]), and hope that the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; value won&amp;#39;t be obsolete by the time it confirmed. Also, you&amp;#39;d have to do that for any number of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Cancel, chaining feebump coin creation transactions off the change of the previous ones or replacing&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; them with more outputs. Both seem to become really un-manageable (and expensive) in many edge-cases,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; shortening the time you have to confirm the actual Cancel transaction and creating uncertainty about&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the reserve (how much is my just-in-time fanout going to cost me in fees that i need to refill in&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; advance on my watchtower wallet?).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is less of a concern for protocols using CPFP to sponsor transactions, but they rely on a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; policy rule specific to 2-parties contracts.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Therefore for Revault we fan-out the coins per-vault in advance. We do so at refill time so the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; refiller can give an excess to pay for the fees of the fanout transaction (which is reasonable since&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it will occur just after the refilling transaction confirms). When the watchtower is asked to watch&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; for a new delegated vault it will allocate coins from the pool of fanned-out UTxOs to it (failing&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; that, it would refuse the delegation).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; What is a good distribution of UTxOs amounts per vault? We want to minimize the number of coins,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; still have coins small enough to not overpay (remember, we can&amp;#39;t have change) and be able to bump a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Cancel up to the reserve feerate using these coins. The two latter constraints are directly in&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; contradiction as the minimal value of a coin usable at the reserve feerate (paying for its own input&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; fee &#43; bumping the feerate by, say, 5sat/vb) is already pretty high. Therefore we decided to go with&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; two distributions per vault. The &amp;#34;reserve distribution&amp;#34; alone ensures that we can bump up to the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; reserve feerate and is usable for high feerates. The &amp;#34;bonus distribution&amp;#34; is not, but contains&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; smaller coins useful to prevent overpayments during low and medium fee periods (which is most of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; time).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Both distributions are based on a basic geometric suite [6]. Each value is half the previous one.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This exponentially decreases the value, limiting the number of coins. But this also allows for&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; pretty small coins to exist and each coin&amp;#39;s value is equal to the sum of the smaller coins,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; or smaller by at most the value of the smallest coin. Therefore bounding the maximum overpayment to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the smallest coin&amp;#39;s value [7].&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For the management of the UTxO pool across time we merged the consolidation with the fanout. When&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; fanning out a refilled UTxO, we scan the pool for coins that need to be consolidated according to a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; heuristic. An instance of a heuristic is &amp;#34;the coin isn&amp;#39;t allocated and would not have been able to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; increase the fee at the median feerate over the past 90 days of blocks&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; We had this assumption that feerate would tend to go up with time and therefore discarded having to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; split some UTxOs from the pool. We however overlooked that a large increase in the exchange price of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; BTC as we&amp;#39;ve seen during the past year could invalidate this assumption and that should arguably be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; reconsidered.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## 7. Bumping and re-bumping&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; First of all, when to fee-bump? At fixed time intervals? At each block connection? It sounds like,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; given a large enough timelock, you could try to greed by &amp;#34;trying your luck&amp;#34; at a lower feerate and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; only re-bumping every N blocks. You would then start aggressively bumping at every block after M&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; blocks have passed. But that&amp;#39;s actually a bet (in disguised?) that the next block feerate in M blocks&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; will be lower than the current one. In the absence of any predictive model it is more reasonable to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; just start being aggressive immediately.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; You probably want to base your estimates on `estimatesmartfee` and as a consequence you would re-bump&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (if needed )after each block connection, when your estimates get updated and you notice your&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transaction was not included in the block.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In the event that you notice a consequent portion of the block is filled with transactions paying&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; less than your own, you might want to start panicking and bump your transaction fees by a certain&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; percentage with no consideration for your fee estimator. You might skew miners incentives in doing&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; so: if you increase the fees by a factor of N, any miner with a fraction larger than 1/N of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; network hashrate now has an incentive to censor your transaction at first to get you to panic. Also&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; note this can happen if you want to pay the absolute fees for the &amp;#39;pinning&amp;#39; attack mentioned in&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; section #2, and that might actually incentivize miners to perform it themselves..&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The gist is that the most effective way to bump and rebump (RBF the Cancel tx) seems to just be to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; consider the `estimatesmartfee 2 CONSERVATIVE` feerate at every block your tx isn&amp;#39;t included in, and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to RBF it if the feerate is higher.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In addition, we fallback to a block chain based estimation when estimates aren&amp;#39;t available (eg if&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the user stopped their WT for say a hour and we come back up): we use the 85th percentile over the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feerates in the last 6 blocks. Sure, miners can try to have an influence on that by stuffing their&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; blocks with large fee self-paying transactions, but they would need to:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1. Be sure to catch a significant portion of the 6 blocks (at least 2, actually)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2. Give up on 25% of the highest fee-paying transactions (assuming they got the 6 blocks, it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; proportionally larger and incertain as they get less of them)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 3. Hope that our estimator will fail and we need to fall back to the chain-based estimation&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## 8. Our study&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; We essentially replayed the historical data with different deployment configurations (number of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; participants and timelock) and probability of an event occurring (event being say an Unvault, an&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; invalid Unvault, a new delegation, ..). We then observed different metrics such as the time at risk&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (when we can&amp;#39;t enforce all our contracts at the reserve feerate at the same time), or the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; operational cost.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; We got the historical fee estimates data from Statoshi [9], Txstats [10] and the historical chain&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; data from Riccardo Casatta&amp;#39;s `blocks_iterator` [11]. Thanks!&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The (research-quality..) code can be found at &lt;a href=&#34;https://github.com/revault/research&#34;&gt;https://github.com/revault/research&lt;/a&gt; under the section&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;#34;Fee bumping&amp;#34;. Again it&amp;#39;s very Revault specific, but at least the data can probably be reused for&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; studying other protocols.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ## 9. Insurances&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Of course, given it&amp;#39;s all hacks and workarounds and there is no good answer to &amp;#34;what is a reasonable&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feerate up to which we need to make contracts enforceable onchain?&amp;#34;, there is definitely room for an&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; insurance market. But this enters the realm of opinions. Although i do have some (having discussed&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; this topic for the past years with different people), i would like to keep this post focused on the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; technical aspects of this problem.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [0] As far as i can tell, having offchain contracts be enforceable onchain by confirming a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transaction before the expiration of a timelock is a widely agreed-upon approach. And i don&amp;#39;t think&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; we can opt for any other fundamentally different one, as you want to know you can claim back your&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; coins from a contract after a deadline before taking part in it.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [1] The Real Revault (tm) involves more transactions, but for the sake of conciseness i only&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; detailed a minimum instance of the problem.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [2] Only presigning part of the Unvault transactions allows to only delegate part of the coins,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; which can be abstracted as &amp;#34;delegate x% of your stash&amp;#34; in the user interface.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [3] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [4] &lt;a href=&#34;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L323-L329&#34;&gt;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L323-L329&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [5] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/23121&#34;&gt;https://github.com/bitcoin/bitcoin/pull/23121&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [6] &lt;a href=&#34;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L494-L507&#34;&gt;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L494-L507&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [7] Of course this assumes a combinatorial coin selection, but i believe it&amp;#39;s ok given we limit the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; number of coins beforehand.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [8] Although there is the argument to outbid a censorship, anyone censoring you isn&amp;#39;t necessarily a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; miner.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [9] &lt;a href=&#34;https://www.statoshi.info/&#34;&gt;https://www.statoshi.info/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [10] &lt;a href=&#34;https://www.statoshi.info/&#34;&gt;https://www.statoshi.info/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [11] &lt;a href=&#34;https://github.com/RCasatta/blocks_iterator&#34;&gt;https://github.com/RCasatta/blocks_iterator&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20211208/06c111d0/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20211208/06c111d0/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:00:55Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs2g89egyyr9xqam0d9crnun72v42qsgdnm3uc83aus85rx92zcvwczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy9dssww</id>
    
      <title type="html">📅 Original date posted:2021-11-30 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs2g89egyyr9xqam0d9crnun72v42qsgdnm3uc83aus85rx92zcvwczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy9dssww" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxxlev6xyp36ad3mmcsce5rc6yj7l8kmjyx358njafud8hyj3htqc72jufx&#39;&gt;nevent1q…jufx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-11-30&lt;br/&gt;📝 Original message:Hi Antoine,&lt;br/&gt;&lt;br/&gt;Thanks for your comment. I believe for Lightning it&amp;#39;s simpler with regard to the management of the UTxO pool, but harder with regard to choosing&lt;br/&gt;a threat model.&lt;br/&gt;Responses inline.&lt;br/&gt;&lt;br/&gt;&amp;gt; For any opened channel, ensure the confirmation of a Commitment transaction and the children HTLC-Success/HTLC-Timeout transactions. Note, in the Lightning security game you have to consider (at least) 4 types of players moves and incentives : your node, your channel counterparties, the miners, the crowd of bitcoin users. The number of the last type of players is unknown from your node, however it should not be forgotten you&amp;#39;re in competition for block space, therefore their block demands bids should be anticipated and reacted to in consequence. With that remark in mind, implications for your LN fee-bumping strategy will be raised afterwards.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For a LN service provider, on-chain overpayments are bearing on your operational costs, thus downgrading your economic competitiveness. For the average LN user, overpayment might price out outside a LN non-custodial deployment, as you don&amp;#39;t have the minimal security budget to be on your own.&lt;br/&gt;&lt;br/&gt;I think this problem statement can be easily generalised to any offchain contract. And your points stand for all of them.&lt;br/&gt;&amp;#34;For any opened contract, ensure at any point the confirmation of a (set of) transaction(s) in a given number of blocks&amp;#34;&lt;br/&gt;&lt;br/&gt;&amp;gt; Same issue with Lightning, we can be pinned today on the basis of replace-by-fee rule 3. We can be also blinded by network mempool partitions, a pinning counterparty can segregate all the full-nodes in as many subsets by broadcasting a revoked Commitment transaction different for each. For Revault, I think you can also do unlimited partitions by mutating the ANYONECANPAY-input of the Cancel.&lt;br/&gt;&lt;br/&gt;Well you can already do unlimited partitions by adding different inputs to it. You could malleate the witness, but since we are using Miniscript i&amp;#39;m confident you would only be able in a marginal way.&lt;br/&gt;&lt;br/&gt;&amp;gt; That said, if you have a distributed towers deployment, spread across the p2p network topology, and they can&amp;#39;t be clustered together through cross-layers or intra-layer heuristics, you should be able to reliably observe such partitions. I think such distributed monitors are deployed by few L1 merchants accepting 0-conf to detect naive double-spend.&lt;br/&gt;&lt;br/&gt;We should aim to more than 0-conf (in)security level..&lt;br/&gt;It seems to me the only policy-level mitigation for RBF pinning around the &amp;#34;don&amp;#39;t decrease the abolute fees of a less-than-a-block mempool&amp;#34; would be to drop the requirement on increasing absolute fees if the mempool is &amp;#34;full enough&amp;#34; (and the feerate increases exponentially, of course).&lt;br/&gt;Another approach could be by introducing new consensus rules as proposed by Jeremy last year [0]. If we go in the realm of new consensus rules, then i think that simply committing to a maximum tx size would fix pinning by RBF rule 3. Could be in the annex, or in the unused sequence bits (although they currently are by Lightning, meh). You could also check in the output script that the input commits to this.&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Have we already discussed a fee-bumping &amp;#34;shared cache&amp;#34;, a CPFP variation ? Strawman idea: Alice and Bob commit collateral inputs to a separate UTXO from the main &amp;#34;offchain contract&amp;#34; one. This UTXO is locked by a multi-sig. For any Commitment transaction pre-signed, also counter-sign a CPFP with top mempool feerate included, spending a Commitment anchor output and the shared-cache UTXO. If the fees spike, you can re-sign a high-feerate CPFP, assuming interactivity. As the CPFP is counter-signed by everyone, the outputs can be CSV-1 encumbered to prevent pinnings. If the share-cache is feeded at parity, there shouldn&amp;#39;t be an incentive to waste or maliciously inflate the feerate. I think this solution can be easily generalized to more than 2 counterparties by using a multi-signature scheme. Big issue, if the feerate is short due to fee spikes and you need to re-sign a higher-feerate CPFP, you&amp;#39;re trusting your counterparty to interact, though arguably not worse than the current update fee mechanism.&lt;br/&gt;&lt;br/&gt;It really looks just like `update_fee`. Except maybe with the property that you have the channel liquidity not depend on the onchain feerate.&lt;br/&gt;In any case, for Lightning i think it&amp;#39;s a bad idea to re-introduce trust on this side post anchor outputs. For Revault it&amp;#39;s clearly out of the question to introduce trust in your counterparties (why would you bother having a fee-bumping mechanism in the first place then?). Probably the same holds for all offchain contracts.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; For Lightning, it&amp;#39;d mean keeping an equivalent amount of funds as the sum of all your&lt;br/&gt;&amp;gt; channels balances sitting there unallocated &amp;#34;just in case&amp;#34;. This is not reasonable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Agree, game-theory wise, you would like to keep a full fee-bumping reserve, ready to burn as much in fees as the contested HTLC value, as it&amp;#39;s the maximum gain of your counterparty. Though perfect equilibrium is hard to achieve because your malicious counterparty might have an edge pushing you to broadcast your Commitment first by witholding HTLC resolution.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Fractional fee-bumping reserves are much more realistic to expect in the LN network. Lower fee-bumping reserve, higher liquidity deployed, in theory higher routing fees. By observing historical feerates, average offchain balances at risk and routing fees expected gains, you should be able to discover an equilibrium where higher levels of reserve aren&amp;#39;t worth the opportunity cost. I guess this equilibrium could be your LN fee-bumping reserve max feerate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Note, I think the LN approach is a bit different from what suits a custody protocol like Revault, as you compute a direct return of the frozen fee-bumping liquidity. With Revault, if you have numerous bitcoins protected, it&amp;#39;s might be more interesting to adopt a &amp;#34;buy the mempool, stupid&amp;#34; strategy than risking fund safety for few percentages of interest returns.&lt;br/&gt;&lt;br/&gt;True for routing nodes. For wallets (if receiving funds), it&amp;#39;s not about an investment: just users expectations to being able to transact without risking to lose their funds (ie being able to enforce their contract onchain). Although wallets they are much less at risk.&lt;br/&gt;&lt;br/&gt;&amp;gt; This is where the &amp;#34;anticipate the crowd of bitcoin users move&amp;#34; point can be laid out. As the crowd of bitcoin users&amp;#39; fee-bumping reserves are ultimately unknown from your node knowledge, you should be ready to be a bit more conservative than the vanilla fee-bumping strategies shipped by default. In case of massive mempool congestion, your additional conservatism might get your time-sensitive transactions and game on the crowd of bitcoin users. First Problem: if all offchain bitcoin software adopt that strategy we might inflate the worst-case feerate rate at the benefit of the miners, without holistically improving block throughput. Second problem : your class of offchain bitcoin softwares might have ridiculous fee-bumping reserve compared&lt;br/&gt;&amp;gt; to other classes of offchain bitcoin softwares (Revault &amp;gt; Lightning) and just be priced out bydesign in case of mempool congestion. Third problem : as the number of offchain bitcoin applications should go up with time, your fee-bumping reserve levels based from historical data might be always late by one &amp;#34;bank-run&amp;#34; scenario.&lt;br/&gt;&lt;br/&gt;Black swan event 2.0? Just rule n°3 is inherent to any kind of fee estimation.&lt;br/&gt;&lt;br/&gt;&amp;gt; For Lightning, if you&amp;#39;re short in fee-bumping reserves you might still do preemptive channel closures, either cooperatively or unilaterally and get back the off-chain liquidity to protect the more economically interesting channels. Though again, that kind of automatic behavior might be compelling at the individual node-level, but make the mempol congestion worse holistically.&lt;br/&gt;&lt;br/&gt;Yeah so we are back to the &amp;#34;fractional reserve&amp;#34; model: you can only enforce X% of the offchain contracts your participate in.. Actually it&amp;#39;s even an added assumption: that you still have operating contracts, with honest counterparties.&lt;br/&gt;&lt;br/&gt;&amp;gt; In case of massive mempool congestion, you might try to front-run the crowd of bitcoin users relying on block connections for fee-bumping, and thus start your fee-bumping as soon as you observe feerate groups fluctuations in your local mempool(s).&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think any kind of mempool-based estimate generalizes well, since at any point the expected time before the next block is 10 minutes (and a lot can happen in 10min).&lt;br/&gt;&lt;br/&gt;&amp;gt; Also you might proceed your fee-bumping ticks on a local clock instead of block connections in case of time-dilation or deeper eclipse attacks of your local node. Your view of the chain might be compromised but not your ability to broadcast transactions thanks to emergency channels (in the non-LN sense...though in fact quid of txn wrapped in onions ?) of communication.&lt;br/&gt;&lt;br/&gt;Oh, yeah, i didn&amp;#39;t explicit &amp;#34;not getting eclipsed&amp;#34; (or more generally &amp;#34;data availability&amp;#34;) as an assumption since it&amp;#39;s generally one made by participants of any offchain contract. In this case you can&amp;#39;t even have decent fee estimation, so you are screwed anyways.&lt;br/&gt;&lt;br/&gt;&amp;gt; Yes, stay open the question on how you enforce this block insurance market. Reputation, which might be to avoid due to the latent centralization effect, might be hard to stack and audit reliably for an emergency mechanism running, hopefully, once in a halvening period. Maybe maybe some cryptographic or economically based mechanism on slashing or swaps could be found...&lt;br/&gt;&lt;br/&gt;Unfortunately, given current mining centralisation, pools are in a very good position to offer pretty decent SLAs around that. With a block space insurance, you of course don&amp;#39;t need all these convoluted fee-bumping hacks.&lt;br/&gt;I&amp;#39;m very concerned that large stakeholders of the &amp;#34;offchain contracts ecosystem&amp;#34; would just go this (easier) way and further increase mining centralisation pressure.&lt;br/&gt;&lt;br/&gt;I agree that a cryptography-based scheme around this type of insurance services would be the best way out.&lt;br/&gt;&lt;br/&gt;&amp;gt; Antoine&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le lun. 29 nov. 2021 à 09:34, darosior via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi everyone,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Fee-bumping is paramount to the security of many protocols building on Bitcoin, as they require the&lt;br/&gt;&amp;gt;&amp;gt; confirmation of a transaction (which might be presigned) before the expiration of a timelock at any&lt;br/&gt;&amp;gt;&amp;gt; point after the establishment of the contract.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The part of Revault using presigned transactions (the delegation from a large to a smaller multisig)&lt;br/&gt;&amp;gt;&amp;gt; is no exception. We have been working on how to approach this for a while now and i&amp;#39;d like to share&lt;br/&gt;&amp;gt;&amp;gt; what we have in order to open a discussion on this problem so central to what seem to be The Right&lt;br/&gt;&amp;gt;&amp;gt; Way [0] to build on Bitcoin but which has yet to be discussed in details (at least publicly).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;ll discuss what we came up with for Revault (at least for what will be its first iteration) but my&lt;br/&gt;&amp;gt;&amp;gt; intent with posting to the mailing list is more to frame the questions to this problem we are all&lt;br/&gt;&amp;gt;&amp;gt; going to face rather than present the results of our study tailored to the Revault usecase.&lt;br/&gt;&amp;gt;&amp;gt; The discussion is still pretty Revault-centric (as it&amp;#39;s the case study) but hopefully this can help&lt;br/&gt;&amp;gt;&amp;gt; future protocol designers and/or start a discussion around what everyone&amp;#39;s doing for existing ones.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ## 1. Reminder about Revault&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The part of Revault we are interested in for this study is the delegation process, and more&lt;br/&gt;&amp;gt;&amp;gt; specifically the application of spending policies by network monitors (watchtowers).&lt;br/&gt;&amp;gt;&amp;gt; Coins are received on a large multisig. Participants of this large multisig create 2 [1]&lt;br/&gt;&amp;gt;&amp;gt; transactions. The Unvault, spending a deposit UTxO, creates an output paying either to the small&lt;br/&gt;&amp;gt;&amp;gt; multisig after a timelock or to the large multisig immediately. The Cancel, spending the Unvault&lt;br/&gt;&amp;gt;&amp;gt; output through the non-timelocked path, creates a new deposit UTxO.&lt;br/&gt;&amp;gt;&amp;gt; Participants regularly exchange the Cancel transaction signatures for each deposit, sharing the&lt;br/&gt;&amp;gt;&amp;gt; signatures with the watchtowers they operate. They then optionally [2] sign the Unvault transaction&lt;br/&gt;&amp;gt;&amp;gt; and share the signatures with the small multisig participants who can in turn use them to proceed&lt;br/&gt;&amp;gt;&amp;gt; with a spending. Watchtowers can enforce spending policies (say, can&amp;#39;t Unvault outside of business&lt;br/&gt;&amp;gt;&amp;gt; hours) by having the Cancel transaction be confirmed before the expiration of the timelock.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ## 2. Problem statement&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; For any delegated vault, ensure the confirmation of a Cancel transaction in a configured number of&lt;br/&gt;&amp;gt;&amp;gt; blocks at any point. In so doing, minimize the overpayments and the UTxO set footprint. Overpayments&lt;br/&gt;&amp;gt;&amp;gt; increase the burden on the watchtower operator by increasing the required frequency of refills of the&lt;br/&gt;&amp;gt;&amp;gt; fee-bumping wallet, which is already the worst user experience. You are likely to manage a number of&lt;br/&gt;&amp;gt;&amp;gt; UTxOs with your number of vaults, which comes at a cost for you as well as everyone running a full&lt;br/&gt;&amp;gt;&amp;gt; node.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Note that this assumes miners are economically rationale, are incentivized by *public* fees and that&lt;br/&gt;&amp;gt;&amp;gt; you have a way to propagate your fee-bumped transaction to them. We also don&amp;#39;t consider the block&lt;br/&gt;&amp;gt;&amp;gt; space bounds.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In the previous paragraph and the following text, &amp;#34;vault&amp;#34; can generally be replaced with &amp;#34;offchain&lt;br/&gt;&amp;gt;&amp;gt; contract&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ## 3. With presigned transactions&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As you all know, the first difficulty is to get to be able to unilaterally enforce your contract&lt;br/&gt;&amp;gt;&amp;gt; onchain. That is, any participant must be able to unilaterally bump the fees of a transaction even&lt;br/&gt;&amp;gt;&amp;gt; if it was co-signed by other participants.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; For Revault we can afford to introduce malleability in the Cancel transaction since there is no&lt;br/&gt;&amp;gt;&amp;gt; second-stage transaction depending on its txid. Therefore it is pre-signed with ANYONECANPAY. We&lt;br/&gt;&amp;gt;&amp;gt; can&amp;#39;t use ANYONECANPAY|SINGLE since it would open a pinning vector [3]. Note how we can&amp;#39;t leverage&lt;br/&gt;&amp;gt;&amp;gt; the carve out rule, and neither can any other more-than-two-parties contract.&lt;br/&gt;&amp;gt;&amp;gt; This has a significant implication for the rest, as we are entirely burning fee-bumping UTxOs.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This opens up a pinning vector, or at least a significant nuisance: any other party can largely&lt;br/&gt;&amp;gt;&amp;gt; increase the absolute fee without increasing the feerate, leveraging the RBF rules to prevent you&lt;br/&gt;&amp;gt;&amp;gt; from replacing it without paying an insane fee. And you might not see it in your own mempool and&lt;br/&gt;&amp;gt;&amp;gt; could only suppose it&amp;#39;s happening by receiving non-full blocks or with transactions paying a lower&lt;br/&gt;&amp;gt;&amp;gt; feerate.&lt;br/&gt;&amp;gt;&amp;gt; Unfortunately i know of no other primitive that can be used by multi-party (i mean, &amp;gt;2) presigned&lt;br/&gt;&amp;gt;&amp;gt; transactions protocols for fee-bumping that aren&amp;#39;t (more) vulnerable to pinning.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ## 4. We are still betting on future feerate&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The problem is still missing one more constraint. &amp;#34;Ensuring confirmation at any time&amp;#34; involves ensuring&lt;br/&gt;&amp;gt;&amp;gt; confirmation at *any* feerate, which you *cannot* do. So what&amp;#39;s the limit? In theory you should be ready&lt;br/&gt;&amp;gt;&amp;gt; to burn as much in fees as the value of the funds you want to get out of the contract. So... For us&lt;br/&gt;&amp;gt;&amp;gt; it&amp;#39;d mean keeping for each vault an equivalent amount of funds sitting there on the watchtower&amp;#39;s hot&lt;br/&gt;&amp;gt;&amp;gt; wallet. For Lightning, it&amp;#39;d mean keeping an equivalent amount of funds as the sum of all your&lt;br/&gt;&amp;gt;&amp;gt; channels balances sitting there unallocated &amp;#34;just in case&amp;#34;. This is not reasonable.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; So you need to keep a maximum feerate, above which you won&amp;#39;t be able to ensure the enforcement of&lt;br/&gt;&amp;gt;&amp;gt; all your contracts onchain at the same time. We call that the &amp;#34;reserve feerate&amp;#34; and you can have&lt;br/&gt;&amp;gt;&amp;gt; different strategies for choosing it, for instance:&lt;br/&gt;&amp;gt;&amp;gt; - The 85th percentile over the last year of transactions feerates&lt;br/&gt;&amp;gt;&amp;gt; - The maximum historical feerate&lt;br/&gt;&amp;gt;&amp;gt; - The maximum historical feerate adjusted in dollars (makes more sense but introduces a (set of?)&lt;br/&gt;&amp;gt;&amp;gt; trusted oracle(s) in a security-critical component)&lt;br/&gt;&amp;gt;&amp;gt; - Picking a random high feerate (why not? It&amp;#39;s an arbitrary assumption anyways)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Therefore, even if we don&amp;#39;t have to bet on the broadcast-time feerate market at signing time anymore&lt;br/&gt;&amp;gt;&amp;gt; (since we can unilaterally bump), we still need some kind of prediction in preparation of making&lt;br/&gt;&amp;gt;&amp;gt; funds available to bump the fees at broadcast time.&lt;br/&gt;&amp;gt;&amp;gt; Apart from judging that 500sat/vb is probably more reasonable than 10sat/vbyte, this unfortunately&lt;br/&gt;&amp;gt;&amp;gt; sounds pretty much crystal-ball-driven.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We currently use the maximum of the 95th percentiles over 90-days windows over historical block chain&lt;br/&gt;&amp;gt;&amp;gt; feerates. [4]&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ## 5. How much funds does my watchtower need?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; That&amp;#39;s what we call the &amp;#34;reserve&amp;#34;. Depending on your reserve feerate strategy it might vary over&lt;br/&gt;&amp;gt;&amp;gt; time. This is easier to reason about with a per-contract reserve. For Revault it&amp;#39;s pretty&lt;br/&gt;&amp;gt;&amp;gt; straightforward since the Cancel transaction size is static: `reserve_feerate * cancel_size`. For&lt;br/&gt;&amp;gt;&amp;gt; other protocols with dynamic transaction sizes (or even packages of transactions) it&amp;#39;s less so. For&lt;br/&gt;&amp;gt;&amp;gt; your Lightning channel you would probably take the maximum size of your commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; according to your HTLC exposure settings &#43; the size of as many `htlc_success` transaction?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Then you either have your software or your user guesstimate how many offchain contracts the&lt;br/&gt;&amp;gt;&amp;gt; watchtower will have to watch, time that by the per-contract reserve and refill this amount (plus&lt;br/&gt;&amp;gt;&amp;gt; some slack in practice). Once again, a UX tradeoff (not even mentioning the guesstimation UX):&lt;br/&gt;&amp;gt;&amp;gt; overestimating leads to too many unallocated funds sitting on a hot wallet, underestimating means&lt;br/&gt;&amp;gt;&amp;gt; (at best) inability to participate in new contracts or being &amp;#34;at risk&amp;#34; (not being able to enforce&lt;br/&gt;&amp;gt;&amp;gt; all your contracts onchain at your reserve feerate) before a new refill.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; For vaults you likely have large-value UTxOs and small transactions (the Cancel is one-in one-out in&lt;br/&gt;&amp;gt;&amp;gt; Revault). For some other applications with large transactions and lower-value UTxOs on average it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; likely that only part of the offchain contracts might be enforceable at a reasonable feerate. Is it&lt;br/&gt;&amp;gt;&amp;gt; reasonable?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ## 6. UTxO pool layout&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Now that you somehow managed to settle on a refill amount, how are you going to use these funds?&lt;br/&gt;&amp;gt;&amp;gt; Also, you&amp;#39;ll need to manage your pool across time (consolidating small coins, and probably fanning&lt;br/&gt;&amp;gt;&amp;gt; out large ones).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; You could keep a single large UTxO and peel it as you need to sponsor transactions. But this means&lt;br/&gt;&amp;gt;&amp;gt; that you need to create a coin of a specific value according to your need at the current feerate&lt;br/&gt;&amp;gt;&amp;gt; estimation, hope to have it confirmed in a few blocks (at least for now! [5]), and hope that the&lt;br/&gt;&amp;gt;&amp;gt; value won&amp;#39;t be obsolete by the time it confirmed. Also, you&amp;#39;d have to do that for any number of&lt;br/&gt;&amp;gt;&amp;gt; Cancel, chaining feebump coin creation transactions off the change of the previous ones or replacing&lt;br/&gt;&amp;gt;&amp;gt; them with more outputs. Both seem to become really un-manageable (and expensive) in many edge-cases,&lt;br/&gt;&amp;gt;&amp;gt; shortening the time you have to confirm the actual Cancel transaction and creating uncertainty about&lt;br/&gt;&amp;gt;&amp;gt; the reserve (how much is my just-in-time fanout going to cost me in fees that i need to refill in&lt;br/&gt;&amp;gt;&amp;gt; advance on my watchtower wallet?).&lt;br/&gt;&amp;gt;&amp;gt; This is less of a concern for protocols using CPFP to sponsor transactions, but they rely on a&lt;br/&gt;&amp;gt;&amp;gt; policy rule specific to 2-parties contracts.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Therefore for Revault we fan-out the coins per-vault in advance. We do so at refill time so the&lt;br/&gt;&amp;gt;&amp;gt; refiller can give an excess to pay for the fees of the fanout transaction (which is reasonable since&lt;br/&gt;&amp;gt;&amp;gt; it will occur just after the refilling transaction confirms). When the watchtower is asked to watch&lt;br/&gt;&amp;gt;&amp;gt; for a new delegated vault it will allocate coins from the pool of fanned-out UTxOs to it (failing&lt;br/&gt;&amp;gt;&amp;gt; that, it would refuse the delegation).&lt;br/&gt;&amp;gt;&amp;gt; What is a good distribution of UTxOs amounts per vault? We want to minimize the number of coins,&lt;br/&gt;&amp;gt;&amp;gt; still have coins small enough to not overpay (remember, we can&amp;#39;t have change) and be able to bump a&lt;br/&gt;&amp;gt;&amp;gt; Cancel up to the reserve feerate using these coins. The two latter constraints are directly in&lt;br/&gt;&amp;gt;&amp;gt; contradiction as the minimal value of a coin usable at the reserve feerate (paying for its own input&lt;br/&gt;&amp;gt;&amp;gt; fee &#43; bumping the feerate by, say, 5sat/vb) is already pretty high. Therefore we decided to go with&lt;br/&gt;&amp;gt;&amp;gt; two distributions per vault. The &amp;#34;reserve distribution&amp;#34; alone ensures that we can bump up to the&lt;br/&gt;&amp;gt;&amp;gt; reserve feerate and is usable for high feerates. The &amp;#34;bonus distribution&amp;#34; is not, but contains&lt;br/&gt;&amp;gt;&amp;gt; smaller coins useful to prevent overpayments during low and medium fee periods (which is most of the&lt;br/&gt;&amp;gt;&amp;gt; time).&lt;br/&gt;&amp;gt;&amp;gt; Both distributions are based on a basic geometric suite [6]. Each value is half the previous one.&lt;br/&gt;&amp;gt;&amp;gt; This exponentially decreases the value, limiting the number of coins. But this also allows for&lt;br/&gt;&amp;gt;&amp;gt; pretty small coins to exist and each coin&amp;#39;s value is equal to the sum of the smaller coins,&lt;br/&gt;&amp;gt;&amp;gt; or smaller by at most the value of the smallest coin. Therefore bounding the maximum overpayment to&lt;br/&gt;&amp;gt;&amp;gt; the smallest coin&amp;#39;s value [7].&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; For the management of the UTxO pool across time we merged the consolidation with the fanout. When&lt;br/&gt;&amp;gt;&amp;gt; fanning out a refilled UTxO, we scan the pool for coins that need to be consolidated according to a&lt;br/&gt;&amp;gt;&amp;gt; heuristic. An instance of a heuristic is &amp;#34;the coin isn&amp;#39;t allocated and would not have been able to&lt;br/&gt;&amp;gt;&amp;gt; increase the fee at the median feerate over the past 90 days of blocks&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt; We had this assumption that feerate would tend to go up with time and therefore discarded having to&lt;br/&gt;&amp;gt;&amp;gt; split some UTxOs from the pool. We however overlooked that a large increase in the exchange price of&lt;br/&gt;&amp;gt;&amp;gt; BTC as we&amp;#39;ve seen during the past year could invalidate this assumption and that should arguably be&lt;br/&gt;&amp;gt;&amp;gt; reconsidered.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ## 7. Bumping and re-bumping&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; First of all, when to fee-bump? At fixed time intervals? At each block connection? It sounds like,&lt;br/&gt;&amp;gt;&amp;gt; given a large enough timelock, you could try to greed by &amp;#34;trying your luck&amp;#34; at a lower feerate and&lt;br/&gt;&amp;gt;&amp;gt; only re-bumping every N blocks. You would then start aggressively bumping at every block after M&lt;br/&gt;&amp;gt;&amp;gt; blocks have passed. But that&amp;#39;s actually a bet (in disguised?) that the next block feerate in M blocks&lt;br/&gt;&amp;gt;&amp;gt; will be lower than the current one. In the absence of any predictive model it is more reasonable to&lt;br/&gt;&amp;gt;&amp;gt; just start being aggressive immediately.&lt;br/&gt;&amp;gt;&amp;gt; You probably want to base your estimates on `estimatesmartfee` and as a consequence you would re-bump&lt;br/&gt;&amp;gt;&amp;gt; (if needed )after each block connection, when your estimates get updated and you notice your&lt;br/&gt;&amp;gt;&amp;gt; transaction was not included in the block.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In the event that you notice a consequent portion of the block is filled with transactions paying&lt;br/&gt;&amp;gt;&amp;gt; less than your own, you might want to start panicking and bump your transaction fees by a certain&lt;br/&gt;&amp;gt;&amp;gt; percentage with no consideration for your fee estimator. You might skew miners incentives in doing&lt;br/&gt;&amp;gt;&amp;gt; so: if you increase the fees by a factor of N, any miner with a fraction larger than 1/N of the&lt;br/&gt;&amp;gt;&amp;gt; network hashrate now has an incentive to censor your transaction at first to get you to panic. Also&lt;br/&gt;&amp;gt;&amp;gt; note this can happen if you want to pay the absolute fees for the &amp;#39;pinning&amp;#39; attack mentioned in&lt;br/&gt;&amp;gt;&amp;gt; section #2, and that might actually incentivize miners to perform it themselves..&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The gist is that the most effective way to bump and rebump (RBF the Cancel tx) seems to just be to&lt;br/&gt;&amp;gt;&amp;gt; consider the `estimatesmartfee 2 CONSERVATIVE` feerate at every block your tx isn&amp;#39;t included in, and&lt;br/&gt;&amp;gt;&amp;gt; to RBF it if the feerate is higher.&lt;br/&gt;&amp;gt;&amp;gt; In addition, we fallback to a block chain based estimation when estimates aren&amp;#39;t available (eg if&lt;br/&gt;&amp;gt;&amp;gt; the user stopped their WT for say a hour and we come back up): we use the 85th percentile over the&lt;br/&gt;&amp;gt;&amp;gt; feerates in the last 6 blocks. Sure, miners can try to have an influence on that by stuffing their&lt;br/&gt;&amp;gt;&amp;gt; blocks with large fee self-paying transactions, but they would need to:&lt;br/&gt;&amp;gt;&amp;gt; 1. Be sure to catch a significant portion of the 6 blocks (at least 2, actually)&lt;br/&gt;&amp;gt;&amp;gt; 2. Give up on 25% of the highest fee-paying transactions (assuming they got the 6 blocks, it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; proportionally larger and incertain as they get less of them)&lt;br/&gt;&amp;gt;&amp;gt; 3. Hope that our estimator will fail and we need to fall back to the chain-based estimation&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ## 8. Our study&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We essentially replayed the historical data with different deployment configurations (number of&lt;br/&gt;&amp;gt;&amp;gt; participants and timelock) and probability of an event occurring (event being say an Unvault, an&lt;br/&gt;&amp;gt;&amp;gt; invalid Unvault, a new delegation, ..). We then observed different metrics such as the time at risk&lt;br/&gt;&amp;gt;&amp;gt; (when we can&amp;#39;t enforce all our contracts at the reserve feerate at the same time), or the&lt;br/&gt;&amp;gt;&amp;gt; operational cost.&lt;br/&gt;&amp;gt;&amp;gt; We got the historical fee estimates data from Statoshi [9], Txstats [10] and the historical chain&lt;br/&gt;&amp;gt;&amp;gt; data from Riccardo Casatta&amp;#39;s `blocks_iterator` [11]. Thanks!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The (research-quality..) code can be found at &lt;a href=&#34;https://github.com/revault/research&#34;&gt;https://github.com/revault/research&lt;/a&gt; under the section&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;Fee bumping&amp;#34;. Again it&amp;#39;s very Revault specific, but at least the data can probably be reused for&lt;br/&gt;&amp;gt;&amp;gt; studying other protocols.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ## 9. Insurances&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course, given it&amp;#39;s all hacks and workarounds and there is no good answer to &amp;#34;what is a reasonable&lt;br/&gt;&amp;gt;&amp;gt; feerate up to which we need to make contracts enforceable onchain?&amp;#34;, there is definitely room for an&lt;br/&gt;&amp;gt;&amp;gt; insurance market. But this enters the realm of opinions. Although i do have some (having discussed&lt;br/&gt;&amp;gt;&amp;gt; this topic for the past years with different people), i would like to keep this post focused on the&lt;br/&gt;&amp;gt;&amp;gt; technical aspects of this problem.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [0] As far as i can tell, having offchain contracts be enforceable onchain by confirming a&lt;br/&gt;&amp;gt;&amp;gt; transaction before the expiration of a timelock is a widely agreed-upon approach. And i don&amp;#39;t think&lt;br/&gt;&amp;gt;&amp;gt; we can opt for any other fundamentally different one, as you want to know you can claim back your&lt;br/&gt;&amp;gt;&amp;gt; coins from a contract after a deadline before taking part in it.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [1] The Real Revault (tm) involves more transactions, but for the sake of conciseness i only&lt;br/&gt;&amp;gt;&amp;gt; detailed a minimum instance of the problem.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [2] Only presigning part of the Unvault transactions allows to only delegate part of the coins,&lt;br/&gt;&amp;gt;&amp;gt; which can be abstracted as &amp;#34;delegate x% of your stash&amp;#34; in the user interface.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [3] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [4] &lt;a href=&#34;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L323-L329&#34;&gt;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L323-L329&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [5] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/23121&#34;&gt;https://github.com/bitcoin/bitcoin/pull/23121&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [6] &lt;a href=&#34;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L494-L507&#34;&gt;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L494-L507&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [7] Of course this assumes a combinatorial coin selection, but i believe it&amp;#39;s ok given we limit the&lt;br/&gt;&amp;gt;&amp;gt; number of coins beforehand.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [8] Although there is the argument to outbid a censorship, anyone censoring you isn&amp;#39;t necessarily a&lt;br/&gt;&amp;gt;&amp;gt; miner.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [9] &lt;a href=&#34;https://www.statoshi.info/&#34;&gt;https://www.statoshi.info/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [10] &lt;a href=&#34;https://www.statoshi.info/&#34;&gt;https://www.statoshi.info/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [11] &lt;a href=&#34;https://github.com/RCasatta/blocks_iterator&#34;&gt;https://github.com/RCasatta/blocks_iterator&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20211130/79715fe8/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20211130/79715fe8/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:00:46Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs2c32re8cfl22tu5vgtfrxpckzws90yd3xsjk98rzq58jy3vedrhqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwystj2ht</id>
    
      <title type="html">📅 Original date posted:2021-11-29 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs2c32re8cfl22tu5vgtfrxpckzws90yd3xsjk98rzq58jy3vedrhqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwystj2ht" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9k4vjj7sfmw8xsy3ggd69vvuk6gftet9qg32v8el3nm4qh2a60aga4tvkp&#39;&gt;nevent1q…tvkp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-11-29&lt;br/&gt;📝 Original message:Hi everyone,&lt;br/&gt;&lt;br/&gt;Fee-bumping is paramount to the security of many protocols building on Bitcoin, as they require the&lt;br/&gt;confirmation of a transaction (which might be presigned) before the expiration of a timelock at any&lt;br/&gt;point after the establishment of the contract.&lt;br/&gt;&lt;br/&gt;The part of Revault using presigned transactions (the delegation from a large to a smaller multisig)&lt;br/&gt;is no exception. We have been working on how to approach this for a while now and i&amp;#39;d like to share&lt;br/&gt;what we have in order to open a discussion on this problem so central to what seem to be The Right&lt;br/&gt;Way [0] to build on Bitcoin but which has yet to be discussed in details (at least publicly).&lt;br/&gt;&lt;br/&gt;I&amp;#39;ll discuss what we came up with for Revault (at least for what will be its first iteration) but my&lt;br/&gt;intent with posting to the mailing list is more to frame the questions to this problem we are all&lt;br/&gt;going to face rather than present the results of our study tailored to the Revault usecase.&lt;br/&gt;The discussion is still pretty Revault-centric (as it&amp;#39;s the case study) but hopefully this can help&lt;br/&gt;future protocol designers and/or start a discussion around what everyone&amp;#39;s doing for existing ones.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## 1. Reminder about Revault&lt;br/&gt;&lt;br/&gt;The part of Revault we are interested in for this study is the delegation process, and more&lt;br/&gt;specifically the application of spending policies by network monitors (watchtowers).&lt;br/&gt;Coins are received on a large multisig. Participants of this large multisig create 2 [1]&lt;br/&gt;transactions. The Unvault, spending a deposit UTxO, creates an output paying either to the small&lt;br/&gt;multisig after a timelock or to the large multisig immediately. The Cancel, spending the Unvault&lt;br/&gt;output through the non-timelocked path, creates a new deposit UTxO.&lt;br/&gt;Participants regularly exchange the Cancel transaction signatures for each deposit, sharing the&lt;br/&gt;signatures with the watchtowers they operate. They then optionally [2] sign the Unvault transaction&lt;br/&gt;and share the signatures with the small multisig participants who can in turn use them to proceed&lt;br/&gt;with a spending. Watchtowers can enforce spending policies (say, can&amp;#39;t Unvault outside of business&lt;br/&gt;hours) by having the Cancel transaction be confirmed before the expiration of the timelock.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## 2. Problem statement&lt;br/&gt;&lt;br/&gt;For any delegated vault, ensure the confirmation of a Cancel transaction in a configured number of&lt;br/&gt;blocks at any point. In so doing, minimize the overpayments and the UTxO set footprint. Overpayments&lt;br/&gt;increase the burden on the watchtower operator by increasing the required frequency of refills of the&lt;br/&gt;fee-bumping wallet, which is already the worst user experience. You are likely to manage a number of&lt;br/&gt;UTxOs with your number of vaults, which comes at a cost for you as well as everyone running a full&lt;br/&gt;node.&lt;br/&gt;&lt;br/&gt;Note that this assumes miners are economically rationale, are incentivized by *public* fees and that&lt;br/&gt;you have a way to propagate your fee-bumped transaction to them. We also don&amp;#39;t consider the block&lt;br/&gt;space bounds.&lt;br/&gt;&lt;br/&gt;In the previous paragraph and the following text, &amp;#34;vault&amp;#34; can generally be replaced with &amp;#34;offchain&lt;br/&gt;contract&amp;#34;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## 3. With presigned transactions&lt;br/&gt;&lt;br/&gt;As you all know, the first difficulty is to get to be able to unilaterally enforce your contract&lt;br/&gt;onchain. That is, any participant must be able to unilaterally bump the fees of a transaction even&lt;br/&gt;if it was co-signed by other participants.&lt;br/&gt;&lt;br/&gt;For Revault we can afford to introduce malleability in the Cancel transaction since there is no&lt;br/&gt;second-stage transaction depending on its txid. Therefore it is pre-signed with ANYONECANPAY. We&lt;br/&gt;can&amp;#39;t use ANYONECANPAY|SINGLE since it would open a pinning vector [3]. Note how we can&amp;#39;t leverage&lt;br/&gt;the carve out rule, and neither can any other more-than-two-parties contract.&lt;br/&gt;This has a significant implication for the rest, as we are entirely burning fee-bumping UTxOs.&lt;br/&gt;&lt;br/&gt;This opens up a pinning vector, or at least a significant nuisance: any other party can largely&lt;br/&gt;increase the absolute fee without increasing the feerate, leveraging the RBF rules to prevent you&lt;br/&gt;from replacing it without paying an insane fee. And you might not see it in your own mempool and&lt;br/&gt;could only suppose it&amp;#39;s happening by receiving non-full blocks or with transactions paying a lower&lt;br/&gt;feerate.&lt;br/&gt;Unfortunately i know of no other primitive that can be used by multi-party (i mean, &amp;gt;2) presigned&lt;br/&gt;transactions protocols for fee-bumping that aren&amp;#39;t (more) vulnerable to pinning.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## 4. We are still betting on future feerate&lt;br/&gt;&lt;br/&gt;The problem is still missing one more constraint. &amp;#34;Ensuring confirmation at any time&amp;#34; involves ensuring&lt;br/&gt;confirmation at *any* feerate, which you *cannot* do. So what&amp;#39;s the limit? In theory you should be ready&lt;br/&gt;to burn as much in fees as the value of the funds you want to get out of the contract. So... For us&lt;br/&gt;it&amp;#39;d mean keeping for each vault an equivalent amount of funds sitting there on the watchtower&amp;#39;s hot&lt;br/&gt;wallet. For Lightning, it&amp;#39;d mean keeping an equivalent amount of funds as the sum of all your&lt;br/&gt;channels balances sitting there unallocated &amp;#34;just in case&amp;#34;. This is not reasonable.&lt;br/&gt;&lt;br/&gt;So you need to keep a maximum feerate, above which you won&amp;#39;t be able to ensure the enforcement of&lt;br/&gt;all your contracts onchain at the same time. We call that the &amp;#34;reserve feerate&amp;#34; and you can have&lt;br/&gt;different strategies for choosing it, for instance:&lt;br/&gt;- The 85th percentile over the last year of transactions feerates&lt;br/&gt;- The maximum historical feerate&lt;br/&gt;- The maximum historical feerate adjusted in dollars (makes more sense but introduces a (set of?)&lt;br/&gt;  trusted oracle(s) in a security-critical component)&lt;br/&gt;- Picking a random high feerate (why not? It&amp;#39;s an arbitrary assumption anyways)&lt;br/&gt;&lt;br/&gt;Therefore, even if we don&amp;#39;t have to bet on the broadcast-time feerate market at signing time anymore&lt;br/&gt;(since we can unilaterally bump), we still need some kind of prediction in preparation of making&lt;br/&gt;funds available to bump the fees at broadcast time.&lt;br/&gt;Apart from judging that 500sat/vb is probably more reasonable than 10sat/vbyte, this unfortunately&lt;br/&gt;sounds pretty much crystal-ball-driven.&lt;br/&gt;&lt;br/&gt;We currently use the maximum of the 95th percentiles over 90-days windows over historical block chain&lt;br/&gt;feerates. [4]&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## 5. How much funds does my watchtower need?&lt;br/&gt;&lt;br/&gt;That&amp;#39;s what we call the &amp;#34;reserve&amp;#34;. Depending on your reserve feerate strategy it might vary over&lt;br/&gt;time. This is easier to reason about with a per-contract reserve. For Revault it&amp;#39;s pretty&lt;br/&gt;straightforward since the Cancel transaction size is static: `reserve_feerate * cancel_size`. For&lt;br/&gt;other protocols with dynamic transaction sizes (or even packages of transactions) it&amp;#39;s less so. For&lt;br/&gt;your Lightning channel you would probably take the maximum size of your commitment transaction&lt;br/&gt;according to your HTLC exposure settings &#43; the size of as many `htlc_success` transaction?&lt;br/&gt;&lt;br/&gt;Then you either have your software or your user guesstimate how many offchain contracts the&lt;br/&gt;watchtower will have to watch, time that by the per-contract reserve and refill this amount (plus&lt;br/&gt;some slack in practice). Once again, a UX tradeoff (not even mentioning the guesstimation UX):&lt;br/&gt;overestimating leads to too many unallocated funds sitting on a hot wallet, underestimating means&lt;br/&gt;(at best) inability to participate in new contracts or being &amp;#34;at risk&amp;#34; (not being able to enforce&lt;br/&gt;all your contracts onchain at your reserve feerate) before a new refill.&lt;br/&gt;&lt;br/&gt;For vaults you likely have large-value UTxOs and small transactions (the Cancel is one-in one-out in&lt;br/&gt;Revault). For some other applications with large transactions and lower-value UTxOs on average it&amp;#39;s&lt;br/&gt;likely that only part of the offchain contracts might be enforceable at a reasonable feerate. Is it&lt;br/&gt;reasonable?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## 6. UTxO pool layout&lt;br/&gt;&lt;br/&gt;Now that you somehow managed to settle on a refill amount, how are you going to use these funds?&lt;br/&gt;Also, you&amp;#39;ll need to manage your pool across time (consolidating small coins, and probably fanning&lt;br/&gt;out large ones).&lt;br/&gt;&lt;br/&gt;You could keep a single large UTxO and peel it as you need to sponsor transactions. But this means&lt;br/&gt;that you need to create a coin of a specific value according to your need at the current feerate&lt;br/&gt;estimation, hope to have it confirmed in a few blocks (at least for now! [5]), and hope that the&lt;br/&gt;value won&amp;#39;t be obsolete by the time it confirmed. Also, you&amp;#39;d have to do that for any number of&lt;br/&gt;Cancel, chaining feebump coin creation transactions off the change of the previous ones or replacing&lt;br/&gt;them with more outputs. Both seem to become really un-manageable (and expensive) in many edge-cases,&lt;br/&gt;shortening the time you have to confirm the actual Cancel transaction and creating uncertainty about&lt;br/&gt;the reserve (how much is my just-in-time fanout going to cost me in fees that i need to refill in&lt;br/&gt;advance on my watchtower wallet?).&lt;br/&gt;This is less of a concern for protocols using CPFP to sponsor transactions, but they rely on a&lt;br/&gt;policy rule specific to 2-parties contracts.&lt;br/&gt;&lt;br/&gt;Therefore for Revault we fan-out the coins per-vault in advance. We do so at refill time so the&lt;br/&gt;refiller can give an excess to pay for the fees of the fanout transaction (which is reasonable since&lt;br/&gt;it will occur just after the refilling transaction confirms). When the watchtower is asked to watch&lt;br/&gt;for a new delegated vault it will allocate coins from the pool of fanned-out UTxOs to it (failing&lt;br/&gt;that, it would refuse the delegation).&lt;br/&gt;What is a good distribution of UTxOs amounts per vault? We want to minimize the number of coins,&lt;br/&gt;still have coins small enough to not overpay (remember, we can&amp;#39;t have change) and be able to bump a&lt;br/&gt;Cancel up to the reserve feerate using these coins. The two latter constraints are directly in&lt;br/&gt;contradiction as the minimal value of a coin usable at the reserve feerate (paying for its own input&lt;br/&gt;fee &#43; bumping the feerate by, say, 5sat/vb) is already pretty high. Therefore we decided to go with&lt;br/&gt;two distributions per vault. The &amp;#34;reserve distribution&amp;#34; alone ensures that we can bump up to the&lt;br/&gt;reserve feerate and is usable for high feerates. The &amp;#34;bonus distribution&amp;#34; is not, but contains&lt;br/&gt;smaller coins useful to prevent overpayments during low and medium fee periods (which is most of the&lt;br/&gt;time).&lt;br/&gt;Both distributions are based on a basic geometric suite [6]. Each value is half the previous one.&lt;br/&gt;This exponentially decreases the value, limiting the number of coins. But this also allows for&lt;br/&gt;pretty small coins to exist and each coin&amp;#39;s value is equal to the sum of the smaller coins,&lt;br/&gt;or smaller by at most the value of the smallest coin. Therefore bounding the maximum overpayment to&lt;br/&gt;the smallest coin&amp;#39;s value [7].&lt;br/&gt;&lt;br/&gt;For the management of the UTxO pool across time we merged the consolidation with the fanout. When&lt;br/&gt;fanning out a refilled UTxO, we scan the pool for coins that need to be consolidated according to a&lt;br/&gt;heuristic. An instance of a heuristic is &amp;#34;the coin isn&amp;#39;t allocated and would not have been able to&lt;br/&gt;increase the fee at the median feerate over the past 90 days of blocks&amp;#34;.&lt;br/&gt;We had this assumption that feerate would tend to go up with time and therefore discarded having to&lt;br/&gt;split some UTxOs from the pool. We however overlooked that a large increase in the exchange price of&lt;br/&gt;BTC as we&amp;#39;ve seen during the past year could invalidate this assumption and that should arguably be&lt;br/&gt;reconsidered.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## 7. Bumping and re-bumping&lt;br/&gt;&lt;br/&gt;First of all, when to fee-bump? At fixed time intervals? At each block connection? It sounds like,&lt;br/&gt;given a large enough timelock, you could try to greed by &amp;#34;trying your luck&amp;#34; at a lower feerate and&lt;br/&gt;only re-bumping every N blocks. You would then start aggressively bumping at every block after M&lt;br/&gt;blocks have passed. But that&amp;#39;s actually a bet (in disguised?) that the next block feerate in M blocks&lt;br/&gt;will be lower than the current one. In the absence of any predictive model it is more reasonable to&lt;br/&gt;just start being aggressive immediately.&lt;br/&gt;You probably want to base your estimates on `estimatesmartfee` and as a consequence you would re-bump&lt;br/&gt;(if needed )after each block connection, when your estimates get updated and you notice your&lt;br/&gt;transaction was not included in the block.&lt;br/&gt;&lt;br/&gt;In the event that you notice a consequent portion of the block is filled with transactions paying&lt;br/&gt;less than your own, you might want to start panicking and bump your transaction fees by a certain&lt;br/&gt;percentage with no consideration for your fee estimator. You might skew miners incentives in doing&lt;br/&gt;so: if you increase the fees by a factor of N, any miner with a fraction larger than 1/N of the&lt;br/&gt;network hashrate now has an incentive to censor your transaction at first to get you to panic. Also&lt;br/&gt;note this can happen if you want to pay the absolute fees for the &amp;#39;pinning&amp;#39; attack mentioned in&lt;br/&gt;section #2, and that might actually incentivize miners to perform it themselves..&lt;br/&gt;&lt;br/&gt;The gist is that the most effective way to bump and rebump (RBF the Cancel tx) seems to just be to&lt;br/&gt;consider the `estimatesmartfee 2 CONSERVATIVE` feerate at every block your tx isn&amp;#39;t included in, and&lt;br/&gt;to RBF it if the feerate is higher.&lt;br/&gt;In addition, we fallback to a block chain based estimation when estimates aren&amp;#39;t available (eg if&lt;br/&gt;the user stopped their WT for say a hour and we come back up): we use the 85th percentile over the&lt;br/&gt;feerates in the last 6 blocks. Sure, miners can try to have an influence on that by stuffing their&lt;br/&gt;blocks with large fee self-paying transactions, but they would need to:&lt;br/&gt;1. Be sure to catch a significant portion of the 6 blocks (at least 2, actually)&lt;br/&gt;2. Give up on 25% of the highest fee-paying transactions (assuming they got the 6 blocks, it&amp;#39;s&lt;br/&gt;   proportionally larger and incertain as they get less of them)&lt;br/&gt;3. Hope that our estimator will fail and we need to fall back to the chain-based estimation&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## 8. Our study&lt;br/&gt;&lt;br/&gt;We essentially replayed the historical data with different deployment configurations (number of&lt;br/&gt;participants and timelock) and probability of an event occurring (event being say an Unvault, an&lt;br/&gt;invalid Unvault, a new delegation, ..). We then observed different metrics such as the time at risk&lt;br/&gt;(when we can&amp;#39;t enforce all our contracts at the reserve feerate at the same time), or the&lt;br/&gt;operational cost.&lt;br/&gt;We got the historical fee estimates data from Statoshi [9], Txstats [10] and the historical chain&lt;br/&gt;data from Riccardo Casatta&amp;#39;s `blocks_iterator` [11]. Thanks!&lt;br/&gt;&lt;br/&gt;The (research-quality..) code can be found at &lt;a href=&#34;https://github.com/revault/research&#34;&gt;https://github.com/revault/research&lt;/a&gt; under the section&lt;br/&gt;&amp;#34;Fee bumping&amp;#34;. Again it&amp;#39;s very Revault specific, but at least the data can probably be reused for&lt;br/&gt;studying other protocols.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;## 9. Insurances&lt;br/&gt;&lt;br/&gt;Of course, given it&amp;#39;s all hacks and workarounds and there is no good answer to &amp;#34;what is a reasonable&lt;br/&gt;feerate up to which we need to make contracts enforceable onchain?&amp;#34;, there is definitely room for an&lt;br/&gt;insurance market. But this enters the realm of opinions. Although i do have some (having discussed&lt;br/&gt;this topic for the past years with different people), i would like to keep this post focused on the&lt;br/&gt;technical aspects of this problem.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[0] As far as i can tell, having offchain contracts be enforceable onchain by confirming a&lt;br/&gt;transaction before the expiration of a timelock is a widely agreed-upon approach. And i don&amp;#39;t think&lt;br/&gt;we can opt for any other fundamentally different one, as you want to know you can claim back your&lt;br/&gt;coins from a contract after a deadline before taking part in it.&lt;br/&gt;&lt;br/&gt;[1] The Real Revault (tm) involves more transactions, but for the sake of conciseness i only&lt;br/&gt;detailed a minimum instance of the problem.&lt;br/&gt;&lt;br/&gt;[2] Only presigning part of the Unvault transactions allows to only delegate part of the coins,&lt;br/&gt;which can be abstracted as &amp;#34;delegate x% of your stash&amp;#34; in the user interface.&lt;br/&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[4] &lt;a href=&#34;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L323-L329&#34;&gt;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L323-L329&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[5] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/23121&#34;&gt;https://github.com/bitcoin/bitcoin/pull/23121&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[6] &lt;a href=&#34;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L494-L507&#34;&gt;https://github.com/revault/research/blob/1df953813708287c32a15e771ba74957ec44f354/feebumping/model/statemachine.py#L494-L507&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[7] Of course this assumes a combinatorial coin selection, but i believe it&amp;#39;s ok given we limit the&lt;br/&gt;number of coins beforehand.&lt;br/&gt;&lt;br/&gt;[8] Although there is the argument to outbid a censorship, anyone censoring you isn&amp;#39;t necessarily a&lt;br/&gt;miner.&lt;br/&gt;&lt;br/&gt;[9] &lt;a href=&#34;https://www.statoshi.info/&#34;&gt;https://www.statoshi.info/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[10] &lt;a href=&#34;https://www.statoshi.info/&#34;&gt;https://www.statoshi.info/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[11] &lt;a href=&#34;https://github.com/RCasatta/blocks_iterator&#34;&gt;https://github.com/RCasatta/blocks_iterator&lt;/a&gt;
    </content>
    <updated>2023-06-07T23:00:43Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs0j0gfe4ae7vl66e6wskg6t5uhs2h4s3s6prxheusehc3ff97jj4qzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyxvyht9</id>
    
      <title type="html">📅 Original date posted:2021-10-26 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs0j0gfe4ae7vl66e6wskg6t5uhs2h4s3s6prxheusehc3ff97jj4qzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyxvyht9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdw69tj48ymaatqv8xgn48st7xyphlrk5zk8x55jtap94dh04830cynlk7s&#39;&gt;nevent1q…lk7s&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-26&lt;br/&gt;📝 Original message:Hi Niftynei,&lt;br/&gt;&lt;br/&gt;I share the concerns raised about direct connections to mining pools being a centralization pressure: de-anonymization and an inevitable higher barrier to entry. Making it more difficult to reach smaller miners is another one.&lt;br/&gt;Regarding fee estimation you state:&lt;br/&gt;&amp;gt; Initial feerate estimation would need to be based on published blocks, not pending transactions (as this information would no longer be available)&lt;br/&gt;The current fee estimation algorithm uses both, not only the pending transactions (game-able). Although i agree that past-block(s) based fee estimation isn&amp;#39;t that bad, it&amp;#39;s worth mentioning that not tracking the confirmation time of relayed transactions drops the ability to have a target in the estimation. That is it&amp;#39;s good enough for time-sensitive transactions where you always target the next block but not for other usages which usually target a few dozen of blocks in the future.&lt;br/&gt;&lt;br/&gt;However, as we discussed recently, i do believe their is a failure mode here. On one hand, directly connecting to pools is already possible today and pretty effective given the current mining centralization. On the other hand, it&amp;#39;s not possible for most pre-signed txs protocols to reliably (securely) use the Bitcoin tx relay network today to propagate time-sensitive transactions. Furthermore, even if these are fixed (eg via package-relay for (today&amp;#39;s) Lightning Network) it seems like there is a stark contrast between what &amp;#34;L2 [0] protocols&amp;#34; need and what regular node operators can reasonably offer. A node operator is incentivized to relay transactions to:&lt;br/&gt;- have more privacy *if* they use their node to broadcast transactions (make it less distinguishable which relayed transaction comes from the wallet)&lt;br/&gt;- provide fee estimates *if* they need them&lt;br/&gt;- avoid bandwidth spikes on block connection (compact block relay)&lt;br/&gt;&lt;br/&gt;L2s would ideally need the tx relaying nodes to do more computation and lift their DOS mitigations for all miner-incentive-compatible transactions to eventually be relayed to most of the miners. One obvious instance of such a dilemma is the RBF rules.&lt;br/&gt;Such protocols getting increasingly developed and used create a strong incentive for their users/stakeholders to directly connect to mining pools [1], with all the consequences for the network mentioned in the replies to your mail and elsewhere.&lt;br/&gt;Before we get to this, i think there is a strong case for an opt-in and publicly accessible &amp;#34;overlay&amp;#34; network to relay miner-incentive compatible transactions with higher DOS limits. This way the cost is not imposed to L1 node runners, and L2s can operate with more safety assumptions without (entirely) falling for centralization.&lt;br/&gt;&lt;br/&gt;Thanks for publicly starting this discussion,&lt;br/&gt;Antoine&lt;br/&gt;&lt;br/&gt;[0] Using &amp;#34;L2s&amp;#34; for the sake of brevety, whatever it means i mean &amp;#34;protocols using pre-signed Bitcoin transactions which timely confirmation might be a security requirement&amp;#34;.&lt;br/&gt;[1] Wen block space insurance contracts&lt;br/&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;Le mardi 26 octobre 2021 à 4:56 AM, lisa neigut via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In a recent conversation with @glozow, I had the realization that the mempool is obsolete and should be eliminated.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Instead, users should submit their transactions directly to mining pools, preferably over an anonymous communication network such as tor. This can easily be achieved by mining pools running a tor onion node for this express purpose (or via a lightning network extension etc)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Mempools make sense in a world where mining is done by a large number of participating nodes, eg where the block template is constructed by a majority of the participants on the network. In this case, it is necessary to socialize pending transaction data to all participants, as you don’t know which participant will be constructing the winning block template.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In reality however, mempool relay is unnecessary where the majority of hashpower and thus block template creation is concentrated in a semi-restricted set.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Removing the mempool would greatly reduce the bandwidth requirement for running a node, keep intentionality of transactions private until confirmed/irrevocable, and naturally resolve all current issues inherent in package relay and rbf rules. It also resolves the recent minimum relay questions, as relay is no longer a concern for unmined transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Provided the number of block template producing actors remains beneath, say 1000, it’d be quite feasible to publish a list of tor endpoints that nodes can independently &#43; directly submit their transactions to. In fact, merely allowing users to select their own list of endpoints to use alternatively to the mempool would be a low effort starting point for the eventual replacement.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On the other hand, removing the mempool would greatly complicate solo mining and would also make BetterHash proposals, which move the block template construction away from a centralized mining pool back to the individual miner, much more difficult. It also makes explicit the target for DoS attacks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A direct communication channel between block template construction venues and transaction proposers also provides a venue for direct feedback wrt acceptable feerates at the time, which both makes transaction confirmation timelines less variable as well as provides block producers a mechanism for (independently) enforcing their own minimum security budget. In other words, expressing a minimum acceptable feerate for continued operation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Initial feerate estimation would need to be based on published blocks, not pending transactions (as this information would no longer be available), or from direct interactions with block producers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ~niftynei&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20211026/d151987f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20211026/d151987f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:00:19Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqs0fh4ylmc2e35rz480rnvgfz7hw6cdhw0zvldhk50czmhh9fhppvczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy27jgmr</id>
    
      <title type="html">📅 Original date posted:2021-09-06 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqs0fh4ylmc2e35rz480rnvgfz7hw6cdhw0zvldhk50czmhh9fhppvczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy27jgmr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8e7u40gk37gzxjq497dc9zvd0ncygky068hft04aqvg38wf3dxwqxeh6vm&#39;&gt;nevent1q…h6vm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-09-06&lt;br/&gt;📝 Original message:Hi Jeremy,&lt;br/&gt;&lt;br/&gt;I think it would be nice to have and suggested something similar (enforce minimality) in the context of&lt;br/&gt;Miniscript a few months ago [0].&lt;br/&gt;&lt;br/&gt;However your code:&lt;br/&gt;&lt;br/&gt;const bool seq_is_reserved = (txin.nSequence &amp;lt; CTxIn::SEQUENCE_FINAL-2) &amp;amp;&amp;amp; (&lt;br/&gt;// when sequence is set to disabled, it is reserved for future use&lt;br/&gt;((txin.nSequence &amp;amp; CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG) != 0) ||&lt;br/&gt;// when sequence has bits set outside of the type flag and locktime mask,&lt;br/&gt;// it is reserved for future use.&lt;br/&gt;((~(CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | CTxIn::SEQUENCE_LOCKTIME_MASK) &amp;amp;&lt;br/&gt;txin.nSequence) != 0)&lt;br/&gt;);&lt;br/&gt;&lt;br/&gt;Would effectively prevent Lightning Network commitment transactions from relaying. The protocol uses&lt;br/&gt;a hack encoding the commitment transaction numbering in the part of nSequence (and nLockTime)&lt;br/&gt;without consensus meaning. This both sets the LOCKTIME_DISABLE_FLAG and uses bits outside of&lt;br/&gt;the mask.&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://github.com/rust-bitcoin/rust-miniscript/pull/246#issue-671512626&#34;&gt;https://github.com/rust-bitcoin/rust-miniscript/pull/246#issue-671512626&lt;/a&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#commitment-transaction&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#commitment-transaction&lt;/a&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;Le lundi 6 septembre 2021 à 5:17 AM, Jeremy via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; BIP 68 says &amp;gt;= 2:This specification defines the meaning of sequence numbers for transactions with an nVersion greater than or equal to 2 for which the rest of this specification relies on.&lt;br/&gt;&amp;gt; BIP-112 says not &amp;lt; 2&lt;br/&gt;&amp;gt; // Fail if the transaction&amp;#39;s version number is not set high&lt;br/&gt;&amp;gt; // enough to trigger BIP 68 rules.&lt;br/&gt;&amp;gt; if (static_cast&amp;lt;uint32_t&amp;gt;(txTo-&amp;gt;nVersion) &amp;lt; 2) return false;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A further proof that this needs fix: the flawed upgradable semantic exists in script as well as in the transaction nSeqeunce. we can&amp;#39;t really control the transaction version an output will be spent with in the future, so it would be weird/bad to change the semantic in transaction version 3.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; [@JeremyRubin](&lt;a href=&#34;https://twitter.com/JeremyRubin&#34;&gt;https://twitter.com/JeremyRubin&lt;/a&gt;)&lt;a href=&#34;https://twitter.com/JeremyRubin&#34;&gt;https://twitter.com/JeremyRubin&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Sun, Sep 5, 2021 at 7:36 PM David A. Harding &amp;lt;dave at dtrt.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Fri, Sep 03, 2021 at 08:32:19PM -0700, Jeremy via bitcoin-dev wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Hi Bitcoin Devs,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I recently noticed a flaw in the Sequence lock implementation with respect&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; to upgradability. It might be the case that this is protected against by&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; some transaction level policy (didn&amp;#39;t see any in policy.cpp, but if not,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I&amp;#39;ve put up a blogpost explaining the defect and patching it&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://rubin.io/bitcoin/2021/09/03/upgradable-nops-flaw/&#34;&gt;https://rubin.io/bitcoin/2021/09/03/upgradable-nops-flaw/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Isn&amp;#39;t this why BIP68 requires using tx.version=2? Wouldn&amp;#39;t we just&lt;br/&gt;&amp;gt;&amp;gt; deploy any new nSequence rules with tx.version&amp;gt;2?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; -Dave&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210906/ff395880/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210906/ff395880/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T22:58:41Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsrknza2xvfec48lteccah4zluqd2u69hmec3kttd975rplt5d6nfqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy45c92x</id>
    
      <title type="html">📅 Original date posted:2021-06-10 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsrknza2xvfec48lteccah4zluqd2u69hmec3kttd975rplt5d6nfqzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy45c92x" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv884s4rjqjmtdqzvt4fcm64l5s30r8fg84r9yzup9lfgy89edd3qnk388l&#39;&gt;nevent1q…388l&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-06-10&lt;br/&gt;📝 Original message:&amp;gt; Note, I think that the tx mutation proposal relies on interactivity in the worst-case scenario where a counterparty wants to increase its fee-bumping output from the contract balance. This interactivity may lure a counterparty to alway lock the worst-case fee-bumping reserve in the output. I believe anchor output enables more &amp;#34;real-time&amp;#34; fee-bumping reserve adjustment ?&lt;br/&gt;&lt;br/&gt;Anchor outputs / malleability allow for real-time adjustment of long-lived contracts (for which the today worst case is much larger than the worst case&lt;br/&gt;estimated at the contract creation time). However it&amp;#39;s a really interested for vaults, as you have multiple parties with the same goal (getting this Cancel&lt;br/&gt;transaction confirmed). Therefore you have this slight &amp;#34;tragedy of the commons&amp;#34; of whose fee-bumping wallet is going to pay for sponsoring the next&lt;br/&gt;Cancel (and it&amp;#39;s exacerbated by / for external redundancy providers). With this approach, fees are taxed from the shared coins, so there is no pernicious&lt;br/&gt;incentive to delay the broadcast of your revocation transaction in the hope that another watchtower will pay the fee instead of you. I think this applies to&lt;br/&gt;multi-party channels too, by having some kind of a shared budget.&lt;br/&gt;&lt;br/&gt;You would also have a large UX improvement with regard to the fee-bumping wallet: no need to have one (fb wallet refills are really *really* poor UX)&lt;br/&gt;one and maintain a nice laid-out UTXO pool.&lt;br/&gt;In the end, both approaches seem desirable: the output for paying most of the fees from shared coins, therefore dwarfing the &amp;#34;tragedy of the common&amp;#34;&lt;br/&gt;concerns, and the malleability to still be able to dynamically allocate more funds to feebump in case of a black swan event (but essentially needs a single&lt;br/&gt;refill at startup as it&amp;#39;s never spent from).&lt;br/&gt;&lt;br/&gt;As a side note, this can &amp;#34;just&amp;#34; be implemented by exchanging N (varying depending on the granularity) signatures with increasing feerates. Again, this&lt;br/&gt;might be reasonable in some usecases but not others (eg if you are already generating tons of sigs, or have longer chain of unconfirmed transactions).&lt;br/&gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Antoine&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0] Incautious sighash alleability is unsafe. Be careful, otherwise kitties will perish by the thousands :&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/revault/practical-revault/pull/83&#34;&gt;https://github.com/revault/practical-revault/pull/83&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le dim. 6 juin 2021 à 22:28, Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi Antione,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks for bringing up this important topic. I think there might be another class of solutions over input based, CPFP and sponsorship. I&amp;#39;ll call them tx mutation schemes. The idea is that you can set a key that can increase the fee by lowering a particular output after the tx is signed without invalidating the signature. The premise is that anytime you need to bump the fee of a transaction you must necessarily have funds in an output that are going to you and therefore you can sacrifice some of them to increase the fee. This is obviously destructive to txids so child presigned transactions will have to use ANYPREVOUT as in your proposal. The advantage is that it does not require keeping extra inputs around to bump the fee.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; So imagine a new opcode OP_CHECKSIG_MUTATED &amp;lt;output index&amp;gt; &amp;lt;publickey&amp;gt; &amp;lt;value&amp;gt; &amp;lt;signature&amp;gt;.&lt;br/&gt;&amp;gt;&amp;gt; This would check that &amp;lt;signature&amp;gt; is valid against &amp;lt;publickey&amp;gt; if the current transaction had the output at &amp;lt;output index&amp;gt; reduced by &amp;lt;value&amp;gt;. To make this more efficient, if the public key is one byte: 0x02 it references the taproot *external key* (similar to how ANYPREVOUT uses 0x01 to refer to internal key[1]).&lt;br/&gt;&amp;gt;&amp;gt; Now for our protocol we want both parties (p1 and p2) to be able to fee bump a commitment transaction. They use MuSig to sign the commitment tx under the external key with a decent fee for the current conditions. But in case it proves insufficient they have added the following two leaves to their key in the funding output as a backup so that p1 and p2 can unilaterally bump the fee of anything they sign spending from the funding output:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1. OP_CHECKSIG_MUTATED(0, 0x02, &amp;lt;fee-bump-value&amp;gt;, &amp;lt;original-signature&amp;gt;) OP_CHECKSIGADD(p1-fee-bump-key, &amp;lt;p1-fee-bump-signature&amp;gt;) OP_2 OP_NUMEQUALVERIFY&lt;br/&gt;&amp;gt;&amp;gt; 2. OP_CHECKSIG_MUTATED(1, 0x02, &amp;lt;fee-bump-value&amp;gt;, &amp;lt;original-signature&amp;gt;) OP_CHECKSIGADD(p2-fee-bump-key, &amp;lt;p2-fee-bump-signature&amp;gt;) OP_2 OP_NUMEQUALVERIFY&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; where &amp;lt;...&amp;gt; indicates the thing comes from the witness stack.&lt;br/&gt;&amp;gt;&amp;gt; So to bump the fee of the commit tx after it has been signed either party takes the &amp;lt;original-signature&amp;gt; and adds a signature under their fee-bump-key for the new tx and reveals their fee bump leaf. &amp;lt;original-signature&amp;gt; is checked against the old transaction while the fee bumped transaction is checked against the fee bump key.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I know I have left out how to change mempool eviction rules to accommodate this kind of fee bumping without DoS or pinning attacks but hopefully I have demonstrated that this class of solutions also exists.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [1] &lt;a href=&#34;https://github.com/ajtowns/bips/blob/bip-anyprevout/bip-0118.mediawiki&#34;&gt;https://github.com/ajtowns/bips/blob/bip-anyprevout/bip-0118.mediawiki&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; LL&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Fri, 28 May 2021 at 07:13, Antoine Riard via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Hi,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; This post is pursuing a wider discussion around better fee-bumping strategies for second-layer protocols. It draws out a comparison between input-based and CPFP fee-bumping techniques, and their apparent trade-offs in terms of onchain footprint, tx-relay bandwidth rebroadcast, batching opportunity and mempool flexibility.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Thanks to Darosior for reviews, ideas and discussions.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ## Child-Pay-For-Parent&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; CPFP is a mature fee-bumping technique, known and used for a while in the Bitcoin ecosystem. However, its usage in contract protocols with distrusting counterparties raised some security issues. As mempool&amp;#39;s chain of unconfirmed transactions are limited in size, if any output is spendable by any contract participant, it can be leveraged as a pinning vector to downgrade odds of transaction confirmation [0].&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; That said, contract transactions interested to be protected under the carve-out logic require to add a new output for any contract participant, even if ultimately only one of them serves as an anchor to attach a CPFP.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ## Input-Based&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I think input-based fee-bumping has been less studied as fee-bumping primitive for L2s [1]. One variant of input-based fee-bumping usable today is the leverage of the SIGHASH_ANYONECANPAY/SIGHASH_SINGLE malleability flags. If the transaction is the latest stage of the contract, a bumping input can be attached just-in-time, thus increasing the feerate of the whole package.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; However, as of today, input-based fee-bumping doesn&amp;#39;t work to bump first stages of contract transactions as it&amp;#39;s destructive of the txid, and as such breaks chain of pre-signed transactions. A first improvement would be the deployment of the SIGHASH_ANYPREVOUT softfork proposal. This new malleability flag allows a transaction to be signed without reference to any specific previous output. That way, spent transactions can be fee-bumped without altering validity of the chain of transactions.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Even assuming SIGHASH_ANYPREVOUT, if the first stage contract transaction includes multiple outputs (e.g the LN&amp;#39;s commitment tx has multiple HTLC outputs), SIGHASH_SINGLE can&amp;#39;t be used and the fee-bumping input value might be wasted. This edge can be smoothed by broadcasting a preliminary fan-out transaction with a set of outputs providing a range of feerate points for the bumped transaction.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; This overhead could be smoothed even further in the future with more advanced sighash malleability flags like SIGHASH_IOMAP, allowing transaction signers to commit to a map of inputs/outputs [2]. In the context of input-based, the overflowed fee value could be redirected to an outgoing output.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ## Onchain Footprint&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; CPFP: One anchor output per participant must be included in the commitment transaction. To this anchor must be attached a child transaction with 2 inputs (one for the commitment, one for the bumping utxo) and 1 output. Onchain footprint: 2 inputs &#43; 3 outputs.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Input-based (today): If the bumping utxo is offering an adequate feerate point in function of network mempools congestion at time of broadcast, only 1 input. If a preliminary fan-out transaction to adjust feerate point must be broadcasted first, 1 input and 2 outputs more must be accounted for. Onchain footprint: 2 inputs &#43; 3 outputs.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Input-based (SIGHASH_ANYPREVOUT&#43;SIGHASH_IOMAP): As long as the bumping utxo&amp;#39;s value is wide enough to cover the worst-case of mempools congestion, the bumped transaction can be attached 1 input and 1 output. Onchain footprint: 1 input &#43; 1 output.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ## Tx-Relay Bandwidth Rebroadcast&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; CPFP: In the context of multi-party protocols, we should assume bounded rationality of the participants w.r.t to an unconfirmed spend of the contract utxo across network mempools. Under this assumption, the bumped transaction might have been replaced by a concurrent state. To guarantee efficiency of the CPFP the whole chain of transactions should be rebroadcast, perhaps wasting bandwidth consumption for a still-identical bumped transaction [3]. Rebroadcast footprint: the whole chain of transactions.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Input-based (today): In case of rebroadcast, the fee-bumping input is attached to the root of the chain of transactions and as such breaks the chain validity in itself. Beyond the rebroadcast of the updated root under replacement policy, the remaining transactions must be updated and rebroadcast. Rebroadcast footprint: the whole chain of transactions.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Input-based(SIGHASH_ANYPREVOUT&#43;SIGHASH_IOMAP): In case of rebroadcast, the fee-bumping is attached to the root of the chain of transactions but it doesn&amp;#39;t break the chain validity in itself. Assuming a future mempool acceptance logic to authorize in-place substitution, the rest of the chain could be preserved. Rebroadcast footprint: the root of the chain of transactions.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ## Fee-Bumping Batching&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; CPFP: In the context of multi-party protocols, in optimistic scenarios, we can assume aggregation of multiple chains of transactions. For e.g, a LN operator is desirous to non-cooperatively close multiple channels at the same time and would like to combine their fee-bumping. With CPFP, one anchor output and one bumping input must be consumed per aggregated chain, even if the child transaction fields can be shared. Batching perf: 1 input/1 output per aggregated chain.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Input-based (today): Unless the contract allows interactivity, multiple chains of transactions cannot be aggregated. One bumping input must be attached per chain, though if a preliminary fan-out transaction is relied on to offer multiple feerate points, transaction fields can be shared. Batching perf: 1 input/1 output per aggregated chain.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Input-based (SIGHASH_ANYPREVOUT&#43;SIGHASH_IOMAP): Multiple chains of transactions might be aggregated together *non-interactively*. One bumping input and outgoing output can be attached to the aggregated root. Batching perf: 1 input/1 output per aggregation.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ## Fee-Bumping Mempool Flexibility&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; CPFP: In the context of multi-party protocols, one of your counterparties might build a branch of transactions from one of the root outputs thus saturating the in-mempool package limits. To avoid these shenanigans, LN channels are relying on the carve-out mechanism. Though, the carve-out mechanism includes its own limitation and doesn&amp;#39;t scale beyond 2 contract participants.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Input-based: The root of the chain of transaction is the package&amp;#39;s oldest ancestor, so package limits don&amp;#39;t restrain its acceptance and it works whatever the number of contract participants.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; To conclude, this post scores 2 fee-bumping primitives for multi-party protocols on a range of factors. It hopes to unravel the ground for a real feerate performance framework of second-layers protocols .&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Beyond that, few points can be highlighted a) future soft forks allow significant onchain footprint savings, especially in case of batching, b) future package relay bandwidth efficiency should account for rebroadcast frequency of CPFPing multi-party protocols. On this latter point one follow-up might be to evaluate differing package relay *announcement* schemes in function of odds of non-cooperative protocol broadcast/odds of concurrent broadcast/rebroadcast frequencies.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Thoughts ?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Antoine&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-November/016518.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-November/016518.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [1] Beyond the revault architecture : &lt;a href=&#34;https://github.com/revault/practical-revault/blob/master/revault.pdf&#34;&gt;https://github.com/revault/practical-revault/blob/master/revault.pdf&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [2] Already proposed a while back : &lt;a href=&#34;https://bitcointalk.org/index.php?topic=252960.0&#34;&gt;https://bitcointalk.org/index.php?topic=252960.0&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [3] In theory, an already-relayed transaction shouldn&amp;#39;t pass Core&amp;#39;s `filterInventoryKnown`. In practice, if the transaction is announced as part of a package_id, the child might have changed, not the parent, leading to a redundant relay of the latter.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210610/71c247b4/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210610/71c247b4/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T22:54:28Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsqgs7cn3vp0x0aasvyurpn6k9vujh8m5g8wp589j0268k23hnvgygzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy6qek6j</id>
    
      <title type="html">📅 Original date posted:2021-06-10 📝 Original message:Hi, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsqgs7cn3vp0x0aasvyurpn6k9vujh8m5g8wp589j0268k23hnvgygzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy6qek6j" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv2fys7mtkrply8wyncshzeevv9npmkseesdgfmj6tezqjrv73smczrjmvn&#39;&gt;nevent1q…jmvn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-06-10&lt;br/&gt;📝 Original message:Hi,&lt;br/&gt;&lt;br/&gt;Another thing to consider when comparing these two techniques is anti-fee sniping protection. If you are going to feebump directly&lt;br/&gt;your revocation transaction by adding inputs to it, the nLockTime has already been signed in advance. Therefore your are sponsoring&lt;br/&gt;a transaction that could be included in any reorged block.&lt;br/&gt;&lt;br/&gt;This is not a big deal for now but i&amp;#39;m concerned it may become one, especially since this type of transaction might be the highest fee-paying&lt;br/&gt;ones on the network (there is a lot at stake). Having a new sighash type not masking the nLockTime so that it can be set by the feebumper&lt;br/&gt;could help with this, even though the presumably low pre-signed fee can still be snipped (since the ALL signature is added to the feebump inputs).&lt;br/&gt;&lt;br/&gt;The recent BIP proposal by Chris Belcher [0] also just uncovered (to me) a new hack: if the feebumping coins are less than 65,535 blocks old, we&lt;br/&gt;could also set the nSequence of these coins to achieve the same purpose [1]. And this can be done with today&amp;#39;s Bitcoin!&lt;br/&gt;&lt;br/&gt;Antoine P.&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019048.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019048.html&lt;/a&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002412.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002412.html&lt;/a&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;Le vendredi 28 mai 2021 à 6:13 AM, Antoine Riard &amp;lt;antoine.riard at gmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Unfortunately, ACP | SINGLE is trivially pinable [0] (TL;DR: i can just attach an output paying immediately to me, and construct a tx chain spending it). We are using ACP | ALL for Revault,&lt;br/&gt;&amp;gt;&amp;gt; which is the reason why we need a well laid-out pool of fee-bumping UTXOs (as you need to consume them entirely).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Oh yes, I should have mentioned this pinning vector. The witnessScript I&amp;#39;ve in mind to make secure that type of chain of transactions would be one MuSig key for all contract participants, where signature are committed with SIGHASH_ANYPREVOUT | SIGHASH_IOMAP, one pubkey per participant to lockdown the transaction with SIGHASH_ALL. I think it works and prevents malicious in-flight attachment of input/output to a multi-party transaction ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I believe that it&amp;#39;s better to broadcast a single fan-out transaction creating your entire UTXO pool in advance. You could create one coin per contract you are watching which value would be&lt;br/&gt;&amp;gt;&amp;gt; used to bump your transaction feerate from the presigned one to -say- the average feerate over the past month, and then have smaller coins that you could attach to any transaction to bump&lt;br/&gt;&amp;gt;&amp;gt; by a certain threshold (say, 10sat/vbyte). You would create as many small coin as your reserve algorithm tells you (which could be &amp;#34;i need to be able, worst case, to close all my contracts&lt;br/&gt;&amp;gt;&amp;gt; with the worst historical feerate.&amp;#34; or (fractional reserve version) &amp;#34;i need to be able, worst case, to close 10% of my contracts at the average feerate of the past year, the remaining ones sorry&lt;br/&gt;&amp;gt;&amp;gt; for my loss&amp;#34;). [1]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This method is both much more optimal (though you need to sometimes incur the cost of many small additional inputs) and also makes sure that your feebump does not depend on the confirmation of a first stage transaction (as you can only RBF with new inputs if they are confirmed).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I see, so you spread your bumping UTXO pool in two ranges : at least one bumping utxo per contract, and a subpool of emergency smaller coins, ready to be attached on any contract. I think this strategy makes sense for vaults as you can afford a bunch of small coins at different feerates, spending the ones not used afterwards. And higher cells of feerate reserve as the worst historical feerate are relatively not that much compared to locked-in vaults value. That said, I&amp;#39;m more dubious about LN, where node operators might not keep the worst-case fee-bumping reserve, as the time value of the coins aren&amp;#39;t worth the channel liquidity at stake.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Why not just attaching it at the tail of the chain? Bumping the last child with additional input would effectively be a CPFP for the entire chain in this case.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes, input-based bumping targeting the tail of the chain works at the transaction level. But if you assume bounded visibility of network mempools, one of your counterparties might have broadcast a concurrent state, thus making your CPFP irrelevant for propagation. Though smarter tx-relay techniques such as &amp;#34;attach-on-contract-utxo-root&amp;#34; CPFP (or also known as &amp;#34;blinded CPFP&amp;#34;) might solve this issue.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le jeu. 27 mai 2021 à 17:45, darosior &amp;lt;darosior at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ## Input-Based&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I think input-based fee-bumping has been less studied as fee-bumping primitive for L2s [1]. One variant of input-based fee-bumping usable today is the leverage of the SIGHASH_ANYONECANPAY/SIGHASH_SINGLE malleability flags. If the transaction is the latest stage of the contract, a bumping input can be attached just-in-time, thus increasing the feerate of the whole package.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Unfortunately, ACP | SINGLE is trivially pinable [0] (TL;DR: i can just attach an output paying immediately to me, and construct a tx chain spending it). We are using ACP | ALL for Revault,&lt;br/&gt;&amp;gt;&amp;gt; which is the reason why we need a well laid-out pool of fee-bumping UTXOs (as you need to consume them entirely).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Input-based (today): If the bumping utxo is offering an adequate feerate point in function of network mempools congestion at time of broadcast, only 1 input. If a preliminary fan-out transaction to adjust feerate point must be broadcasted first, 1 input and 2 outputs more must be accounted for. Onchain footprint: 2 inputs &#43; 3 outputs.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I believe that it&amp;#39;s better to broadcast a single fan-out transaction creating your entire UTXO pool in advance. You could create one coin per contract you are watching which value would be&lt;br/&gt;&amp;gt;&amp;gt; used to bump your transaction feerate from the presigned one to -say- the average feerate over the past month, and then have smaller coins that you could attach to any transaction to bump&lt;br/&gt;&amp;gt;&amp;gt; by a certain threshold (say, 10sat/vbyte). You would create as many small coin as your reserve algorithm tells you (which could be &amp;#34;i need to be able, worst case, to close all my contracts&lt;br/&gt;&amp;gt;&amp;gt; with the worst historical feerate.&amp;#34; or (fractional reserve version) &amp;#34;i need to be able, worst case, to close 10% of my contracts at the average feerate of the past year, the remaining ones sorry&lt;br/&gt;&amp;gt;&amp;gt; for my loss&amp;#34;). [1]&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This method is both much more optimal (though you need to sometimes incur the cost of many small additional inputs) and also makes sure that your feebump does not depend on the confirmation&lt;br/&gt;&amp;gt;&amp;gt; of a first stage transaction (as you can only RBF with new inputs if they are confirmed).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Input-based (today): In case of rebroadcast, the fee-bumping input is attached to the root of the chain of transactions and as such breaks the chain validity in itself. Beyond the rebroadcast of the updated root under replacement policy, the remaining transactions must be updated and rebroadcast. Rebroadcast footprint: the whole chain of transactions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Why not just attaching it at the tail of the chain? Bumping the last child with additional input would effectively be a CPFP for the entire chain in this case.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks for starting this discussion :)&lt;br/&gt;&amp;gt;&amp;gt; Antoine&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [1] Credits to Jacob Swambo, who came up with the single fan-out transaction and with whom i&amp;#39;m discussing how to practically apply these ideas to Revault.&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210610/f17a3b66/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210610/f17a3b66/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T22:54:26Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsypkvp2e7nzlkr0zaf5n30947q4c8veg480m96vmc8dkm8qwzpurszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy38xayc</id>
    
      <title type="html">📅 Original date posted:2021-05-28 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsypkvp2e7nzlkr0zaf5n30947q4c8veg480m96vmc8dkm8qwzpurszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwy38xayc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxq6g5egnv6ze74v2kuyvhjzzex324vt5fg703gyt0udclywzkeygjaa4un&#39;&gt;nevent1q…a4un&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-05-28&lt;br/&gt;📝 Original message:&amp;gt; Oh yes, I should have mentioned this pinning vector. The witnessScript I&amp;#39;ve in mind to make secure that type of chain of transactions would be one MuSig key for all contract participants, where signature are committed with SIGHASH_ANYPREVOUT | SIGHASH_IOMAP, one pubkey per participant to lockdown the transaction with SIGHASH_ALL. I think it works and prevents malicious in-flight attachment of input/output to a multi-party transaction ?&lt;br/&gt;&lt;br/&gt;So something like `or(and(pk(FB),pk(A)),and(pk(FB),pk(B)),and(pk(FB),pk(C)))` with each `or` in their own leaf? I think it works, but only if the keys `A`, `B`, `C` are &amp;#34;hot&amp;#34;, as in available to the&lt;br/&gt;fee-bumper. For Revault it means introducing a key for each watchtower in the vaults descriptors, which is meh but technically feasible since they are identified. This kinda break our replication&lt;br/&gt;model though. On the other end for Lightning... You&amp;#39;d need to know what watchtower (or your node) is going to be willing to feebump? The descriptor can very quickly get very convoluted:&lt;br/&gt;`or(and(pk(FB),pk(A_NODE)),and(pk(FB),pk(A_WT1)),and(pk(FB),pk(A_WT2)),and(pk(FB),pk(B_NODE)),and(pk(FB),pk(B_WT1)),and(pk(FB),pk(B_WT2)))` for only 2 participants in a channel&lt;br/&gt;where one of either the node or two watchtowers (identified beforehand !!) can feebump.&lt;br/&gt;&lt;br/&gt;&amp;gt; I see, so you spread your bumping UTXO pool in two ranges : at least one bumping utxo per contract, and a subpool of emergency smaller coins, ready to be attached on any contract. I think this strategy makes sense for vaults as you can afford a bunch of small coins at different feerates, spending the ones not used afterwards. And higher cells of feerate reserve as the worst historical feerate are relatively not that much compared to locked-in vaults value. That said, I&amp;#39;m more dubious about LN, where node operators might not keep the worst-case fee-bumping reserve, as the time value of the coins aren&amp;#39;t worth the channel liquidity at stake.&lt;br/&gt;&lt;br/&gt;Yes. That&amp;#39;s a bit concerning, but i guess it&amp;#39;s a tradeoff. Amusingly the incentive is at odds with routing: you want to keep your channels unbalanced if you run on fractional fee-bumping reserves&lt;br/&gt;so that if things go south you can still salvage most of your funds by focusing your fee-bumping on the unbalanced (to you) channels :p .&lt;br/&gt;&lt;br/&gt;&amp;gt; Yes, input-based bumping targeting the tail of the chain works at the transaction level. But if you assume bounded visibility of network mempools, one of your counterparties might have broadcast a concurrent state, thus making your CPFP irrelevant for propagation. Though smarter tx-relay techniques such as &amp;#34;attach-on-contract-utxo-root&amp;#34; CPFP (or also known as &amp;#34;blinded CPFP&amp;#34;) might solve this issue.&lt;br/&gt;&lt;br/&gt;Oh, yes, good point.&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210528/e838d90f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210528/e838d90f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T22:54:10Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqspljzpneqr0kjffwucfhkfdl985d44hd87k59hudak28ey8ljdemczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwye5yuc5</id>
    
      <title type="html">📅 Original date posted:2021-05-27 📝 Original message:Hi, ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqspljzpneqr0kjffwucfhkfdl985d44hd87k59hudak28ey8ljdemczyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwye5yuc5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0xc9a0my3zsmf3p4h6gdrjz7nlht03j5acf037s7ytynp87ae0jqehqg59&#39;&gt;nevent1q…qg59&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-05-27&lt;br/&gt;📝 Original message:Hi,&lt;br/&gt;&lt;br/&gt;&amp;gt; ## Input-Based&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think input-based fee-bumping has been less studied as fee-bumping primitive for L2s [1]. One variant of input-based fee-bumping usable today is the leverage of the SIGHASH_ANYONECANPAY/SIGHASH_SINGLE malleability flags. If the transaction is the latest stage of the contract, a bumping input can be attached just-in-time, thus increasing the feerate of the whole package.&lt;br/&gt;&lt;br/&gt;Unfortunately, ACP | SINGLE is trivially pinable [0] (TL;DR: i can just attach an output paying immediately to me, and construct a tx chain spending it). We are using ACP | ALL for Revault,&lt;br/&gt;which is the reason why we need a well laid-out pool of fee-bumping UTXOs (as you need to consume them entirely).&lt;br/&gt;&lt;br/&gt;&amp;gt; Input-based (today): If the bumping utxo is offering an adequate feerate point in function of network mempools congestion at time of broadcast, only 1 input. If a preliminary fan-out transaction to adjust feerate point must be broadcasted first, 1 input and 2 outputs more must be accounted for. Onchain footprint: 2 inputs &#43; 3 outputs.&lt;br/&gt;&lt;br/&gt;I believe that it&amp;#39;s better to broadcast a single fan-out transaction creating your entire UTXO pool in advance. You could create one coin per contract you are watching which value would be&lt;br/&gt;used to bump your transaction feerate from the presigned one to -say- the average feerate over the past month, and then have smaller coins that you could attach to any transaction to bump&lt;br/&gt;by a certain threshold (say, 10sat/vbyte). You would create as many small coin as your reserve algorithm tells you (which could be &amp;#34;i need to be able, worst case, to close all my contracts&lt;br/&gt;with the worst historical feerate.&amp;#34; or (fractional reserve version) &amp;#34;i need to be able, worst case, to close 10% of my contracts at the average feerate of the past year, the remaining ones sorry&lt;br/&gt;for my loss&amp;#34;). [1]&lt;br/&gt;&lt;br/&gt;This method is both much more optimal (though you need to sometimes incur the cost of many small additional inputs) and also makes sure that your feebump does not depend on the confirmation&lt;br/&gt;of a first stage transaction (as you can only RBF with new inputs if they are confirmed).&lt;br/&gt;&lt;br/&gt;&amp;gt; Input-based (today): In case of rebroadcast, the fee-bumping input is attached to the root of the chain of transactions and as such breaks the chain validity in itself. Beyond the rebroadcast of the updated root under replacement policy, the remaining transactions must be updated and rebroadcast. Rebroadcast footprint: the whole chain of transactions.&lt;br/&gt;&lt;br/&gt;Why not just attaching it at the tail of the chain? Bumping the last child with additional input would effectively be a CPFP for the entire chain in this case.&lt;br/&gt;&lt;br/&gt;Thanks for starting this discussion :)&lt;br/&gt;Antoine&lt;br/&gt;&lt;br/&gt;[0] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&lt;/a&gt;&lt;br/&gt;[1] Credits to Jacob Swambo, who came up with the single fan-out transaction and with whom i&amp;#39;m discussing how to practically apply these ideas to Revault.&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210527/a0939895/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210527/a0939895/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T22:54:09Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsv6ykpvjl56q9ylst36dwkhpejsmy6dq4rfv7mn3hr65rnw2kzdtgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyageed2</id>
    
      <title type="html">📅 Original date posted:2021-05-09 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsv6ykpvjl56q9ylst36dwkhpejsmy6dq4rfv7mn3hr65rnw2kzdtgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyageed2" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr9dljjtrqg54veaes3eml3r9ul9td0cjnpx6nfcmxl3jnmppszzsfrnhj4&#39;&gt;nevent1q…nhj4&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-05-09&lt;br/&gt;📝 Original message:Hi Antoine,&lt;br/&gt;&lt;br/&gt;Thank you for the disclosure.&lt;br/&gt;&lt;br/&gt;&amp;gt; * Onchain DLC/Coinswap/Vault : Those contract protocols have also multiple stages of execution with time-sensitive transactions opening the way to pinning attacks. Those protocols being non-deployed or in early phase, I would recommend that any in-protocol competing transactions explicitly signal RBF.&lt;br/&gt;&lt;br/&gt;For what it&amp;#39;s worth, Revault isn&amp;#39;t vulnerable as all transactions signal RBF and there is no way to sneak a non-signaling competing transaction (as long as the CSV isn&amp;#39;t matured yet).&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;&lt;br/&gt;Antoine (the other one)&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210509/73a6d27f/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210509/73a6d27f/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T22:52:31Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsqfzjwt6j67axunw7wzxnv60c9jjhl7twyepv63jk3ft3dy6y4cwszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyc86vv3</id>
    
      <title type="html">📅 Original date posted:2021-01-17 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsqfzjwt6j67axunw7wzxnv60c9jjhl7twyepv63jk3ft3dy6y4cwszyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyc86vv3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsddzhkpcdhrjr7hrpx8fkygptlwdjqhw8md2kmcpw3tqnw7z4ldwsqemflj&#39;&gt;nevent1q…mflj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-01-17&lt;br/&gt;📝 Original message:Hi Antoine, and Kevin,&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; * Proposed improvement: The HW should display the Bitcoin Script itself when possible (including the unlock conditions).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What level of script literacy are you assuming on your users ? I can see enterprise/hobbyist folks to know enough of Script to understand the intended behavior but I don&amp;#39;t think that&amp;#39;s a reasonable assumption for your average user. Of course, Miniscript Policy makes things easier, but IMHO, I still hope to see some mature, higher-level language (e.g Ivy) to ease script semantic understanding and thus widen the crowd of users.&lt;br/&gt;&lt;br/&gt;No Script literacy should be assumed. I believe with Miniscript Policy (with possibly alias instead of pubkeys, see below) we are to the highest possible level of abstraction&lt;br/&gt;without loss of meaning for user verification. I don&amp;#39;t think Ivy would be helpful here.&lt;br/&gt;Also, as Kevin mentioned, anything would be better than an address anyways.&lt;br/&gt;&lt;br/&gt;&amp;gt; Further, I would do a bit on UX research on the correctness model expected by your users. I.e if they fail to verify accordingly, are they losing funds, transaction doesn&amp;#39;t confirm, transaction doesn&amp;#39;t even propagate, etc. You should also make assumptions on the mental resources you&amp;#39;re required from them. Time-sensitive L2 protocols have a wide scope to check, e.g not verifying the nSequence/nLocktime fields can provoke funds failures.&lt;br/&gt;&lt;br/&gt;Regarding the correctness, with the OP threat model (laptop compromised), for any transaction: if they fail to verify the locking policy, fund loss.&lt;br/&gt;Re nSeq: If we trust the HM, and the HM support Miniscript, it must be able to satisfy inputs in a sa[n,f]e way.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; This applies to pre-signed transaction protocols especially well as the template of these transactions could be known&lt;br/&gt;&amp;gt; and recognized by the HW. Typically for Revault, the HW could display: &amp;#34;Unvault Transaction, all expected pubkeys&lt;br/&gt;&amp;gt; present in the script&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the future, I would expect templates of high-security protocols like vaults to be part of the trusted computing base of any decent HW. I think good standards there would avoid HW vendors to come with some kind of certified-templates scheme and thus having to bless custom scripts of every vaults implementations.&lt;br/&gt;&lt;br/&gt;&#43;1&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Then there is PSBT support and the maximum transaction size limit for&lt;br/&gt;&amp;gt; these: we need more transparency from HW manufacturers on their li&lt;br/&gt;&amp;gt; mitations.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I understand them, Script is full of subtleties, taproot is likely to have more of them and if you take sighash malleability that&amp;#39;s not something you want your average user to play with. Maybe it&lt;br/&gt;&amp;gt; would be better to come up with a first wave of script features on which you expect transparency ? For sure, OP_CSV is a good candidate.&lt;br/&gt;&lt;br/&gt;I agree that rather than supporting all of Script it would be better to support a &amp;#34;safe&amp;#34;, analyzable subset of Script: that&amp;#39;s Miniscript :p&lt;br/&gt;I also believe supporting any new Script capabilities without Miniscript would be a huge footgun. It would also ease the upgrade to Tapscript.&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; Once any input of a (pre-signed)transaction is&lt;br/&gt;&amp;gt; spent, this transaction isn&amp;#39;t valid anymore. Most pre-signed transactions protocols are used today as a form of defense&lt;br/&gt;&amp;gt; mechanism, spending any input would mean incapacitating the entire defense mechanism.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t see the exact issue here. E.g in Lightning, even if you pre-sign a justice transaction punishing every revokeable outputs on counterparty transaction, and one input is spent, will current HWs prevent you to-resign an updated justice transaction ?&lt;br/&gt;&lt;br/&gt;That&amp;#39;s because in Revault we don&amp;#39;t require HMs for watchtowers. Funds holders are expected to have a routine signing of cancel / deterrent / unvault transactions&lt;br/&gt;and share them with the watchtowers. The attack Kevin is talking about is a (expected-to-be-stateless) HM will happily sign a cancel of deterrent transaction that&lt;br/&gt;spends an already-signed input. So let&amp;#39;s say a fund holder sends a signature for an Unvault tx and a Cancel tx that does not spend this Unvault to their watchtower.&lt;br/&gt;The watchtower would cringe (in our v0 protocol, send an NACK): but the NACK isn&amp;#39;t handled by the HM therefore at the end of the day the already-compromised laptop&lt;br/&gt;is ensuring the (statefull) validity of the signature.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Antoine&lt;br/&gt;&lt;br/&gt;&amp;gt; Le jeu. 14 janv. 2021 à 13:46, Kevin Loaec via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hello everyone,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I would like to start a discussion on improving Hardware Wallets.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; My approach to this right now is from a vault protocol we are developing (Revault, [1]), and its Hardware Wallet&lt;br/&gt;&amp;gt;&amp;gt; requirements. I started working on a Github Issue in our repo [2], other people recommended us to do a more general&lt;br/&gt;&amp;gt;&amp;gt; discussion on the mailing list instead as it could benefit many other protocols and users.&lt;br/&gt;&amp;gt;&amp;gt; This email discusses improvements that would benefit everyone, and some that are more suitable for &amp;#34;layer 2&amp;#34; or pre-&lt;br/&gt;&amp;gt;&amp;gt; signed transactions protocols.&lt;br/&gt;&amp;gt;&amp;gt; The goal is to spark discussions and hopefully iterate to a more secure and more usable hardware ecosystem for all&lt;br/&gt;&amp;gt;&amp;gt; bitcoiners.&lt;br/&gt;&amp;gt;&amp;gt; While I mainly foresee issues/improvements that may affect Revault, I would be really happy to see people joining this&lt;br/&gt;&amp;gt;&amp;gt; thread with any other ideas and remarks that would benefit some parts of Bitcoin that I overlooked.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Prior work on similar problematics:&lt;br/&gt;&amp;gt;&amp;gt; ===================================&lt;br/&gt;&amp;gt;&amp;gt; - ZmnSCPx&lt;br/&gt;&amp;gt;&amp;gt; j: [Lightning-dev] Speculations on hardware wallet support for Lightning [3]&lt;br/&gt;&amp;gt;&amp;gt; - mflaxman: Known Issues: Verifying a Receive Address [4]&lt;br/&gt;&amp;gt;&amp;gt; - ksedgwic and devrandom01: Lightning-signer [5]&lt;br/&gt;&amp;gt;&amp;gt; - benma: How nearly all personal hardware wallet multisig setups are insecure [6]&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The postulate we start from is that Hardware Wallets (HW) are useful to mitigate the compromission of the day-to-day&lt;br/&gt;&amp;gt;&amp;gt; device of a user. They mainly prevent private-key extraction today, and aren&amp;#39;t very suitable against an attack on the&lt;br/&gt;&amp;gt;&amp;gt; transaction being signed, as explained further.&lt;br/&gt;&amp;gt;&amp;gt; To make this discussion security-focused, let&amp;#39;s assume the general purpose device (laptop, for example) is compromised&lt;br/&gt;&amp;gt;&amp;gt; with a malware implanted by an attacker, capable of modifying PSBTs, displayed addresses, etc.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Our study so far:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Output Script Parsing:&lt;br/&gt;&amp;gt;&amp;gt; ======================&lt;br/&gt;&amp;gt;&amp;gt; Problem: A typical HW today would display the &amp;#34;destination&amp;#34; of a transaction in the form of a bitcoin address. A user&lt;br/&gt;&amp;gt;&amp;gt; would generally compare this wit&lt;br/&gt;&amp;gt;&amp;gt; h the address displayed on his laptop screen... which might have been compromised&lt;br/&gt;&amp;gt;&amp;gt; already. The correct usage would be for a user to verify this address on a third device (mobile phone, for example).&lt;br/&gt;&amp;gt;&amp;gt; This is weak security and bad user experience.&lt;br/&gt;&amp;gt;&amp;gt; Proposed improvement: The HW should display the Bitcoin Script itself when possible (including the unlock conditions).&lt;br/&gt;&amp;gt;&amp;gt; The best way to do so would be to lift this Script to a more user-friendly format such as a MiniScript Policy display,&lt;br/&gt;&amp;gt;&amp;gt; but anything would be better than an &amp;#34;address&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt; This applies to pre-signed transaction protocols especially well as the template of these transactions could be known&lt;br/&gt;&amp;gt;&amp;gt; and recognized by the HW. Typically for Revault, the HW could display: &amp;#34;Unvault Transaction, all expected pubkeys&lt;br/&gt;&amp;gt;&amp;gt; present in the script&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Pubkey Interpretation:&lt;br/&gt;&amp;gt;&amp;gt; ======================&lt;br/&gt;&amp;gt;&amp;gt; Problem: currently HW cannot &amp;#34;identify&amp;#34; addresses or keys.&lt;br/&gt;&amp;gt;&amp;gt; Proposed improvement: The HW could know pubkeys or xpubs it does not hold the private keys&lt;br/&gt;&amp;gt;&amp;gt; for, and display a label (or&lt;br/&gt;&amp;gt;&amp;gt; understand it for logic reasons, such as &amp;#34;expected pubkeys&amp;#34; as the previous example). Going further, the xpubs could be&lt;br/&gt;&amp;gt;&amp;gt; aliased the first time they are entered/verified (as part of, say, an initial setup ceremony) for instance with the&lt;br/&gt;&amp;gt;&amp;gt; previously mentioned Miniscript policy: or(pk(Alice), and(pk(Bob), after(42))).&lt;br/&gt;&amp;gt;&amp;gt; This should be done in the Secure Element if possible to avoid physical compromission, but would be a strong improvement&lt;br/&gt;&amp;gt;&amp;gt; versus a day-to-day laptop in any case.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Better Bitcoin Compatibility:&lt;br/&gt;&amp;gt;&amp;gt; =============================&lt;br/&gt;&amp;gt;&amp;gt; Problem: most HW cannot interpret some Script OPs such as OP_CSV, or any conditional outputs. This is a major issue for&lt;br/&gt;&amp;gt;&amp;gt; anyone using Bitcoin &amp;#34;advanced&amp;#34; features. Related to this are the Sighash flags: most HW do not support most Sighash&lt;br/&gt;&amp;gt;&amp;gt; flags. Kind of annoying for a signing device. Then there is PSBT support and the maximum transaction size limit for&lt;br/&gt;&amp;gt;&amp;gt; these: we need more transparency from HW manufacturers on their li&lt;br/&gt;&amp;gt;&amp;gt; mitations.&lt;br/&gt;&amp;gt;&amp;gt; Solution: Make Bitcoin HW actually compatible with Bitcoin :D&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Inputs (mainly for pre-signed Tx):&lt;br/&gt;&amp;gt;&amp;gt; ==================================&lt;br/&gt;&amp;gt;&amp;gt; Problem: Poisoned inputs are a major risk for HW as they don&amp;#39;t know the UTXO set. While this can be exploited for fee&lt;br/&gt;&amp;gt;&amp;gt; attacks, it is a bigger threat to pre-signed transactions protocols. Once any input of a (pre-signed)transaction is&lt;br/&gt;&amp;gt;&amp;gt; spent, this transaction isn&amp;#39;t valid anymore. Most pre-signed transactions protocols are used today as a form of defense&lt;br/&gt;&amp;gt;&amp;gt; mechanism, spending any input would mean incapacitating the entire defense mechanism.&lt;br/&gt;&amp;gt;&amp;gt; Proposed improvement: for protocols that requires it, keeping track of inputs already signed once would be extremely&lt;br/&gt;&amp;gt;&amp;gt; helpful. Going further, most of these protocols require to follow a specific signing order (typically the &amp;#34;clawback&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; first, then the regular spend path) so adding a way to check that a &amp;#34;clawback&amp;#34; has been signed first, with the same&lt;br/&gt;&amp;gt;&amp;gt; input, would be very helpful. All of this on the dev&lt;br/&gt;&amp;gt;&amp;gt; ice itself.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I understand some of these changes may be very difficult, especially given the low memory and computational power of&lt;br/&gt;&amp;gt;&amp;gt; secure elements. However I truly believe most of these points are a MUST have for any decent security. If you don&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt; assume the computer on which the transaction is crafted is compromised, then you don&amp;#39;t need a hardware wallet. If you&lt;br/&gt;&amp;gt;&amp;gt; assume it may be compromised, then the HW needs to be able to defend against those.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Revault does not plan on building hardware wallets, we hope existing and upcoming manufacturers will implement a strong&lt;br/&gt;&amp;gt;&amp;gt; security that we could use for the Revault protocol users. Vault users will likely hold very large sums and would be&lt;br/&gt;&amp;gt;&amp;gt; happy to pay a high premium for more secure HW. This will hopefully encourage existing players to keep on improving&lt;br/&gt;&amp;gt;&amp;gt; their devices and that will ultimately benefit us all.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Feel free to reply with your comments or adding suggestions, I am not a hardware wallet expert and would take criticism&lt;br/&gt;&amp;gt;&amp;gt; wit&lt;br/&gt;&amp;gt;&amp;gt; hout being offended.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Kind Regards,&lt;br/&gt;&amp;gt;&amp;gt; Kevin Loaec&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [1]: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-May/017835.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [2]: &lt;a href=&#34;https://github.com/re-vault/practical-revault/issues/59&#34;&gt;https://github.com/re-vault/practical-revault/issues/59&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [3]: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002425.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002425.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [4]: &lt;a href=&#34;https://btcguide.github.io/known-issues/verify-receive-address&#34;&gt;https://btcguide.github.io/known-issues/verify-receive-address&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [5]: &lt;a href=&#34;https://gitlab.com/lightning-signer/docs&#34;&gt;https://gitlab.com/lightning-signer/docs&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [6]: &lt;a href=&#34;https://shiftcrypto.ch/blog/how-nearly-all-personal-hardware-wallet-multisig-setups-are-insecure/&#34;&gt;https://shiftcrypto.ch/blog/how-nearly-all-personal-hardware-wallet-multisig-setups-are-insecure/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210117/8d1d6722/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210117/8d1d6722/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:28:14Z</updated>
  </entry>

  <entry>
    <id>https://yabu.me/nevent1qqsrua9hdd3wz4nzf3kylc8za673a7yz6f76q625uxqjvcpmj0gsplgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyx7c47q</id>
    
      <title type="html">📅 Original date posted:2020-05-08 📝 Original message:The ...</title>
    
    <link rel="alternate" href="https://yabu.me/nevent1qqsrua9hdd3wz4nzf3kylc8za673a7yz6f76q625uxqjvcpmj0gsplgzyqxg4aff865vgreksmezv6t8fcxpz65wjfr8zcujn4ek42y3klkwyx7c47q" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0nsawxrxr59wwds06yfhhjen4a4r9dmn4wpnparajxzlltg85mgcakuhns&#39;&gt;nevent1q…uhns&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-08&lt;br/&gt;📝 Original message:The fee bumping construction I described in the previous post is potentially vulnerable&lt;br/&gt;to transaction pinning.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;We shared a SINGLE | ANYONECANPAY signature for the first (and only) input of revaulting&lt;br/&gt;transactions to allow any party to append an input and an output in order to bump the&lt;br/&gt;transaction fees.&lt;br/&gt;An user would either append an input signed with ALL, or replace their SINGLE | ANYONECANPAY&lt;br/&gt;signature with one using ALL before broadcasting the transaction.&lt;br/&gt;&lt;br/&gt;This allowed one party to decrease the transaction fees down to the minimum relay fees,&lt;br/&gt;and possibly pin the transaction by spending their added single-pubkey output.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;We now exchange ALL | ANYONECANPAY signatures for revaulting transactions to restrict the creation&lt;br/&gt;of a new output only spendable by one party.&lt;br/&gt;The fee bumping is now done in two stages (to avoid consuming an entire utxo) :&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;       Unvaulting transaction&lt;br/&gt;  --------------------------------&lt;br/&gt; | vault prevout | unvault output |------------------&lt;br/&gt;  --------------------------------                    \&lt;br/&gt;                                                       \             Revaulting transaction&lt;br/&gt;                                                        \  ---------------------------------------&lt;br/&gt;                                                          | unvault prevout    | new vault output |&lt;br/&gt;                                                           ---------------------------------------&lt;br/&gt;                                                          | fee bump prevout   |&lt;br/&gt;                                                         / --------------------&lt;br/&gt;       Single-party wallet transaction                  /&lt;br/&gt;  -----------------------------------------            /&lt;br/&gt; | wallet prevout | fee bump output        |----------&lt;br/&gt;  -----------------------------------------&lt;br/&gt;                  | wallet change output   |&lt;br/&gt;                   ------------------------&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This construction isn&amp;#39;t perfect as a malicious party could still pin its fee bumping transaction&lt;br/&gt;and prevent the other stakeholders from **immediatly** replacing this input, because of the second&lt;br/&gt;rule of BIP125 :&lt;br/&gt;&amp;gt; The replacement transaction may only include an unconfirmed input if that input was included&lt;br/&gt;&amp;gt; in one of the original transactions.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;However, I think it&amp;#39;s preferable as :&lt;br/&gt;- Depending on the unvault CSV, the honest party might pay a high fee to have the fee-bumping&lt;br/&gt;  transaction confirm in one of the next two blocks, and then use this now confirmed output as an&lt;br/&gt;  additional input of the revaulting transaction.&lt;br/&gt;- If the amount is consequent, the honest party may sacrifice an entire confirmed utxo from its&lt;br/&gt;  wallet (effectively skipping the fee bumping transaction).&lt;br/&gt;- It&amp;#39;s realistic to expect, for such an application, users&amp;#39; wallets to have a pool of confirmed&lt;br/&gt;  utxo that might be sacrificed if the amount is consequent AND the CSV is so small (which is&lt;br/&gt;  anyway a bad idea in the first place) that you are not sure to have the fee bumping transaction&lt;br/&gt;  to be confirmed before its maturity, ).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Antoine / Darosior&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;Le vendredi, avril 24, 2020 5:00 PM, darosior &amp;lt;darosior at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Kevin Loaec and I have been working on a new multiparty vault architecture and I think it reached the point where we’d welcome some feedback.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Intended usage and limitations&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ===============================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The aim is to secure the shared storage of coins without relying on a trusted third party and by disincentivizing theft attempts, while not restricting the usage of the funds for day-to-day operations.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Revault uses N-of-N multisigs and thus does not protect against intentional locking of funds (such as refusal to sign, or key erasure). Therefore it assumes its users (likely companies with already on-going agreements between shareholders) to be able to solve intentional blockage outside the Bitcoin network (such as through legal contracts).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The actual architecture&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ========================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We called it revault as it relies on pre-signed and revocable (revaultable) transactions.&lt;br/&gt;&amp;gt; The users pre-sign a transaction chain as the only used way to spend from a vault output.&lt;br/&gt;&amp;gt; They would have signed a set of transactions to either cancel a spend attempt or lock the funds for some time beforehand. The funds are always better locked for a long time than stolen.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The transactions&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ----------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The system is composed of mainly 6 transaction types (with N the number of stakeholders) :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -   The “vault” transaction which pays to a N-of-N, by which funds are received.&lt;br/&gt;&amp;gt; -   The “emergency” transaction, which spends the vault output and pays to a [here goes a&lt;br/&gt;&amp;gt;     high value]-days timelocked N-of-N (with N differents but statics keys, assumed to be physically stored in hard(/long) to access locations).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -   The “unvault” transaction, which spends the vault output and pays to [either the vault’s N-of-N, or after X blocks to a subset of the stakeholders AND a co-signing server].&lt;br/&gt;&amp;gt; -   The “unvault emergency” transaction, which spends the unvault output and pays to the&lt;br/&gt;&amp;gt;     same script as the first emergency transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -   The “cancel” transaction, which spends the unvault output and pays back to a new vault utxo.&lt;br/&gt;&amp;gt; -   The “spend” transaction, which spends the unvault output and pays to an external address (potentially contained in a list of destinations previously agreed-upon by all the stakeholders).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     The process&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The stakeholders would exchange the signatures of all the revaulting transactions after the reception of a new vault utxo, and then exchange the signatures of the unvaulting transaction. Before doing so, the coins are not available to be spent.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to spend a vault, the subset of the stakeholders who manages the funds (for example, the traders of an investment fund) would make the cosigning server (which only signs a transaction once) sign the spend transaction.&lt;br/&gt;&amp;gt; They would then present it to the other watchers which would ACK the spend (if paying to an authorized address), and broadcast the &amp;#34;unvault&amp;#34; transaction. Finally, and after X blocks have passed they would be able to broadcast the spend transaction.&lt;br/&gt;&amp;gt; If a stakeholder&amp;#39;s watcher detects an unvaulting transaction without knowing about its child “spend” transaction, it triggers an automatic “cancel” transaction (not encumbered by the timelock).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At any point -even in the middle of a spend- any of the stakeholder can trigger an emergency transaction if anything nasty is happening.&lt;br/&gt;&amp;gt; Any network watcher noticing the broadcast of an emergency transaction would also broadcast all other vaults’ emergency transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This network watching and revaulting power can be replicated (watchtowers) to further decrease the reliance on a single machine or internet access.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Pre-signed transactions fun&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ---------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to avoid our security assumptions to be as weak as betting on the value of the feerate in the future, stakeholders exchange SINGLE | ANYONECANPAY signatures for the revaulting transactions and append their own as SIGHASH_ALL before broadcasting.&lt;br/&gt;&amp;gt; They can add another input (and potentially output) in order to bump the fees before doing so.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We protect ourselves from the bug by leveraging the fact the revaulting (namely the &amp;#34;emergency&amp;#34;, &amp;#34;unvault emergency&amp;#34;, and &amp;#34;cancel&amp;#34; transactions) only have strictly one input and one output. The change being part of the spend transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In addition, revaulting transactions may signal for RBF to cover a feerate increase after the broadcast. Anyhow, a significant breathing room can be added to the feerate as these transactions are not intended to be used under normal circumstances.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Worth mentioning&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The original draft of this architecture was first designed by Kevin Loaec who was hired by NOIA to do so. It was inspired by Bryan Bishop’s single-party vault architecture (&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-August/017229.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-August/017229.html&lt;/a&gt;), who published a demo implementation of it last week (&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-April/017755.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-April/017755.html&lt;/a&gt;, &lt;a href=&#34;https://github.com/kanzure/python-vaults&#34;&gt;https://github.com/kanzure/python-vaults&lt;/a&gt;).&lt;br/&gt;&amp;gt; Kevin and I since detailed and reworked our new architecture together.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A WIP draft / demo / PoC / [enter adjective with “insecure” meaning] implementation is available at &lt;a href=&#34;https://github.com/re-vault/revault-demo&#34;&gt;https://github.com/re-vault/revault-demo&lt;/a&gt;, which uses 4 stakeholders, 2 or 3 traders (doing the day-to-day moves) a CSV of 6 blocks for the unvault script and a CSV of ~1 month for the emergency scripts.&lt;br/&gt;&amp;gt; The transactions used are detailed in the doc/ directory of the same repo, and are coded in the revault/transactions/ module.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The “revault” name was coined by Lea Thiebaut (Lexyon).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for reading,&lt;br/&gt;&amp;gt; Antoine / Darosior
    </content>
    <updated>2023-06-07T18:24:31Z</updated>
  </entry>

</feed>