<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated></updated>
  <generator>https://nostr.ae</generator>

  <title>Nostr notes by </title>
  <author>
    <name></name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://nostr.ae/npub1f2w9pm06c4k9ay8rst7757thahg2tfrtd0n645zxrtsqwhvaysrswydpll.rss" />
  <link href="https://nostr.ae/npub1f2w9pm06c4k9ay8rst7757thahg2tfrtd0n645zxrtsqwhvaysrswydpll" />
  <id>https://nostr.ae/npub1f2w9pm06c4k9ay8rst7757thahg2tfrtd0n645zxrtsqwhvaysrswydpll</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqs8ddqsdrhz3use6fynsafza24upczcywj4vwup3h0kgk9ycuufv4gzyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqw307754</id>
    
      <title type="html">📅 Original date posted:2023-02-07 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8ddqsdrhz3use6fynsafza24upczcywj4vwup3h0kgk9ycuufv4gzyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqw307754" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgssnq2sgyfv77r768tzwnqugpzg2l2wp6xwmjrtxx49gm36p8aqqhcrtvz&#39;&gt;nevent1q…rtvz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-07&lt;br/&gt;🗒️ Summary of this message: Taproot/MAST spends have variable size, allowing for unfair fee extraction in multiparty transactions. Mitigations include RBF, minimum weight before signing, and a trusted coordinator.&lt;br/&gt;📝 Original message:&amp;gt; Since Taproot (more generally any kind of MAST) spends have variable size&lt;br/&gt;&lt;br/&gt;Isn&amp;#39;t this the case with any arbitrary script execution? Non-taproot&lt;br/&gt;P2(W)SH can also have multiple (OP_IF-gated) script branches. For example&lt;br/&gt;with `&amp;lt;pk&amp;gt; CHECKSIG IF SHA256 &amp;lt;hash&amp;gt; EQUALVERIFY ENDIF`, Mallory can&lt;br/&gt;initially demonstrate that she can spend with `FALSE &amp;lt;sig&amp;gt;`, then later&lt;br/&gt;switch to spending with `&amp;lt;some large preimage&amp;gt; TRUE &amp;lt;sig&amp;gt;`. (or I guess&lt;br/&gt;even `DROP &amp;lt;pk&amp;gt; CHECKSIG`, then just switch from DROPing a 0 length item to&lt;br/&gt;a larger one)&lt;br/&gt;&lt;br/&gt;It seems that supporting arbitrary scripts would require analyzing them and&lt;br/&gt;verifying that all spend paths are acceptable, with or without Taproot/MAST.&lt;br/&gt;&lt;br/&gt;If the goal is to only allow registering simple singlesig-encumbered UTXOs&lt;br/&gt;like P2(W)PKH, the participants could be asked to prove that their P2TR&lt;br/&gt;output commits to an unspendable script path [0].&lt;br/&gt;&lt;br/&gt;shesek&lt;br/&gt;&lt;br/&gt;[0]&lt;br/&gt;&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_ref-23-0&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_ref-23-0&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Feb 7, 2023 at 4:59 AM Yuval Kogman via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; ## Summary&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since Taproot (more generally any kind of MAST) spends have variable size&lt;br/&gt;&amp;gt; which&lt;br/&gt;&amp;gt; depends on the path being used, the last such input to be signed in a&lt;br/&gt;&amp;gt; multiparty&lt;br/&gt;&amp;gt; transaction can always use a larger than estimated signature to unfairly&lt;br/&gt;&amp;gt; extract&lt;br/&gt;&amp;gt; a fee contribution from the other parties to the transaction (keeping the&lt;br/&gt;&amp;gt; absolute fees the same and reducing the feerate for the transaction).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Attack Scenario&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice et al wish to perform a multiparty transaction, such as a CoinJoin or&lt;br/&gt;&amp;gt; lightning dual funding at a relatively high feerate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Mallory has a P2TR output with a large script spend path, e.g. an ordinal&lt;br/&gt;&amp;gt; inscription commitment transaction output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Mallory registers this coin as an input into the multiparty transaction&lt;br/&gt;&amp;gt; with a&lt;br/&gt;&amp;gt; fee obligation calculated on the basis of a key spend. When all other&lt;br/&gt;&amp;gt; participants have provided signatures, the script spend path can be used.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since the absolute fee amount is already committed to by the provided&lt;br/&gt;&amp;gt; (`SIGHASH_ALL`) signatures but the total transaction weight is not,&lt;br/&gt;&amp;gt; Mallory can&lt;br/&gt;&amp;gt; broadcast any valid signatures up to the maximum standard weight and&lt;br/&gt;&amp;gt; minimum&lt;br/&gt;&amp;gt; relay fees, or in collusion with a miner, up to consensus limits.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This effectively steals a fee from Alice et al, as their signatures do not&lt;br/&gt;&amp;gt; commit to a feerate directly or indirectly.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Mitigations&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### RBF&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; All parties could negotiate a (series of) transaction(s) ahead of time at a&lt;br/&gt;&amp;gt; lower feerate, giving a lower bound minimum feerate that Mallory can force.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Minimum Weight Before Signing&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Enforcing a minimal weight for all non-witness data in the transaction&lt;br/&gt;&amp;gt; before&lt;br/&gt;&amp;gt; the transaction is considered fully constructed can limit the&lt;br/&gt;&amp;gt; effectiveness of&lt;br/&gt;&amp;gt; this attack, since the difference between the predicted weight and the&lt;br/&gt;&amp;gt; maximum&lt;br/&gt;&amp;gt; weight decreases.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Trusted Coordinator&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the centralized setting if BIP-322 ownership proofs are required for&lt;br/&gt;&amp;gt; participation and assuming the server can be trusted not to collude with&lt;br/&gt;&amp;gt; Mallory, the server can reject signatures that do not exercise the same&lt;br/&gt;&amp;gt; spend&lt;br/&gt;&amp;gt; path as the ownership proof, which makes the ownership proof a commitment&lt;br/&gt;&amp;gt; to the&lt;br/&gt;&amp;gt; spend weight of the input.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Reputation&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Multiparty protocols with publicly verifiable protocol transcripts can be&lt;br/&gt;&amp;gt; provided as weak evidence of a history of honest participation in&lt;br/&gt;&amp;gt; multiparty&lt;br/&gt;&amp;gt; transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A ring signature from keys used in the transaction or its transcript&lt;br/&gt;&amp;gt; committing&lt;br/&gt;&amp;gt; to the new proposed transaction can provide weak evidence for the honesty&lt;br/&gt;&amp;gt; of the&lt;br/&gt;&amp;gt; peer.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Such proofs are more compelling to an entity which has participated in&lt;br/&gt;&amp;gt; (one of)&lt;br/&gt;&amp;gt; the transcripts, or proximal transactions. Incentives are theoretically&lt;br/&gt;&amp;gt; aligned&lt;br/&gt;&amp;gt; if public coordinators publish these transcripts as a kind of server&lt;br/&gt;&amp;gt; reputation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Increasing Costliness&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A minimum feerate for the previous transaction or a minimum confirmation&lt;br/&gt;&amp;gt; age&lt;br/&gt;&amp;gt; (coindays destroyed implies time value, analogous to fidelity bonds) can be&lt;br/&gt;&amp;gt; required for inputs to be added, in order to make such attacks less&lt;br/&gt;&amp;gt; lucrative&lt;br/&gt;&amp;gt; (but there is still a positive payoff for the attacker).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Signature Ordering&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Signatures from potentially exploitative inputs can be required ahead of&lt;br/&gt;&amp;gt; legacy&lt;br/&gt;&amp;gt; or SegWit v0 ones. The prescribed order can be determined based on&lt;br/&gt;&amp;gt; reputation or&lt;br/&gt;&amp;gt; costliness as described in the previous paragraphs.&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;&lt;br/&gt;&amp;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/20230207/85947d66/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230207/85947d66/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:19:25Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqwppglm3ryru895v4ktvs9daqcsxtfx4q5d03s483hmh7k947qeszyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqwkjfdwg</id>
    
      <title type="html">📅 Original date posted:2022-05-07 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqwppglm3ryru895v4ktvs9daqcsxtfx4q5d03s483hmh7k947qeszyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqwkjfdwg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0j7s9xuequlpnwjgs4e3nec9uwp0tfzkr69vp83j7v5zdxgqeymqu2dsaa&#39;&gt;nevent1q…dsaa&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-07&lt;br/&gt;📝 Original message:On Sat, May 7, 2022 at 5:08 PM ZmnSCPxj via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt; * Even ***with*** `OP_CAT`, the following will enable non-recursive&lt;br/&gt;covenants without enabling recursive covenants:&lt;br/&gt;&amp;gt;  * `OP_CTV`, ...&lt;br/&gt;&amp;gt; * With `OP_CAT`, the following would enable recursive covenants:&lt;br/&gt;&amp;gt;  * `OP_CHECKSIGFROMSTACK`, ...&lt;br/&gt;&lt;br/&gt;Why does CTV&#43;CAT not enable recursive covenants while CSFS&#43;CAT does?&lt;br/&gt;&lt;br/&gt;CTV&#43;CAT lets you similarly assert against the outputs and verify that they&lt;br/&gt;match some dynamically constructed script.&lt;br/&gt;&lt;br/&gt;Is it because CTV does not let you have a verified copy of the input&amp;#39;s&lt;br/&gt;prevout scriptPubKey on the stack [0], while with OP_CSFS you can because&lt;br/&gt;the signature hash covers it?&lt;br/&gt;&lt;br/&gt;But you don&amp;#39;t actually need this for recursion. Instead of having the user&lt;br/&gt;supply the script in the witness stack and verifying it against the input&lt;br/&gt;to obtain the quine, the script can simply contain a copy of itself as an&lt;br/&gt;initial push (minus this push). You can then reconstruct the full script&lt;br/&gt;quine using OP_CAT, as a PUSH(&amp;lt;script&amp;gt;) followed by the literal &amp;lt;script&amp;gt;.&lt;br/&gt;&lt;br/&gt;When I started experimenting with recursive covenants on liquid, I started&lt;br/&gt;with the approach of verifying user-supplied witness data against the&lt;br/&gt;input. It ended up being quite complex and verbose with taproot, because&lt;br/&gt;you have to compute the tagged taptree hash from the tapscript and&lt;br/&gt;TWEAKVERIFY it against the prevout&amp;#39;s taproot output key (which also&lt;br/&gt;requires the internal key and parity flag, provided as two extra witness&lt;br/&gt;elements by the user).&lt;br/&gt;&lt;br/&gt;I then realized that it is much simpler to have the tapscript hold a copy&lt;br/&gt;of itself, that it&amp;#39;s as safe and that it reduces the witness size cost&lt;br/&gt;(because you don&amp;#39;t need to do the entire taproot dance to verify the&lt;br/&gt;tapscript), and switched to this approach.&lt;br/&gt;&lt;br/&gt;Here are two examples of recursive covenants using this approach that I&lt;br/&gt;played with (for liquid, rough sketches, very lightly tested and has some&lt;br/&gt;known issues. the $label thing is a scriptwiz notation and can be ignored):&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://gist.github.com/shesek/be910619b247ce5e1aedd84e9ba9db42&#34;&gt;https://gist.github.com/shesek/be910619b247ce5e1aedd84e9ba9db42&lt;/a&gt; (auction)&lt;br/&gt;&lt;a href=&#34;https://gist.github.com/shesek/ede9ca921a394580b23d301b8d84deea&#34;&gt;https://gist.github.com/shesek/ede9ca921a394580b23d301b8d84deea&lt;/a&gt; (listed&lt;br/&gt;price sale with royalty)&lt;br/&gt;(And here&amp;#39;s the second example written in Minsc:&lt;br/&gt;&lt;a href=&#34;https://min.sc/next/#gist=e1c9914b4cb940137122d6d30972c25c&#34;&gt;https://min.sc/next/#gist=e1c9914b4cb940137122d6d30972c25c&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;shesek&lt;br/&gt;&lt;br/&gt;[0] It does not cover it, and it cannot be done even by providing the full&lt;br/&gt;prev tx because the prevout txid is not covered either.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Sat, May 7, 2022 at 5:08 PM ZmnSCPxj via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Jorge,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks a lot for the many clarifications.&lt;br/&gt;&amp;gt; &amp;gt; Yeah, I forgot it wasn&amp;#39;t OP_CAT alone, but in combination with other&lt;br/&gt;&amp;gt; things.&lt;br/&gt;&amp;gt; &amp;gt; I guess this wouldn&amp;#39;t be a covenants proposal then.&lt;br/&gt;&amp;gt; &amp;gt; But simplicity would enable covenants too indeed, no?&lt;br/&gt;&amp;gt; &amp;gt; Or did I get that wrong too?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes, it would enable covenants.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, it could also enable *recursive* covenants, depending on what&lt;br/&gt;&amp;gt; introspection operations are actually implemented (though maybe not?&lt;br/&gt;&amp;gt; Russell O&amp;#39;Connor should be the one that answers this).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It is helpful to delineate between non-recursive covenants from recursive&lt;br/&gt;&amp;gt; covenants.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Even ***with*** `OP_CAT`, the following will enable non-recursive&lt;br/&gt;&amp;gt; covenants without enabling recursive covenants:&lt;br/&gt;&amp;gt;   * `OP_CTV`&lt;br/&gt;&amp;gt;   * `SIGHASH_ANYPREVOUT`&lt;br/&gt;&amp;gt; * With `OP_CAT`, the following would enable recursive covenants:&lt;br/&gt;&amp;gt;   * `OP_EVAL`&lt;br/&gt;&amp;gt;   * `OP_CHECKSIGFROMSTACK`&lt;br/&gt;&amp;gt;   * `OP_TX`/`OP_TXHASH`&lt;br/&gt;&amp;gt;   * ...possibly more.&lt;br/&gt;&amp;gt;     * It is actually *easier* to *design* an opcode which inadvertently&lt;br/&gt;&amp;gt; supports recursive covenants than to design one which avoids recursive&lt;br/&gt;&amp;gt; covenants.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Recursive covenants are very near to true Turing-completeness.&lt;br/&gt;&amp;gt; We want to avoid Turing-completeness due to the halting problem being&lt;br/&gt;&amp;gt; unsolvable for Turing-complete languages.&lt;br/&gt;&amp;gt; That is, given just a program, we cannot determine for sure if for all&lt;br/&gt;&amp;gt; possible inputs, it will terminate.&lt;br/&gt;&amp;gt; It is important in our context (Bitcoin) that any SCRIPT programs we write&lt;br/&gt;&amp;gt; *must* terminate, or else we run the risk of a DoS on the network.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A fair amount of this is theoretical crap, but if you want to split hairs,&lt;br/&gt;&amp;gt; recursive covenants are *not* Turing-complete, but are instead total&lt;br/&gt;&amp;gt; functional programming with codata.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As a very rough bastardization, a program written in a total functional&lt;br/&gt;&amp;gt; programming language with codata will always assuredly terminate.&lt;br/&gt;&amp;gt; However, the return value of a total functional programming language with&lt;br/&gt;&amp;gt; codata can be another program.&lt;br/&gt;&amp;gt; An external program (written in a Turing-complete language) could then&lt;br/&gt;&amp;gt; just keep invoking the interpreter of the total functional programming&lt;br/&gt;&amp;gt; language with codata (taking the output program and running it, taking&lt;br/&gt;&amp;gt; *its* output program and running it, ad infinitum, thus effectively able to&lt;br/&gt;&amp;gt; loop indefinitely.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Translated to Bitcoin transactions, a recursive covenant system can force&lt;br/&gt;&amp;gt; an output to be spent only if the output is spent on a transaction where&lt;br/&gt;&amp;gt; one of the outputs is the same covenant (possibly with tweaks).&lt;br/&gt;&amp;gt; Then an external program can keep passing the output program to the&lt;br/&gt;&amp;gt; Bitcoin SCRIPT interpreter --- by building transactions that spend the&lt;br/&gt;&amp;gt; previous output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This behavior is still of concern.&lt;br/&gt;&amp;gt; It may be possible to attack the network by eroding its supply, by such a&lt;br/&gt;&amp;gt; recursive covenant.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Common reactions:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * We can just limit the number of opcodes we can process and then fail it&lt;br/&gt;&amp;gt; if it takes too many operations!&lt;br/&gt;&amp;gt;   That way we can avoid DoS!&lt;br/&gt;&amp;gt;   * Yes, this indeed drops it from Turing-complete to total, possibly&lt;br/&gt;&amp;gt; total functional programming **without** codata.&lt;br/&gt;&amp;gt;     But if it is possible to treat data as code, it may drop it &amp;#34;total but&lt;br/&gt;&amp;gt; with codata&amp;#34; instead (i.e. recursive covenants).&lt;br/&gt;&amp;gt;     But if you want to avoid recursive covenants while allowing recursive&lt;br/&gt;&amp;gt; ones (i.e. equivalent to total without codata), may I suggest you instead&lt;br/&gt;&amp;gt; look at `OP_CTV` and `SIGHASH_ANYPREVOUT`?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * What is so wrong with total-with-codata anyway??&lt;br/&gt;&amp;gt;   So what if the recursive covenant could potentially consume all&lt;br/&gt;&amp;gt; Bitcoins, nobody will pay to it except as a novelty!!&lt;br/&gt;&amp;gt;   If you want to burn your funds, 1BitcoinEater willingly accepts it!&lt;br/&gt;&amp;gt;   * The burden of proof-of-safety is on the proposer, so if you have some&lt;br/&gt;&amp;gt; proof that total-with-codata is safe, by construction, then sure, we can&lt;br/&gt;&amp;gt; add opcodes that may enable recursive covenants, and add `OP_CAT` back in&lt;br/&gt;&amp;gt; too.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&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;&lt;br/&gt;&amp;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/20220508/4b8325a8/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220508/4b8325a8/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:09:18Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfh7dl3w6s37gynemz8nx3udgntddwwqqrag02007w9w4y53eqgzgzyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqwtsm5lu</id>
    
      <title type="html">📅 Original date posted:2022-05-01 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfh7dl3w6s37gynemz8nx3udgntddwwqqrag02007w9w4y53eqgzgzyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqwtsm5lu" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsysla7epxrjhju72jna30dpcaajeue2urpw86ucfygq0hgzun78xg46mjcy&#39;&gt;nevent1q…mjcy&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-01&lt;br/&gt;📝 Original message:&amp;gt; via `sha_sequences`&lt;br/&gt;&lt;br/&gt;Since you cannot expect txid stability with &amp;gt;1 inputs either way[0], it&lt;br/&gt;should be sufficient to commit just to the current input&amp;#39;s&lt;br/&gt;nSequence/scriptSig to get txid stability for single input transactions. I&lt;br/&gt;chatted with Jeremy about this and he appears to agree.&lt;br/&gt;&lt;br/&gt;Not committing to the nSequence of other inputs gives them the freedom to&lt;br/&gt;set it independently, so for example you can spend a CSV-encumbered output&lt;br/&gt;alongside the covenant. And there seems to be no downside to doing this [1].&lt;br/&gt;&lt;br/&gt;APO/APOAS already commits to the nSequence of the current input. And since&lt;br/&gt;APO is Taproot-only, the scriptSig of the covenant input is guarrnated to&lt;br/&gt;be empty, so it is also already committed to in a way.&lt;br/&gt;&lt;br/&gt;However, without committing to all the nSequences which implicitly commits&lt;br/&gt;to the number of inputs, the number has to be committed separately.&lt;br/&gt;&lt;br/&gt;So my suggestion is to explicitly commit to the number of inputs, instead&lt;br/&gt;of commiting to `sha_sequences`.&lt;br/&gt;&lt;br/&gt;Cheers&lt;br/&gt;shesek&lt;br/&gt;&lt;br/&gt;[0] the additional input(s) will be third-party malleable, since their&lt;br/&gt;prevouts can be replaced with an entirely different txid:vout&lt;br/&gt;[1] BIP 119&amp;#39;s rationale for committing to the nSequences is txid&lt;br/&gt;malleability:&lt;br/&gt;&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki#committing-to-the-sequences-hash&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki#committing-to-the-sequences-hash&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Sat, Apr 30, 2022 at 11:09 AM Nadav Ivgi &amp;lt;nadav at shesek.info&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi darosior,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It&amp;#39;s interesting to note that APOAS|SINGLE (with the ANYONECANPAY&lt;br/&gt;&amp;gt; behaviour and without covering the spent input index) has some interesting&lt;br/&gt;&amp;gt; uses for cases where the covenant only needs to restrict a single output&lt;br/&gt;&amp;gt; (so useful for e.g. vaults or spacechains, but not for batch channels or&lt;br/&gt;&amp;gt; congestion control).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For example in the vault use-case, it makes it possible to bump fees on&lt;br/&gt;&amp;gt; the unvault tx by adding more inputs and a change output, as well as&lt;br/&gt;&amp;gt; unvault multiple vaulted outputs in a single transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For spacechains, it makes it possible to add the spaceblock hash OP_RETURN&lt;br/&gt;&amp;gt; and pay fees directly in the tx chain, instead of having to use an&lt;br/&gt;&amp;gt; additional tx to prepare an output that gets spent in the tx chain  (see&lt;br/&gt;&amp;gt; the diagram in [0]).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; via `sha_sequences` and maybe also `sha_amounts`&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; CTV does not commit to the input amounts. This has some practical&lt;br/&gt;&amp;gt; implications:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. If it is committed, sending an even slightly incorrect amount will make&lt;br/&gt;&amp;gt; the covenant-encumbered spend path unusable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With CTV, sending a slightly lower amount results in slightly lower fees,&lt;br/&gt;&amp;gt; while any extra gets spent/burned on fees. The covenant spend path only&lt;br/&gt;&amp;gt; becomes unusable if the amount is too low to cover for the outputs (&#43;relay&lt;br/&gt;&amp;gt; fee for it to also be standard).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2. The ability to allow for additional inputs with unknown amounts makes&lt;br/&gt;&amp;gt; it possible to fee-bump the covenant spending transaction (with whole utxos&lt;br/&gt;&amp;gt; and no change). You can have one tapleaf for spending the covenant output&lt;br/&gt;&amp;gt; alone, and another one for attaching an extra fee input to it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This also makes it possible to resolve the under-payment issue described&lt;br/&gt;&amp;gt; in (1), by adding an input that covers the original intended amount.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So my suggestion would be to either not cover `sha_amounts` in the msg&lt;br/&gt;&amp;gt; hash, or to make it optional behind a flag.&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://github.com/fiatjaf/simple-ctv-spacechain&#34;&gt;https://github.com/fiatjaf/simple-ctv-spacechain&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;&lt;br/&gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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.&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; 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;&lt;br/&gt;&amp;gt;&amp;gt; Given the interest in, and demand for, both simple covenants and better&lt;br/&gt;&amp;gt;&amp;gt; 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)&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin users.&lt;br/&gt;&amp;gt;&amp;gt; Actually i&amp;#39;d also be interested in knowing if people would oppose the&lt;br/&gt;&amp;gt;&amp;gt; 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;&lt;br/&gt;&amp;gt;&amp;gt; [0] That is, to not commit to the other inputs of the transaction (via&lt;br/&gt;&amp;gt;&amp;gt; `sha_sequences` and maybe also&lt;br/&gt;&amp;gt;&amp;gt; `sha_amounts`). Cf&lt;br/&gt;&amp;gt;&amp;gt; &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;&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;&amp;gt;&amp;gt;&lt;br/&gt;&amp;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/20220501/515b1504/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220501/515b1504/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:08:53Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsze6e3epvxxzuygcqc2c42t2aytxwq0kjmypmw7drqxttukz4c84szyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqwv57lwx</id>
    
      <title type="html">📅 Original date posted:2022-04-20 📝 Original message:&amp;gt; I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsze6e3epvxxzuygcqc2c42t2aytxwq0kjmypmw7drqxttukz4c84szyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqwv57lwx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdg829p5kww7fymzxmhvy7aqfkf4qq8gu2e5xaqc7rt7awjzj04rc7a9ct7&#39;&gt;nevent1q…9ct7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-20&lt;br/&gt;📝 Original message:&amp;gt; I didn&amp;#39;t think DROP/1 is necessary here? Doesn&amp;#39;t leaving the 32 byte hash&lt;br/&gt;on the stack evaluate as true?&lt;br/&gt;&lt;br/&gt;Not with Taproot&amp;#39;s CLEANSTACK rule. It can make sense to always use `DROP&lt;br/&gt;OP_1` even outside of Taproot, just to keep things consistent and to avoid&lt;br/&gt;potential errors when switching from non-Taproot to Taproot. FWIW that&amp;#39;s&lt;br/&gt;what I found myself doing when playing with CTV in P2WSH&lt;br/&gt;&lt;br/&gt;On Wed, Apr 20, 2022 at 5:31 AM Anthony Towns via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Thu, Feb 17, 2022 at 01:58:38PM -0800, Jeremy Rubin via bitcoin-dev&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; AJ Wrote (in another thread):&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;   I&amp;#39;d much rather see some real&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;   third-party experimentation *somewhere* public first, and Jeremy&amp;#39;s&lt;br/&gt;&amp;gt; CTV&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;   signet being completely empty seems like a bad sign to me.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There&amp;#39;s now been some 2,200 txs on CTV signet, of which (if I haven&amp;#39;t&lt;br/&gt;&amp;gt; missed anything) 317 have been CTV spends:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - none have been bare CTV (ie, CTV in scriptPubKey directly, not via&lt;br/&gt;&amp;gt;    p2sh/p2wsh/taproot)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - none have been via p2sh&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - 3 have been via taproot:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://explorer.ctvsignet.com/tx/f73f4671c6ee2bdc8da597f843b2291ca539722a168e8f6b68143b8c157bee20&#34;&gt;https://explorer.ctvsignet.com/tx/f73f4671c6ee2bdc8da597f843b2291ca539722a168e8f6b68143b8c157bee20&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://explorer.ctvsignet.com/tx/7e4ade977db94117f2d7a71541d87724ccdad91fa710264206bb87ae1314c796&#34;&gt;https://explorer.ctvsignet.com/tx/7e4ade977db94117f2d7a71541d87724ccdad91fa710264206bb87ae1314c796&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://explorer.ctvsignet.com/tx/e05d828bf716effc65b00ae8b826213706c216b930aff194f1fb2fca045f7f11&#34;&gt;https://explorer.ctvsignet.com/tx/e05d828bf716effc65b00ae8b826213706c216b930aff194f1fb2fca045f7f11&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    The first two of these had alternative merkle paths, the last didn&amp;#39;t.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - 314 have been via p2wsh&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://explorer.ctvsignet.com/tx/62292138c2f55713c3c161bd7ab36c7212362b648cf3f054315853a081f5808e&#34;&gt;https://explorer.ctvsignet.com/tx/62292138c2f55713c3c161bd7ab36c7212362b648cf3f054315853a081f5808e&lt;/a&gt;&lt;br/&gt;&amp;gt;    (don&amp;#39;t think there&amp;#39;s any meaningfully different examples?)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As far as I can see, all the scripts take the form:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   [PUSH 32 bytes] [OP_NOP4] [OP_DROP] [OP_1]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (I didn&amp;#39;t think DROP/1 is necessary here? Doesn&amp;#39;t leaving the 32 byte&lt;br/&gt;&amp;gt; hash on the stack evaluate as true? I guess that means everyone&amp;#39;s using&lt;br/&gt;&amp;gt; sapio to construct the txs?)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t think there&amp;#39;s any demos of jamesob&amp;#39;s simple-ctv-vault [0], which&lt;br/&gt;&amp;gt; I think uses a p2wsh of &amp;#34;IF n CSV DROP hotkey CHECKSIG ELSE lockcoldtx CTV&lt;br/&gt;&amp;gt; ENDIF&amp;#34;, rather than taproot branches.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0] &lt;a href=&#34;https://github.com/jamesob/simple-ctv-vault&#34;&gt;https://github.com/jamesob/simple-ctv-vault&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Likewise I don&amp;#39;t think there&amp;#39;s any examples of &amp;#34;this CTV immediately;&lt;br/&gt;&amp;gt; or if fees are too high, this other CTV that pays more fees after X&lt;br/&gt;&amp;gt; days&amp;#34;, though potentially they could be hidden in the untaken taproot&lt;br/&gt;&amp;gt; merkle branches.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t think there&amp;#39;s any examples of two CTV outputs being combined&lt;br/&gt;&amp;gt; and spent in a single transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t see any txs with nSequence set meaningfully; though most (all?)&lt;br/&gt;&amp;gt; of the CTV spends seem to set nSequence to 0x00400000 which I think&lt;br/&gt;&amp;gt; doesn&amp;#39;t have a different effect from 0xfffffffe?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That looks to me like there&amp;#39;s still not much practical (vs theoretical)&lt;br/&gt;&amp;gt; exploration of CTV going on; but perhaps it&amp;#39;s an indication that CTV&lt;br/&gt;&amp;gt; could be substantially simplified and still get all the benefits that&lt;br/&gt;&amp;gt; people are particularly eager for.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I am unsure that &amp;#34;learning in public&amp;#34; is required --&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For a consensus system, part of the learning is &amp;#34;this doesn&amp;#39;t seem that&lt;br/&gt;&amp;gt; interesting to me; is it actually valuable enough to others that the&lt;br/&gt;&amp;gt; change is worth the risk it imposes on me?&amp;#34; and that&amp;#39;s not something&lt;br/&gt;&amp;gt; you can do purely in private.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One challenge with building a soft fork is that people don&amp;#39;t want to&lt;br/&gt;&amp;gt; commit to spending time building something that relies on consensus&lt;br/&gt;&amp;gt; features and run the risk that they might never get deployed. But the&lt;br/&gt;&amp;gt; reverse of that is also a concern: you don&amp;#39;t want to deploy consensus&lt;br/&gt;&amp;gt; changes and run the risk that they won&amp;#39;t actually turn out to be useful.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or, perhaps, to &amp;#34;meme-ify&amp;#34; it -- part of the &amp;#34;proof of work&amp;#34; for deploying&lt;br/&gt;&amp;gt; a consensus change is actually proving that it&amp;#39;s going to be useful.&lt;br/&gt;&amp;gt; Like sha256 hashing, that does require real work, and it might turn out&lt;br/&gt;&amp;gt; to be wasteful.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; aj&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;&lt;br/&gt;&amp;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/20220420/5f867336/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220420/5f867336/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T23:07:24Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszry82gsg4hf3u6ryfley9mtdjk7avnkxqwxkn8k9gm92qnpe0zuqzyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqw2svamc</id>
    
      <title type="html">📅 Original date posted:2020-08-21 📝 Original message:Having ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszry82gsg4hf3u6ryfley9mtdjk7avnkxqwxkn8k9gm92qnpe0zuqzyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqw2svamc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsz72vv798ce2dffsqedrc5vgc5l9djxatez9hw0de3plpydtmqceca3pg3e&#39;&gt;nevent1q…pg3e&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-08-21&lt;br/&gt;📝 Original message:Having large portions of the network using a different minrelayfee could&lt;br/&gt;make it easier to reliably get different parts of the network to accept&lt;br/&gt;different conflicting transactions into their mempools, which could&lt;br/&gt;potentially be used to double-spend unconfirmed non-rbf transactions with&lt;br/&gt;more ease. Node operators that accept unconfirmed payments with a&lt;br/&gt;minrelayfee that&amp;#39;s higher than what other nodes/miners are typically&lt;br/&gt;accepting would be at risk.&lt;br/&gt;&lt;br/&gt;Relying on unconfirmed transactions is of course discouraged so I&amp;#39;m not&lt;br/&gt;sure how much weight this should be given if at all, but I thought it was&lt;br/&gt;at least worth bringing up.&lt;br/&gt;&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Fri, Aug 21, 2020 at 11:00 AM Dan Bryant via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; It&amp;#39;s been 5 years since minrealytxfee was lowered.  At the time&lt;br/&gt;&amp;gt; bitcoin was trading for $255 and it was agreed that the fee of 5000&lt;br/&gt;&amp;gt; sat/vkB was too high.  It was lowered to 1000 sat/vkB.  In regards to&lt;br/&gt;&amp;gt; how much anti-DoS protection that provided, it comes out to $0.00255 /&lt;br/&gt;&amp;gt; vkB in USD terms.  To have parity with the last reduction, we would&lt;br/&gt;&amp;gt; need to reduce minrealytxfee to 22 sat/vKB, though an even more&lt;br/&gt;&amp;gt; conservative reduction to 100 or 50 sat/vKB would be welcome.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With the growing adoption of LN, there is a need for ultra-low-fee&lt;br/&gt;&amp;gt; on-chain TXNs.  Having these queue and confirm overnight, or even&lt;br/&gt;&amp;gt; waiting until the Sunday lull would still probably be welcome to many&lt;br/&gt;&amp;gt; users.  The fact that the mempool is going empty at least every week&lt;br/&gt;&amp;gt; indicates that miners have not reached the floor of what they are&lt;br/&gt;&amp;gt; willing to mine.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; About 2 years ago there was a PR (#13922) to try to make a reduction&lt;br/&gt;&amp;gt; from 1000 to 200 sat/vkB.  It was widely accepted but the submitter&lt;br/&gt;&amp;gt; eventually closed it in favor of PR #13990.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If minrelaytxfee is already parameterized and configurable in&lt;br/&gt;&amp;gt; bitcoin.conf, how could it be detrimental to operation of a node to&lt;br/&gt;&amp;gt; change the default?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; References:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/commit/9e93640be6c49fa1505ba5c5df8c89210da5a6e4&#34;&gt;https://github.com/bitcoin/bitcoin/commit/9e93640be6c49fa1505ba5c5df8c89210da5a6e4&lt;/a&gt;&lt;br/&gt;&amp;gt; * &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/13922&#34;&gt;https://github.com/bitcoin/bitcoin/pull/13922&lt;/a&gt;&lt;br/&gt;&amp;gt; * &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/13990&#34;&gt;https://github.com/bitcoin/bitcoin/pull/13990&lt;/a&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;&lt;br/&gt;&amp;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/20200821/fb241441/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200821/fb241441/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:26:36Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0nc2cxydup2hqq39aq5hkuh33spud949k7wu5q9dvsz94pvurmrczyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqwn5myfg</id>
    
      <title type="html">📅 Original date posted:2020-06-25 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0nc2cxydup2hqq39aq5hkuh33spud949k7wu5q9dvsz94pvurmrczyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqwn5myfg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgwhp67fpv7pa6p3qwpssfmtz9f46vhy2nrm0evn8grlghepd3ggsxmwc0e&#39;&gt;nevent1q…wc0e&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-25&lt;br/&gt;📝 Original message:Hi ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;You are of course correct. I had considered the effect of reorgs, but the&lt;br/&gt;email seemed to be getting too lengthy to mention that too.&lt;br/&gt;&lt;br/&gt;You would need a few spare blocks in which Bob won&amp;#39;t be accused of bribery&lt;br/&gt;as a safety margin, which does reduce the time frame in which Alice can get&lt;br/&gt;her transaction confirmed in order to have a valid bribery fraud. This&lt;br/&gt;seems workable if the time frame was long enough (over a few hours should&lt;br/&gt;be sufficient, assuming we consider reorgs of over 3-4 blocks to be&lt;br/&gt;unlikely), but could indeed be problematic if the time frame is already&lt;br/&gt;short to begin with.&lt;br/&gt;&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Thu, Jun 25, 2020 at 7:04 AM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Nadav,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I and some number of Lightning devs consider this to be sufficient&lt;br/&gt;&amp;gt; disincentive to Bob not attacking in the first place.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; An additional disincentive could be introduced in the form of bribery&lt;br/&gt;&amp;gt; proofs for failed attempts.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If we assume that &amp;#34;honest&amp;#34; users of the LN protocol won&amp;#39;t reveal their&lt;br/&gt;&amp;gt; timelocked transactions before reaching the timelock expiry (they shouldn&amp;#39;t&lt;br/&gt;&amp;gt; anyway because standard full node implementations won&amp;#39;t relay them), we can&lt;br/&gt;&amp;gt; prove that Bob attempted bribery and failed to an outside observer by&lt;br/&gt;&amp;gt; showing Bob&amp;#39;s signed timelocked transaction, spending an output that was in&lt;br/&gt;&amp;gt; reality spent by a different transaction prior to the locktime expiry,&lt;br/&gt;&amp;gt; which should not be possible if Bob had waited.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Unfortunately this could be subject to an inversion of this attack.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice can wait for the timelock to expire, then bribe miners to prevent&lt;br/&gt;&amp;gt; confirmation of the Bob timelocked transaction, getting the Alice&lt;br/&gt;&amp;gt; hashlocked transaction confirmed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now of course you do mention &amp;#34;prior to the locktime expiry&amp;#34; but there is&lt;br/&gt;&amp;gt; now risk at around locktime.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Particularly, &amp;#34;natural&amp;#34; orphaned blocks and short-term chainsplits can&lt;br/&gt;&amp;gt; exist.&lt;br/&gt;&amp;gt; Bob might see that the locktime has arrived and broadcast the signed&lt;br/&gt;&amp;gt; timelocked transaction, then Alice sees the locktime has not yet arrived&lt;br/&gt;&amp;gt; (due to short-term chainsplits/propagation delays) and broadcast the signed&lt;br/&gt;&amp;gt; hashlocked transaction, then in the end the Alice side of the short-term&lt;br/&gt;&amp;gt; chainsplit is what solidifies into reality due to random chance on which&lt;br/&gt;&amp;gt; miner wins which block.&lt;br/&gt;&amp;gt; Then Bob can now be accused of bribery, even though it acted innocently;&lt;br/&gt;&amp;gt; it broadcasted the timelock branch due to a natural chainsplit but Alice&lt;br/&gt;&amp;gt; hashlocked branch got confirmed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Additional complications can be added on top to help mitigate this edge&lt;br/&gt;&amp;gt; case but more complex == worse in general.&lt;br/&gt;&amp;gt; For example it could &amp;#34;prior to locktime expiry&amp;#34; can ignore a few blocks&lt;br/&gt;&amp;gt; before the actual timelock, but this might allow Bob to mount the attack by&lt;br/&gt;&amp;gt; initiating its bribery behavior earlier by those few blocks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Finally, serious attackers would just use new pseudonyms, the important&lt;br/&gt;&amp;gt; thing is to make pseudonyms valuable and costly to lose, so it is&lt;br/&gt;&amp;gt; considered sufficient that LN nodes need to have some commitment to the LN&lt;br/&gt;&amp;gt; in the form of actual channels (which are valuable, potentially&lt;br/&gt;&amp;gt; money-earning constructs, and costly to set up).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Other HTLC-using systems, such as the &amp;#34;SwapMarket&amp;#34; being proposed by Chris&lt;br/&gt;&amp;gt; Belcher, could use similar disincentivizing; I know Chris is planning a&lt;br/&gt;&amp;gt; fidelity bond system for SwapMarket makers, for example, which would mimic&lt;br/&gt;&amp;gt; the properties of LN channels (costly to set up, money-earning).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;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/20200625/b7933c5a/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200625/b7933c5a/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:25:39Z</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdjulpas47yaqhmxs3yw6q88x47ve2hwrdj0zrwyzj0twy6xetpzqzyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqw0ahp4u</id>
    
      <title type="html">📅 Original date posted:2020-06-25 📝 Original message:&amp;gt; I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdjulpas47yaqhmxs3yw6q88x47ve2hwrdj0zrwyzj0twy6xetpzqzyp9fc58dltzkch5suwp0m6newlkapfdydd4702ksgcdwqp6an5jqw0ahp4u" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszkfae9ssxkdmu7y4fxenzrxp25atdr04wlpjxv2yerjd5230fw7gfrk7sx&#39;&gt;nevent1q…k7sx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-25&lt;br/&gt;📝 Original message:&amp;gt; I and some number of Lightning devs consider this to be sufficient&lt;br/&gt;disincentive to Bob not attacking in the first place.&lt;br/&gt;&lt;br/&gt;An additional disincentive could be introduced in the form of bribery&lt;br/&gt;proofs for failed attempts.&lt;br/&gt;&lt;br/&gt;If we assume that &amp;#34;honest&amp;#34; users of the LN protocol won&amp;#39;t reveal their&lt;br/&gt;timelocked transactions before reaching the timelock expiry (they shouldn&amp;#39;t&lt;br/&gt;anyway because standard full node implementations won&amp;#39;t relay them), we can&lt;br/&gt;prove that Bob attempted bribery and failed to an outside observer by&lt;br/&gt;showing Bob&amp;#39;s signed timelocked transaction, spending an output that was in&lt;br/&gt;reality spent by a different transaction prior to the locktime expiry,&lt;br/&gt;which should not be possible if Bob had waited.&lt;br/&gt;&lt;br/&gt;These proofs would be gossiped, and lightning network participants could&lt;br/&gt;choose not to peer with Bob when they see them. This might require some&lt;br/&gt;sort of a scoring/reputation scheme that makes it harder for Bob to attack&lt;br/&gt;with new throw-away identities to be effective. (i.e. limiting your&lt;br/&gt;exposure to peers to some BTC amount based on their historical public&lt;br/&gt;channels records, using fidelity bonds, etc.)&lt;br/&gt;&lt;br/&gt;Bob could still send these bribery transactions privately to selected&lt;br/&gt;miners, but not making them public would greatly reduce the participating&lt;br/&gt;miners&amp;#39; confidence that there is enough participating hashpower for the&lt;br/&gt;attack to be profitable.&lt;br/&gt;&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Thu, Jun 25, 2020 at 4:38 AM ZmnSCPxj via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Stanga et al,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Hi ZmnSCPxj,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Thank you for taking the time to respond, these are very good points.&lt;br/&gt;&amp;gt; Responses inline.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; On Tue, Jun 23, 2020 at 12:48 PM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Good morning Itay, Ittay, and Matan,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I believe an unstated assumption in Bitcoin is that miners are&lt;br/&gt;&amp;gt; short-sighted.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The reasoning for this assumption is:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; * Deployment of new mining hardware controlled by others may occur&lt;br/&gt;&amp;gt; at any time you do not control.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   * Thus, any transactions you leave on the table are potentially&lt;br/&gt;&amp;gt; taken by somebody else and not by you.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   * Sudden changes in hashpower distribution may reduce your&lt;br/&gt;&amp;gt; expected future earnings, so any future theoretical earnings should be&lt;br/&gt;&amp;gt; discounted (*in addition to* expected return-on-investment on getting money&lt;br/&gt;&amp;gt; you can invest *now*).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Our analysis assumes constant difficulty, i.e., no significant changes&lt;br/&gt;&amp;gt; of the miners set. Indeed, hash-rate changes typically occur at a much&lt;br/&gt;&amp;gt; larger granularity than your average HTLC timeout. For instance, we noticed&lt;br/&gt;&amp;gt; plenty of lightning nodes use timeouts of a day. So, we do not consider&lt;br/&gt;&amp;gt; optimization at infinity, just a day ahead, and within this time frame all&lt;br/&gt;&amp;gt; the factors you mentioned are not expected to dramatically change.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; That being said, it would be interesting to analyze the effect of&lt;br/&gt;&amp;gt; miners joining during the HTLC duration. Intuitively, this shouldn’t affect&lt;br/&gt;&amp;gt; the results, as those new miners have the same incentive to wait for the&lt;br/&gt;&amp;gt; higher-paying tx.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We already know that hashrate tends to trend upwards, and that we do not&lt;br/&gt;&amp;gt; expect hashrate to fall except for occasional transients.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The expectation is not that new miners have different incentives.&lt;br/&gt;&amp;gt; Instead, the expectation is that current miners discount future possible&lt;br/&gt;&amp;gt; gains because in the future, they expect to have less hashrate share than&lt;br/&gt;&amp;gt; right now.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The only trustless way for Bob to bribe miners into deferring Alice tx is&lt;br/&gt;&amp;gt; to attach the bribe to the future confirmation of the Bob tx, thus Bob is&lt;br/&gt;&amp;gt; offering future-coins, not present-coins like Alice can offer, and the fact&lt;br/&gt;&amp;gt; that miners expect an overall uptrend in total hashrate (leading to an&lt;br/&gt;&amp;gt; overall downtrend in their hashrate share) means that miners discount the&lt;br/&gt;&amp;gt; Bob offered future-coins.&lt;br/&gt;&amp;gt; The discounting is proportional to the time delay involved, as a larger&lt;br/&gt;&amp;gt; delay implies greater reduction in hashrate share.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This discounting is, again, *in addition to* natural discounting a.k.a. &amp;#34;I&lt;br/&gt;&amp;gt; will gladly pay you Thursday for a hamburger today&amp;#34;, the hamburger seller&lt;br/&gt;&amp;gt; will want some pretty stiff assurances plus a bigger payment on Thursday&lt;br/&gt;&amp;gt; for giving you a hamburger today, due to expected returns on investment.&lt;br/&gt;&amp;gt;&lt;br/&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; &amp;gt; It also strikes me that, in a world with RBF and CPFP, the same&lt;br/&gt;&amp;gt; endpoint (i.e. miners earn the entire fund of the HTLC) is achieved by&lt;br/&gt;&amp;gt; existing HTLCs, without the additional branch and script opcodes needed by&lt;br/&gt;&amp;gt; MAD-HTLC.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; For example, if an HTLC is confirmed but the hashlock-claiming&lt;br/&gt;&amp;gt; transaction is not being confirmed (because miners are holding it up&lt;br/&gt;&amp;gt; because Bob is offering a much higher fee in the future for the&lt;br/&gt;&amp;gt; timelock-claiming transaction), then Alice can, regardless of the reason&lt;br/&gt;&amp;gt; why it is not being confirmed, bump up the fee with RBF or CPFP.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; If the fee bump offered by Alice is sufficiently large, then miners&lt;br/&gt;&amp;gt; will start re-preferring the Alice hashlock transaction.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; To counter this, Bob has to bid up its version higher.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; As the timeout approaches, Alice can bump up its fee until it is&lt;br/&gt;&amp;gt; just 1 satoshi short of the total fund.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; It is rational for Alice to do so since at timeout, it can expect to&lt;br/&gt;&amp;gt; lose the entire fund.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In order for Bob to win, it has to beat that fee, at which point it&lt;br/&gt;&amp;gt; equals or exceeds the total fund, and miners get the total fund (or more).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Knowing this end-point, rational Bob will not even begin this game.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I think this research considers these two endpoints to be distinct:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; * Bob misbehaves and the entire fund is punished by miners, leaving&lt;br/&gt;&amp;gt; miners with the fund and Alice and Bob without money (MAD-HTLC).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; * Bob misbehaves, Alice counters, and the ensuing fee war leads to&lt;br/&gt;&amp;gt; fees approaching the fund value, leaving miners with the fund and Alice and&lt;br/&gt;&amp;gt; Bob without money (standard HTLC).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; But in practice I think both endpoints are essentially equivalent.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; These are not the same scenario, since in HTLC there is a race between&lt;br/&gt;&amp;gt; Alice and Bob. Alice might not wish to pay the full HTLC amount once she&lt;br/&gt;&amp;gt; sees Bob is trying to cheat. She could wait until close to the timeout so&lt;br/&gt;&amp;gt; as to reduce the time Bob can respond. Of course Bob would do the same. So&lt;br/&gt;&amp;gt; this is an actual race, and Bob takes no risk since his payment is all from&lt;br/&gt;&amp;gt; the HTLC amount. Mutual destruction is only assured under certain&lt;br/&gt;&amp;gt; assumptions in HTLC. MAD-HTLC achieves security without relying on such&lt;br/&gt;&amp;gt; assumptions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice already knows that a rational Bob (who it might never interact with&lt;br/&gt;&amp;gt; again in the future) will take the funds at the locktime L.&lt;br/&gt;&amp;gt; Thus, Alice can offer, at time L - 1, the entire fund, minus 1 satoshi, to&lt;br/&gt;&amp;gt; miners.&lt;br/&gt;&amp;gt; Alice getting 1 satoshi versus 0 satoshi is a no-brainer for Alice.&lt;br/&gt;&amp;gt; Bob can only  beat this offer by offering the entire fund, at which point&lt;br/&gt;&amp;gt; Bob earns nothing and it performed an attack for no benefit.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I and some number of Lightning devs consider this to be sufficient&lt;br/&gt;&amp;gt; disincentive to Bob not attacking in the first place.&lt;br/&gt;&amp;gt;&lt;br/&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; &amp;gt; --&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; What MAD-HTLC can do would be to make different claims:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; * Inputs:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   * Bob 1 BTC - HTLC amount&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   * Bob 1 BTC - Bob fidelity bond&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; * Cases:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   * Alice reveals hashlock at any time:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     * 1 BTC goes to Alice&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     * 1 BTC goes to Bob (fidelity bond refund)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   * Bob reveals bob-hashlock after time L:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     * 2 BTC goes to Bob (HTLC refund &#43; fidelity bond refund)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;   * Bob cheated, anybody reveals both hashlock and bob-hashlock:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     * 2 BTC goes to miner&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This is an actual improvement over HTLC: Bob misbehavior leads to&lt;br/&gt;&amp;gt; loss of the fidelity bond.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The above cases can be assured by requiring both Alice and Bob to&lt;br/&gt;&amp;gt; sign in the alice-hashlock branch, so that the splitting of the fund is&lt;br/&gt;&amp;gt; enforced, and SegWit signing so that the dependent transaction is signed&lt;br/&gt;&amp;gt; before the HTLC-funding transaction is.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; It can also be implemented with `OP_CHECKTEMPLATEVERIFY`.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; The cases you present are exactly how MAD-HTLC works. It comprises two&lt;br/&gt;&amp;gt; contracts (UTXOs):&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; * Deposit (holding the intended HTLC tokens), with three redeem paths:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;     - Alice (signature), with preimage &amp;#34;A&amp;#34;, no timeout&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;     - Bob (signature), with preimage &amp;#34;B&amp;#34;, timeout T&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;     - Any entity (miner), with both preimages &amp;#34;A&amp;#34; and &amp;#34;B&amp;#34;, no timeout&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; * Collateral (the fidelity bond, doesn&amp;#39;t have to be of the same amount)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;     - Bob (signature), no preimage, timeout T&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;     - Any entity (miner), with both preimages &amp;#34;A&amp;#34; and &amp;#34;B&amp;#34;, timeout T&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Only Bob initially knows preimage &amp;#34;B&amp;#34;, and is required to reveal it if&lt;br/&gt;&amp;gt; he wishes to get the Deposit tokens.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Consider first the case where Alice publishes preimage &amp;#34;A&amp;#34;: Bob can&lt;br/&gt;&amp;gt; safely publish preimage &amp;#34;B&amp;#34; and get both the Deposit and Collateral tokens&lt;br/&gt;&amp;gt; after the timeout.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Now, consider the case where Alice does not publish preimage &amp;#34;A&amp;#34;: If&lt;br/&gt;&amp;gt; Bob publishes preimage &amp;#34;B&amp;#34; he gets nothing (and so does Alice - this is the&lt;br/&gt;&amp;gt; mutual assured destruction), and if he doesn&amp;#39;t, he gets the Collateral&lt;br/&gt;&amp;gt; tokens.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thank you for the clarification.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&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;&lt;br/&gt;&amp;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/20200625/86ee66c8/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200625/86ee66c8/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T18:25:38Z</updated>
  </entry>

</feed>