<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated>2023-06-09T14:19:44&#43;02:00</updated>
  <generator>https://nostr.ae</generator>

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




  <entry>
    <id>https://nostr.ae/nevent1qqs8rm8r5j75mvqh57y0d75ycqwm823s6yp96vgga05w6kmvzy4jfdgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u4yrmpv</id>
    
      <title type="html">📅 Original date posted:2023-08-10 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8rm8r5j75mvqh57y0d75ycqwm823s6yp96vgga05w6kmvzy4jfdgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u4yrmpv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvektlvvxx0wed7rq9ren45ngxsfs4w25qa5cmyzprrgnhd3a9a7g2ggw0f&#39;&gt;nevent1q…gw0f&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-08-10&lt;br/&gt;🗒️ Summary of this message: The sender is questioning the use of schnorr blind signatures in the statechain protocol and the potential for malicious signatures. They also suggest enforcing sequential blind signing to prevent attacks.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Tom,&lt;br/&gt;&lt;br/&gt;These questions might be wrongheaded since I&amp;#39;m not familiar enough with the&lt;br/&gt;statechain protocol. Here goes:&lt;br/&gt;&lt;br/&gt;Why do you need to use schnorr blind signatures for this? Are the blind&lt;br/&gt;signatures being used to produce on-chain tx signatures or are they just&lt;br/&gt;for credentials for transferring ownership (or are they for both). If they&lt;br/&gt;are for on-chain txs then you won&amp;#39;t be able to enforce that the signature&lt;br/&gt;used was not generated maliciously so it doesn&amp;#39;t seem to me like your trick&lt;br/&gt;above would help you here. I can fully verify that the state chain&lt;br/&gt;signatures were all produced non-maliciously but then there may be another&lt;br/&gt;hidden forged signature that can take the on-chain funds that were produced&lt;br/&gt;by malicious signing sessions I was never aware of (or how can you be sure&lt;br/&gt;this isn&amp;#39;t the case).&lt;br/&gt;&lt;br/&gt;Following on from that point, is it not possible to enforce sequential&lt;br/&gt;blind signing in the statechain protocol under each key. With that you&lt;br/&gt;don&amp;#39;t have the problem of wagner&amp;#39;s attack.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Wed, 9 Aug 2023 at 23:34, Tom Trevethan 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; @moonsettler&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When anyone receives a coin (either as payment or as part of a swap) they&lt;br/&gt;&amp;gt; need to perform a verification of all previous signatures and&lt;br/&gt;&amp;gt; corresponding backup txs. If anything is missing, then the verification&lt;br/&gt;&amp;gt; will fail. So anyone &amp;#39;breaking the chain&amp;#39; by signing something&lt;br/&gt;&amp;gt; incorrectly simply cannot then send that coin on.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The second point is important. All the &amp;#39;transfer data&amp;#39; (i.e. new and all&lt;br/&gt;&amp;gt; previous backup txs, signatures and values) is encrypted with the new owner&lt;br/&gt;&amp;gt; public key. But the server cannot know this pubkey as this would enable it&lt;br/&gt;&amp;gt; to compute the full coin pubkey and identify it on-chain. Currently, the&lt;br/&gt;&amp;gt; server identifies individual coins (shared keys) with a statechain_id&lt;br/&gt;&amp;gt; identifier (unrelated to the coin outpoint), which is used by the coin&lt;br/&gt;&amp;gt; receiver to retrieve the transfer data via the API. But this means the&lt;br/&gt;&amp;gt; receiver must be sent this identifier out-of-band by the sender, and also&lt;br/&gt;&amp;gt; that if anyone else learns it they can corrupt the server key&lt;br/&gt;&amp;gt; share/signature chain via the API. One solution to this is to have a second&lt;br/&gt;&amp;gt; non-identifying key used only for authenticating with the server. This&lt;br/&gt;&amp;gt; would mean a &amp;#39;statchain address&amp;#39; would then be composed of 2 separate&lt;br/&gt;&amp;gt; pubkeys 1) for the shared taproot address and 2) for server authentication.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Tom&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Tue, Aug 8, 2023 at 6:44 PM moonsettler &amp;lt;moonsettler at protonmail.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Very nice! Is there an authentication mechanism to avoid &amp;#39;breaking the&lt;br/&gt;&amp;gt;&amp;gt; chain&amp;#39; with an unverifiable new state by a previous owner? Can the current&lt;br/&gt;&amp;gt;&amp;gt; owner prove the knowledge of a non-identifying secret he learned as&lt;br/&gt;&amp;gt;&amp;gt; recipient to the server that is related to the statechain tip?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; BR,&lt;br/&gt;&amp;gt;&amp;gt; moonsettler&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ------- Original Message -------&lt;br/&gt;&amp;gt;&amp;gt; On Monday, August 7th, 2023 at 2:55 AM, Tom Trevethan via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; A follow up to this, I have updated the blinded statechain protocol&lt;br/&gt;&amp;gt;&amp;gt; description to include the mitigation to the Wagner attack by requiring the&lt;br/&gt;&amp;gt;&amp;gt; server to send R1 values only after commitments made to the server of the&lt;br/&gt;&amp;gt;&amp;gt; R2 values used by the user, and that all the previous computed c values are&lt;br/&gt;&amp;gt;&amp;gt; verified by each new statecoin owner.&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/commerceblock/mercury/blob/master/layer/protocol.md&#34;&gt;https://github.com/commerceblock/mercury/blob/master/layer/protocol.md&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Essentially, the attack is possible because the server cannot verify that&lt;br/&gt;&amp;gt;&amp;gt; the blinded challenge (c) value it has been sent by the user has been&lt;br/&gt;&amp;gt;&amp;gt; computed honestly (i.e. c = SHA256(X1 &#43; X2, R1 &#43; R2, m) ), however this CAN&lt;br/&gt;&amp;gt;&amp;gt; be verified by each new owner of a statecoin for all the previous&lt;br/&gt;&amp;gt;&amp;gt; signatures.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Each time an owner cooperates with the server to generate a signature on&lt;br/&gt;&amp;gt;&amp;gt; a backup tx, the server will require that the owner send a commitment to&lt;br/&gt;&amp;gt;&amp;gt; their R2 value: e.g. SHA256(R2). The server will store this value before&lt;br/&gt;&amp;gt;&amp;gt; responding with it&amp;#39;s R1 value. This way, the owner cannot choose the value&lt;br/&gt;&amp;gt;&amp;gt; of R2 (and hence c).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; When the statecoin is received by a new owner, they will receive ALL&lt;br/&gt;&amp;gt;&amp;gt; previous signed backup txs for that coin from the sender, and all the&lt;br/&gt;&amp;gt;&amp;gt; corresponding R2 values used for each signature. They will then ask the&lt;br/&gt;&amp;gt;&amp;gt; server (for each previous signature), the commitments SHA256(R2) and the&lt;br/&gt;&amp;gt;&amp;gt; corresponding server generated R1 value and c value used. The new owner&lt;br/&gt;&amp;gt;&amp;gt; will then verify that each backup tx is valid, and that each c value was&lt;br/&gt;&amp;gt;&amp;gt; computed c = SHA256(X1 &#43; X2, R1 &#43; R2, m) and each commitment equals&lt;br/&gt;&amp;gt;&amp;gt; SHA256(R2). This ensures that a previous owner could not have generated&lt;br/&gt;&amp;gt;&amp;gt; more valid signatures than the server has partially signed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Thu, Jul 27, 2023 at 2:25 PM Tom Trevethan &amp;lt;tom at commerceblock.com&amp;gt;&lt;br/&gt;&amp;gt;&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; On Thu, Jul 27, 2023 at 9:08 AM Jonas Nick &amp;lt;jonasdnick at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; No, proof of knowledge of the r values used to generate each R does not&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; prevent&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Wagner&amp;#39;s attack. I 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; Using Wagner&amp;#39;s algorithm, choose R2[0], ..., R2[K-1] such that&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; c[0] &#43; ... &#43; c[K-1] = c[K].&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; You can think of this as actually choosing scalars r2[0], ..., r2[K-1]&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; define R2[i] = r2[i]*G. The attacker chooses r2[i]. The attack wouldn&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; make&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; sense if he didn&amp;#39;t.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;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/20230810/ed54cc20/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230810/ed54cc20/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-08-11T01:09:38&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswhenmvjqj6pdsf5hrjmarxkqu2z7l3d2cf5sfzw0xhclvagjarhczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u26ds5v</id>
    
      <title type="html">📅 Original date posted:2023-07-26 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswhenmvjqj6pdsf5hrjmarxkqu2z7l3d2cf5sfzw0xhclvagjarhczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u26ds5v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfdpmajq8f3f97d55wwjmrcysw46065ajfe0a4mcxn979jp92h3yqgzkmgd&#39;&gt;nevent1q…kmgd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-07-26&lt;br/&gt;🗒️ Summary of this message: The text discusses the need for a secure blind schnorr signing service and the potential attacks that can occur without proof of knowledge of the signing key.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hello all,&lt;br/&gt;&lt;br/&gt;1. No proof of knowledge of each R does *NOT* prevent wagner&amp;#39;s attack.&lt;br/&gt;2. In my mind, A generic blind signing service is sufficient for doing&lt;br/&gt;blinded MuSig, Muig2, FROST or whatever without the blind signing service&lt;br/&gt;knowing. You don&amp;#39;t need a specialized MuSig2 blind singing service to&lt;br/&gt;extract MuSig2 compatible shares from it. You can just add the MuSig tweak&lt;br/&gt;(and/or BIP32 etc) to their key when you do the blind signing request (this&lt;br/&gt;seemed to be what the OP was suggesting). Making the server have multiple&lt;br/&gt;nonces like in MuSig2 proper doesn&amp;#39;t help the server&amp;#39;s security at all. I&lt;br/&gt;think the problem is simply reduced to creating a secure blind schnorr&lt;br/&gt;signing service. Jonas mentioned some papers which show how to do that. The&lt;br/&gt;question is mostly about whether you can practically integrate those tricks&lt;br/&gt;into your protocol which might be tricky.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Thu, 27 Jul 2023 at 08:20, Erik Aronesty 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; correct.  you cannot select R if it is shipped with a POP&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Jul 26, 2023, 4:35 PM Tom Trevethan &amp;lt;tom at commerceblock.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Not &amp;#39;signing&amp;#39; but &amp;#39;secret&amp;#39; i.e. the r values (ephemeral keys). Proof of&lt;br/&gt;&amp;gt;&amp;gt; knowledge of the r values used to generate each R used prevents the Wagner&lt;br/&gt;&amp;gt;&amp;gt; attack, no?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Wed, Jul 26, 2023 at 8:59 PM Jonas Nick &amp;lt;jonasdnick at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; None of the attacks mentioned in this thread so far (ZmnSCPxj mentioned&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; an&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; attack on the nonces, I mentioned an attack on the challenge c) can be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; prevented&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; by proving knowledge of the signing key (usually known as proof of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; possession,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; PoP).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;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/20230727/4af404bf/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230727/4af404bf/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-07-28T17:08:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgazs3yd5hw0x9pzdcu6hyzlhqav2pcy80h7udgl4vxr0llstrdrczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uwl7rft</id>
    
      <title type="html">📅 Original date posted:2023-01-04 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgazs3yd5hw0x9pzdcu6hyzlhqav2pcy80h7udgl4vxr0llstrdrczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uwl7rft" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyz2nlaha2ntesprqla6e5cd776zqenaazuwkkmarpnm5gm784a8gv02s9z&#39;&gt;nevent1q…2s9z&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-04&lt;br/&gt;🗒️ Summary of this message: A new scheme for bridging layer-1 and layer-2 systems transparently for users has been proposed, allowing wallets to give out addresses that are covert channel openings without the sender&amp;#39;s knowledge. This would enable users to withdraw coins from an exchange straight into a channel by submitting an address without knowing precisely how much money they will receive to that address. The use of a covenant would mean the channel would not have an expiry date and therefore be a first-class citizen among channels.&lt;br/&gt;📝 Original message:&lt;br/&gt;Dear Jesse &amp;amp; Z,&lt;br/&gt;&lt;br/&gt;I believe this kind of scheme is of crucial importance. I think if we&amp;#39;re&lt;br/&gt;serious about bridging layer-1 and layer-2 systems transparently for users,&lt;br/&gt;wallets must be able to give out addresses that are covert channel openings&lt;br/&gt;without the sender&amp;#39;s knowledge. e.g. I should be able to withdraw coins&lt;br/&gt;from an exchange straight into a channel by submitting an address without&lt;br/&gt;knowing precisely how much money I will receive to that address. I hadn&amp;#39;t&lt;br/&gt;considered this particular design before -- it&amp;#39;s very practical and works&lt;br/&gt;today. My own minor effort on this topic was to suggest that researchers&lt;br/&gt;designing sophisticated covenant proposals should make sure that they&lt;br/&gt;achieve this functionality cleanly [1]. The advantage of using a covenant&lt;br/&gt;is that the channel would not have an expiry date and therefore be a first&lt;br/&gt;class citizen among channels.&lt;br/&gt;&lt;br/&gt;[1]&lt;br/&gt;&lt;a href=&#34;https://github.com/ariard/bitcoin-contracting-primitives-wg/issues/19#issue-1492942389&#34;&gt;https://github.com/ariard/bitcoin-contracting-primitives-wg/issues/19#issue-1492942389&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, 4 Jan 2023 at 00:58, ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Subject: Swap-in-Potentiam: Moving Onchain Funds &amp;#34;Instantly&amp;#34; To Lightning&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; by Jesse Posner, ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Introduction&lt;br/&gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Moving funds from an onchain-only address to Lightning Network is slow,&lt;br/&gt;&amp;gt; especially if you desire trust-minimization (which removes solutions&lt;br/&gt;&amp;gt; relying on 0-conf).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Basically, to reduce trust requirements in all onchain transactions,&lt;br/&gt;&amp;gt; onchain receivers *MUST* ensure confirmation of the onchain transaction&lt;br/&gt;&amp;gt; that creates their UTXO.&lt;br/&gt;&amp;gt; In practice, the minimum should be at least 3 blocks, since reorgs of&lt;br/&gt;&amp;gt; up to 2 blocks are common occurences, but even 1 confirmation can&lt;br/&gt;&amp;gt; take an inordinately long time in the real world due to the random&lt;br/&gt;&amp;gt; nature of mining.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is particularly acute for mobile phone use-cases.&lt;br/&gt;&amp;gt; As mobile phones run on a battery, mobile phone OSs often greatly&lt;br/&gt;&amp;gt; restrict CPU and other resource consumption when an app is not&lt;br/&gt;&amp;gt; currently open by the user.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now consider this user story, for a wallet app that supports both&lt;br/&gt;&amp;gt; Bitcoin blockchain and Lightning Network operations:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * The user wants to be paid over the Bitcoin blockchain.&lt;br/&gt;&amp;gt; * The user gets an address from their wallet and provides it to&lt;br/&gt;&amp;gt;   some other party to receive their payment.&lt;br/&gt;&amp;gt; * The user closes their wallet app, which causes the mobile phone&lt;br/&gt;&amp;gt;   OS to kill all its threads.&lt;br/&gt;&amp;gt; * The other party sends their payment over blockchain while the&lt;br/&gt;&amp;gt;   user is asleep.&lt;br/&gt;&amp;gt; * The blockchain transaction confirms and time passes.&lt;br/&gt;&amp;gt; * The user wakes up and checks their favorite blockchain explorer,&lt;br/&gt;&amp;gt;   and sees they received funds on their wallet address.&lt;br/&gt;&amp;gt; * The user opens their wallet app and decides they need a coffee,&lt;br/&gt;&amp;gt;   so they buy coffee over Lightning.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For current solutions to move funds from the blockchain layer to&lt;br/&gt;&amp;gt; Lightning, however, the above user story would need to complete&lt;br/&gt;&amp;gt; over a long time, possibly measurable in dozens of minutes or&lt;br/&gt;&amp;gt; even hours in the worst case, due to the need for confirmation:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Channel open: Requires confirmation, many nodes require 6 or&lt;br/&gt;&amp;gt;   more confirmations.&lt;br/&gt;&amp;gt; * Submarine swap/peerswap: Requires confirmation before the swap&lt;br/&gt;&amp;gt;   service will send out the HTLC on Lightning.&lt;br/&gt;&amp;gt; * Splice-in: Channel remains operational, but until the splice&lt;br/&gt;&amp;gt;   transaction confirms, the channel operates in &amp;#34;dual mode&amp;#34;&lt;br/&gt;&amp;gt;   where both pre-splice and post-splice state is valid, and&lt;br/&gt;&amp;gt;   that means only the lower amount of the pre-splice and&lt;br/&gt;&amp;gt;   post-splice can be used in the mean time.&lt;br/&gt;&amp;gt;   For splice-in, the pre-splice amount will be lower, thus&lt;br/&gt;&amp;gt;   the amount being spliced in will not be credited until&lt;br/&gt;&amp;gt;   the splice transaction is confirmed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In this writeup, we present a novel protocol, swap-in-potentiam,&lt;br/&gt;&amp;gt; that can be used for immediate transfer from the blockchain&lt;br/&gt;&amp;gt; layer to the Lightning layer, in the above user story.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Advantages And Limitations&lt;br/&gt;&amp;gt; --------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To whet your appetite, here are the advantages:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Immediate transfer of already-confirmed-received onchain&lt;br/&gt;&amp;gt;   funds to Lightning.&lt;br/&gt;&amp;gt; * Onchain funds can also be transferred to another onchain&lt;br/&gt;&amp;gt;   address (subject to normal onchain confirmation rules).&lt;br/&gt;&amp;gt;   * This can be &amp;#34;immediate&amp;#34; if sending to a receiver that&lt;br/&gt;&amp;gt;     accepts the risk of 0-conf onchain transactions.&lt;br/&gt;&amp;gt; * Minimized trust requirement.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The disadvantages, to help convince you that yes, this is&lt;br/&gt;&amp;gt; technology and not magic beans (and to not oversell this&lt;br/&gt;&amp;gt; tech, Bitcoin media reporting often tend to oversell&lt;br/&gt;&amp;gt; new technologies because the disadvantages are often&lt;br/&gt;&amp;gt; hidden away behind technical minutae):&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Requires a cooperating LSP.&lt;br/&gt;&amp;gt;   If LSP is down or refuses to cooperate, onchain funds&lt;br/&gt;&amp;gt;   are locked for some time.&lt;br/&gt;&amp;gt;   This has a timeout (so if the LSP never comes online&lt;br/&gt;&amp;gt;   again, you just wait out the timeout) and the timeout&lt;br/&gt;&amp;gt;   starts from when the receiving UTXO is confirmed in a&lt;br/&gt;&amp;gt;   blocks, so it will not cause loss of funds, only loss&lt;br/&gt;&amp;gt;   of opportunity (i.e. &amp;#34;involuntary HODLing&amp;#34;).&lt;br/&gt;&amp;gt; * If you have multiple LSPs, when you generate an address&lt;br/&gt;&amp;gt;   you *have to* select one of them at that point, you&lt;br/&gt;&amp;gt;   *cannot* commit to multiple LSPs and select one of them&lt;br/&gt;&amp;gt;   later when your phone wakes up again.&lt;br/&gt;&amp;gt;   This exacerbates the above disadvantage, since you have&lt;br/&gt;&amp;gt;   to select one of your LSPs and hope that when your&lt;br/&gt;&amp;gt;   phone wakes up the LSP you selected is also up and&lt;br/&gt;&amp;gt;   cooperative.&lt;br/&gt;&amp;gt; * The onchain-received funds have to be confirmed first,&lt;br/&gt;&amp;gt;   otherwise we still need to wait for confirmation of the&lt;br/&gt;&amp;gt;   onchain-received funds.&lt;br/&gt;&amp;gt;   This is generally true for many blockchain-only wallets&lt;br/&gt;&amp;gt;   anyway and is thus not a worsening, but is also not an&lt;br/&gt;&amp;gt;   improvement.&lt;br/&gt;&amp;gt; * If the timeout is too near, actions must be performed&lt;br/&gt;&amp;gt;   onchain that require confirmation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Swap-in-Potentiam&lt;br/&gt;&amp;gt; =================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; All onchain fund movements, as noted, require confirmation.&lt;br/&gt;&amp;gt; These include onchain fund movements to the Lightning network.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the onchain address that the wallet provides was controlled&lt;br/&gt;&amp;gt; solely by that wallet, then any action that requires cooperation&lt;br/&gt;&amp;gt; with a Lightning Network participant --- channel open, swap, or&lt;br/&gt;&amp;gt; splice --- would require an onchain transaction that commits to&lt;br/&gt;&amp;gt; that specific Lightning Network participant.&lt;br/&gt;&amp;gt; Only when the new onchain transaction is confirmed, can that&lt;br/&gt;&amp;gt; Lightning participant rely on the transaction output without&lt;br/&gt;&amp;gt; having to trust the initiator.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; From there, we can consider: what if the wallet provides an&lt;br/&gt;&amp;gt; address that *already* commits to that specific Lightning Network&lt;br/&gt;&amp;gt; participant?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If so, then the &amp;#34;timer for confirmation&amp;#34; starts as soon as&lt;br/&gt;&amp;gt; the wallet receives on the blockchain, not as soon as the wallet&lt;br/&gt;&amp;gt; decides to move funds from blockchain to Lightning.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is a significant difference for a mobile wallet: the mobile&lt;br/&gt;&amp;gt; environment does not support the mobile wallet being online for&lt;br/&gt;&amp;gt; long.&lt;br/&gt;&amp;gt; Thus, the mobile wallet may not have any CPU to make the decision&lt;br/&gt;&amp;gt; to move funds from blockchain to Lightning, until the actual user&lt;br/&gt;&amp;gt; explicitly opens the mobile wallet app.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It has already been generally accepted that due to the limitations&lt;br/&gt;&amp;gt; of the mobile phone environment, a mobile phone wallet with&lt;br/&gt;&amp;gt; Lightning support would need some LSP anyway.&lt;br/&gt;&amp;gt; Thus, a mobile wallet that can receive on the blockchain layer&lt;br/&gt;&amp;gt; and then send on the Lightning layer can commit to a specific,&lt;br/&gt;&amp;gt; different, Lightning participant: the LSP it has channels with.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, the mobile wallet can provide an address that commits to&lt;br/&gt;&amp;gt; one particular Lightning Network participant: its LSP.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The mobile wallet can then initiate a single-hop swap with the&lt;br/&gt;&amp;gt; LSP when the mobile wallet app is in the foreground and has CPU&lt;br/&gt;&amp;gt; to think with.&lt;br/&gt;&amp;gt; If it received funds into the address that have already been&lt;br/&gt;&amp;gt; confirmed, then it can do this single-hop swap immediately with&lt;br/&gt;&amp;gt; its LSP.&lt;br/&gt;&amp;gt; The LSP can immediately resolve this swap, crediting funds to&lt;br/&gt;&amp;gt; channel, while atomically ensuring it has sole claim to the&lt;br/&gt;&amp;gt; onchain UTXO.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The Contract&lt;br/&gt;&amp;gt; ------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The contract has two participants: Alice the funds owner, and&lt;br/&gt;&amp;gt; Bob its potential swap partner.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Once *any* funds have been confirmed received into an address&lt;br/&gt;&amp;gt; committing to this contract, Alice owns the funds and can&lt;br/&gt;&amp;gt; dispose of them as it likes (with cooperation from Bob).&lt;br/&gt;&amp;gt; The source of the funds need not be Alice, it could be a third&lt;br/&gt;&amp;gt; party that has an obligation to pay Alice onchain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The contract has only 2 branches:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Onchain/channel branch: Alice and Bob.&lt;br/&gt;&amp;gt; * Timelock branch: Alice plus a relative timelock (`OP_CSV`)&lt;br/&gt;&amp;gt;   measurable in weeks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Astute readers will realize that the above is really a variant&lt;br/&gt;&amp;gt; of [CLTV-style unidirectional time-limited channels][1],&lt;br/&gt;&amp;gt; themselves a variant of Spilman-style channels:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Uses an explicit opcode to simplify channel setup (no need&lt;br/&gt;&amp;gt;   to pre-sign a timeout transaction between Alice and Bob,&lt;br/&gt;&amp;gt;   can just send funds directly to the address).&lt;br/&gt;&amp;gt; * Uses a relative locktime instead of an absolute one to&lt;br/&gt;&amp;gt;   allow funding of the channel address (= receive onchain&lt;br/&gt;&amp;gt;   funds ready to spend over Lightning) at any time.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The use-cases this enables are:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * If Alice wants to pay to another onchain address, and Bob&lt;br/&gt;&amp;gt;   is also online and cooperative, Alice can ask Bob to help&lt;br/&gt;&amp;gt;   sign the Onchain/channel branch to move the funds in any&lt;br/&gt;&amp;gt;   arbitrary onchain manner.&lt;br/&gt;&amp;gt; * If Alice wants to pay to a Lightning invoice / keysend, and&lt;br/&gt;&amp;gt;   has insufficient Lightning outgoing capacity (but has&lt;br/&gt;&amp;gt;   sufficient *total* capacity), it can swap with Bob, by&lt;br/&gt;&amp;gt;   offerring a transaction that spends via the Onchain/channel&lt;br/&gt;&amp;gt;   branch and instantiates a fresh onchain HTLC that Bob can&lt;br/&gt;&amp;gt;   then forward over Lightning.&lt;br/&gt;&amp;gt;   As soon as Alice offers its signature of that transaction,&lt;br/&gt;&amp;gt;   Bob can immediately offer an in-Lightning HTLC to Alice on&lt;br/&gt;&amp;gt;   their channel, and then Alice can immediately resolve it&lt;br/&gt;&amp;gt;   (thus immediately getting its funds into Lightning).&lt;br/&gt;&amp;gt; * If Bob is offline or uncooperative, Alice can unilterally&lt;br/&gt;&amp;gt;   recover its funds after the timeout in the Timelock&lt;br/&gt;&amp;gt;   branch.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Trust is required only to the extent that Alice trusts Bob to&lt;br/&gt;&amp;gt; be cooperative so that Alice can dispose of its funds immediately.&lt;br/&gt;&amp;gt; In case Bob turns out to be non-trustworthy, Alice can recover&lt;br/&gt;&amp;gt; its funds via the timelock branch after the timeout period.&lt;br/&gt;&amp;gt; There is no scope for Bob to steal funds (indeed, it is easier&lt;br/&gt;&amp;gt; for Bob to steal Lightning funds than to steal swap-in-potentiam&lt;br/&gt;&amp;gt; funds).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The intent here is that the mobile wallet is Alice, while the&lt;br/&gt;&amp;gt; LSP is Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Bob Security&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bob *MUST* ensure that, for each UTXO, it is either asked to&lt;br/&gt;&amp;gt; sign an arbitrary onchain transaction (i.e the first use-case&lt;br/&gt;&amp;gt; above) *OR* it gets offered an onchain HTLC from that UTXO.&lt;br/&gt;&amp;gt; Once Alice has asked Bob to cooperate in either case for a&lt;br/&gt;&amp;gt; particular UTXO, Bob *MUST* ensure that it does not sign the other&lt;br/&gt;&amp;gt; case (and Bob *MUST* refuse to cooperate in the other case once&lt;br/&gt;&amp;gt; one case has been requested).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In addition, Bob *MUST* ensure that, if it is used in the&lt;br/&gt;&amp;gt; &amp;#34;channel&amp;#34; case (i.e. the second use-case above), the timeout of&lt;br/&gt;&amp;gt; the Timelock branch is far enough in the future that it is likely&lt;br/&gt;&amp;gt; that spends using the Onchain/channel branch have confirmed by&lt;br/&gt;&amp;gt; then.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With both invariants enforced by Bob, Bob can ensure that, if&lt;br/&gt;&amp;gt; Alice requests a swap using the Onchain/channel branch, only Bob&lt;br/&gt;&amp;gt; can spend the UTXO (at least before the timeout), and thus can&lt;br/&gt;&amp;gt; safely offer a Lightning HTLC to Alice immediately without any&lt;br/&gt;&amp;gt; additional waiting for onchain confirmations.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As Bob needs to know the UTXO in the first use-case above, this&lt;br/&gt;&amp;gt; requirement prevents the use of blind signing techniques when&lt;br/&gt;&amp;gt; implementing the first use-case.&lt;br/&gt;&amp;gt; Basically, when being asked to sign, Bob must generate the entire&lt;br/&gt;&amp;gt; `SIGHASH` from data that Alice provides, so that Bob is able to&lt;br/&gt;&amp;gt; keep track of UTXOs it is signing for.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Remote Swap&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While Bob is generally considered &amp;#34;the&amp;#34; LSP of the mobile wallet&lt;br/&gt;&amp;gt; Alice, nothing in the Lightning protocol actually requires that&lt;br/&gt;&amp;gt; Bob be a direct peer of Alice.&lt;br/&gt;&amp;gt; The only real requirement is that Bob is able to send funds to&lt;br/&gt;&amp;gt; Alice over Lightning in exchange for possession of the equivalent&lt;br/&gt;&amp;gt; onchain funds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Against this, we should note that the mobile wallet is already&lt;br/&gt;&amp;gt; dependent on one or more LSPs anyway, so it may as well just use&lt;br/&gt;&amp;gt; its direct peer LSPs instead of a remote node.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Address Derivation&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Swap-in-potentiam addresses can be derived from a root public or&lt;br/&gt;&amp;gt; private key.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We only need one keypair each from Alice and Bob.&lt;br/&gt;&amp;gt; Alice can use standard derivation paths for its keypair.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As Bob is intended to be an LSP, we can just use its Lightning&lt;br/&gt;&amp;gt; node ID as the public key.&lt;br/&gt;&amp;gt; Bob needs to be in possession of the corresponding private key&lt;br/&gt;&amp;gt; anyway in order to set up BOLT 8 encrypted transports.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As LSPs are part of the public network, Alice can simply try to&lt;br/&gt;&amp;gt; scan for all published nodes that advertise support for&lt;br/&gt;&amp;gt; swap-in-potentiam.&lt;br/&gt;&amp;gt; Alternately if the wallet has a short list of fixed LSPs it&lt;br/&gt;&amp;gt; will use, it can simply refer to that list.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Alice uses a derived keypair.&lt;br/&gt;&amp;gt; * Bob uses a fixed keypair (its Lightning node ID).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The above is sufficient to derive swap-in-potentiam addresses&lt;br/&gt;&amp;gt; from an `xprv` or `xpub` root key.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Swap-in-potentiam For LSPs&lt;br/&gt;&amp;gt; ==========================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While the original design of swap-in-potentiam has the mobile&lt;br/&gt;&amp;gt; wallet in the &amp;#34;Alice&amp;#34; role and its LSP in the &amp;#34;Bob&amp;#34; role, it&lt;br/&gt;&amp;gt; turns out that LSPs can provide special service to improve&lt;br/&gt;&amp;gt; receiving mobile wallets.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Suppose that the LSP keeps track of statistics, and thus has&lt;br/&gt;&amp;gt; an idea of which of its mobile wallet clients are likely to&lt;br/&gt;&amp;gt; be net receivers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Net receivers will often have low inbound capacity (since the&lt;br/&gt;&amp;gt; inbound capacity has been used up during previous LN receives).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; During times of low onchain fees, an LSP can check which of its&lt;br/&gt;&amp;gt; offline mobile wallet clients have low inbound capacity, and are&lt;br/&gt;&amp;gt; likely to come online in the future to receive.&lt;br/&gt;&amp;gt; In those cases, the LSP can commit funds to a swap-in-potentiam&lt;br/&gt;&amp;gt; with the mobile client, with the LSP as &amp;#34;Alice&amp;#34; and the mobile&lt;br/&gt;&amp;gt; client as &amp;#34;Bob&amp;#34;.&lt;br/&gt;&amp;gt; This at least lets the LSP set up half of a swap during a time of&lt;br/&gt;&amp;gt; low fees.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the transfer to swap-in-potentiam addresses is confirmed by&lt;br/&gt;&amp;gt; the time the mobile wallet client comes online, the LSP can&lt;br/&gt;&amp;gt; immediately initiate a swap, giving inbound capacity towards the&lt;br/&gt;&amp;gt; mobile client.&lt;br/&gt;&amp;gt; This swap can be immediately resolved, and allows the mobile&lt;br/&gt;&amp;gt; wallet client to immediately receive funds over Lightning.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In particular, if &amp;#34;offline receive&amp;#34; as designed by TheBlueMatt&lt;br/&gt;&amp;gt; is implemented, then the LSP already has indication of a pending&lt;br/&gt;&amp;gt; payment towards an offline mobile wallet client.&lt;br/&gt;&amp;gt; The LSP can check if the offline mobile wallet client has&lt;br/&gt;&amp;gt; insufficient incoming capacity to receive the funds, and if so,&lt;br/&gt;&amp;gt; arrange to fund a swap-in-potentiam with that client.&lt;br/&gt;&amp;gt; Then, when the mobile wallet client comes online, the LSP can&lt;br/&gt;&amp;gt; initiate the swap with them, and once the swap completes (and&lt;br/&gt;&amp;gt; thus the mobile wallet client has sufficient incoming capacity)&lt;br/&gt;&amp;gt; the LSP can contact the sender LSP to complete the payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In particular, this use-case allows for *immediate* receives as&lt;br/&gt;&amp;gt; soon as the mobile wallet client gets foregrounded and has CPU&lt;br/&gt;&amp;gt; time, **without** requiring 0-conf trusted transactions and&lt;br/&gt;&amp;gt; thus without requiring any kind of semi-custodial trust, even&lt;br/&gt;&amp;gt; if the mobile wallet client had insufficient incoming capacity.&lt;br/&gt;&amp;gt; A channel still has to be set up beforehand (without 0-conf, if&lt;br/&gt;&amp;gt; trusting funds to the LSP is undesirable).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Implementation Sketch&lt;br/&gt;&amp;gt; =====================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The intent is to use Taproot with Schnorr signatures, but&lt;br/&gt;&amp;gt; **without** using the keyspend path (at least initially).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The plan currently is to use a `MuSig(A, B)` as the internal&lt;br/&gt;&amp;gt; pubkey, but with the branches still explicitly laid out as&lt;br/&gt;&amp;gt; tapleaves.&lt;br/&gt;&amp;gt; That is, there are two tapleaf SCRIPTs corresponding to the&lt;br/&gt;&amp;gt; two branches described above:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * `&amp;lt;A&amp;gt; OP_CHECKSIGVERIFY &amp;lt;B&amp;gt; OP_CHECKSIG`&lt;br/&gt;&amp;gt; * `&amp;lt;timelock&amp;gt; OP_CHECKSEQUENCEVERIFY OP_DROP &amp;lt;A&amp;gt; OP_CHECKSIG`&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Using an explicit 2-of-2 branch rather than a MuSig allows&lt;br/&gt;&amp;gt; for a simple protocol at least for initial deployment:&lt;br/&gt;&amp;gt; we can have Alice send the signature using `A` in a single&lt;br/&gt;&amp;gt; half-round without having to engage in a 2-round MuSig2 signing&lt;br/&gt;&amp;gt; ritual.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We intend to use Taproot since the mobile wallet client&lt;br/&gt;&amp;gt; may need to use a 2-of-3 or 2-of-2 signing scheme, similar&lt;br/&gt;&amp;gt; to Blockstream Green.&lt;br/&gt;&amp;gt; This allows either Alice or Bob in the contract to secretly&lt;br/&gt;&amp;gt; be a FROST 2-of-3 or MuSig 2-of-2 (or any FROST k-of-n or&lt;br/&gt;&amp;gt; MuSig n-of-n).&lt;br/&gt;&amp;gt; This is also another reason for avoiding a 2-of-2 MuSig&lt;br/&gt;&amp;gt; keyspend path between Alice and Bob, as there is (to our&lt;br/&gt;&amp;gt; knowledge) no publicly-reviewed security proof that&lt;br/&gt;&amp;gt; FROST-in-MuSig and MuSig-in-MuSig are safe (or the&lt;br/&gt;&amp;gt; corresponding variants using MuSig2 for the signing&lt;br/&gt;&amp;gt; ritual).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Later, when we are more confident of the use of MuSig2 and&lt;br/&gt;&amp;gt; FROST inside a MuSig2, and with using MuSig2 with possibly&lt;br/&gt;&amp;gt; untrusted outsiders (who might exploit any mis-implementation&lt;br/&gt;&amp;gt; of the MuSig2 signing protocol if we are not careful with&lt;br/&gt;&amp;gt; designing it), we can seamlessly upgrade the protocol&lt;br/&gt;&amp;gt; to use the keyspend path later, to save witness bytes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For the Onchain use-case (i.e. Alice wants to spend the UTXO&lt;br/&gt;&amp;gt; to an onchain address), the protocol betweeen Alice and Bob&lt;br/&gt;&amp;gt; would be:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * `request_arbitrary_signature` Alice-&amp;gt;Bob: Requests Bob&lt;br/&gt;&amp;gt;   to sign a PSBT spending a swap-in-potentiam address&lt;br/&gt;&amp;gt;   using the Onchain branch.&lt;br/&gt;&amp;gt; * `response_arbitrary_signature` Bob-&amp;gt;Alice: Response to&lt;br/&gt;&amp;gt;   the above, returning the requested signature.&lt;br/&gt;&amp;gt; * `reject_arbitrary_signature` Bob-&amp;gt;Alice: Sent in&lt;br/&gt;&amp;gt;   response to `request_arbitary_signature` if Bob refuses&lt;br/&gt;&amp;gt;   to cooperate (e.g. the UTXO being spent has already&lt;br/&gt;&amp;gt;   been accepted by Bob in a Channel use-case below).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For the Channel use-case (i.e. Alice wants to spend the UTXO&lt;br/&gt;&amp;gt; to a Lightning receiver), we operate the swap-in-potentiam&lt;br/&gt;&amp;gt; UTXO(s) as a Spilman-like channel over two states:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * HTLC-offering: Offering an amount `N` HTLC from Alice to&lt;br/&gt;&amp;gt;   Bob, with any remaining amount to a change address to&lt;br/&gt;&amp;gt;   Alice.&lt;br/&gt;&amp;gt; * Resolved: Giving the amount `N` outright to Bob, with any&lt;br/&gt;&amp;gt;   remaining amount to a change address to Alice.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The intention is that the channel is initially put into&lt;br/&gt;&amp;gt; the HTLC-offerring state.&lt;br/&gt;&amp;gt; Then Bob offers a corresponding in-Lightning HTLC to Alice&lt;br/&gt;&amp;gt; over their channel.&lt;br/&gt;&amp;gt; When Alice resolves the in-Lightning HTLC, it can then&lt;br/&gt;&amp;gt; send a new signature for the Resolved state.&lt;br/&gt;&amp;gt; Once the channel is in a Resolved state, Bob *SHOULD* sign&lt;br/&gt;&amp;gt; the last state and broadcast it on the blockchain, thereby&lt;br/&gt;&amp;gt; closing the Spilman-like channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The protocol messages for the Channel use-case are:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * `request_swap_in` Alice-&amp;gt;Bob: Tell Bob the UTXOs with&lt;br/&gt;&amp;gt;   the same swap-in-potentiam address to spend, how&lt;br/&gt;&amp;gt;   much to put into the Alice-&amp;gt;Bob channel direction,&lt;br/&gt;&amp;gt;   what channel to move into, and (optionally) a change&lt;br/&gt;&amp;gt;   address for Alice.&lt;br/&gt;&amp;gt; * `reject_swap_in` Bob-&amp;gt;Alice: Sent in response to&lt;br/&gt;&amp;gt;   `request_swap_in` if Bob refuses to cooperate (e.g.&lt;br/&gt;&amp;gt;   one of the UTXOs on offer was already signed with&lt;br/&gt;&amp;gt;   `response_arbitrary_signature`, or Bob cannot legally&lt;br/&gt;&amp;gt;   accept control of funds from one or more of the UTXOs&lt;br/&gt;&amp;gt;   offerred).&lt;br/&gt;&amp;gt; * `accept_swap_in` Bob-&amp;gt;Alice: Sent in response to&lt;br/&gt;&amp;gt;   `request_swap_in`, containing the Bob-side address to&lt;br/&gt;&amp;gt;   send funds to later once the state is Resolved.&lt;br/&gt;&amp;gt; * `swap_in_signed` Alice-&amp;gt;Bob: Response to&lt;br/&gt;&amp;gt;   `accept_swap_in`, containing the Alice-side signature&lt;br/&gt;&amp;gt;   for the HTLC-offering state transaction.&lt;br/&gt;&amp;gt;   Once Bob receives this, Bob can safely construct a&lt;br/&gt;&amp;gt;   new on-Lightning HTLC using BOLT1&lt;br/&gt;&amp;gt;   `update_offer_htlc`.&lt;br/&gt;&amp;gt; * `swap_in_resolved` Alice-&amp;gt;Bob: Sent after Alice has&lt;br/&gt;&amp;gt;   acquired the funds via `update_fulfill_htlc` of the&lt;br/&gt;&amp;gt;   corresponding on-Lightning HTLC, containing the&lt;br/&gt;&amp;gt;   Alice-side signature for the Resolved state&lt;br/&gt;&amp;gt;   transaction.&lt;br/&gt;&amp;gt;   The Resolved state transaction spends to the Bob-side&lt;br/&gt;&amp;gt;   address given in `accept_swap_in`, and any change to&lt;br/&gt;&amp;gt;   the Alice-side change address in `request_swap_in`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The plan is to reserve only one odd BOLT1 message ID,&lt;br/&gt;&amp;gt; and to embed the actual swap-in-potentiam message ID&lt;br/&gt;&amp;gt; as the first 2 bytes of the BOLT1 message, to reduce&lt;br/&gt;&amp;gt; pollution of the limited BOLT1 message ID space and to&lt;br/&gt;&amp;gt; allow more flexibility for swap-in-potentiam to expand&lt;br/&gt;&amp;gt; to new messages inside its own message ID space.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For a richer future protocol, we will want to consider&lt;br/&gt;&amp;gt; how a swap-in can be combined with a splice-in.&lt;br/&gt;&amp;gt; This is useful if the current total capacity of the&lt;br/&gt;&amp;gt; channel is lower than the available onchain funds.&lt;br/&gt;&amp;gt; The swap-in can be credited immediately (and is limited&lt;br/&gt;&amp;gt; to the current total capacity) while additional funds&lt;br/&gt;&amp;gt; can be added to the channel via splice-in (which is&lt;br/&gt;&amp;gt; credited only once the splice-in is confirmed).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As-is, a similar result can be obtained using openv1,&lt;br/&gt;&amp;gt; wherein a swap-in is combined with a channel open,&lt;br/&gt;&amp;gt; with the swap-in immediately credited while the channel&lt;br/&gt;&amp;gt; open is awaiting confirmation:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Alice and Bob currently have one or more existing&lt;br/&gt;&amp;gt;   channels, and Alice has a UTXO in a swap-in-potentiam&lt;br/&gt;&amp;gt;   address whose value exceeds the incoming capacity of&lt;br/&gt;&amp;gt;   the existing channel(s).&lt;br/&gt;&amp;gt; * Alice-&amp;gt;Bob `open_channel`.&lt;br/&gt;&amp;gt; * Bob-&amp;gt;Alice `accept_channel`.&lt;br/&gt;&amp;gt; * Alice-&amp;gt;Bob `request_swap_in` with the &amp;#34;change address&amp;#34;&lt;br/&gt;&amp;gt;   being the funding address of the channel.&lt;br/&gt;&amp;gt; * Bob-&amp;gt;Alice `accept_swap_in` provides the TXID of the&lt;br/&gt;&amp;gt;   funding transaction (Alice now knows the &amp;#34;change&lt;br/&gt;&amp;gt;   address&amp;#34; and the Bob final Resolved address, letting it&lt;br/&gt;&amp;gt;   know the final Resolved state transaction TXID).&lt;br/&gt;&amp;gt; * Alice-&amp;gt;Bob `funding_created` with the TXID.&lt;br/&gt;&amp;gt; * Bob-&amp;gt;Alice `funding_signed`.&lt;br/&gt;&amp;gt; * Alice-&amp;gt;Bob `swap_in_signed` to provide the signature&lt;br/&gt;&amp;gt;   spending the swap-in-potentiam address to Bob.&lt;br/&gt;&amp;gt; * Bob then constructs an HTLC over the existing channel,&lt;br/&gt;&amp;gt;   which Alice claims, revealing the preimage.&lt;br/&gt;&amp;gt; * Alice-&amp;gt;Bob `swap_in_resolved`.&lt;br/&gt;&amp;gt; * Bob then broadcasts the Resolved state transaction,&lt;br/&gt;&amp;gt;   which is also the funding transaction of the new channel.&lt;br/&gt;&amp;gt; * Both Alice and Bob await confirmation of the transaction&lt;br/&gt;&amp;gt;   in order to use the new channel.&lt;br/&gt;&amp;gt;   Alice can still use the existing channel, which has been&lt;br/&gt;&amp;gt;   topped-up with fresh outgoing capacity by the swap-in.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (The above is not safe, as Bob can complete the protocol&lt;br/&gt;&amp;gt; by using the HTLC-offerring state transaction; this can&lt;br/&gt;&amp;gt; be fixed by having Alice open *2* channels with the same&lt;br/&gt;&amp;gt; amount, one with the HTLC-offering state transaction as&lt;br/&gt;&amp;gt; the funding tx, the other with the Resolved state&lt;br/&gt;&amp;gt; transaction as the funding tx, and later `error`ing the&lt;br/&gt;&amp;gt; channel corresponding to the transaction that is not&lt;br/&gt;&amp;gt; confirmed; this is left as an exercise to the reader,&lt;br/&gt;&amp;gt; though note that it requires two different change addresses&lt;br/&gt;&amp;gt; for Alice for both HTLC-offerring and Resolved states,&lt;br/&gt;&amp;gt; which can be arranged for the protocol)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://en.bitcoin.it/wiki/Payment_channels#CLTV-style_payment_channels&#34;&gt;https://en.bitcoin.it/wiki/Payment_channels#CLTV-style_payment_channels&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/lightning-dev/attachments/20230104/22436848/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230104/22436848/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:12:25&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswpj285egn0d9yelt535gjj6e3mmf38vq7faerrvkul3478uja3hszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ugeyvhl</id>
    
      <title type="html">📅 Original date posted:2021-12-08 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswpj285egn0d9yelt535gjj6e3mmf38vq7faerrvkul3478uja3hszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ugeyvhl" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszfxy3pft4ft5zhheyw7gx8ql5tvnc2j7f3rtkutj4j5dz47807jgf2e5xr&#39;&gt;nevent1q…e5xr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi thread,&lt;br/&gt;&lt;br/&gt;I was indeed mistaken. It does require four rounds for both parties to&lt;br/&gt;fully transition to the next comimit tx and I don&amp;#39;t think there is any easy&lt;br/&gt;way around this. As you&amp;#39;ve pointed out there it&amp;#39;s still only three rounds&lt;br/&gt;before the message is forwarded so no performance decrease for forwarding.&lt;br/&gt;&lt;br/&gt;I wanted to add a theoretical note that you might be aware of. The final&lt;br/&gt;message &amp;#34;Bob -&amp;gt; Alice: revoke_and_ack&amp;#34; is not strictly necessary. Alice&lt;br/&gt;does not care about Bob revoking a commit tx that gives her strictly more&lt;br/&gt;coins. Bob&amp;#39;s new commit tx can use the same revocation key as the previous&lt;br/&gt;one i.e. only the offerer of the PTLC/HTLC does a revocation and increments&lt;br/&gt;their revocation key. Not sending messages you don&amp;#39;t need to is usually&lt;br/&gt;both more performant and simpler but given that it introduces some&lt;br/&gt;asymmetry so I&amp;#39;m not sure if it&amp;#39;s worth it. It&amp;#39;s also worth noting that&lt;br/&gt;with fast forwards &#43; symmetric commit tx you will need to do the full four&lt;br/&gt;rounds always I think.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Thu, 9 Dec 2021 at 02:03, Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi again AJ and list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I have slightly re-worked your proposal, and came up with the following&lt;br/&gt;&amp;gt; (I also added the musig2 nonces for completeness):&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice -&amp;gt; Bob: commitment_proposed&lt;br/&gt;&amp;gt;     channel id&lt;br/&gt;&amp;gt;     adaptor sigs for PTLCs to Bob in Alice&amp;#39;s next commitment&lt;br/&gt;&amp;gt;     musig nonces for Alice to spend funding tx&lt;br/&gt;&amp;gt;     musig nonces for Bob to spend funding tx&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bob -&amp;gt; Alice: commitment_proposed&lt;br/&gt;&amp;gt;     channel id&lt;br/&gt;&amp;gt;     adaptor sigs for PTLCs to Alice in Bob&amp;#39;s next commitment&lt;br/&gt;&amp;gt;     musig nonces for Alice to spend funding tx&lt;br/&gt;&amp;gt;     musig nonces for Bob to spend funding tx&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bob -&amp;gt; Alice: commitment_signed&lt;br/&gt;&amp;gt;     channel id&lt;br/&gt;&amp;gt;     signature for Alice to spend funding tx&lt;br/&gt;&amp;gt;     sigs for Alice to spend HTLCs and PTLCs from her next commitment&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice -&amp;gt; Bob: revoke_and_ack&lt;br/&gt;&amp;gt;     channel id&lt;br/&gt;&amp;gt;     reveal previous commitment secret&lt;br/&gt;&amp;gt;     next commitment point&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice -&amp;gt; Bob: commitment_signed&lt;br/&gt;&amp;gt;     channel id&lt;br/&gt;&amp;gt;     signature for Bob to spend funding tx&lt;br/&gt;&amp;gt;     sigs for Bob to spend HTLCs and PTLCs from his next commitment&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bob -&amp;gt; Alice: revoke_and_ack&lt;br/&gt;&amp;gt;     channel id&lt;br/&gt;&amp;gt;     reveal previous commitment secret&lt;br/&gt;&amp;gt;     next commitment point&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe it&amp;#39;s exactly the same flow of data between peers as your&lt;br/&gt;&amp;gt; proposal, but I simply split the data into several messages. Let me&lt;br/&gt;&amp;gt; know if that&amp;#39;s incorrect or if I missed a subtlety in your proposal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This has some small advantages:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * commitment_signed and revoke_and_ack are mostly unchanged, we just&lt;br/&gt;&amp;gt; add a new message before the commit / revoke dance. The only change&lt;br/&gt;&amp;gt; happens in commitment_signed, where the signatures for PTLC-success&lt;br/&gt;&amp;gt; transactions will actually become adaptor signatures.&lt;br/&gt;&amp;gt; * the new adaptor signatures are in commitment_proposed instead of being&lt;br/&gt;&amp;gt; in commitment_signed, which ensures that we can still have 2*483&lt;br/&gt;&amp;gt; pending (H|P)TLCs: since the message size is limited to 65kB, we would&lt;br/&gt;&amp;gt; otherwise decrease our maximum to ~2*335 with your proposal (very rough&lt;br/&gt;&amp;gt; calculation)&lt;br/&gt;&amp;gt; * the messages are now symmetrical, which may be easier to reason about&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One thing to note is that we reversed the order in which participants&lt;br/&gt;&amp;gt; sign new commitments. We previously had Alice sign first, whereas now&lt;br/&gt;&amp;gt; if Alice initiates, Bob will sign the updated commitment first. This is&lt;br/&gt;&amp;gt; why we add only 0.5 RTT instead of 1 RTT compared to the current protocol.&lt;br/&gt;&amp;gt; I don&amp;#39;t think this is an issue, but if someone sees a way to maliciously&lt;br/&gt;&amp;gt; exploit this, please share it!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I updated my article [0], people jumping on the thread now may find it&lt;br/&gt;&amp;gt; helpful to better understand this discussion.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0] &lt;a href=&#34;https://github.com/t-bast/lightning-docs/pull/16&#34;&gt;https://github.com/t-bast/lightning-docs/pull/16&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le mer. 8 déc. 2021 à 11:00, Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; a&lt;br/&gt;&amp;gt; écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi AJ,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think the problem t-bast describes comes up here as well when you&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; collapse the fast-forwards (or, anytime you update the commitment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; transaction even if you don&amp;#39;t collapse them).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yes, exactly.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think doing a synchronous update of commitments to the channel state,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; something like:&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; Alice -&amp;gt; Bob: propose_new_commitment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; channel id&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; adaptor sigs for PTLCs to Bob&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Bob -&amp;gt; Alice: agree_new_commitment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; channel id&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; adaptor sigs for PTLCs to Alice&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; sigs for Alice to spend HTLCs and PTLCs to Bob from her own&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; commitment tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; signature for Alice to spend funding tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Alice -&amp;gt; Bob: finish_new_commitment_1&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; channel id&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; sigs for Bob to spend HTLCs and PTLCs to Alice from his own&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; commitment tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; signature for Bob to spend funding tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; reveal old prior commitment secret&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; new commitment nonce&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Bob -&amp;gt; Alice: finish_new_commitment_2&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; reveal old prior commitment secret&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; new commitment nonce&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; would work pretty well.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I agree, this is better than my naive addition of a `remote_ptlcs_signed`&lt;br/&gt;&amp;gt;&amp;gt; message in both directions, and even though it changes the protocol&lt;br/&gt;&amp;gt;&amp;gt; messages&lt;br/&gt;&amp;gt;&amp;gt; it stays very close to the mechanisms we currently have.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;ll spend some time specifying this in more details, to verify that we&amp;#39;re&lt;br/&gt;&amp;gt;&amp;gt; not missing anything. What I really like about this proposal is that we&lt;br/&gt;&amp;gt;&amp;gt; can probably bundle that protocol change with `option_simplified_update`&lt;br/&gt;&amp;gt;&amp;gt; [0]&lt;br/&gt;&amp;gt;&amp;gt; without the adaptor sigs, and simply add the adaptor sigs as tlvs when we&lt;br/&gt;&amp;gt;&amp;gt; do PTLCs. That lets us deploy this new update protocol separately from&lt;br/&gt;&amp;gt;&amp;gt; PTLCs&lt;br/&gt;&amp;gt;&amp;gt; and ensure it also simplifies the state machine and makes other features&lt;br/&gt;&amp;gt;&amp;gt; such as splicing [1] and dynamic channel upgrades [2] easier.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [0] &lt;a href=&#34;https://github.com/lightning/bolts/pull/867&#34;&gt;https://github.com/lightning/bolts/pull/867&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [1] &lt;a href=&#34;https://github.com/lightning/bolts/pull/863&#34;&gt;https://github.com/lightning/bolts/pull/863&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; [2] &lt;a href=&#34;https://github.com/lightning/bolts/pull/868&#34;&gt;https://github.com/lightning/bolts/pull/868&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Le mer. 8 déc. 2021 à 10:29, Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; On Tue, Dec 07, 2021 at 11:52:04PM &#43;0000, ZmnSCPxj via Lightning-dev&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Alternately, fast-forwards, which avoid this because it does not&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; change commitment transactions on the payment-forwarding path.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; You only change commitment transactions once you have enough changes&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; to justify collapsing them.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I think the problem t-bast describes comes up here as well when you&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; collapse the fast-forwards (or, anytime you update the commitment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; transaction even if you don&amp;#39;t collapse them).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; That is, if you have two PTLCs, one from A-&amp;gt;B conditional on X, one&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; from B-&amp;gt;A conditional on Y. Then if A wants to update the commitment tx,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; she needs to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   1) produce a signature to give to B to spend the funding tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   2) produce an adaptor signature to authorise B to spend via X from his&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;      commitment tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   3) produce a signature to allow B to recover Y after timeout from his&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;      commitment tx spending to an output she can claim if he cheats&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   4) *receive* an adaptor signature from B to be able to spend the Y&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; output&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;      if B posts his commitment tx using A&amp;#39;s signature in (1)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; The problem is, she can&amp;#39;t give B the result of (1) until she&amp;#39;s received&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; (4) from B.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; It doesn&amp;#39;t matter if the B-&amp;gt;A PTLC conditional on Y is in the commitment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; tx itself or within a fast-forward child-transaction -- any previous&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; adaptor sig will be invalidated because there&amp;#39;s a new commitment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; transaction, and if you allowed any way of spending without an adaptor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; sig, B wouldn&amp;#39;t be able to recover the secret and would lose funds.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; It also doesn&amp;#39;t matter if the commitment transaction that A and B will&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; publish is the same or different, only that it&amp;#39;s different from the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; commitment tx that previous adaptor sigs committed to. (So ANYPREVOUT&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; would fix this if it were available)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; So I think this is still a relevant question, even if fast-forwards&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; make it a rare problem, that perhaps is only applicable to very heavily&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; used channels.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; (I said the following in email to t-bast already)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I think doing a synchronous update of commitments to the channel state,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; something like:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;    Alice -&amp;gt; Bob: propose_new_commitment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        channel id&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        adaptor sigs for PTLCs to Bob&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;    Bob -&amp;gt; Alice: agree_new_commitment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        channel id&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        adaptor sigs for PTLCs to Alice&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        sigs for Alice to spend HTLCs and PTLCs to Bob from her own&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;          commitment tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        signature for Alice to spend funding tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;    Alice -&amp;gt; Bob: finish_new_commitment_1&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        channel id&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        sigs for Bob to spend HTLCs and PTLCs to Alice from his own&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;          commitment tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        signature for Bob to spend funding tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        reveal old prior commitment secret&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        new commitment nonce&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;    Bob -&amp;gt; Alice: finish_new_commitment_2&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        reveal old prior commitment secret&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;        new commitment nonce&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; would work pretty well.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; This adds half a round-trip compared to now:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;    Alice -&amp;gt; Bob: commitment_signed&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;    Bob -&amp;gt; Alice: revoke_and_ack, commitment_signed&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;    Alice -&amp;gt; Bob: revoke_and_ack&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; The timings change like so:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   Bob can use the new commitment after 1.5 round-trips (previously 0.5)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   Alice can be sure Bob won&amp;#39;t use the old commitment after 2 round-trips&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   (previously 1)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   Alice can use the new commitment after 1 round-trip (unchanged)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   Bob can be sure Alice won&amp;#39;t use the old commitment after 1.5&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; round-trips&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;   (unchanged -- note: this is what&amp;#39;s relevant for forwarding)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Making the funding tx a musig setup would mean also supplying 64B&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; of musig2 nonces along with the &amp;#34;adaptor sigs&amp;#34; in one direction,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; and providing the other side&amp;#39;s 64B of musig2 nonces back along with the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; (now partial) signature for spending the funding tx (a total of 256B of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; nonce data, not 128B).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Because it keeps both peers&amp;#39; commitments synchronised to a single channel&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; state, I think the same protocol should work fine with the revocable&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; signatures on a single tx approach too, though I haven&amp;#39;t tried working&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; through the details.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Fast forwards would then be reducing the 2 round-trip protocol to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; update the state commitment to a 0.5 round-trip update, to reduce&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; latency when forwarding by the same amount as before (1.5 round-trips&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; to 0.5 round-trips).&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; aj&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/lightning-dev/attachments/20211209/dcadd171/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211209/dcadd171/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:40&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0gzhk0tej6rvyma0zmkcudvphuz37xyww9q4nu0cp7glue708reczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u828g5y</id>
    
      <title type="html">📅 Original date posted:2021-12-07 📝 Original message: I was ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0gzhk0tej6rvyma0zmkcudvphuz37xyww9q4nu0cp7glue708reczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u828g5y" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsx935rmvckj4gy0htnzlxd4gcf5htyzs97e9s7csdcgxjxp0tyg6g4jg05a&#39;&gt;nevent1q…g05a&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-07&lt;br/&gt;📝 Original message:&lt;br/&gt;I was thinking along the same lines as Z. With MuSig2 and pre-sharing of&lt;br/&gt;signature nonces it should stay three rounds and share a similar structure.&lt;br/&gt;&lt;br/&gt;On Tue, 7 Dec 2021 at 11:08, ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Basically, if my memory and understanding are accurate, in the above, it&lt;br/&gt;&amp;gt; is the *PTLC-offerrer* which provides an adaptor signature.&lt;br/&gt;&amp;gt; That adaptor signature would be included in the `update_add_ptlc` message.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Isn&amp;#39;t it the case that all previous PTLC adaptor signatures need to be&lt;br/&gt;re-sent for each update_add_ptlc message because the signatures would no&lt;br/&gt;longer be valid once the commit tx changes. I think it&amp;#39;s better to put it&lt;br/&gt;in `commitment_signed` if possible. This is what is done with pre-signed&lt;br/&gt;HTLC signatures at the moment anyway.&lt;br/&gt;&lt;br/&gt;LL&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/20211207/894e2b77/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211207/894e2b77/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxljcuft3ezf34stdvddpfn4z0skrtjj04j3lqgce9xlzl9svrndszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uglzqpj</id>
    
      <title type="html">📅 Original date posted:2021-10-13 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxljcuft3ezf34stdvddpfn4z0skrtjj04j3lqgce9xlzl9svrndszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uglzqpj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstl8ksldnu79r452hpzrwkfwtu032gggtkra2cxs3sktrymdahw7c82kcwd&#39;&gt;nevent1q…kcwd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-13&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi SomberNight,&lt;br/&gt;&lt;br/&gt;I started a similar discussion less than a year ago on the list. The idea I&lt;br/&gt;put forward works fine with MuSig and taproot.&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-December/002907.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-December/002907.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The idea was considered for channel establishment v2 but in the end there&lt;br/&gt;were various objections to it becoming specified as it forces&lt;br/&gt;implementations to handle keys in a certain way. You can still do it&lt;br/&gt;informally though by fixing your funding pubkey to be derived from the&lt;br/&gt;Diffie-Hellman key of the two node ids. This makes the funding public keys&lt;br/&gt;a (secret) deterministic function of the two node ids without making a&lt;br/&gt;privacy leak.&lt;br/&gt;&lt;br/&gt;FWIW I still think this is a good idea but in hindsight I think the&lt;br/&gt;objections to it being mandatory are valid.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Sat, 18 Sept 2021 at 02:14, SomberNight via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; TL;DR: an approach is described how to derive channel keys&lt;br/&gt;&amp;gt; deterministically that allows certain forms of recovery from just&lt;br/&gt;&amp;gt; a seed, that works today. This approach however will no longer work&lt;br/&gt;&amp;gt; with e.g. MuSig key aggregation in the future. An idea for a proposal&lt;br/&gt;&amp;gt; is given how the channel-open flow (e.g. as part of channel v2) could be&lt;br/&gt;&amp;gt; changed to make a similar approach work independent of key aggregation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -----&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While implementing anchor output support in Electrum, we have realised&lt;br/&gt;&amp;gt; one difficulty is to do with the remote-force-close case where the&lt;br/&gt;&amp;gt; to_remote output is no longer a simple p2wpkh.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Currently, pre-anchor-support, Electrum sets option_static_remotekey&lt;br/&gt;&amp;gt; to required (feature bit 12), and we restrict lightning usage to wallets&lt;br/&gt;&amp;gt; that derive p2wpkh addresses, and payment_basepoint is set&lt;br/&gt;&amp;gt; to a bip32-derived pubkey that corresponds to a wallet address.&lt;br/&gt;&amp;gt; Hence, if a user were to restore from seed words, and their channel&lt;br/&gt;&amp;gt; counterparty force closed their channel, the to_remote output of the&lt;br/&gt;&amp;gt; broadcast commitment tx would directly pay to the user&amp;#39;s wallet.&lt;br/&gt;&amp;gt; That is, in many typical scenarios, funds are not lost when restoring&lt;br/&gt;&amp;gt; from seed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (Also, if we are the channel-funder/opener, it is easy to find the&lt;br/&gt;&amp;gt; funding transaction, just by testing txs in the wallet history.&lt;br/&gt;&amp;gt; Further, for the cases we are the channel-funder/opener,&lt;br/&gt;&amp;gt; there is a setting to put an OP_RETURN in the funding tx, which stores&lt;br/&gt;&amp;gt; the nodeid of the counterparty, allowing us to identify who to contact&lt;br/&gt;&amp;gt; to get the channel closed.&lt;br/&gt;&amp;gt; Also, we are (ab)using dataloss_protect to ask the remote&lt;br/&gt;&amp;gt; to force-close when restoring from seed, so the user does not even have&lt;br/&gt;&amp;gt; to wait for an arbitrarily long time.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With anchors, the to_remote is now a p2wsh that involves a CSV,&lt;br/&gt;&amp;gt; and we cannot easily make this script correspond to a wallet address,&lt;br/&gt;&amp;gt; i.e. we lose the property that the remote-force-close pays directly&lt;br/&gt;&amp;gt; to a wallet address.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So, the problem we would like to solve, is:&lt;br/&gt;&amp;gt; - having seed words&lt;br/&gt;&amp;gt; - having access to blockchain data&lt;br/&gt;&amp;gt; - somehow having identified our channel counterparties (node IDs),&lt;br/&gt;&amp;gt;   and our channels with them (funding outpoints)&lt;br/&gt;&amp;gt; - and assuming we can get the remote to do a force-close&lt;br/&gt;&amp;gt; --&amp;gt; we would like to be able to spend the to_remote output&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Solutions:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1) Naively, we could just derive a static key to be used as&lt;br/&gt;&amp;gt; payment_basepoint, reused between all our channels, and watch the&lt;br/&gt;&amp;gt; single resulting p2wsh script on-chain.&lt;br/&gt;&amp;gt; Clearly this has terrible privacy implications.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2) Or, we could derive a new bip32 chain/sequence of pubkeys&lt;br/&gt;&amp;gt; used as payment_basepoint for channels, and watch these p2wsh scripts,&lt;br/&gt;&amp;gt; with a gap limit.&lt;br/&gt;&amp;gt; Particularly the gap limit part makes this undesirable though&lt;br/&gt;&amp;gt; (just consider having more than &amp;#34;gap limit&amp;#34; channels open and restoring&lt;br/&gt;&amp;gt; from seed).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Instead, it seems desirable to see whether we can extract some entropy&lt;br/&gt;&amp;gt; from the blockchain, and use that as a nonce to be combined with a&lt;br/&gt;&amp;gt; static private secret derived from our seed.&lt;br/&gt;&amp;gt; We could extract data either from the funding tx, or from the&lt;br/&gt;&amp;gt; remote-commitment-transaction that spent the funding output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 3) We exploit the fact that the funding output uses a&lt;br/&gt;&amp;gt; 2of2 OP_CHECKMULTISIG script composed of the funding pubkeys of&lt;br/&gt;&amp;gt; each party. The funding pubkey itself can be used as a nonce, and&lt;br/&gt;&amp;gt; it can be recovered from the witness of the commitment tx.&lt;br/&gt;&amp;gt; The privkey for payment_basepoint can then be derived as e.g.&lt;br/&gt;&amp;gt; hash(bip32_derive(seed, HARDCODED_PATH) &#43; funding_pubkey).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In fact (3) is not novel at all: eclair has been deriving&lt;br/&gt;&amp;gt; all their channel keys like this [0] for some time, from&lt;br/&gt;&amp;gt; a static seed-based secret combined with the funding_pubkey as nonce,&lt;br/&gt;&amp;gt; and generating the funding_privkey from ~os.urandom.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Electrum will likely use (3) at least for the payment_basepoint,&lt;br/&gt;&amp;gt; as part of adapting to anchors.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -----&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Note that the idea (3) relies on recovering the funding_pubkey from&lt;br/&gt;&amp;gt; the witness of the spending transaction, which will break in the future&lt;br/&gt;&amp;gt; if the funding script is changed to e.g. a p2tr that uses musig.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Crucially, note that all the approach needs is some blockchain-visible&lt;br/&gt;&amp;gt; nonce that is already known at the time we need to construct the&lt;br/&gt;&amp;gt; open_channel message (as we want to be able to derive some of the keys&lt;br/&gt;&amp;gt; that are sent as part of the open_channel message&lt;br/&gt;&amp;gt; (e.g. payment_basepoint) from it).&lt;br/&gt;&amp;gt; As long as the funding output uses a 2of2 OP_CHECKMULTISIG,&lt;br/&gt;&amp;gt; the local funding_pubkey fits the bill.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Note that irrespective of any restrictions on the script used in&lt;br/&gt;&amp;gt; the funding output, we could use the funding scriptPubKey/address as&lt;br/&gt;&amp;gt; the nonce, if the open_channel/accept_channel messages were&lt;br/&gt;&amp;gt; split into two.&lt;br/&gt;&amp;gt; For example, instead of the single round of open_channel/accept_channel,&lt;br/&gt;&amp;gt; there could be two rounds:&lt;br/&gt;&amp;gt; - an open_channel_part1, where the peers exchange only&lt;br/&gt;&amp;gt;   the funding_pubkey (and the other non-pubkey fields), and&lt;br/&gt;&amp;gt; - an open_channel_part2, where the rest of the pubkeys are sent&lt;br/&gt;&amp;gt; This way the peers would learn what the funding address would be after&lt;br/&gt;&amp;gt; the first round finishes, and could potentially use that to derive&lt;br/&gt;&amp;gt; their other channel keys (needed for round 2).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So, to arrive at my point, I would like to ask whether people think&lt;br/&gt;&amp;gt; such a change - or something similar - might be useful, and if so,&lt;br/&gt;&amp;gt; whether it could/should be incorporated to the current&lt;br/&gt;&amp;gt; channel establishment v2 proposal [1].&lt;br/&gt;&amp;gt; If there is agreement that this would be useful, a spec change&lt;br/&gt;&amp;gt; would be most useful before changing the 2of2 multisig script.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ghost43 (SomberNight)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0]: &lt;a href=&#34;https://github.com/ACINQ/eclair/pull/1097&#34;&gt;https://github.com/ACINQ/eclair/pull/1097&lt;/a&gt;&lt;br/&gt;&amp;gt; [1]: &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/851&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/851&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/lightning-dev/attachments/20211013/390ec20d/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211013/390ec20d/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:16&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszzjcgx3pkkkjzpw6tuytj6ejf9y5jd4pp250cvry97e2l7cpmxsqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9un3h7ke</id>
    
      <title type="html">📅 Original date posted:2021-10-13 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszzjcgx3pkkkjzpw6tuytj6ejf9y5jd4pp250cvry97e2l7cpmxsqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9un3h7ke" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfyvj2tvwg7ecuswzmruz492z86w8t6l0jpwahh0utghz2hgdwvpgzgr5r0&#39;&gt;nevent1q…r5r0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-13&lt;br/&gt;📝 Original message:&lt;br/&gt;On Tue, 12 Oct 2021 at 14:08, Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you&amp;#39;re willing to accept that &amp;#34;worst case&amp;#34; happening more often, I&lt;br/&gt;&amp;gt; think you could then retain the low latency forwarding, by having the&lt;br/&gt;&amp;gt; transaction structure be:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; commitment tx&lt;br/&gt;&amp;gt;   input:&lt;br/&gt;&amp;gt;      funding tx&lt;br/&gt;&amp;gt;   outputs:&lt;br/&gt;&amp;gt;      Alice&amp;#39;s balance&lt;br/&gt;&amp;gt;      (others)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; low-latency inflight tx:&lt;br/&gt;&amp;gt;   input:&lt;br/&gt;&amp;gt;     Alice&amp;#39;s balance&lt;br/&gt;&amp;gt;   output:&lt;br/&gt;&amp;gt;     (1) or (2)&lt;br/&gt;&amp;gt;     Alice&amp;#39;s remaining balance&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bob claim:&lt;br/&gt;&amp;gt;   input:&lt;br/&gt;&amp;gt;     (1) [&amp;lt;payment-recovery-delay&amp;gt; CSV bob CHECKSIG]&lt;br/&gt;&amp;gt;   output:&lt;br/&gt;&amp;gt;     [&amp;lt;bob-revoke&amp;gt; checksigverify &amp;lt;alice&amp;gt; checksig&lt;br/&gt;&amp;gt;      ifdup notif &amp;lt;channel-recovery-delay&amp;gt; csv endif]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Too-slow:&lt;br/&gt;&amp;gt;   input:&lt;br/&gt;&amp;gt;     (2) [&amp;lt;payment-timeout&amp;gt; CLTV alice CHECKSIG]&lt;br/&gt;&amp;gt;   output:&lt;br/&gt;&amp;gt;     Alice&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The idea being:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * Alice sends the low-latency inflight tx which Bob then forwards&lt;br/&gt;&amp;gt;    immediately.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * Bob then tries to update the base channel state with Alice, so both&lt;br/&gt;&amp;gt;    sides have a commitment to the new payment, and the low-latency&lt;br/&gt;&amp;gt;    inflight tx is voided (since it&amp;#39;s based on a revoked channel state)&lt;br/&gt;&amp;gt;    If this succeeds, everything is fine as usual.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * If Alice is unavailable to confirm that update, Bob closes the&lt;br/&gt;&amp;gt;    channel prior to (payment-timeout - payment-recover-delay), and posts&lt;br/&gt;&amp;gt;    &amp;#34;Bob claim&amp;#34;. After an additional pyment recovery delay (and prior&lt;br/&gt;&amp;gt;    to payment-timeout) Bob posts Bob claim, ensuring that the only way&lt;br/&gt;&amp;gt;    Alice can claim the funds is if he had posted a revoked state.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * In this case, Alice has at least one payment-recovery-delay period&lt;br/&gt;&amp;gt;    prior to the payment-timeout to notice the transaction onchain and&lt;br/&gt;&amp;gt;    recover the preimage.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * If Bob posted the low-latency inflight tx later than&lt;br/&gt;&amp;gt;    (payment-timeout - payment-recovery-delay) then Alice will have&lt;br/&gt;&amp;gt;    payment-recovery-delay time to notice and post the &amp;#34;too-slow&amp;#34; tx and&lt;br/&gt;&amp;gt;    claim the funds via the timeout path.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * If Bob posted a revoked state, Alice can also claim the funds via&lt;br/&gt;&amp;gt;    Bob claim, provided she notices within the channel-recovery-delay&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;In my mind your &amp;#34;update the base channel state&amp;#34; idea seems to fix&lt;br/&gt;everything by itself. So at T - to_self_delay (or a bit before) you say to&lt;br/&gt;your counterparty &amp;#34;can we lift this HTLC out of your in-flight tx into the&lt;br/&gt;&amp;#39;balance tx&amp;#39; (which will go back to naming a &amp;#39;commitment tx&amp;#39; since it&lt;br/&gt;doesn&amp;#39;t just have balance outputs anymore) so I can use it too? --&lt;br/&gt;otherwise I&amp;#39;ll have to close the channel on chain now to force you to&lt;br/&gt;reveal it to me on time?&amp;#34;. If they agree, after the revocation and new&lt;br/&gt;commit tx everything is back to (tx symmetric) Poon-Dryja so no need for&lt;br/&gt;extra CSVs. Am I missing something?&lt;br/&gt;&lt;br/&gt;I realise this kills some of the elegance of your original protocol and&lt;br/&gt;adds quite a bit of complexity but I think it retains the important&lt;br/&gt;properties.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; That only allows one low-latency payment to be inflight though, which I&amp;#39;m&lt;br/&gt;&amp;gt; not sure is that interesting... It&amp;#39;s also kinda complicated, and doesn&amp;#39;t&lt;br/&gt;&amp;gt; cover both the low-latency and offline cases, which is disappointing...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;It seems to me lazily lifting the HTLCs into the commitment tx would allow&lt;br/&gt;as many low-latency payments as you want to be in-flight. You would&lt;br/&gt;probably just lift them all up to the commitment tx if you lift one. I&lt;br/&gt;think in the case of nodes that want to keep channel keys offline, having&lt;br/&gt;to go on-chain at T - to_self_delay is not a disaster since it will likely&lt;br/&gt;only be the payment receiver who has their keys offline i.e. the merchant&lt;br/&gt;or end user. So only the last hop would go on chain if the user fails to&lt;br/&gt;claim payment as per usual (just to_self_delay earlier than usual).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20211013/f94a9551/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211013/f94a9551/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg3kkqkyd4t8m64uvn5vwdxzcx04eqhcyvnxf3tve2wsl4lz5966szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u4hym94</id>
    
      <title type="html">📅 Original date posted:2021-10-11 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg3kkqkyd4t8m64uvn5vwdxzcx04eqhcyvnxf3tve2wsl4lz5966szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u4hym94" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq22gwxdass387pftx3n06908k5kvf8ewn7khr0k87m77hcke7yused0kga&#39;&gt;nevent1q…0kga&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-11&lt;br/&gt;📝 Original message:&lt;br/&gt;On Mon, 11 Oct 2021 at 9:23 pm, Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Adjust the protocol so that you reciprocate the in-flight txs. So when I&lt;br/&gt;&amp;gt; offer you a HTLC you first forward it and then lazily send me the signature&lt;br/&gt;&amp;gt; for the inflight tx. Therefore I dont have to wait to get the HTLC on chain&lt;br/&gt;&amp;gt; and don’t have to close the channel early.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So against a malicious node you have to go on chain to_self_delay earlier&lt;br/&gt;&amp;gt; than usual but if both are honest you don’t have to. The problem with eltoo&lt;br/&gt;&amp;gt; is that we don’t know how to achieve this even if both parties are honest&lt;br/&gt;&amp;gt; iirc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Err never mind that won’t work. Sending in-flights to both parties makes no&lt;br/&gt;sense because they can be stale of course.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&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/lightning-dev/attachments/20211012/603c793a/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211012/603c793a/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq22gwxdass387pftx3n06908k5kvf8ewn7khr0k87m77hcke7yuszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uq2awgj</id>
    
      <title type="html">📅 Original date posted:2021-10-11 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq22gwxdass387pftx3n06908k5kvf8ewn7khr0k87m77hcke7yuszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uq2awgj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsf4r3tx2x3ky4gajzugkkmgfn0hhmgz8t6r3jnspkpnhzde23akkq4jn0ae&#39;&gt;nevent1q…n0ae&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-11&lt;br/&gt;📝 Original message:&lt;br/&gt;On Mon, 11 Oct 2021 at 17:30, Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t think the layering here quite works: if Alice forwarded a payment&lt;br/&gt;&amp;gt; to Bob, with timeout T, then the only way she can be sure that she can&lt;br/&gt;&amp;gt; either reclaim the funds or know the preimage by time T is to close the&lt;br/&gt;&amp;gt; channel on-chain at time T-to_self_delay.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Any time later than that, say T-to_self_delay&#43;x&#43;1, would allow Bob to&lt;br/&gt;&amp;gt; post the inflight tx at T&#43;x (prior to Alice being able to claim her&lt;br/&gt;&amp;gt; balance directly due to the to_self_delay) and then immediately post the&lt;br/&gt;&amp;gt; layered transaction (4, above) revealing the preimage, and preventing&lt;br/&gt;&amp;gt; Alice from claiming the refund.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;This problem may not be as bad as it seems. Recall that the issue in eltoo&lt;br/&gt;is worse because you are delayed both when you are offering and receiving&lt;br/&gt;the HTLC. In this one you are only delayed on offered HTLC.&lt;br/&gt;&lt;br/&gt;Adjust the protocol so that you reciprocate the in-flight txs. So when I&lt;br/&gt;offer you a HTLC you first forward it and then lazily send me the signature&lt;br/&gt;for the inflight tx. Therefore I dont have to wait to get the HTLC on chain&lt;br/&gt;and don’t have to close the channel early.&lt;br/&gt;&lt;br/&gt;So against a malicious node you have to go on chain to_self_delay earlier&lt;br/&gt;than usual but if both are honest you don’t have to. The problem with eltoo&lt;br/&gt;is that we don’t know how to achieve this even if both parties are honest&lt;br/&gt;iirc.&lt;br/&gt;&lt;br/&gt;LL&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/20211011/270d3661/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211011/270d3661/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswqcu4tmpvryc3czxj3gr2pq2f4alpvcmu4pvfydne9jygh05eyjszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ug9z0d8</id>
    
      <title type="html">📅 Original date posted:2021-10-11 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswqcu4tmpvryc3czxj3gr2pq2f4alpvcmu4pvfydne9jygh05eyjszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ug9z0d8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrxg8sgs4jj4gw3zz0ca6sqz0vexeezxrvzyphmnm2g97h8qc85fq5ftcjr&#39;&gt;nevent1q…tcjr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey aj,&lt;br/&gt;&lt;br/&gt;This is awesome work. My line of research on &amp;#34;witness asymmetric channels&amp;#34;&lt;br/&gt;essentially ended up in a dead end because I couldn&amp;#39;t see how they were&lt;br/&gt;much better than naive PTLC lightning. The idea I really liked from it was&lt;br/&gt;&amp;#34;revocable signatures&amp;#34;. I hoped someone would eventually figure out what to&lt;br/&gt;do with them. Looks like you&amp;#39;ve done that!&lt;br/&gt;&lt;br/&gt;I also didn&amp;#39;t make the connection to how revocable signatures actually&lt;br/&gt;solves the constant size storage problem. I knew it could make the protocol&lt;br/&gt;in &amp;#34;generalized payment channels&amp;#34; [1] only require constant size which was&lt;br/&gt;the target of the idea but I hadn&amp;#39;t considered that lightning already&lt;br/&gt;suffers from this problem so it can be applied more generally.&lt;br/&gt;&lt;br/&gt;The other big breakthrough you made is showing how you can do concurrent&lt;br/&gt;non-interactive payment forwarding by using a refined version of Z&amp;#39;s fast&lt;br/&gt;forward idea. In my mind the most practical way to make FF work on&lt;br/&gt;Poon-Dryja channels was to do it asymmetrically [3] but this meant that if&lt;br/&gt;a payment was sent the other way you&amp;#39;d have to do a 3 phase commit first.&lt;br/&gt;With your idea as long as you have balance to spare in your balance output&lt;br/&gt;you can always forward a payment in one message. A nice speed boost for&lt;br/&gt;busy routing nodes.&lt;br/&gt;&lt;br/&gt;### Scorched earth punishment&lt;br/&gt;&lt;br/&gt;Another thing that I&amp;#39;d like to mention is that using revocable signatures&lt;br/&gt;enables scorched earth punishments [2]. The key you reveal when you post a&lt;br/&gt;revoked state does not have to be limited to your channel -- it could be&lt;br/&gt;used in multiple channels allowing the wronged party to take coins from all&lt;br/&gt;their channels with the perpetrator. Furthermore, a lightning service&lt;br/&gt;provider that offers channels with the same channel key to all their&lt;br/&gt;customers is putting up all their coins in all their existing channels as&lt;br/&gt;their good behaviour bond rather than just the coins they have in the&lt;br/&gt;channels they have with you.&lt;br/&gt;&lt;br/&gt;For many users this will be sufficient to go without a &amp;#34;watchtower&amp;#34; to do&lt;br/&gt;punishments for them. They know if the LSP takes their coins with a revoked&lt;br/&gt;state whenever they come back online they can punish the LSP by revealing&lt;br/&gt;their static channel key to everyone. They can even do this weeks or months&lt;br/&gt;after the theft assuming the LSP is still operating with the same key.&lt;br/&gt;&lt;br/&gt;Some people feel this idea is too spicy but I prefer it to introducing a&lt;br/&gt;trusted third party for people that cannot be online all the time.&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://eprint.iacr.org/2020/476.pdf&#34;&gt;https://eprint.iacr.org/2020/476.pdf&lt;/a&gt;&lt;br/&gt;[2]&lt;br/&gt;&lt;a href=&#34;https://github.com/LLFourn/witness-asymmetric-channel#scorched-earth-punishments&#34;&gt;https://github.com/LLFourn/witness-asymmetric-channel#scorched-earth-punishments&lt;/a&gt;&lt;br/&gt;[3]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-June/003045.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-June/003045.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Some queries below:&lt;br/&gt;&lt;br/&gt;On Sat, 9 Oct 2021 at 12:12, Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We will use &amp;#34;i&amp;#34; to represent the number of times a given inflight&lt;br/&gt;&amp;gt; transaction has been updated for the nth update to the balance&lt;br/&gt;&amp;gt; transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At any time Alice can update the inflight transaction spending her balance&lt;br/&gt;&amp;gt; to transfer funds towards Bob, either by updating the balances directly,&lt;br/&gt;&amp;gt; or adding a htlc/ptlc entry to conditionally transfer funds to Bob. (And&lt;br/&gt;&amp;gt; conversely for Bob)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We will define RP=musig(A/2/n/i, RB2(n,i)).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The inflight transaction spending Alice&amp;#39;s balance can have multiple&lt;br/&gt;&amp;gt; types of outputs:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * Alice&amp;#39;s remaining balance: pays directly to A/2/n/i&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * Bob&amp;#39;s remaining balances: pays to RP/2 with script path&lt;br/&gt;&amp;gt;    &amp;#34;&amp;lt;B/2/n/i&amp;gt; CHECKSIGVERIFY &amp;lt;D&amp;gt; CSV&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * An htlc paying to Bob: pays to RP/2/k with script paths:&lt;br/&gt;&amp;gt;    &#43; &amp;#34;LENGTH 32 EQUALVERIFY HASH160 &amp;lt;X&amp;gt; EQUALVERIFY &amp;lt;B/2/n/i/k&amp;gt;&lt;br/&gt;&amp;gt; CHECKSIGVERIFY &amp;lt;A/2/n/i/k&amp;gt; CHECKSIG&amp;#34;&lt;br/&gt;&amp;gt;    &#43; &amp;#34;&amp;lt;A/2/n/i/k/1&amp;gt; CHECKSIGVERIFY &amp;lt;T&amp;gt; CLTV&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * A ptlc paying to Bob: pays to RP/2/k with script paths:&lt;br/&gt;&amp;gt;    &#43; &amp;#34;&amp;lt;B/2/n/i/k&amp;gt; CHECKSIG NOTIF &amp;lt;T&amp;gt; CLTV DROP ENDIF &amp;lt;A/2/n/i/k&amp;gt; CHECKSIG&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Any outputs that would be zero or dust are not included.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Note that we number each currently inflight transaction by &amp;#34;k&amp;#34;,&lt;br/&gt;&amp;gt; starting at 0. The same htlc/ptlc may have a different value for k&lt;br/&gt;&amp;gt; between different inflight transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Can you expand on why &amp;#34;k&amp;#34; is needed in addition to &amp;#34;n&amp;#34; and &amp;#34;i&amp;#34;. k sounds&lt;br/&gt;like the same thing as i to me.&lt;br/&gt;&lt;br/&gt;Also what does RP/2/k notation imply given the definition of RP you gave&lt;br/&gt;above?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;  * if the inflight transaction contains a ptlc output, then if Alice&lt;br/&gt;&amp;gt;    has not retained the old ptlc details (the point and the timeout)&lt;br/&gt;&amp;gt;    she will not trivially be able to reconstruct the script path,&lt;br/&gt;&amp;gt;    which includes the timeout. However, presuming the timeout was&lt;br/&gt;&amp;gt;    within 5000 blocks, then the only possible timeouts are the inflight&lt;br/&gt;&amp;gt;    tx&amp;#39;s nlocktime&#43;i with 0&amp;lt;i&amp;lt;=5000, and she will only need to calculate&lt;br/&gt;&amp;gt;    5000*k cases and match the corresponding scriptPubKeys to exhaustively&lt;br/&gt;&amp;gt;    enumerate every possible ptlc output, which should take under a minute,&lt;br/&gt;&amp;gt;    and be easily achievable. In addition, if Bob attempts to claim the&lt;br/&gt;&amp;gt;    funds, he will reveal the script path, and Alice will be either able&lt;br/&gt;&amp;gt;    to claim the inflight output directly or the layered output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;What about just doing a scriptless PTLC to avoid this (just CSV input of&lt;br/&gt;presigned tx)? The cost is pre-sharing more nonces per PTLC message.&lt;br/&gt;&lt;br/&gt;This does not support option_static_remotekey, but compensates for that&lt;br/&gt;&amp;gt; by allowing balances to be recovered with only the channel setup data&lt;br/&gt;&amp;gt; even if all revocation data is lost.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;This is rather big drawback but is this really the case? Can&amp;#39;t &amp;#34;in-flight&amp;#34;&lt;br/&gt;transactions send the balance of the remote party to their unencumbered&lt;br/&gt;static remote key? Since there is no &amp;#34;in-flight&amp;#34; transaction just after you&lt;br/&gt;create a new balance tx you can just sign a &amp;#34;good will&amp;#34; in-flight tx&lt;br/&gt;whenever you create a new balance tx that sends all the coins to your&lt;br/&gt;static key. Of course, your counterparty has no incentive to broadcast this&lt;br/&gt;when they close the channel but we can just specify that as part of the&lt;br/&gt;protocol you broadcast this anyway (even if it gives you nothing). It&amp;#39;s no&lt;br/&gt;skin off their back.&lt;br/&gt;Ok so what about the fee for the &amp;#34;good will&amp;#34; tx? Well let&amp;#39;s say it is a&lt;br/&gt;special case and just pays for itself with a reasonable fee. The &amp;#34;good&lt;br/&gt;will&amp;#34; tx is low time preference and can be CPFP easily if you haven&amp;#39;t lost&lt;br/&gt;your state. If you have lost your state then this is much better than&lt;br/&gt;nothing.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20211011/a619e4b8/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211011/a619e4b8/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:08&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswz5n9eezwu48y4n447xhypd7dehtyh65x0s4ype9qsz50xq275zgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ujvkzw0</id>
    
      <title type="html">📅 Original date posted:2021-06-01 📝 Original message: Hi Z, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswz5n9eezwu48y4n447xhypd7dehtyh65x0s4ype9qsz50xq275zgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ujvkzw0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs84d86xhnty7xch6smtm7uh3vw4q6dv53t95u66suled07edx5k4q7033n4&#39;&gt;nevent1q…33n4&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 Z,&lt;br/&gt;&lt;br/&gt;I just went through the presentation which made your thinking very clear.&lt;br/&gt;Thanks.&lt;br/&gt;I will not be able to match this effort so please bear with me as I try and&lt;br/&gt;explain my own thinking.&lt;br/&gt;I don&amp;#39;t see why fast forwards (FF) need &amp;#34;symmetrically encumbered outputs&amp;#34;?&lt;br/&gt;To me the protocol should be asymmetric.&lt;br/&gt;&lt;br/&gt;This is what I think happens when offering a FF HTLC:&lt;br/&gt;1. The offerer creates and signs a new commitment tx as normal with the&lt;br/&gt;HTLC except it has the same revocation key as the last one.&lt;br/&gt;2. The offerer patches their balance output by sending a tx spending from&lt;br/&gt;it to a new tx which has the HTLC output and their balance output&lt;br/&gt;(unencumbered).&lt;br/&gt;&lt;br/&gt;The HTLC is now irrevocably committed from the perspective of the receiver.&lt;br/&gt;Now the receiver presents the pre-image and the offerer then:&lt;br/&gt;&lt;br/&gt;1. The offerer creates and signs a new commitment tx as normal&lt;br/&gt;consolidating the funds into the receiver&amp;#39;s balance output except once&lt;br/&gt;again it has the same revocation key as the last one.&lt;br/&gt;2. The offerer patches their commitment tx balance output again by sending&lt;br/&gt;a tx spending from it to a new tx which splits into the receiver&amp;#39;s balance&lt;br/&gt;(the value of the claimed HTLC) and the offerer&amp;#39;s remaining balance.&lt;br/&gt;&lt;br/&gt;You can repeat the above process without having the receiver&amp;#39;s revocation&lt;br/&gt;keys online or their commitment tx keys for many HTLCs while the offerer&lt;br/&gt;still has balance towards the receiver.&lt;br/&gt;The on-chain cost is about the same as before for an uncooperative close.&lt;br/&gt;&lt;br/&gt;Once the receiver brings their keys on line they can consolidate the FF&lt;br/&gt;state into a new commitment txs on both sides and with a proper revocation&lt;br/&gt;operate the channel normally. What has been the receiver up until now can&lt;br/&gt;finally send funds.&lt;br/&gt;&lt;br/&gt;Am I missing something?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Mon, 31 May 2021 at 19:47, ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; It may be difficult to understand this, so maybe I will make a&lt;br/&gt;&amp;gt; convenient presentation of some sort.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As promised: &lt;a href=&#34;https://zmnscpxj.github.io/offchain/2021-06-fast-forwards.odp&#34;&gt;https://zmnscpxj.github.io/offchain/2021-06-fast-forwards.odp&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The presentation is intended to be seen by semi-technical and technical&lt;br/&gt;&amp;gt; people, particular those that have not read (or managed to fully read and&lt;br/&gt;&amp;gt; understand) the original writeup in 2019.&lt;br/&gt;&amp;gt; Simply &amp;#34;run&amp;#34; the presentation (F5 in LibreOffice), as the presentation&lt;br/&gt;&amp;gt; uses callouts extensively for explication.&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; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/lightning-dev/attachments/20210602/d72b5993/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210602/d72b5993/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:02:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfldxup9698z9ptada6sm6a5f46tn0g69zxkzprz2tyr4r89nnp8szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uhur9l9</id>
    
      <title type="html">📅 Original date posted:2021-01-09 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfldxup9698z9ptada6sm6a5f46tn0g69zxkzprz2tyr4r89nnp8szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uhur9l9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqvwnakr9wrlt6f0xyxlrm47jtqa6xkzqvv3djfyfjvv2fwm4z4ys6e6vw5&#39;&gt;nevent1q…6vw5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-01-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Rusty, Zman,&lt;br/&gt;&lt;br/&gt;A concern I have with only doing one signaling transaction out of the whole&lt;br/&gt;group of inputs is that it means you don&amp;#39;t prove ownership of the other&lt;br/&gt;inputs.&lt;br/&gt;I am not exactly sure what you could do by adding inputs from the chain you&lt;br/&gt;don&amp;#39;t own but it does feel a bit risky.&lt;br/&gt;Perhaps it would allow you to add whale output from the chain to trick the&lt;br/&gt;peer&amp;#39;s algorithm for deciding how much they want to add to the funding.&lt;br/&gt;Perhaps regulators of the future might check whether the LN node is&lt;br/&gt;following their directive to ban certain inputs on a blacklist -- If you&lt;br/&gt;carry on after the  funding_add_input from a blacklisted input you must not&lt;br/&gt;be running our gov approved node!&lt;br/&gt;If that is not a concern, then I agree a single 1-input-1-output signaling&lt;br/&gt;transaction should be fine, otherwise requiring 1-input-1-output signaling&lt;br/&gt;tx for each input the opener adds may be prudent (as Z suggested).&lt;br/&gt;&lt;br/&gt;&amp;gt; [2] Which Lisa promises she&amp;#39;ll publish RSN, so we can add your derived&lt;br/&gt;    points proposal to it.&lt;br/&gt;&lt;br/&gt;Looking forward to seeing this :)&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20210109/f94f442f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210109/f94f442f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:50&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszqw8avzdp48456w72cedj0qgax8umamsagepuk292qgvc6jtl6hszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9udf54pt</id>
    
      <title type="html">📅 Original date posted:2021-01-14 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszqw8avzdp48456w72cedj0qgax8umamsagepuk292qgvc6jtl6hszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9udf54pt" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsta96t7n5u5zutn70tp8hrlj99shsknxjt2vwhy0tp4j8ca948fes5rl97l&#39;&gt;nevent1q…l97l&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-01-14&lt;br/&gt;📝 Original message:&lt;br/&gt;On Wed, Jan 13, 2021 at 11:54 AM Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; Rusty, Zman,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A concern I have with only doing one signaling transaction out of the&lt;br/&gt;&amp;gt; whole&lt;br/&gt;&amp;gt; &amp;gt; group of inputs is that it means you don&amp;#39;t prove ownership of the other&lt;br/&gt;&amp;gt; &amp;gt; inputs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But that&amp;#39;s by design.  You can contact two peers and middleman between&lt;br/&gt;&amp;gt; them to produce a single tx.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Ah. I missed this motivation. So you actually want to have sessions where&lt;br/&gt;you use the same signaling transaction in all of them. That&amp;#39;s a cool idea.&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The practical problem with a signalling tx is that it&amp;#39;s hard to tell if&lt;br/&gt;&amp;gt; it&amp;#39;s conflicting.  Mallory uses a single UTXO to probe for everyone&amp;#39;s&lt;br/&gt;&amp;gt; UTXO at once.  Poor Bob wants to both wait 60 seconds to see if a&lt;br/&gt;&amp;gt; conflicting tx ends up in his mempool, *and* broadcast it ASAP to signal&lt;br/&gt;&amp;gt; to others.  He wants to do both of these *before* revealing his own&lt;br/&gt;&amp;gt; UTXOs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;I think this is a problem with all three schemes I mentioned. You will&lt;br/&gt;always have to wait for things to be gossiped in some way to catch attempts&lt;br/&gt;at parallel sessions.&lt;br/&gt;Of course there could be faster mediums than the mempool but it does seem a&lt;br/&gt;convenient one to use.&lt;br/&gt;Note that you should not wait a predictable amount of time but rather a&lt;br/&gt;randomly sampled amount from e.g. 0-60 seconds (or longer). If everyone is&lt;br/&gt;waiting the same predictable amount of time it does nothing to protect you.&lt;br/&gt;&lt;br/&gt;But the &amp;#34;middleman&amp;#34; idea you mentioned above makes this all the more&lt;br/&gt;complicated: If you are meant to have parallel sessions then this is a&lt;br/&gt;problem for an honest Alice who initiates a funding with Bob and Carol.&lt;br/&gt;Bob decides to wait 24s and Carol decides to wait 55s to check the mempool&lt;br/&gt;for the signaling before revealing their utxos. After Bob wakes up from his&lt;br/&gt;24s he will add his own utxos and demand that Alice complete the&lt;br/&gt;transaction by signing it. But since Alice is trying to also add Carol&amp;#39;s&lt;br/&gt;UTXOs to the transaction she will have to wait until Carol becomes&lt;br/&gt;responsive again. To Bob this will look like Alice has become unresponsive&lt;br/&gt;through no fault of her own and Bob will broadcast the signaling tx.&lt;br/&gt;&lt;br/&gt;In other words, if parallel sessions are legal then you shouldn&amp;#39;t try and&lt;br/&gt;catch parallel sessions. But if parallel sessions are legal there will&lt;br/&gt;always be an effective dual funding UTXO discovery attack by using one UTXO&lt;br/&gt;to hit many targets. I think this is true for all three schemes I mentioned.&lt;br/&gt;&lt;br/&gt;It seems the really difficult question is: is it even worth trying to stop&lt;br/&gt;sequential attacks if parallel attacks are unstoppable?&lt;br/&gt;&lt;br/&gt;Not sure how to square this, but I do prefer this approach over PoDLE.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I think PoDLE might actually have an advantage in parallel attacks if the&lt;br/&gt;scheme was changed a bit. A weakness of the lightning proposal as compared&lt;br/&gt;to the joinmarket idea is that the `h2` point is not broadcast immediately&lt;br/&gt;-- rather you wait for failure and then broadcast it.  Instead, a peer&lt;br/&gt;should broadcast h2 as soon as they have agreed to create a transaction&lt;br/&gt;with the initiator. Then if at any time during the tx creation protocol&lt;br/&gt;they receive the same h2 from someone else, they cancel and don&amp;#39;t reveal&lt;br/&gt;their UTXOs (let&amp;#39;s say they wait ~10s after broadcasting before revealing&lt;br/&gt;any utxos). Note that here you don&amp;#39;t have to randomly select the time you&lt;br/&gt;wait.&lt;br/&gt;&lt;br/&gt;There are several (perhaps addressable) downsides to this scheme but it at&lt;br/&gt;least has better protection against parallel attacks than the others.&lt;br/&gt;Since it is effective it would also break the &amp;#34;middleman&amp;#34; idea unless Alice&lt;br/&gt;funds with two utxos (a different h2 for each party) or there is some way&lt;br/&gt;for all parties involved in the funding to distinguish gossiped h2s from&lt;br/&gt;their funding session from others.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20210115/db7150a5/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210115/db7150a5/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:50&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2nt6ma7t58txfrrrg5ljkn7k7xwxn3uc4c4ah4y834defl3t4m2gzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uu0nvxt</id>
    
      <title type="html">📅 Original date posted:2021-01-04 📝 Original message: Happy ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2nt6ma7t58txfrrrg5ljkn7k7xwxn3uc4c4ah4y834defl3t4m2gzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uu0nvxt" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsf5e66d0rn7twldclwgpu603c2hlpthd7xgvdh5dg6vsyv6deqznsh5jp9e&#39;&gt;nevent1q…jp9e&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-01-04&lt;br/&gt;📝 Original message:&lt;br/&gt;Happy New Year Lightning Developers,&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve recently been closely looking at the dual funding proposal [1] because&lt;br/&gt;it uses a DLEQ proof (PoDLE) which we are also working on specifying as&lt;br/&gt;part of DLC ECDSA adaptor signatures [2].&lt;br/&gt;While reading it I had some queries and ideas that I thought were worth&lt;br/&gt;sharing (even though they are very very late).&lt;br/&gt;&lt;br/&gt;# Background&lt;br/&gt;&lt;br/&gt;Lisa posted a draft proposal [1] which includes the PoDLE and explained it&lt;br/&gt;in [3] along with a good list of its weaknesses.&lt;br/&gt;The original discussion thread where the idea was conceived is [4] and&lt;br/&gt;there is an excellent summary in the following optech [5] which I post&lt;br/&gt;below:&lt;br/&gt;&lt;br/&gt;&amp;gt; Another proposal was to use PoDLE, which was originally developed for&lt;br/&gt;JoinMarket based on a suggestion by Gregory Maxwell. This protocol allows&lt;br/&gt;an initiating user such as Mallory to commit to a UTXO in a way that&lt;br/&gt;prevents anyone from identifying that UTXO. The participating user, such as&lt;br/&gt;Bob, publishes the commitment across the network (e.g. the JoinMarket&lt;br/&gt;network) so that nobody else will start a session with Mallory while she’s&lt;br/&gt;using that particular UTXO. Then Bob asks Mallory to identify her UTXO and,&lt;br/&gt;if it’s a valid UTXO that matches her commitment, Bob discloses his UTXO to&lt;br/&gt;Mallory so that they can proceed with the protocol (e.g. a coinjoin). If&lt;br/&gt;Mallory aborts the protocol before completion, the commitment previously&lt;br/&gt;published across the network prevents her from being able to start a new&lt;br/&gt;session with any other user and so learn their UTXO. Mallory’s only option&lt;br/&gt;is to spend her coins from herself to herself in order to generate a new&lt;br/&gt;UTXO—a process that costs her money and so limits her ability to spy on&lt;br/&gt;users. (Note, though, that PoDLE as implemented in JoinMarket allows&lt;br/&gt;Mallory up to three retries by default so honest users aren’t penalized for&lt;br/&gt;occasional accidental failures, such as a loss of network connectivity.)&lt;br/&gt;The idea is to adapt this protocol for LN in order to prevent attackers&lt;br/&gt;from learning which available UTXOs are controlled by LN users.&lt;br/&gt;&lt;br/&gt;Especially relevant to this post is the idea posted by Darosior here [6]&lt;br/&gt;which was summarized as follows:&lt;br/&gt;&lt;br/&gt;&amp;gt; One proposal to fix this would require the person proposing to open the&lt;br/&gt;channel (e.g. Mallory) to provide their UTXO(s) in a ready-to-spend state&lt;br/&gt;so that probing would cost money (e.g. transaction fees). A downside of&lt;br/&gt;this approach is that the construction proposed would be easily&lt;br/&gt;identifiable by block chain analysis, making it easy to determine when a&lt;br/&gt;dual-funded channel was opened&lt;br/&gt;&lt;br/&gt;The goals of this post is to (i) see if I understand the PoDLE idea&lt;br/&gt;correctly, to (ii) refine Darosior&amp;#39;s idea and to (iii) propose a minimal&lt;br/&gt;alternative idea.&lt;br/&gt;&lt;br/&gt;#  Requirements&lt;br/&gt;&lt;br/&gt;Informally, here are the desirable properties I came up with for a dual&lt;br/&gt;funding protocol:&lt;br/&gt;&lt;br/&gt;1. If a malicious initiator learns a peer UTXO, then the initiator should&lt;br/&gt;have to spend their UTXOs before reusing them against the next peer (should&lt;br/&gt;be forced to spend them to repeat attack -- *if attacking sequentially*).&lt;br/&gt;2. A malicious initiator should not be able to use the same UTXOs in&lt;br/&gt;parallel with multiple peers (to learn the UTXOs of multiple makers with a&lt;br/&gt;single UTXO).&lt;br/&gt;3. An honest initiator should not have to spend their UTXOs if they execute&lt;br/&gt;with a malicious peer.&lt;br/&gt;4. dual-funded opening transactions should not have any distinguishing&lt;br/&gt;features (i.e. sighash flags).&lt;br/&gt;5. An honest but intermittently failing initiator should not have their&lt;br/&gt;UTXO details sent by an honest peer to other parties.&lt;br/&gt;&lt;br/&gt;Note I am going to ignore property (2) because of proposals below can turn&lt;br/&gt;their protection against sequential attacks (1) into protection against&lt;br/&gt;parallel attacks (2) by having the peer choose a random time delay and see&lt;br/&gt;if anything is gossiped to them that would indicate malicious behavior by&lt;br/&gt;the initiator in some other channel.&lt;br/&gt;&lt;br/&gt;# PoDLEs&lt;br/&gt;&lt;br/&gt;To solve this problem in JoinMarket, Waxwing had the idea [8] of turning&lt;br/&gt;knowledge of a secret key for a particular UTXO into a kind of unlinkable&lt;br/&gt;credential.&lt;br/&gt;Given a UTXO public key P1, the initiator projects their private key onto a&lt;br/&gt;different generator J to produce P2.&lt;br/&gt;P2 is unlinkable to P1 (without a proof) but is fully determined by P1.&lt;br/&gt;This allows participants to maintain a blacklist of P2s without learning&lt;br/&gt;the P1s.&lt;br/&gt;Having the P1s in the blacklist would make the blacklist itself useful for&lt;br/&gt;chain analysis because it contains a list of UTXOs that tried to open&lt;br/&gt;channels (but perhaps accidentally failed).&lt;br/&gt;&lt;br/&gt;The idea is like this:&lt;br/&gt;1. Taker asks some maker&amp;#39;s if they want to do a coinjoin and sends them all&lt;br/&gt;SHA256(P2)&lt;br/&gt;2. When they find the maker they want to proceed with they reveal P2 and&lt;br/&gt;prove DLEQ((P1, G), (P2, J)) i.e. P1 and P2 have the same private key just&lt;br/&gt;different base points.&lt;br/&gt;3. If they haven&amp;#39;t received SHA256(P2)from the gossip network (i.e. it&amp;#39;s&lt;br/&gt;not in the blacklist), the maker then sends their own UTXO data AND gossips&lt;br/&gt;SHA256(P2)&lt;br/&gt;4. They carry on the protocol.&lt;br/&gt;&lt;br/&gt;The current lightning proposal [1] follows the same logic except that it&lt;br/&gt;only gossips SHA256(P2) in case of malicious behavior (this seems sensible).&lt;br/&gt;If I understood it correctly, then it achieves properties (1,4,5).&lt;br/&gt;&lt;br/&gt;The main downside is that it introduces a new gossip message. The&lt;br/&gt;difficulties associated with this are listed in [3].&lt;br/&gt;Notably it is missing property (3) - protection against malicious peers who&lt;br/&gt;gossip SHA256(P2) even when there was no wrongdoing.&lt;br/&gt;&lt;br/&gt;A question I have is why is SHA256(P2) sent up front? I think that P2 can&lt;br/&gt;just be sent along with the proof later on in the case of dual funding.&lt;br/&gt;Waxwing gave an explanation of it in the case of joinmarket in [7] but I&lt;br/&gt;didn&amp;#39;t grasp it.&lt;br/&gt;&lt;br/&gt;# Darosior&amp;#39;s SIGHASH_SINGLE|SIGHASH_ANYONECANPAY&lt;br/&gt;&lt;br/&gt;The proposal from Darosior [6] is to have the taker provide their inputs in&lt;br/&gt;a ready to broadcast state using SIGHASH_SIGNLE|SIGHASH_ANYONECANPAY.&lt;br/&gt;This way the peer never needs to send their inputs directly to the&lt;br/&gt;initiator (the initiator will only find out about them when the transaction&lt;br/&gt;is broadcast).&lt;br/&gt;I encourage the reader to look at [6] which has nice diagrams and is very&lt;br/&gt;short and to the point.&lt;br/&gt;This achieves all properties except for (4 - distinguishable on-chain)&lt;br/&gt;which is why it was dismissed.&lt;br/&gt;&lt;br/&gt;I think it is possible to extend the idea to achieve (4) and therefore&lt;br/&gt;obtain all desired properties.&lt;br/&gt;Simply put peers can just use the SINGLE|ANYONECANPAY signature as back ups&lt;br/&gt;in case of abort. Here&amp;#39;s how it could work in my mind:&lt;br/&gt;&lt;br/&gt;1. Initiator requests dual-funding and provides a TX_temp spending their&lt;br/&gt;input set to a main output and a change output (does not sign it yet). They&lt;br/&gt;also provide a sighash SIGNLE|ANYONECANPAY signature on the main output&lt;br/&gt;spending into TX_backup-fund and a signature on the first commitment&lt;br/&gt;transaction spending from TX_backup-fund (exactly as in [6]).&lt;br/&gt;2. Peer responds with commitment TX signature for TX_backup-fund.&lt;br/&gt;3. Initiator responds with the signatures for TX_temp.&lt;br/&gt;*Peer now has a fully functional transaction chain with which to open the&lt;br/&gt;channel -- now they can attempt to upgrade to a SIGHASH_ALL opening*.&lt;br/&gt;4. Peer (if possible) checks there are no existing transactions in the&lt;br/&gt;chain or mempool spending from the taker&amp;#39;s inputs. If not it responds with&lt;br/&gt;its inputs, change and commitment tx signature for a SIGHASH_ALL TX_fund.&lt;br/&gt;5. Initiator responds with commitment TX signature and TX_fund input&lt;br/&gt;signatures.&lt;br/&gt;6. Peer broadcasts TX_fund.&lt;br/&gt;*If at any point after step 3 Initiator does not respond for ~2 seconds&lt;br/&gt;they broadcast TX_temp and TX_backup-funding*&lt;br/&gt;&lt;br/&gt;We have (4) because the SINGLE|ANYONECANPAY signature only appears on-chain&lt;br/&gt;in case of abort (i.e. TX_backup-funding makes it on-chain).&lt;br/&gt;It appears to be pretty close to the ideal solution in terms of privacy and&lt;br/&gt;security.&lt;br/&gt;If the malicious initiator learns an output they will always have to spend&lt;br/&gt;one of their inputs otherwise they will quickly get hit by the TX_temp &#43;&lt;br/&gt;TX_backup-funding.&lt;br/&gt;Note that it is possible the node is just slow in which case even if step&lt;br/&gt;TX_backup-funding makes it in both parties should just carry on with the&lt;br/&gt;channel.&lt;br/&gt;&lt;br/&gt;The downsides are that it involves six rounds of communication and cannot&lt;br/&gt;use the &amp;#34;interactive tx building&amp;#34; protocol developed for the original&lt;br/&gt;proposal&lt;br/&gt;&lt;br/&gt;# Signaling Transactions&lt;br/&gt;&lt;br/&gt;Finally I present a simple but unintuitive protocol that achieves roughly&lt;br/&gt;the same properties as the PoDLE protocol but without lightning gossip&lt;br/&gt;messages.&lt;br/&gt;&lt;br/&gt;Whenever the initiator adds an input in the interactive tx building they&lt;br/&gt;provide signatures on a &amp;#34;signaling&amp;#34; transaction spending that input (and&lt;br/&gt;any inputs they have added so far).&lt;br/&gt;The signaling transactions will typically spend the funds back to the&lt;br/&gt;initiator&amp;#39;s wallet.&lt;br/&gt;Before revealing any of their inputs, the peer checks that none of the&lt;br/&gt;inputs added by the initiator are in their mempool/chain.&lt;br/&gt;If the initiator aborts the protocol after learning one of the peer&amp;#39;s&lt;br/&gt;inputs the peer broadcasts one of the signaling transactions.&lt;br/&gt;&lt;br/&gt;Like the PoDLE proposal this doesn&amp;#39;t achieve (3) since a malicious peer&lt;br/&gt;could broadcast the signaling transaction making the honest initiator pay a&lt;br/&gt;transaction fee before using the input in another session.&lt;br/&gt;To mitigate this a bit, the transactions could be RBF and have a 1&lt;br/&gt;sat-per-byte feerate to give the initiator a decent amount of time to use&lt;br/&gt;their input productively before the tx confirms (and paying a low fee if it&lt;br/&gt;ever does confirm).&lt;br/&gt;&lt;br/&gt;The advantages of signaling transactions over PoDLE is that it doesn&amp;#39;t&lt;br/&gt;involve any wonky crypto or new gossip messages.&lt;br/&gt;The advantage of the PoDLE proposal over this is that a malicious peer can&lt;br/&gt;only blacklist the UTXO (not necessarily force you to spend it).&lt;br/&gt;&lt;br/&gt;# Summary&lt;br/&gt;&lt;br/&gt;The preference of protocol depends on how you weigh the importance of a&lt;br/&gt;malicious non-initiating peer griefing the initiator.&lt;br/&gt;To protect fully, the extended version of Darosior&amp;#39;s protocol does not&lt;br/&gt;allow griefing.&lt;br/&gt;There is always a lot to be said for ruling out a class of attack even if&lt;br/&gt;it costs you a few rounds of communication.&lt;br/&gt;&lt;br/&gt;Is griefing a real concern though? Layer-2 is full of opportunities to&lt;br/&gt;grief your counterparty and the ones presented here are hardly the worst.&lt;br/&gt;If you&amp;#39;re opening channels with someone who wants to grief you, you are&lt;br/&gt;already in trouble.&lt;br/&gt;PoDLEs have very weak griefing in the form of unfairly adding your UTXO to&lt;br/&gt;the blacklist but comes at the cost of complexity and a few difficult to&lt;br/&gt;answer questions.&lt;br/&gt;I think the simplicity of signaling transactions may be worth the extra&lt;br/&gt;griefing capabilities it offers a malicious peer given they are hardly as&lt;br/&gt;bad as the griefing capabilities they will have if you open a channel to&lt;br/&gt;them!&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/niftynei/lightning-rfc/pull/1&#34;&gt;https://github.com/niftynei/lightning-rfc/pull/1&lt;/a&gt;&lt;br/&gt;&amp;lt;&lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/524&amp;gt&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/524&amp;gt&lt;/a&gt;;&lt;br/&gt;[2] &lt;a href=&#34;https://github.com/discreetlogcontracts/dlcspecs/pull/114&#34;&gt;https://github.com/discreetlogcontracts/dlcspecs/pull/114&lt;/a&gt;&lt;br/&gt;[3]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-February/002516.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-February/002516.html&lt;/a&gt;&lt;br/&gt;[4]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002466.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002466.html&lt;/a&gt;&lt;br/&gt;[5]&lt;br/&gt;&lt;a href=&#34;https://bitcoinops.org/en/newsletters/2020/02/05/#interactive-construction-of-ln-funding-transactions&#34;&gt;https://bitcoinops.org/en/newsletters/2020/02/05/#interactive-construction-of-ln-funding-transactions&lt;/a&gt;&lt;br/&gt;[6]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002475.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002475.html&lt;/a&gt;&lt;br/&gt;[7]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-February/002522.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-February/002522.html&lt;/a&gt;&lt;br/&gt;[8] &lt;a href=&#34;https://joinmarket.me/blog/blog/poodle/&#34;&gt;https://joinmarket.me/blog/blog/poodle/&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/lightning-dev/attachments/20210104/08adc787/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210104/08adc787/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:49&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrsxlfldyh2pnj4dgkh9p7gh4jj9tjrz58hkehtkegdv39n6gy8cgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uz0g26t</id>
    
      <title type="html">📅 Original date posted:2020-12-16 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrsxlfldyh2pnj4dgkh9p7gh4jj9tjrz58hkehtkegdv39n6gy8cgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uz0g26t" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstlrlvjtp53n0qsmfgytysklaxz8n2d09k6xwzvwhx870s2fxyc3qqhpw7l&#39;&gt;nevent1q…pw7l&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-12-16&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey Z,&lt;br/&gt;&lt;br/&gt;On Tue, Dec 15, 2020 at 9:21 PM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good morning LL,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - What do you do if the channel state has HTLCs in flight? I don&amp;#39;t know -- I guess you can just put them onto the settlement tx? That way it&amp;#39;s possible the payment could still go through. Alternatively you could just gift the money to the party offering the recovery settlement.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Gifting the money is not a good option --- we allow HTLCs to be almost as high as the total channel value minus fees and reserve.&lt;br/&gt;&amp;gt; Thus all the claimable value could potentially be in an outgoing HTLC.&lt;br/&gt;&amp;gt; Worse, if our node is a forwarding node, it would be easy for a third party to arrange to have our funds in various HTLCs.&lt;br/&gt;&lt;br/&gt;Hopefully this recovery system is used by people whose channels are in&lt;br/&gt;a HTLC free state 99.9999% of the time (and hopefully hardware&lt;br/&gt;failures do not somehow coincide with HTLCs!).&lt;br/&gt;As a user, it would be cool to be able to just lock up all my Bitcoin&lt;br/&gt;into channels with well-established lightning nodes. That way if fees&lt;br/&gt;go ballistic I can still move money around cheaply.&lt;br/&gt;One of the main concerns for this pattern of user behaviour is the&lt;br/&gt;recovery story I think. The first line of defence for routing nodes&lt;br/&gt;(people who are taking their role in LN seriously) has to be redundant&lt;br/&gt;data storage.&lt;br/&gt;This would be a poor last-resort solution for routing nodes.&lt;br/&gt;&lt;br/&gt;&amp;gt; Using static-key channels (i.e. channel keys are our node keys) allows us to recover even the outgoing channel with outgoing HTLC that has been forgotten by the outgoing peer.&lt;br/&gt;&lt;br/&gt;Right. I think this doesn&amp;#39;t work with PTLCs though.&lt;br/&gt;&lt;br/&gt;&amp;gt; Using static-key channels does have slightly weaker privacy:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Published nodes reveal all their channels with other published nodes on the blockchain.&lt;br/&gt;&amp;gt;   * While it is true that published nodes already reveal their channels with published nodes, they are currently only revealed on the LN gossip network, which is not archived; historical channels that are now closed are not informed to current surveillors.&lt;br/&gt;&amp;gt;     * On the other hand, all it takes is one &amp;#34;LN wayback machine&amp;#34; to record all LN gossip, which are self-attesting and include a signature from the node.&lt;br/&gt;&amp;gt; * Unpublished nodes risk revealing their channels with published nodes via the blockchain.&lt;br/&gt;&amp;gt;   * Invoices created by unpublished nodes currently reveal their public key.&lt;br/&gt;&amp;gt;     Payers can then uncover all the channels of that node.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think so? You need to know the private key of the node to&lt;br/&gt;discover its channels! The points actually used in the channels would&lt;br/&gt;be randomized with shared secret from Diffie-Hellman so are unlinkable&lt;br/&gt;to the public keys of the two nodes under decisional Diffie-Hellman&lt;br/&gt;assumption.&lt;br/&gt;&lt;br/&gt;There is more minor but still real concern of &amp;#34;deniability&amp;#34; of&lt;br/&gt;unpublished closed channels if a large node operator later becomes&lt;br/&gt;corrupted or coerced by a malicious actor. Since the node operator&lt;br/&gt;still knows their secret key (obviously) they can still do a scan&lt;br/&gt;(same as you would do in recovery) on the whole chain and find any&lt;br/&gt;past channels they had with any nodes. A mitigation of this problem&lt;br/&gt;would be for users who want unpublished channels to turn the&lt;br/&gt;use-node-key-as-channel-key feature off for their keys in the channel&lt;br/&gt;so they would still be able to do a backup-free channel scan but the&lt;br/&gt;well-established node would lose the ability to do so. This means that&lt;br/&gt;after the channel is closed there would be no way for the large node&lt;br/&gt;to find the channel again assuming they honestly delete the data.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL
    </content>
    <updated>2023-06-09T15:01:45&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxf8upkdjkytc3mn4luh3kfvlkuyum726xvh3rgvp99fm4c5zfxqqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u6xxmet</id>
    
      <title type="html">📅 Original date posted:2020-12-15 📝 Original message: Errr ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxf8upkdjkytc3mn4luh3kfvlkuyum726xvh3rgvp99fm4c5zfxqqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u6xxmet" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswxwf74psu7rwaq4xwayv8x00rvvy9w2j4fwell7yf2py3705lsvcpfywr9&#39;&gt;nevent1q…ywr9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-12-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Errr please replace 5 with 4 in the previous post. Thanks to devrandom.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Dec 15, 2020 at 2:43 PM Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; It seems difficult to recommend YOLO commitment transactions becoming the standard way to recover funds. It could be preferable to the current system but even that is up for debate I guess.&lt;br/&gt;&amp;gt; &amp;gt; I feel like I can recommend oblivious settlements because (i) it&amp;#39;s covert (like YOLO commitments txs unlike current system) and (ii) it&amp;#39;s  &amp;#34;what you see is what you get&amp;#34; -- you are guaranteed to recover the funds that you are presented with once you finally trigger the recovery&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Off list Dave correctly pointed out to me that this wasn&amp;#39;t a very clear picture of the situation.&lt;br/&gt;&amp;gt; After some thought, I came up with these claims that I think I can make strongly:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Before you reveal that you are doing recovery you are guaranteed to have a tx in hand that:&lt;br/&gt;&amp;gt;      i. You can broadcast first&lt;br/&gt;&amp;gt;      ii. You can choose the fee to be as high as you like&lt;br/&gt;&amp;gt;      iii. Is not replaceable.&lt;br/&gt;&amp;gt; 2. If the malicious party is *not* willing to risk broadcasting a revoked tx then you are guaranteed to recover the face value of the transaction(s) you have in hand.&lt;br/&gt;&amp;gt; 3. An honest party is never at risk of broadcasting a revoked commitment tx.&lt;br/&gt;&amp;gt; 4. You never have to reveal that you were doing a recovery i.e. the channel can continue (strictly preferable to 1)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Current system has: 3&lt;br/&gt;&amp;gt; Oblivious mutual close has: 1,2,3&lt;br/&gt;&amp;gt; YOLO commitments has: 1,5&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So I think the question of YOLO commitments vs oblivious mutual close is whether paying the price of losing (2,3) is worth the upgrade from (1) to (5).&lt;br/&gt;&amp;gt; The concern with (1) is that once you broadcast to the network the obliviously transferred &amp;#34;mutual close&amp;#34; transaction, the malicious party then has a hint that you have lost data and they can try and broadcast a favourable revoked transaction.&lt;br/&gt;&amp;gt; This should be very hard since in (1) you broadcast first, can choose as large a fee as you like and the tx does not signal replaceability whereas the revoked tx *will* signal replaceability.&lt;br/&gt;&amp;gt; I&amp;#39;m also personally trying to avoid losing (3) because to keep [1] applicable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As a side note: in YOLO commitment transactions you have to recover some additional metadata from the other party -- in particular the compressed revocation keys that you *should* know otherwise the channel cannot continue to operate. So a signature on the compressed revocation keys must be given to the other party before you lose data and returned to you when you are given the commitment transaction upon reconnection.&lt;br/&gt;&amp;gt; This should be easy enough to do though.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] &lt;a href=&#34;https://github.com/LLFourn/witness-asymmetric-channel#scorched-earth-punishments&#34;&gt;https://github.com/LLFourn/witness-asymmetric-channel#scorched-earth-punishments&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Tue, Dec 15, 2020 at 12:13 AM David A. Harding &amp;lt;dave at dtrt.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; The idea I&amp;#39;m working with in revocable signature based channels [1] is&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; to make the node lose its static secret key if it posts a revoked&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; commitment tx. This means they could lose ALL funds from ALL their&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; channels with ALL their peers if they ever broadcast a single revoked&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; commitment transaction. This would be a very bad thing to happen while&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; you&amp;#39;re trying to recover funds.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yikes!  A very bad thing indeed.  I&amp;#39;ll have to re-read about witness&lt;br/&gt;&amp;gt;&amp;gt; asymmetric channels; I don&amp;#39;t think I realized that was a consequence of&lt;br/&gt;&amp;gt;&amp;gt; using them.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It&amp;#39;s an optional feature -- see link[1] above where I just added an explanation of it.&lt;br/&gt;&amp;gt; I actually see no reason why you couldn&amp;#39;t apply revocable signatures to transaction asymmetric channels (LN as it is today) you just have to overhaul the revocation mechanism.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In general I agree with your points that side-channels may be effective tools to reveal whether a node has had data loss or not.&lt;br/&gt;&amp;gt; I think in both YOLO commitments and oblivious mutual close it is easy enough to simulate data-loss up to a point to try and catch malicious peers using side channels.&lt;br/&gt;&amp;gt; At least you don&amp;#39;t have to ask the peer to broadcast a tx to find out!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; LL
    </content>
    <updated>2023-06-09T15:01:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw700ltjlm44cc2kdna7fjyspnpnfpgey7z8t0fg3alnzwamfcx5gzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uvw6urn</id>
    
      <title type="html">📅 Original date posted:2020-11-30 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw700ltjlm44cc2kdna7fjyspnpnfpgey7z8t0fg3alnzwamfcx5gzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uvw6urn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswny0sudgv2gd3l3mtdjs40hv64c6pvpcnw30spm9x883kj7n64rqrtd450&#39;&gt;nevent1q…d450&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-11-30&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Gleb et al,&lt;br/&gt;&lt;br/&gt;I really appreciate the out-of-the-box thinking of this proposal.&lt;br/&gt;I will put to the side the very difficult task of creating a cryptosystem&lt;br/&gt;that efficiently achieves what&amp;#39;s necessary for this to work because that&lt;br/&gt;seems not to be the main concern.&lt;br/&gt;&lt;br/&gt;I agree with Z that this proposal is missing a strong argument as to why&lt;br/&gt;this is a better &amp;#34;proof-of-stake&amp;#34; than channel balances themselves.&lt;br/&gt;In order to send a jamming HTLC you have to have to lock up funds to do it&lt;br/&gt;(they need outgoing balance for the sender and incoming balance for the&lt;br/&gt;receiver).&lt;br/&gt;Why would stake certificates be more powerful than this? I get that you&lt;br/&gt;decrement the UTXO&amp;#39;s credit even if they fail. This increases the cost of&lt;br/&gt;sending spam (but it also increases the cost of sending normal payments&lt;br/&gt;since you now may be honest but have all your UTXOs run out of credit.)&lt;br/&gt;Does this increased cost (it was not zero before) actually prevent the&lt;br/&gt;attack without inhibiting normal usage?&lt;br/&gt;&lt;br/&gt;In general there seems to be an open question about whether these channel&lt;br/&gt;jamming attacks are actually economic.&lt;br/&gt;If I want to get more payments routed through me would it really be optimal&lt;br/&gt;to do channel jamming?&lt;br/&gt;Suppose that the nodes react to the jamming by adding extra capacity by&lt;br/&gt;splicing out from somewhere else. Then I have jammed up my own coins and&lt;br/&gt;got nothing for it.&lt;br/&gt;What if instead of attacking I allocated the coins instead to creating more&lt;br/&gt;valuable channels. Couldn&amp;#39;t this be more profitable?&lt;br/&gt;I just posed this question in [1].&lt;br/&gt;&lt;br/&gt;If we are talking about non-economic adversaries who simply wish to destroy&lt;br/&gt;LN then that&amp;#39;s another game altogether.&lt;br/&gt;For example if the CCP with its 1% of all Bitcoin it seized from the&lt;br/&gt;plustoken scam were to try and attack lightning they would likely succeed&lt;br/&gt;even if we had this system in place simply because they have a lot of&lt;br/&gt;&amp;#34;stake&amp;#34;.&lt;br/&gt;As David points out I don&amp;#39;t think you can make a distinction between real&lt;br/&gt;LN outputs and fake ones.&lt;br/&gt;It seems unavoidable that any coins you own could be used to produce a&lt;br/&gt;certificate to give you spam bandwidth (especially if you actually manage&lt;br/&gt;to guarantee privacy through ZKPs).&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/t-bast/lightning-docs/issues/7&#34;&gt;https://github.com/t-bast/lightning-docs/issues/7&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Sun, Nov 29, 2020 at 5:25 AM David A. Harding &amp;lt;dave at dtrt.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Thu, Nov 26, 2020 at 11:40:46PM &#43;0200, Gleb Naumenko wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hello list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Gleb and Antoine,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is an interesting idea!  Thank you for working on it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I had difficulty with one part of the proposal:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; #### Should we allow holding *any* Bitcoins (not just LN channels) for&lt;br/&gt;&amp;gt; Stake Certificates?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [...] we believe that allowing any UTXO would give an attacker more&lt;br/&gt;&amp;gt; &amp;gt; opportunities to use their cold funds for this attack, or even have a&lt;br/&gt;&amp;gt; &amp;gt; secondary market where holders sell their proofs (they have nothing to&lt;br/&gt;&amp;gt; &amp;gt; loose).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Can&amp;#39;t a malicious user get around this restriction by opening channels&lt;br/&gt;&amp;gt; with themself?  (Also, aren&amp;#39;t current channel open outputs just P2WSH&lt;br/&gt;&amp;gt; 2-of-2 multisigs, and in the future won&amp;#39;t they be generic P2TR outputs?&lt;br/&gt;&amp;gt; How would a stake certificate prove that the UTXO was generated for LN&lt;br/&gt;&amp;gt; rather than just belonging to a user with a 2-of-2 multisig wallet or&lt;br/&gt;&amp;gt; any key-path-spendable taproot wallet?)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; According to some random website, the current total channel balance of&lt;br/&gt;&amp;gt; the public LN is about 1,000 BTC.  Although I&amp;#39;m sure this will grow with&lt;br/&gt;&amp;gt; time, it seems to me that an attacker who can rent access to stake&lt;br/&gt;&amp;gt; certificates for a one-week attack at, say, a 5% annual interest rate&lt;br/&gt;&amp;gt; would only need to pay 1 BTC to acquire stake certificates equal to all&lt;br/&gt;&amp;gt; honest users at present.  That cost doesn&amp;#39;t seem high enough to me to&lt;br/&gt;&amp;gt; effectively prevent attacks.  Am I missing something?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -Dave&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/lightning-dev/attachments/20201130/a4049932/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201130/a4049932/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:35&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxf32jf5qq8453kfve8zywk7wa9cz5q6wsypmflnwuh222990twjgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9un77va0</id>
    
      <title type="html">📅 Original date posted:2020-10-09 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxf32jf5qq8453kfve8zywk7wa9cz5q6wsypmflnwuh222990twjgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9un77va0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst38gg8hnyjqzs770ze9npfy7w2296xyhr9wqw58knssdrceeajdqvsn0cd&#39;&gt;nevent1q…n0cd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi list,&lt;br/&gt;&lt;br/&gt;tl;dr: I think can use two round MuSig safely in the context of lightning.&lt;br/&gt;&lt;br/&gt;As a recap, Zeeman did a good evaluation of &amp;#34;purely scriptless&amp;#34; lightning&lt;br/&gt;channels after taproot/schnorr.[1]&lt;br/&gt;Z concluded that even in the most optimized case the 3 round MuSig protocol&lt;br/&gt;leads to an extra round of communication before you can forward a payment.&lt;br/&gt;I think this is correct but perhaps you could just use 2 round MuSig&lt;br/&gt;(without MuSig-DN magic[4]).&lt;br/&gt;&lt;br/&gt;=== 2 round MuSig ===&lt;br/&gt;&lt;br/&gt;(from memory) The original MuSig paper suggested the following signing&lt;br/&gt;algorithm once two keys A and B have already been established for Alice and&lt;br/&gt;Bob&lt;br/&gt;&lt;br/&gt;Alice                                           Bob&lt;br/&gt;pick ra randomly&lt;br/&gt;Ra = ra * G&lt;br/&gt;                          ----- Ra ----&amp;gt;&lt;br/&gt;                                                pick rb randomly&lt;br/&gt;                                                Rb = rb * G&lt;br/&gt;                                                let c = H(Ra &#43; Rb || A &#43; B&lt;br/&gt;|| m)&lt;br/&gt;                                                sb = rb &#43; cb&lt;br/&gt;                          &amp;lt;--Rb, sb----&lt;br/&gt;s = sb &#43; ra &#43; ca&lt;br/&gt;R = Ra &#43; Rb&lt;br/&gt;X = A &#43; B&lt;br/&gt;verify(X, (R, s), m)?&lt;br/&gt;output: (R,s)&lt;br/&gt;&lt;br/&gt;This was insecure under *parallel composition* because the proof cannot&lt;br/&gt;work (from my memory because having open signing sessions makes the&lt;br/&gt;rewinding argument in the proof incoherent) and led to actual attacks which&lt;br/&gt;have recently improved in efficiency.[3]&lt;br/&gt;&lt;br/&gt;=== My insight ===&lt;br/&gt;&lt;br/&gt;2 round MuSig *is secure* under sequential composition and in a lightning&lt;br/&gt;channel we are essentially arranging sequential state updates so perhaps&lt;br/&gt;we&amp;#39;re ok here?&lt;br/&gt;&lt;br/&gt;It should be easy to require that you can&amp;#39;t open another signing session&lt;br/&gt;until we&amp;#39;ve finished the current session.&lt;br/&gt;Also if Alice has sent Ra there is no reason that Bob can&amp;#39;t send multiple&lt;br/&gt;(Rb, sb) pairs for different messages for the same Ra while he wants for&lt;br/&gt;Alice to respond.&lt;br/&gt;Alice doesn&amp;#39;t have to finish the signature yet she can just store the most&lt;br/&gt;recent one and finish if/when she needs to.&lt;br/&gt;This preserves the current update communication structure of lightning&lt;br/&gt;without breaking the security requirements of 2 round MuSig.&lt;br/&gt;&lt;br/&gt;=== How could PTLCs work ===&lt;br/&gt;&lt;br/&gt;Updating states is more than just signing the commitment transaction. Let&amp;#39;s&lt;br/&gt;assume we do PTLCs with both a PTLC-success and PTLC-timeout pre-signed&lt;br/&gt;transaction (I don&amp;#39;t see how else to do it) on *both* sides of the channel.&lt;br/&gt;This means you have to pre-share the following:&lt;br/&gt;&lt;br/&gt;- A fresh pair of nonces for every existing PTLC in the state plus one&lt;br/&gt;extra (must be done every update)&lt;br/&gt;- A key for every existing PTLC in the state plus one extra (can be fixed&lt;br/&gt;at the start of the channel or updated as you go along).&lt;br/&gt;&lt;br/&gt;After pre-sharing this data Bob starts the communication with:&lt;br/&gt;&lt;br/&gt;(the postfix *-alice and *-bob means that they are in the tree of&lt;br/&gt;transactions on alice or bob&amp;#39;s side, not necessarily that alice or bob is&lt;br/&gt;the one broadcasting it).&lt;br/&gt;&lt;br/&gt;Bob sends:&lt;br/&gt;    - new PTLC details&lt;br/&gt;    - (Rb,sb)-success(s)-bob (uses pre-shared nonce)&lt;br/&gt;    - (Rb,sb)-success(s)-alice (uses pre-shared nonce)&lt;br/&gt;    - (Rb)-commit-bob&lt;br/&gt;    - (Rb)-timeout(s)-bob&lt;br/&gt;    - (Rb)-timeout(s)-alice&lt;br/&gt;&lt;br/&gt;Alice sends back:&lt;br/&gt;    -  (Ra,sa)-timeout(s)-bob&lt;br/&gt;    -  (Ra,sa)-timeout(s)-alice&lt;br/&gt;    -  (Ra,sa)-commit-bob&lt;br/&gt;    -  (Ra)-commit-alice&lt;br/&gt;Bob sends:&lt;br/&gt;    - (Rb,sb)-commit-alice&lt;br/&gt;    - revocation key for last commitment&lt;br/&gt;&lt;br/&gt;**Note that Alice still hasn&amp;#39;t revoked her last state but at this point she&lt;br/&gt;can safely forward the PTLC since Bob has revoked his last state.**&lt;br/&gt;&lt;br/&gt;Other notes:&lt;br/&gt;- This is and looks convoluted but it is simpler if you use witness&lt;br/&gt;asymmetry[2] because it removes duplicating the party&amp;#39;s transactions across&lt;br/&gt;both sides.&lt;br/&gt;- Although you are doing parallel signing on the PTLC output key (you are&lt;br/&gt;signing both a timeout and success) a different party is receiving the&lt;br/&gt;signature and the nonces are communicated in reverse so it actually&lt;br/&gt;sidesteps the flaw of two round MuSig (where the adversary is always&lt;br/&gt;declaring his nonce second and second).&lt;br/&gt;- For protocols such as DLCs you will have to do proper three round MuSig&lt;br/&gt;but you are not forwarding payments so it&amp;#39;s not as time sensitive.&lt;br/&gt;- I am completely avoiding revocation mechanisms here but from my own ideas&lt;br/&gt;and what I&amp;#39;ve seen from others this is compatible.&lt;br/&gt;&lt;br/&gt;=== Claim Summary ===&lt;br/&gt;&lt;br/&gt;Given the above, I claim there is a protocol using two-round MuSig for&lt;br/&gt;fully scriptless lightning that incurs no extra rounds of communication to&lt;br/&gt;get to the irrevocably committed state.&lt;br/&gt;It does incur extra storage for each PTLC in the present commitment&lt;br/&gt;transaction.&lt;br/&gt;It includes an extra round to &amp;#34;fully&amp;#34; update the state between two parties&lt;br/&gt;(but this does not delay payment forwarding).&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t claim that this is the optimal path forward but just wanted to make&lt;br/&gt;this observation to see what others thought.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;[1]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://github.com/LLFourn/witness-asymmetric-channel&#34;&gt;https://github.com/LLFourn/witness-asymmetric-channel&lt;/a&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://eprint.iacr.org/2020/945.pdf&#34;&gt;https://eprint.iacr.org/2020/945.pdf&lt;/a&gt; (thanks @n1cklr)&lt;br/&gt;[4] &lt;a href=&#34;https://eprint.iacr.org/2020/1057.pdf&#34;&gt;https://eprint.iacr.org/2020/1057.pdf&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/lightning-dev/attachments/20201009/e40df51d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201009/e40df51d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfvg889ulvqccjwrw5c7vvtlcadvnjnctzjrpaj6lgtl7tng0y4ygzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u8m7hk3</id>
    
      <title type="html">📅 Original date posted:2020-10-08 📝 Original message: For ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfvg889ulvqccjwrw5c7vvtlcadvnjnctzjrpaj6lgtl7tng0y4ygzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u8m7hk3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszqlrehxtkzqdu3hzpa27ju4x4n97wnw2rjs7sja2rfmrts3genmqz0nhpw&#39;&gt;nevent1q…nhpw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-08&lt;br/&gt;📝 Original message:&lt;br/&gt;For those interested I&amp;#39;ve recently integrated the above refinements&lt;br/&gt;and tried to coherently package the whole idea together here:&lt;br/&gt;&lt;a href=&#34;https://github.com/LLFourn/witness-asymmetric-channel&#34;&gt;https://github.com/LLFourn/witness-asymmetric-channel&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The main difference is that the protocol now uses what I am calling&lt;br/&gt;&amp;#34;revocable signatures&amp;#34; as the main primitive.&lt;br/&gt;This allows for O(1) storage complexity in both key aggregated and&lt;br/&gt;&amp;#34;multisig&amp;#34; constructions.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Thu, Sep 10, 2020 at 1:56 PM Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Fortunately, I am wrong. At least in the case of non-aggregated 2-of-2 you can deterministically produce the encrypted signature by yourself for any commitment transaction as long as you use a deterministic nonce.&lt;br/&gt;&amp;gt;&amp;gt; But I think if using MuSig you would need to store each two party generated encrypted signature.&lt;br/&gt;&amp;gt;&amp;gt; Seeing as the likely way forward would be to use MuSig on an output which has a taproot which hides a discrete 2-of-2 this may not be a problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Upon further reflection I was missing something obvious when I came to this conclusion. You can&amp;#39;t produce the adaptor signature for a commitment transaction deterministically without the encryption key (the other party&amp;#39;s publication point).&lt;br/&gt;&amp;gt; As long as we have to store the other party&amp;#39;s per-commitment publication point we still need O(n) storage where n is the number of commitment transactions. Sorry for the confusion.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Fortunately I had a bit of a breakthrough which allows us to eliminate publication points altogether and enables O(1) storage when 2-of-2 multi-signatures are instantiated with or without key aggregation (i.e. MuSig or OP_CHECKMULTISIG).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Eliminating Publication Points In favor of  &amp;#34;revocable signatures&amp;#34; (for OP_CHECKMULTISIG)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I propose replacing the publication point with a static key that remains the same with each commitment transaction.&lt;br/&gt;&amp;gt; The encryption key for each commitment transaction adaptor signature is (Ra &#43; A)  for Alice and (Rb &#43; B) for Bob.&lt;br/&gt;&amp;gt; Therefore, Alice broadcasting her commitment transaction would reveal the discrete log of Ra &#43; A (and Bob Rb &#43; B).&lt;br/&gt;&amp;gt; Note that if Alice has not revealed her recvocation key (Ra) for this commitment transaction she is not in trouble since her static key A is blinded by Ra. If she has then Bob will learn her static secret key for A.&lt;br/&gt;&amp;gt; The intuition here is that the revocation key acts as a blinding factor for the static key in the same way a nonce blinds your secret key in a schnorr signature (more on that later).&lt;br/&gt;&amp;gt; If you haven&amp;#39;t revealed your revocation key then you are free to use that signature. If you have revealed the revocation key then you have in effect &amp;#34;revoked&amp;#34; the signature.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now we need to make sure that if a party learns the secret key of the other they can efficiently punish them so make the following changes to my original proposal:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Balance output for Alice is  2-of-2(A , Rb &#43; B)&lt;br/&gt;&amp;gt; Balance output for Bob is   2-of-2(Ra &#43; A, B)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The implication of the above structure is that if you broadcast a commitment transaction the other party can take their balance immediately.&lt;br/&gt;&amp;gt; If you broadcasted a revoked commitment transaction then they can take their output and yours immediately.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; PTLC outputs and all subsequent transaction outputs then simplify to 2-of-2(A,B) on every output. Yay!&lt;br/&gt;&amp;gt; Consider a PTLC paying to Alice. The PTLC-success output can be 2-of-2(A,B). If Alice broadcasted it and it has been revoked then Bob knows A and B so he can punish her.&lt;br/&gt;&amp;gt; The converse is true for the PTLC-timeout.&lt;br/&gt;&amp;gt; This elegant uniformity extends to other off-chain protocols hosted in these channels e.g. DLCs&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since A and B are static per channel and the secret keys for Ra and Rb can be incrementally derived from subsequent values (as in the present lightning spec) we have O(1) communication.&lt;br/&gt;&amp;gt; In practice each 2-of-2(A,B) should be randomized so they don&amp;#39;t all look the same.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Revoking key aggregated schnorr signatures (for MuSig)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Even with the above improvement there is still O(n) storage if using key aggregation (MuSig) on the funding transaction output.&lt;br/&gt;&amp;gt; Key aggregation may be desirable here since you may want to not use a taproot spend to broadcast a commitment transaction.&lt;br/&gt;&amp;gt; Since the two party adaptor signature scheme needs randomness from both parties, you would have to store the other party&amp;#39;s nonce and retrieve it to deterministically produce the adaptor signature so you can extract Ra &#43; A (if Alice broadcasts) from the witness of the commitment transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Fortunately, there is a natural way to revoke a key aggregated signature you helped produce without using adaptor signatures at all: just reveal the nonce you used for it to the other party.&lt;br/&gt;&amp;gt; This prevents you from broadcasting it since the other party can now extract your secret key from it!&lt;br/&gt;&amp;gt; Explicitly, two party signature generate two Schnorr signatures for the key A &#43; B in the form:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; sa = ra &#43; rb&amp;#39; &#43; H(Ra &#43; Rb&amp;#39; || A &#43; B || m)(a &#43; b)&lt;br/&gt;&amp;gt; sb = ra&amp;#39; &#43; rb &#43; H(Ra&amp;#39; &#43; Rb || A &#43; B || m)(a &#43; b)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - (ra,rb) are the revocation secret keys,&lt;br/&gt;&amp;gt; - (ra&amp;#39;, rb&amp;#39;) are typical deterministically produced[1] nonces with Ra&amp;#39; = ra&amp;#39; * G etc.&lt;br/&gt;&amp;gt; - (a,b) are the static secret keys&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Only Alice knows sa and only Bob knows sb but they are both signatures on the same commitment transaction.&lt;br/&gt;&amp;gt; This is the witness asymmetry in the protocol.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When revoking the commitment transaction associated with sa Alice reveals ra to Bob and vice versa. If Alice uses sa after that, Bob can deterministically produce rb&amp;#39; and ra (because each revocation key can be derived from the last) and therefore can produce:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ra &#43; rb&amp;#39; &#43; H(Ra &#43; Rb&amp;#39; || A &#43; B || m)b&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; which when subtracted from sa and divided by H(Ra &#43; Rb&amp;#39; || A &#43; B || m) will yield b (Bob&amp;#39;s static secret key).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The advantage of witness asymmetric channels using discrete keys over present lightning seems to boil down to a simpler transaction structure (in favour of using more complicated cryptography).&lt;br/&gt;&amp;gt; However, for key aggregation there is a measurable improvement in communication complexity: It halves the amount of interactive signatures that need to be computed per payment.&lt;br/&gt;&amp;gt; This is because each PTLC does not need to be duplicated across the asymmetric state of both parties.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Zeeman pointed out in [2] that the number of signing rounds (which this does not improve) may be prohibitive anyway for payment applications at least so it remains to be seen whether this efficiency can be utilised  for payment PTLCs in LN.&lt;br/&gt;&amp;gt; Thankfully, there are still advancements being made in Schnorr key aggregated signing so the right answer to this might change over time.[3]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] The caveats about not using deterministic nonces in MuSig can be avoided here since we necessarily have state in LN.&lt;br/&gt;&amp;gt; [2] &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&lt;/a&gt;&lt;br/&gt;&amp;gt; [3] &lt;a href=&#34;https://medium.com/blockstream/musig-dn-schnorr-multisignatures-with-verifiably-deterministic-nonces-27424b5df9d6&#34;&gt;https://medium.com/blockstream/musig-dn-schnorr-multisignatures-with-verifiably-deterministic-nonces-27424b5df9d6&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; LL
    </content>
    <updated>2023-06-09T15:01:05&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs95xt3mcuj5ymcuxat2eaexw80al0eytgw842e6vqkq5pevruj4jgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u8pwuq6</id>
    
      <title type="html">📅 Original date posted:2020-05-05 📝 Original message: On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs95xt3mcuj5ymcuxat2eaexw80al0eytgw842e6vqkq5pevruj4jgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u8pwuq6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspx8zwgz6grhwy8v5gx94vd70rn09g32prmyfu6sg23cx93qjrdqsqe9qhh&#39;&gt;nevent1q…9qhh&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-05&lt;br/&gt;📝 Original message:&lt;br/&gt;On Tue, May 5, 2020 at 9:01 PM Luke Dashjr 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 Tuesday 05 May 2020 10:17:37 Antoine Riard via bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt; Trust-minimization of Bitcoin security model has always relied first and&lt;br/&gt;&amp;gt; &amp;gt; above on running a full-node. This current paradigm may be shifted by LN&lt;br/&gt;&amp;gt; &amp;gt; where fast, affordable, confidential, censorship-resistant payment&lt;br/&gt;&amp;gt; services&lt;br/&gt;&amp;gt; &amp;gt; may attract a lot of adoption without users running a full-node.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; No, it cannot be shifted. This would compromise Bitcoin itself, which for&lt;br/&gt;&amp;gt; security depends on the assumption that a supermajority of the economy is&lt;br/&gt;&amp;gt; verifying their incoming transactions using their own full node.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Hi Luke,&lt;br/&gt;&lt;br/&gt;I have heard this claim made several times but have never understood the&lt;br/&gt;argument behind it. The question I always have is: If I get scammed by not&lt;br/&gt;verifying my incoming transactions properly how can this affect anyone&lt;br/&gt;else? It&amp;#39;s very unintuative.  I&amp;#39;ve been scammed several times in my life in&lt;br/&gt;fiat currency transactions but as far as I could tell it never negatively&lt;br/&gt;affected the currency overall!&lt;br/&gt;&lt;br/&gt;The links you point and from what I&amp;#39;ve seen you say before refer to &amp;#34;miner&lt;br/&gt;control&amp;#34; as the culprit. My only thought is that this is because a light&lt;br/&gt;client could follow a dishonest majority of hash power chain. But this just&lt;br/&gt;brings me back to the question. If, instead of BTC, I get a payment in some&lt;br/&gt;miner scamcoin on their dishonest fork (but I think it&amp;#39;s BTC because I&amp;#39;m&lt;br/&gt;running a light client) that still seems to only to damage me. Where does&lt;br/&gt;the side effect onto others on the network come from?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20200505/549643a3/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200505/549643a3/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqp5g8vsa7zkpevj0wd738qgtfkwd23nk4vrefz55rnpk5ahdvlqgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ug0zyw6</id>
    
      <title type="html">📅 Original date posted:2020-04-28 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqp5g8vsa7zkpevj0wd738qgtfkwd23nk4vrefz55rnpk5ahdvlqgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ug0zyw6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsd7v4ug6rzwtsc9q9253x3g2x2c4mku8yjnudzdwxuqj00kqz7nmsa0m6ug&#39;&gt;nevent1q…m6ug&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-28&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Laolu,&lt;br/&gt;&lt;br/&gt;&amp;gt;From my PoV, new technologies aren&amp;#39;t what has held back DLC deployment to&lt;br/&gt;&amp;gt; this date since the paper was originally released. Tadge has had working&lt;br/&gt;&amp;gt; code than can be deployed today for some time now, and other parties like&lt;br/&gt;&amp;gt; DG-Lab have created full-fledge demos with the system working end to end.&lt;br/&gt;&amp;gt; Instead, the real impediment has been the bootstrapping of the oracles&lt;br/&gt;&amp;gt; which the scheme critically depends upon.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Oracles certainly require a huge bootstrapping effort but I think that some&lt;br/&gt;of the limitations of the original also hurt the progress of DLCs. The&lt;br/&gt;original protocol requires three on-chain transactions, asymmetric state&lt;br/&gt;and punishment transactions (i.e. you have to run a node to watch the&lt;br/&gt;chain). The original DLC is also easy to get wrong:&lt;br/&gt;&lt;a href=&#34;https://github.com/mit-dci/dlcspec/issues/5&#34;&gt;https://github.com/mit-dci/dlcspec/issues/5&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;The PTLC based DLC on the other hand is rather straightforward with only&lt;br/&gt;two transactions, symmetric state and no penalty transactions. Even more&lt;br/&gt;importantly, it has no liveness requirement after the funding transaction&lt;br/&gt;is down (assuming there are no refund transactions) -- you can wait as long&lt;br/&gt;as you want before claims funds. For me, this makes the whole idea far more&lt;br/&gt;attractive both as a user and developer.&lt;br/&gt;&lt;br/&gt;Self plugs: I wrote a short paper on how to optimise the DLCs so they could&lt;br/&gt;get more adoption:&lt;br/&gt;&lt;a href=&#34;https://github.com/LLFourn/two-round-dlc/blob/master/main.pdf&#34;&gt;https://github.com/LLFourn/two-round-dlc/blob/master/main.pdf&lt;/a&gt;. I am also&lt;br/&gt;working on a framework for oracle deployment which will be ready soon™.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thu, Apr 23, 2020 at 7:52 AM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi Laolu,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks for the response :)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I agree that some more framing probably would have been good to have in&lt;br/&gt;&amp;gt;&amp;gt; my update.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; First, I want to clarify that my intention is not to implement a&lt;br/&gt;&amp;gt;&amp;gt; PTLC-based lightning network on top of ECDSA adaptor signatures, as I do&lt;br/&gt;&amp;gt;&amp;gt; believe that using Schnorr will be superior, but rather I wish to get some&lt;br/&gt;&amp;gt;&amp;gt; PoC sandbox with which to start implementing and testing out the long list&lt;br/&gt;&amp;gt;&amp;gt; of currently theoretical proposals surrounding PTLCs, most of which are&lt;br/&gt;&amp;gt;&amp;gt; implementation agnostic (to a degree anyway). I think it would be super&lt;br/&gt;&amp;gt;&amp;gt; beneficial to have more fleshed out with respect to what some challenges of&lt;br/&gt;&amp;gt;&amp;gt; a Payment Point LN are going to be than we understand now, before Schnorr&lt;br/&gt;&amp;gt;&amp;gt; is implemented and it is time to commit to some PTLC scheme for real.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Second, I agree that I&amp;#39;ve probably understated somewhat the changes that&lt;br/&gt;&amp;gt;&amp;gt; will be needed in most implementations as I was mostly thinking about what&lt;br/&gt;&amp;gt;&amp;gt; would need to change in the BOLTs, which does actually seem relatively&lt;br/&gt;&amp;gt;&amp;gt; minimal (although as you mention, these minimal changes to the BOLTs do&lt;br/&gt;&amp;gt;&amp;gt; trigger large changes in many implementations). Also, good point on how&lt;br/&gt;&amp;gt;&amp;gt; BOLT 11 (invoicing) will have to be altered as well, must&amp;#39;ve slipped my&lt;br/&gt;&amp;gt;&amp;gt; mind.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt; Nadav&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Wed, Apr 22, 2020 at 8:17 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Hi Nadav,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Thanks for the updates! Super cool to see this concept continue to evolve&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; and integrate new technologies as they pop up.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Rather than a &amp;#34;few changes&amp;#34;, this would to date be the largest&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; network-level&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; update undertaken to the Lightning Network thus far. In the past, we&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; rolled&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; out the new onion blob format (which enables changes like this), but&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; none of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the intermediate nodes actually need to modify their behavior. New&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; payment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; types like MPP&#43;AMP only needed the _end points_ to update making this an&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; end-to-end update that has been rolled out so far in a de-synchronized&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; manner.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Re-phrasing deploying this requires changes to: the core channel state&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; machine (the protocol we use to make commitment updates), HTLC scripts,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; on-chain HTLC handling and resolution, path finding algorithms (to only&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; see&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; out the new PTLC-enabled nodes), invoice changes and onion blob&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; processing.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I&amp;#39;d caution against underestimating how long all of this will take in&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; practice, and the degree of synchronization required to pull it all off&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; properly.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; For a few years now the question we&amp;#39;ve all been pondering is: do we wait&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; for&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; scnhorr to roll out multi-hop locks, or just use the latest ECDSA based&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; technique? As dual deployment is compatible (we can make the onion blobs&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; for&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; both types the same), a path has always existed to first roll out with&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; latest ECDSA based technique then follow up later to roll out the schnorr&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; version as well. However there&amp;#39;s also a risk here as depending on how&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; quickly things can be rolled out, schnorr may become available&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; mid-development, which would possibly cause us to reconsider the ECDSA&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; path&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; and have the network purely use scnhorr to make things nice and uniform.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Zooming out for a bit, the solution space of &amp;#34;how channels can look post&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; scriptless-scripts &#43; taproot&amp;#34; is rather large [1], and the addition of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; this&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; new technique allows for an even larger set of deployment possibilities.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; This latest ECDSA variant is much simpler than the prior ones (which had&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; few rounds of more involved ZKPs), but since it still uses OP_CMS, it&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; can&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; be used to modify the funding output.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [1]:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; -- Laolu&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; On Wed, Apr 22, 2020 at 8:13 AM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hello all,&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;d like to give an update on the current state of thinking and coding&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; surrounding replacing Hash-TimeLock Contracts (HTLCs) with Point-TimeLock&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Contracts (PTLCs) (aka Payment Hashes -&amp;gt; Payment Points) in hopes of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; sparking interest, discussion, development, 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; We Want Payment Points!&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; Using point-locks (in PTLCs) instead of hash-locks (in HTLCs) for&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; lightning payments is an all around improvement. HTLCs require the use of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the same hash across payment routes (barring fancy ZKPs which are inferior&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to PTLCs) while PTLCs allow for payment de-correlation along routes. For an&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; introduction to the topic, see&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-1/&#34;&gt;https://suredbits.com/payment-points-part-1/&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; In addition to improving privacy in this way and protecting against&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; wormhole attacks, PTLC-based lightning channels open the door to a large&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; variety of interesting applications that cannot be accomplished with HTLCs:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Stuckless (retry-able) Payments with proof of payment (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-2-stuckless-payments/&#34;&gt;https://suredbits.com/payment-points-part-2-stuckless-payments/&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; Escrow contracts over Lightning (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-3-escrow-contracts/&#34;&gt;https://suredbits.com/payment-points-part-3-escrow-contracts/&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; High/DLOG AMP (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://docs.google.com/presentation/d/15l4h2_zEY4zXC6n1NqsImcjgA0fovl_lkgkKu1O3QT0/edit#slide=id.g64c15419e7_0_40&#34;&gt;https://docs.google.com/presentation/d/15l4h2_zEY4zXC6n1NqsImcjgA0fovl_lkgkKu1O3QT0/edit#slide=id.g64c15419e7_0_40&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; Stuckless &#43; AMP (an improvement on Boomerang) (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002239.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002239.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; Pay-for-signature (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-4-selling-signatures/&#34;&gt;https://suredbits.com/payment-points-part-4-selling-signatures/&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; Pay-for-commitment (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002166.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002166.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; Monotonic access structures on payment completion (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-monotone-access-structures/&#34;&gt;https://suredbits.com/payment-points-monotone-access-structures/&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; Ideal Barrier Escrow Implementation (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-implementing-barrier-escrows/&#34;&gt;https://suredbits.com/payment-points-implementing-barrier-escrows/&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; And allowing for Barrier Escrows, we can even have&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Atomic multi-payment setup (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-and-barrier-escrows/&#34;&gt;https://suredbits.com/payment-points-and-barrier-escrows/&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; Lightning Discreet Log Contract (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/discreet-log-contracts-on-lightning-network/&#34;&gt;https://suredbits.com/discreet-log-contracts-on-lightning-network/&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; Atomic multi-payment update (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/updating-and-transferring-lightning-payments/&#34;&gt;https://suredbits.com/updating-and-transferring-lightning-payments/&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; Lightning Discreet Log Contract Novation/Transfer (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/transferring-lightning-dlcs/&#34;&gt;https://suredbits.com/transferring-lightning-dlcs/&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; There are likely even more things that can be done with Payment Points&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; so make sure to respond if I&amp;#39;ve missed any known ones.&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; How Do We Get Payment Points?&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; Eventually, once we have Taproot, we can use 2p-Schnorr adaptor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; signatures in Lightning channels. For a detailed thread by ZmnSCPxj, see&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; here&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.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; In the meantime, Lloyd has written about a way to do 1p-ECDSA adaptor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; sigs (&lt;a href=&#34;https://github.com/LLFourn/one-time-VES&#34;&gt;https://github.com/LLFourn/one-time-VES&lt;/a&gt;) which can be paired&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with OP_CHECKMULTISIG to allows us to execute PTLCs on Bitcoin today!&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Nickler has implemented this in a branch of secp256k1 (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/jonasnick/secp256k1/pull/14&#34;&gt;https://github.com/jonasnick/secp256k1/pull/14&lt;/a&gt;) and I have implemented&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it in Bouncy Castle in Bitcoin-S with some testing against this branch (&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/nkohen/bitcoin-s-core/tree/bouncy-adaptor&#34;&gt;https://github.com/nkohen/bitcoin-s-core/tree/bouncy-adaptor&lt;/a&gt;). Do note&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; that as nickler states on his PR, &amp;#34;IT IS EXTREMELY DANGEROUS AND RECKLESS&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; TO USE THIS MODULE IN PRODUCTION. DON&amp;#39;T!&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; A demo of an on-chain PTLC I executed using nickler&amp;#39;s implementation on&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the backend &#43; bitcoin-s can be seen here &lt;a href=&#34;https://youtu.be/w9o4v7Idjno&#34;&gt;https://youtu.be/w9o4v7Idjno&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; And waxwing did a lovely write-up about the crypto itself&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://joinmarket.me/blog/blog/schnorrless-scriptless-scripts/&#34;&gt;https://joinmarket.me/blog/blog/schnorrless-scriptless-scripts/&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; I would be very interested in having a fork of (at least) one lightning&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; implementation (or Rust Lightning) to be a proof of concept ECDSA-PTLC node&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with which we can test and play with the plethora of PTLC-based proposals&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; above.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1) update_add_ptlc will have a 32 byte x-coordinate (of a point) rather&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; than a 32 byte hash. Additionally the onion&amp;#39;s hop_data will contain a 32&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; byte scalar tweak for each hop. As per [link multi-hop locks]. The last&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; hop_data will instead include a 32 byte scalar equal to the sum of all&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; tweaks.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2) commitment_signed will have 162 byte adaptor ptlc_signatures rather&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; than valid (71/72 byte) ECDSA signatures on PTLC-success transactions.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 3) The in-flight outputs on the commitment transaction itself become a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; little simpler as we no longer need to explicitly check the payment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; pre-image against a hash. Instead, delete all instances of &amp;#34;OP_HASH160&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;RIPEMD160(payment_hash)&amp;gt; OP_EQUALVERIFY&amp;#34; in the scripts (leaving the rest&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the same) and require no pre-image in the witness, only a valid signature.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The pre-image check is implicitly enforced by the &amp;lt;remoteptlc_sig&amp;gt; witness&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; since only an adaptor signature was provided by remote so that the payment&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; pre-image is required to create the valid signature (from which the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; pre-image can be then deduced by comparing adaptor and valid signatures).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If I&amp;#39;ve missed any other changes that need to happen, do respond with&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; them!&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I hope that as a community we can work towards having a PTLC-based&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Lightning Network that is safe and stable as soon as possible, and so I&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; encourage further thinking, development and expirementation with PTLCs now&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; so that when Taproot is finally at our disposal we can cleanly start moving&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; towards a more ideal Lightning :)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Nadav&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&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;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/lightning-dev/attachments/20200428/e304daeb/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200428/e304daeb/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9zjpv59w7zwu4s0v8fxkwf2933dgg7txnedvx5fsyfxyn5pp3szgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ucf97t7</id>
    
      <title type="html">📅 Original date posted:2020-03-06 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9zjpv59w7zwu4s0v8fxkwf2933dgg7txnedvx5fsyfxyn5pp3szgzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ucf97t7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvhhejdrqt5tmprc0aue5wdhk0h8mu5l7lu9z4p4lugd53u0ltv0swg8nwf&#39;&gt;nevent1q…8nwf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Subhra,&lt;br/&gt;&lt;br/&gt;Afaik, the only problem is the one you identified, it doesn&amp;#39;t work across&lt;br/&gt;multiple hops but only for the final hop. This penalty idea is the basis&lt;br/&gt;for doing atomc swaps fairly:&lt;br/&gt;&lt;a href=&#34;https://coblox.tech/docs/financial_crypto19.pdf&#34;&gt;https://coblox.tech/docs/financial_crypto19.pdf&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;On Fri, Mar 6, 2020 at 4:58 PM Subhra Mazumdar &amp;lt;&lt;br/&gt;subhra.mazumdar1993 at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi,&lt;br/&gt;&amp;gt;       I was reading the paper by Poon and Dryja on Bitcoin Lightning&lt;br/&gt;&amp;gt; Network and was going through the construction of HTLC. Suppose 2 parties A&lt;br/&gt;&amp;gt; and B have a channel with each party locking 0.5 BTC. Suppose A wants to&lt;br/&gt;&amp;gt; transfer 0.1 BTC to B contingent to the knowledge of R : H=h(R) produced&lt;br/&gt;&amp;gt; within a locktime of say t days. So the script output for A is -&lt;br/&gt;&amp;gt; 1. 0.4 BTC to A&lt;br/&gt;&amp;gt; 2. 0.5 BTC to B&lt;br/&gt;&amp;gt; 3. 0.1 BTC locked in HTLC between A &amp;amp; B.&lt;br/&gt;&amp;gt; Why we cannot set the terms as say 0.4 BTC to A, 0.2 BTC to B and 0.4 BTC&lt;br/&gt;&amp;gt; to HTLC, where HTLC output can follow either of the paths - If B produces R&lt;br/&gt;&amp;gt; within t days then it gets back 0.4 BTC else after t days A can broadcast&lt;br/&gt;&amp;gt; with 0.4 BTC going to the A? This prevents B from not responding (and&lt;br/&gt;&amp;gt; induce possibly griefing attack across a longer path by withholding the&lt;br/&gt;&amp;gt; solution) since it will lose out 0.3 BTC. What can be the problem if the&lt;br/&gt;&amp;gt; terms of HTLC itself tries to enforce a penalty on the counterparty?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Yours sincerely,&lt;br/&gt;&amp;gt; Subhra Mazumdar.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/lightning-dev/attachments/20200306/41465743/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200306/41465743/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:12&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstrypkey8hwzkxk3qfs4xvzn78hzgn6d868amk6fsd7zueckny94szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u0wd7al</id>
    
      <title type="html">📅 Original date posted:2019-12-18 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstrypkey8hwzkxk3qfs4xvzn78hzgn6d868amk6fsd7zueckny94szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u0wd7al" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst5sg6kthjuwm74dyde9420lkeyveqcemj2m48jsfx23x9spt87wgu7hjlk&#39;&gt;nevent1q…hjlk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-18&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi ZmnSCPxj and Aj,&lt;br/&gt;&lt;br/&gt;Thanks for starting this discussion ZmnSCPxj. Although transactions with&lt;br/&gt;relative lock times are easily distinguishable today, couldn&amp;#39;t this&lt;br/&gt;situation be improved? Even just a few wallets changing their behaviour to&lt;br/&gt;set relative time locks on normal payments would weaken the heuristic. From&lt;br/&gt;a design perspective it feels like leaving the improvement vector open&lt;br/&gt;would be better.&lt;br/&gt;&lt;br/&gt;Aj&amp;#39;s model of scriptless lightning is more or less what I had in my mind&lt;br/&gt;(but with much better detail). On the question of &amp;#34;script based payment&lt;br/&gt;points&amp;#34; or &amp;#34;fully scriptless&amp;#34;: Why not just do both?&lt;br/&gt;&lt;br/&gt;Since the tapscript version is faster to the &amp;#34;irrevocably committed&amp;#34; state,&lt;br/&gt;you first do that so you can forward the payment as fast as possible. Now&lt;br/&gt;that both parties have a commitment tx with a tapscript PTLC, they can (in&lt;br/&gt;no hurry) sign the scriptless spending transactions from the PTLC output. I&lt;br/&gt;think once they have signatures on their scriptless PTLC transactions they&lt;br/&gt;can forget all the tapscript data (to minimize the data they have to store&lt;br/&gt;per commitment tx).&lt;br/&gt;&lt;br/&gt;&amp;gt; But with taproot you can have a script path as well, so you could have a&lt;br/&gt;&amp;gt; script:&lt;br/&gt;&lt;br/&gt;&amp;gt;    A CHECKSIGVERIFY B CHECKSIG&lt;br/&gt;&lt;br/&gt;&amp;gt; and supply a partial signature:&lt;br/&gt;&lt;br/&gt;&amp;gt;    R&#43;X,s,X where s = r &#43; H(R&#43;X,A,m)*a&lt;br/&gt;&lt;br/&gt;&amp;gt; to allow them to satisfy &amp;#34;A CHECKSIGVERIFY&amp;#34; if they know the discrete&lt;br/&gt;&amp;gt; log of X, and of course they can sign with B at any time. This is only&lt;br/&gt;&amp;gt; half a round trip, and can be done at the same time as sending the &amp;#34;I&lt;br/&gt;&amp;gt; want to do a PTLC for X&amp;#34; message to setup the (ultimately cheaper) MuSig&lt;br/&gt;&amp;gt; spend. It&amp;#39;s an extra signature on the sender&amp;#39;s side and an extra&lt;br/&gt;verification&lt;br/&gt;&amp;gt; on the receiver&amp;#39;s side, but I think it works out fine.&lt;br/&gt;&lt;br/&gt;This is exactly how I thought the &amp;#34;script based payment point&amp;#34; would work&lt;br/&gt;where you just replace the hashing with an CHECKSIG and an adaptor sig.&lt;br/&gt;Like Z, I don&amp;#39;t see how you can get away with just that though. I think you&lt;br/&gt;need to do a full tapscript PTLC and revocation (1.5 round trips) before&lt;br/&gt;you can forward a payment.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20191218/b966b7d5/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191218/b966b7d5/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:57:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspax0ug3k88txqn7uypw28uxj4l3s9rpuc37l4wq5v3ylq787ahsszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u67v3r3</id>
    
      <title type="html">📅 Original date posted:2019-10-06 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspax0ug3k88txqn7uypw28uxj4l3s9rpuc37l4wq5v3ylq787ahsszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u67v3r3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqx2dz25gjpp0d2nfcq978xca4fkteq50frhv6yxe6ftg8mwmq6vcxvlre6&#39;&gt;nevent1q…lre6&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Thread,&lt;br/&gt;&lt;br/&gt;I made a reply to the OP but didn&amp;#39;t &amp;#34;reply all&amp;#34; so it just went directly to&lt;br/&gt;Ethan. Since the comments were interesting I&amp;#39;ll attempt to salvage them by&lt;br/&gt;posting them in full:&lt;br/&gt;&lt;br/&gt;== Lloyd&amp;#39;s post ==&lt;br/&gt;Hi Ethan,&lt;br/&gt;&lt;br/&gt;I&amp;#39;d be interested to know what protocols you need OP_CAT for. I&amp;#39;m trying to&lt;br/&gt;figure out if there really exists any script based protocol that doesn&amp;#39;t&lt;br/&gt;have a more efficient scriptless counterpart.  For example,&lt;br/&gt;A²L[1] achieves the same thing as Tumblebit but requires no script. I can&lt;br/&gt;imagine paying based on a merkle path could be useful, but a protocol was&lt;br/&gt;recently suggested on lightning-dev [2] that does this but without OP_CAT&lt;br/&gt;(and without any script!).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://eprint.iacr.org/2019/589.pdf&#34;&gt;https://eprint.iacr.org/2019/589.pdf&lt;/a&gt;&lt;br/&gt;[2]&lt;br/&gt;&lt;a href=&#34;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg01427.html&#34;&gt;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg01427.html&lt;/a&gt;&lt;br/&gt;(*I linked to the wrong thread in the original email*).&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;== Ethan&amp;#39;s response ==&lt;br/&gt;Hi Lloyd,&lt;br/&gt;&lt;br/&gt;Thanks for your response. I am not sure if you intended to take this off&lt;br/&gt;list or not.&lt;br/&gt;&lt;br/&gt;I plan to at some point to enumerate in detail protocols that OP_CAT would&lt;br/&gt;benefit. A more important point is that OP_CAT is a basic building block&lt;br/&gt;and that we don&amp;#39;t know what future protocols it would allow. In my own&lt;br/&gt;research I have avoiding going down certain paths because it isn&amp;#39;t worth&lt;br/&gt;the time to investigate knowing that OP_CAT wouldn&amp;#39;t make the protocol&lt;br/&gt;practical.&lt;br/&gt;&lt;br/&gt;In regards to scriptless scripts they almost always require an interactive&lt;br/&gt;protocol and sometimes ZKPs. A2L is very impressive but like TumbleBit it&lt;br/&gt;places a large burden on the developer. Additionally I am aware of no way&lt;br/&gt;to reveal a subset of preimages with scriptless scripts, do a conditioned&lt;br/&gt;reveal i.e. these preimages can only spend under these two pubkeys and&lt;br/&gt;timelockA where after timelockZ this other pubkey can spend without a&lt;br/&gt;preimages. Scriptless scripts are a fantastic tool but they shouldn&amp;#39;t be&lt;br/&gt;the only tool that we have.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure I follow what you are saying with [2]&lt;br/&gt;&lt;br/&gt;This brings me back a philosophical point:&lt;br/&gt;Bitcoin should give people basic tools to build protocols without first&lt;br/&gt;knowing what all those protocols are especially when those tools have very&lt;br/&gt;little downside.&lt;br/&gt;&lt;br/&gt;I really appreciate your comments.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Ethan&lt;br/&gt;==&lt;br/&gt;&lt;br/&gt;*Back to normal thread*&lt;br/&gt;&lt;br/&gt;Hi Ethan,&lt;br/&gt;&lt;br/&gt;Thanks for the insightful reply and sorry for my mailing list errors.&lt;br/&gt;&lt;br/&gt;&amp;gt; I plan to at some point to enumerate in detail protocols that OP_CAT&lt;br/&gt;would benefit.&lt;br/&gt;&lt;br/&gt;Sweet. Thanks.&lt;br/&gt;&lt;br/&gt;&amp;gt; Additionally I am aware of no way to reveal a subset of preimages with&lt;br/&gt;scriptless scripts, do a conditioned reveal i.e. these preimages can only&lt;br/&gt;spend under these two pubkeys and timelockA where after timelockZ this&lt;br/&gt;other pubkey can spend without a preimages. Scriptless scripts are a&lt;br/&gt;fantastic tool but they shouldn&amp;#39;t be the only tool that we have.&lt;br/&gt;&lt;br/&gt;Yes. With adaptor signatures there is no way to reveal more than one&lt;br/&gt;pre-image; you are limited to revealing a single scalar. But you can have&lt;br/&gt;multiple transactions spending from the same output, each with a different&lt;br/&gt;set of scriptless conditions (absolute time locks, relative time locks and&lt;br/&gt;pre-image reveal). This is enough to achieve what I think you are&lt;br/&gt;describing. FWIW there&amp;#39;s a growing consensus that you can do lightning&lt;br/&gt;without script [1]. Perhaps we can&amp;#39;t do everything with this technique. My&lt;br/&gt;current focus is figuring out what useful things we can&amp;#39;t do like this&lt;br/&gt;(even if we were to go wild and add whatever opcodes we wanted). So far it&lt;br/&gt;looks like covenants are the main exception.&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not sure I follow what you are saying with [2]&lt;br/&gt;&lt;br/&gt;That is perfectly understandable as I linked the wrong thread (sorry!).&lt;br/&gt;Here&amp;#39;s the right one:&lt;br/&gt;&lt;a href=&#34;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg01427.html&#34;&gt;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg01427.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I was pointing to the surprising result that you can actually pay for a&lt;br/&gt;merkle path with a particular merkle root leading to a particular leaf that&lt;br/&gt;you&amp;#39;re interested in without validating the merkle path on chain (e.g.&lt;br/&gt;OP_CAT and OP_SHA256). The catch is that the leaves have to be pedersen&lt;br/&gt;commitments and you prove the existence of your data in the merkle root by&lt;br/&gt;showing an opening to the leaf pedersen commitment. This may not be general&lt;br/&gt;enough to cover every merkle tree use case (but I&amp;#39;m not sure what those&lt;br/&gt;are!).&lt;br/&gt;&lt;br/&gt;&amp;gt; This brings me back a philosophical point:&lt;br/&gt;&amp;gt; Bitcoin should give people basic tools to build protocols without first&lt;br/&gt;knowing what all those protocols are especially when those tools have very&lt;br/&gt;little downside.&lt;br/&gt;&lt;br/&gt;This is a really powerful idea. But I&amp;#39;ve started feeling like you have to&lt;br/&gt;just design the layer 2 protocols first and then design layer 1! It seems&lt;br/&gt;like almost every protocol that people want to make requires very&lt;br/&gt;particular fundamental changes: SegWit for LN-penalty and NOINPUT for eltoo&lt;br/&gt;for example. On top of that it seems like just having the right signature&lt;br/&gt;scheme (schnorr) at layer 1 is enough to enable most useful stuff in an&lt;br/&gt;elegant way.&lt;br/&gt;&lt;br/&gt;[1]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-September/017309.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-September/017309.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Fri, Oct 4, 2019 at 1:08 AM Ethan Heilman &amp;lt;eth3rs at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; To avoid derailing the NO_INPUT conversation, I have changed the&lt;br/&gt;&amp;gt; subject to OP_CAT.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Responding to:&lt;br/&gt;&amp;gt; &amp;#34;&amp;#34;&amp;#34;&lt;br/&gt;&amp;gt; * `SIGHASH` flags attached to signatures are a misdesign, sadly&lt;br/&gt;&amp;gt; retained from the original BitCoin 0.1.0 Alpha for Windows design, on&lt;br/&gt;&amp;gt; par with:&lt;br/&gt;&amp;gt; [..]&lt;br/&gt;&amp;gt; * `OP_CAT` and `OP_MULT` and `OP_ADD` and friends&lt;br/&gt;&amp;gt; [..]&lt;br/&gt;&amp;gt; &amp;#34;&amp;#34;&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CAT is an extremely valuable op code. I understand why it was&lt;br/&gt;&amp;gt; removed as the situation at the time with scripts was dire. However&lt;br/&gt;&amp;gt; most of the protocols I&amp;#39;ve wanted to build on Bitcoin run into the&lt;br/&gt;&amp;gt; limitation that stack values can not be concatenated. For instance&lt;br/&gt;&amp;gt; TumbleBit would have far smaller transaction sizes if OP_CAT was&lt;br/&gt;&amp;gt; supported in Bitcoin. If it happens to me as a researcher it is&lt;br/&gt;&amp;gt; probably holding other people back as well. If I could wave a magic&lt;br/&gt;&amp;gt; wand and turn on one of the disabled op codes it would be OP_CAT.  Of&lt;br/&gt;&amp;gt; course with the change that size of each concatenated value must be 64&lt;br/&gt;&amp;gt; Bytes or less.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Tue, Oct 1, 2019 at 10:04 PM ZmnSCPxj via bitcoin-dev&lt;br/&gt;&amp;gt; &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; Good morning lists,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Let me propose the below radical idea:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * `SIGHASH` flags attached to signatures are a misdesign, sadly retained&lt;br/&gt;&amp;gt; from the original BitCoin 0.1.0 Alpha for Windows design, on par with:&lt;br/&gt;&amp;gt; &amp;gt;   * 1 RETURN&lt;br/&gt;&amp;gt; &amp;gt;   * higher-`nSequence` replacement&lt;br/&gt;&amp;gt; &amp;gt;   * DER-encoded pubkeys&lt;br/&gt;&amp;gt; &amp;gt;   * unrestricted `scriptPubKey`&lt;br/&gt;&amp;gt; &amp;gt;   * Payee-security-paid-by-payer (i.e. lack of P2SH)&lt;br/&gt;&amp;gt; &amp;gt;   * `OP_CAT` and `OP_MULT` and `OP_ADD` and friends&lt;br/&gt;&amp;gt; &amp;gt;   * transaction malleability&lt;br/&gt;&amp;gt; &amp;gt;   * probably many more&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; So let me propose the more radical excision, starting with SegWit v1:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * Remove `SIGHASH` from signatures.&lt;br/&gt;&amp;gt; &amp;gt; * Put `SIGHASH` on public keys.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Public keys are now encoded as either 33-bytes (implicit `SIGHASH_ALL`)&lt;br/&gt;&amp;gt; or 34-bytes (`SIGHASH` byte, followed by pubkey type, followed by pubkey&lt;br/&gt;&amp;gt; coordinate).&lt;br/&gt;&amp;gt; &amp;gt; `OP_CHECKSIG` and friends then look at the *public key* to determine&lt;br/&gt;&amp;gt; sighash algorithm rather than the signature.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As we expect public keys to be indirectly committed to on every output&lt;br/&gt;&amp;gt; `scriptPubKey`, this is automatically output tagging to allow particular&lt;br/&gt;&amp;gt; `SIGHASH`.&lt;br/&gt;&amp;gt; &amp;gt; However, we can then utilize the many many ways to hide public keys away&lt;br/&gt;&amp;gt; until they are needed, exemplified in MAST-inside-Taproot.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I propose also the addition of the opcode:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     &amp;lt;sighash&amp;gt; &amp;lt;pubkey&amp;gt; OP_SETPUBKEYSIGHASH&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * `sighash` must be one byte.&lt;br/&gt;&amp;gt; &amp;gt; * `pubkey` may be the special byte `0x1`, meaning &amp;#34;just use the Taproot&lt;br/&gt;&amp;gt; internal pubkey&amp;#34;.&lt;br/&gt;&amp;gt; &amp;gt; * `pubkey` may be 33-byte public key, in which case the `sighash` byte&lt;br/&gt;&amp;gt; is just prepended to it.&lt;br/&gt;&amp;gt; &amp;gt; * `pubkey` may be 34-byte public key with sighash, in which case the&lt;br/&gt;&amp;gt; first byte is replaced with `sighash` byte.&lt;br/&gt;&amp;gt; &amp;gt; * If `sighash` is `0x00` then the result is a 33-byte public key (the&lt;br/&gt;&amp;gt; sighash byte is removed) i.e. `SIGHASH_ALL` implicit.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This retains the old feature where the sighash is selected at&lt;br/&gt;&amp;gt; time-of-spending rather than time-of-payment.&lt;br/&gt;&amp;gt; &amp;gt; This is done by using the script:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     &amp;lt;pubkey&amp;gt; OP_SETPUBKEYSIGHASH OP_CHECKSIG&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Then the sighash can be put in the witness stack after the signature,&lt;br/&gt;&amp;gt; letting the `SIGHASH` flag be selected at time-of-signing, but only if the&lt;br/&gt;&amp;gt; SCRIPT specifically is formed to do so.&lt;br/&gt;&amp;gt; &amp;gt; This is malleability-safe as the signature still commits to the&lt;br/&gt;&amp;gt; `SIGHASH` it was created for.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; However, by default, public keys will not have an attached `SIGHASH`&lt;br/&gt;&amp;gt; byte, implying `SIGHASH_ALL` (and disallowing-by-default non-`SIGHASH_ALL`).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This removes the problems with `SIGHASH_NONE` `SIGHASH_SINGLE`, as they&lt;br/&gt;&amp;gt; are allowed only if the output specifically says they are allowed.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Would this not be a superior solution?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt; &amp;gt; ZmnSCPxj&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; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/lightning-dev/attachments/20191006/f0e27c02/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191006/f0e27c02/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:56:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvfgg26v2tcwzkjwwgtw2wykl9pv4m6w6q8guuky7lefakpl8ad7szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9utqe7k3</id>
    
      <title type="html">📅 Original date posted:2019-09-25 📝 Original message: This ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvfgg26v2tcwzkjwwgtw2wykl9pv4m6w6q8guuky7lefakpl8ad7szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9utqe7k3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdte7uupl0ds63js862u29a5sgeeyltske6z4fe7sk9v5eyzrlngql44sd5&#39;&gt;nevent1q…4sd5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-09-25&lt;br/&gt;📝 Original message:&lt;br/&gt;This is a nice scheme.&lt;br/&gt;&lt;br/&gt;Pedersen commitments &#43; pay to point seems to be the most practical way to&lt;br/&gt;do it but you can generalise this paying for a decommitment idea to any&lt;br/&gt;commitment scheme. For example, you could do this in a payment channel with&lt;br/&gt;hashes if we had something like OP_CAT. e.g HTLC unlocks based on whether&lt;br/&gt;you can provide an r such that H(r || x) == C.&lt;br/&gt;&lt;br/&gt;&amp;gt; Unfortunately that zkp already proves that C was generated based on x, so&lt;br/&gt;you get your timestamp for free. Ooops. :(&lt;br/&gt;&lt;br/&gt;I haven&amp;#39;t studied zkp for circuits in general but I guess the&lt;br/&gt;non-interactive proofs are fiat-shamir transformations of an interactive&lt;br/&gt;protocol. Maybe you could just use the interactive zero knowledge protocol&lt;br/&gt;which doesn&amp;#39;t have the side effect of the verifier with a proof they can&lt;br/&gt;give to others.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Thu, Sep 26, 2019 at 5:30 AM Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Wed, Sep 25, 2019 at 01:30:39PM &#43;0000, ZmnSCPxj wrote:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Since it&amp;#39;s off chain, you could also provide R and C and a zero&lt;br/&gt;&amp;gt; knowledge&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; proof that you know an r such that:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; R = SHA256( r )&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; C = SHA256( x || r )&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; in which case you could do it with lightning as it exists today.&lt;br/&gt;&amp;gt; &amp;gt; I can insist on paying only if the server reveals an `r` that matches&lt;br/&gt;&amp;gt; some known `R` such that `R = SHA256(r)`, as currently in Lightning network.&lt;br/&gt;&amp;gt; &amp;gt; However, how would I prove, knowing only `R` and `x`, and that there&lt;br/&gt;&amp;gt; exists some `r` such that `R = SHA256(r)`, that `C = SHA256(x || r)`?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you know x and r, you can generate C and R and a zero knowledge proof&lt;br/&gt;&amp;gt; of the relationship between x,C,R that doesn&amp;#39;t reveal r (eg, I think&lt;br/&gt;&amp;gt; you could do that with bulletproofs). Unfortunately that zkp already&lt;br/&gt;&amp;gt; proves that C was generated based on x, so you get your timestamp for&lt;br/&gt;&amp;gt; free. Ooops. :(&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; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/lightning-dev/attachments/20190926/16f52927/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190926/16f52927/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:56:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfy3cnefqhp5kxzcfj2scnju3twd95mgm3vkp6d4zjsk9jtdh6dwczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uxvdfmc</id>
    
      <title type="html">📅 Original date posted:2019-01-02 📝 Original message: Happy ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfy3cnefqhp5kxzcfj2scnju3twd95mgm3vkp6d4zjsk9jtdh6dwczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uxvdfmc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv5jaypznltqzz6lcn4a8lmtyuudwyvv22ztztyh8kpq65nptccsc37ewz8&#39;&gt;nevent1q…ewz8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-01-02&lt;br/&gt;📝 Original message:&lt;br/&gt;Happy new year lightning-dev!&lt;br/&gt;&lt;br/&gt;This topic is my main area of research at moment so I&amp;#39;m really happy to see&lt;br/&gt;a thread about it. In general I agree with ZmnSCPxj&amp;#39;s analysis and&lt;br/&gt;conclusions. I&amp;#39;d like to add a couple of ideas to this discussion and would&lt;br/&gt;greatly appreciate some early peer review on them :)&lt;br/&gt;&lt;br/&gt;HTLCs as American call options&lt;br/&gt;=========================&lt;br/&gt;&lt;br/&gt;I think the &amp;#34;option problem&amp;#34; is actually caused by protocols using HTLCs in&lt;br/&gt;a naive way rather than the use of HTLCs themselves. Consider the atomic&lt;br/&gt;swap protocol described in the OP:&lt;br/&gt;&lt;br/&gt;&amp;gt;1.  You provide me a hash of some secret preimage that only you know.&lt;br/&gt;&amp;gt;2.  You make an HTLC on the Bitcoin blockchain.&lt;br/&gt;&amp;gt;The value of this HTLC is `P`, the hash is the hash you gave above, and&lt;br/&gt;the timelock is `E` &#43; 1 day.&lt;br/&gt;&amp;gt;3.  I make an HTLC on the WJT blockchain.&lt;br/&gt;&amp;gt;The value of this HTLC is 1, the hash is the hash you gave, and the&lt;br/&gt;timelock is `E`.&lt;br/&gt;&lt;br/&gt;If we take this protocol and draw out its abstract functionality we get:&lt;br/&gt;&lt;br/&gt;1. *Up for sale* Alice puts Asset `A` up for sale to Bob for some time&lt;br/&gt;period `Eb` &#43; `Ea`&lt;br/&gt;2. *Make expiring offer* Bob makes an offer of asset `B` which expires at&lt;br/&gt;time `Eb`&lt;br/&gt;3. *Take offer* Alice may take the offer up until time `Eb`&lt;br/&gt;&lt;br/&gt;As has been pointed out, Alice has an &amp;#34;option&amp;#34; for the duration of `Eb`&lt;br/&gt;(and she didn&amp;#39;t pay a premium). This is because Bob made her an offer he&lt;br/&gt;cannot cancel (an offer you can&amp;#39;t cancel but has an expiration is basically&lt;br/&gt;the definition of being short an option contract).&lt;br/&gt;In order to remedy this, the party that makes the offer must be able to&lt;br/&gt;cancel their offer at any point after they have made it (before the&lt;br/&gt;counterparty has taken it). This should be intuitive because it&amp;#39;s how&lt;br/&gt;centralised exchanges work.&lt;br/&gt;&lt;br/&gt;Therefore, the ideal abstract functionality we want is:&lt;br/&gt;&lt;br/&gt;1. *Make Offer* Alice makes an offer to Bob to trade `A` for `B`&lt;br/&gt;2. *Take Offer* Bob can take the offer (if Alice hasn&amp;#39;t already cancelled&lt;br/&gt;it) and get `A` in exchange for `B`.&lt;br/&gt;3. *Cancel Offer* If Bob hasn&amp;#39;t taken the offer, Alice may get back `A` by&lt;br/&gt;cancelling the offer&lt;br/&gt;&lt;br/&gt;I developed the protocol below which comes pretty close to realising this.&lt;br/&gt;Let&lt;br/&gt;- α and β and be two bitcoin-like blockchains&lt;br/&gt;- Alice own asset `A` on the α blockchain and `C` on the β blockchain&lt;br/&gt;- Bob own asset `B` on the β blockchain&lt;br/&gt;&lt;br/&gt;1. Alice puts the HTLC for `A` on α and waits for it to confirm (as per&lt;br/&gt;usual)&lt;br/&gt;2. Alice creates a partial β blockchain transaction by signing one input&lt;br/&gt;and one output (using SIGHASH_SINGLE for example):&lt;br/&gt;   - The input is the asset `C`&lt;br/&gt;   - The output is a HTLC which gives `B` and `C` to herself with the&lt;br/&gt;secret or gives them both to Bob on timeout&lt;br/&gt;  She sends this partial transaction to Bob. (This gives us the &amp;#34;Make&lt;br/&gt;Offer&amp;#34; functionality)&lt;br/&gt;3. If Bob wants to accept the offer, he adds asset `B` to another input of&lt;br/&gt;the transaction and posts it to β. (This gives us &amp;#34;Take Offer&amp;#34;&lt;br/&gt;functionality)&lt;br/&gt;4. If Alice wishes to cancel the trade before Bob has confirmed this&lt;br/&gt;transaction she double spends the `C` output and then reclaims `A` on α&lt;br/&gt;after the timeout. (This gives us the &amp;#34;Cancel Offer&amp;#34; functionality)&lt;br/&gt;5. If the &amp;#34;Take Offer&amp;#34; transaction is confirmed on β, Alice must unlock the&lt;br/&gt;HTLC before the timeout or Bob will gain `C` AND get back `B`.&lt;br/&gt;6. Once she reveals the secret, she both gets back `C` and gains `B` on β.&lt;br/&gt;7. Bob can now take `A` on α in the usual manner now that he has learned&lt;br/&gt;the secret.&lt;br/&gt;&lt;br/&gt;Bob is not guaranteed to get `A` after he &amp;#34;takes&amp;#34; the offer but he is&lt;br/&gt;guaranteed to get `A` (in exchange for `B`) or `C` (for free). Obviously,&lt;br/&gt;`C` is Alice&amp;#39;s collateral for the trade. Bob should only take the offer if&lt;br/&gt;he wants `A` more than `B` and if he is sure that the value of gaining `C`&lt;br/&gt;will be greater than any loss he could experience from `B` depreciating&lt;br/&gt;relative to `A` during the execution of the protocol.&lt;br/&gt;&lt;br/&gt;I believe this shows that HTLCs do not in cause options but rather&lt;br/&gt;uncancelable offers &#43; uncollateralized HTLCs cause the option problem.&lt;br/&gt;&lt;br/&gt;I think this protocol works in payment channels in the case that Alice and&lt;br/&gt;Bob have direct channels to each other. The issue is that if Alice decides&lt;br/&gt;she wants to cancel at the same time Bob decides he wants to take it you&lt;br/&gt;have to go to the blockchain to resolve the issue (which will be rather&lt;br/&gt;arbitrary). CJP&amp;#39;s idea of having a 3rd party who is trusted simply to&lt;br/&gt;compute the outcome of a offer (cancelled or taken) in layer 2 networks&lt;br/&gt;seems like a promising direction because this would avoid on-chain&lt;br/&gt;resolution in this case.&lt;br/&gt;&lt;br/&gt;Cross Asset Payments Don&amp;#39;t Make Sense&lt;br/&gt;====================================&lt;br/&gt;&lt;br/&gt;As ZmnSCPxj demonstrated, the idea of sending a payment in asset `A` and&lt;br/&gt;the other party receiving it as asset `B` with some exchange node in the&lt;br/&gt;middle doing a conversion is unsound given what we are able to construct in&lt;br/&gt;Lightning.&lt;br/&gt;&lt;br/&gt;But this doesn&amp;#39;t necessarily mean that Lightning has to be single asset.&lt;br/&gt;Theoretically, a single two-party channel could record multiple asset types&lt;br/&gt;with a state transaction that has distinct outputs for different&lt;br/&gt;asset-type/party combinations. This would allow you to buy an amount of the&lt;br/&gt;desired asset in one of your channels by simply doing a state update where&lt;br/&gt;you lose `A` in exchange for `B` with your direct peer (no HTLCs needed).&lt;br/&gt;You can then just send `B` normally to the receiver. This is not quite as&lt;br/&gt;good as a cross asset payment but it could still be useful*.&lt;br/&gt;&lt;br/&gt;Quite simply, if you want to send someone asset `A` but they want to&lt;br/&gt;receive asset `B` then just buy asset `B` with asset `A` and then send `B`&lt;br/&gt;to them!&lt;br/&gt;&lt;br/&gt;*I don&amp;#39;t know much about non-native assets on Bitcoin and their suggested&lt;br/&gt;integration with LN so I&amp;#39;m just guessing here.&lt;br/&gt;&lt;br/&gt;All the best for 2019,&lt;br/&gt;Lloyd&lt;br/&gt;\n&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/20190102/5adacabb/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190102/5adacabb/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:53:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2vpx0nq9xuu0jez7snygrj0jddqy08dsmm8h3ytg3p4mk33fxzkczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uvfzsfd</id>
    
      <title type="html">📅 Original date posted:2021-04-20 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2vpx0nq9xuu0jez7snygrj0jddqy08dsmm8h3ytg3p4mk33fxzkczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uvfzsfd" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstk8lthzunewe0he3jfvu5ttwc40r8qhurmqdlgvsh3nc4585s73smf50lt&#39;&gt;nevent1q…50lt&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-20&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Rusty,&lt;br/&gt;&lt;br/&gt;On Tue, 20 Apr 2021 at 10:55, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; On Wed, Dec 9, 2020 at 4:26 PM Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt;&lt;br/&gt;&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; Say r1=SHA256(ss || counter || 0), r2 = SHA256(ss || counter || 1)?&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Nice work.  This would be a definite recovery win.  We should add this&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; to the DF spec, because Lisa was almost finished implmenting it, so it&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; clearly due for a change!&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Yes that&amp;#39;s certainly a fine way to do it.&lt;br/&gt;&amp;gt; &amp;gt; I was also thinking you could eliminate all &amp;#34;basepoints&amp;#34; (not just&lt;br/&gt;&amp;gt; funding&lt;br/&gt;&amp;gt; &amp;gt; pubkey) using something like this. i.e. just use the node pubkey as the&lt;br/&gt;&amp;gt; &amp;gt; &amp;#34;basepoint&amp;#34; for everything and randomize it using the shared secret for&lt;br/&gt;&amp;gt; &amp;gt; each purpose.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OK, I tried to spec this out, to implement it.  One issue is that you&lt;br/&gt;&amp;gt; now can&amp;#39;t sign the commitment_tx (or htlc_tx) without knowing the node&amp;#39;s&lt;br/&gt;&amp;gt; secret key (or, equivalently, knowing the tweaked key and being able to&lt;br/&gt;&amp;gt; use the derivation scheme to untweak it).&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Using node secret key to sign the commitment_tx seems like something you&lt;br/&gt;will have to accept to introduce this feature. For the idea to work it has&lt;br/&gt;to be some public key that is known by others and gossiped through the&lt;br/&gt;network. Of course you could extend the information that is gossiped about&lt;br/&gt;a node to include a &amp;#34;commit_tx_point&amp;#34; but the nodeid seems the more natural&lt;br/&gt;choice.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; c-lightning currently does a round-trip to the signing daemon for this&lt;br/&gt;&amp;gt; already, but it&amp;#39;d be nice to avoid requiring it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So I somewhat reluctantly added `commit_basepoint` from which the others&lt;br/&gt;&amp;gt; are derived: an implementation can use some hardened derivation from its&lt;br/&gt;&amp;gt; privkey (e.g. SHA256(node_privkey || ss || counter)) to create&lt;br/&gt;&amp;gt; this in a deterministic but still private manner.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or we could just leave all the other points in and just replace&lt;br/&gt;&amp;gt; funding_pubkey.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Another approach is to do things in &amp;#34;soft-fork&amp;#34; like manner.&lt;br/&gt;Each node that wants to offer this feature sets their funding_pubkey to a&lt;br/&gt;specified DH tweak of the nodeid. Nodes that want backup-free channel&lt;br/&gt;recovery can just refuse to carry on the funding protocol if the&lt;br/&gt;funding_pubkey is not set the way it wanted.&lt;br/&gt;&lt;br/&gt;&amp;gt;From my pruisit crypto point of view having only one public key is nice but&lt;br/&gt;I&amp;#39;m not sure how it impacts things architecturally and other protocols like&lt;br/&gt;watchtowers.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20210420/65f16c10/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210420/65f16c10/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:39:53&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8m0hjqz65e9l7mkjny6qdal5dzw0j8ed6mfewm027n9hvxzpv7cqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9upsx6pu</id>
    
      <title type="html">📅 Original date posted:2023-05-08 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8m0hjqz65e9l7mkjny6qdal5dzw0j8ed6mfewm027n9hvxzpv7cqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9upsx6pu" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgavr5h4jf2texa7j4a6lzaldael73zvv5vmdh55cg3yxxv4cdn0qxvvpz6&#39;&gt;nevent1q…vpz6&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-08&lt;br/&gt;🗒️ Summary of this message: A discussion on the usefulness of single signer adaptors in Bitcoin transactions, with one participant arguing they can reveal a secret and have been used in production for years.&lt;br/&gt;📝 Original message:Hi Waxwing,&lt;br/&gt;&lt;br/&gt;On Tue, 2 May 2023 at 02:37, AdamISZ &amp;lt;AdamISZ at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Lloyd,&lt;br/&gt;&amp;gt; thanks for taking a look.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I think your view of the uselessness of single signer adaptors is too&lt;br/&gt;&amp;gt; pessimistic. The claim you make is that they &amp;#34;don&amp;#39;t provide a way to create&lt;br/&gt;&amp;gt; enforcement that the publication of signature on a pre-defined message will&lt;br/&gt;&amp;gt; reveal a secret&amp;#39;&amp;#39; and so are useless. I think this is wrong. If I hold a&lt;br/&gt;&amp;gt; secret key for X and create a signature adaptor with some encryption key Y&lt;br/&gt;&amp;gt; with message m and do not create any further signatures (adaptor or&lt;br/&gt;&amp;gt; otherwise) on m, then any signature on m that is published necessarily&lt;br/&gt;&amp;gt; reveals the secret on Y to me. This is very useful and has already been&lt;br/&gt;&amp;gt; used for years by DLCs in production.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m struggling with this one - say I hold privkey x for pubkey X. And I&lt;br/&gt;&amp;gt; publish adaptor for a point Y (DL y) for message m, like: s&amp;#39; = k - y &#43;&lt;br/&gt;&amp;gt; H(R|X|m)x with k the nonce and R the nonce point.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; And to get the basics clear first, if I publish s = k &#43; H(R|X|m)x then of&lt;br/&gt;&amp;gt; course the secret y is revealed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What do you mean in saying &amp;#34;any signature on m that is published reveals&lt;br/&gt;&amp;gt; y&amp;#34;? Clearly you don&amp;#39;t mean any signature on any key (i.e. not the key X).&lt;br/&gt;&amp;gt; But I also can&amp;#39;t parse it if you mean &amp;#34;any signature on m using key X&amp;#34;,&lt;br/&gt;&amp;gt; because if I go ahead and publish s = k_2 &#43; H(R_2|X|m)x, it has no&lt;br/&gt;&amp;gt; algebraic relationship to the adaptor s&amp;#39; as defined above, right?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Yes but suppose you do *not* create another signature adaptor or otherwise&lt;br/&gt;on m. Since you&amp;#39;ve only generated one adaptor signature on m and no other&lt;br/&gt;signatures on m there is no possibility that a signature on m that appears&lt;br/&gt;under your key would not reveal y to you. This is an useful property in&lt;br/&gt;theory and in practice.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think the point of confusion is maybe about the DLC construct? I&lt;br/&gt;&amp;gt; referenced that in Section 4.2, parenthetically, because it&amp;#39;s analogous in&lt;br/&gt;&amp;gt; one sense - in MuSig(2) you&amp;#39;re fixing R via a negotiation, whereas in&lt;br/&gt;&amp;gt; Dryja&amp;#39;s construct you&amp;#39;re fixing R &amp;#34;by definition&amp;#34;. When I was talking about&lt;br/&gt;&amp;gt; single key Schnorr, I was saying that&amp;#39;s what&amp;#39;s missing, and thereby making&lt;br/&gt;&amp;gt; them useless.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;I was not referencing the DLC oracle attestation protocol - I am pointing&lt;br/&gt;out that DLC client implementations have been using single signer adaptor&lt;br/&gt;signatures as signature encryption in practice for years for the&lt;br/&gt;transaction signatures. There are even channel implementations using them&lt;br/&gt;as well as atomic swaps doing this iirc. It&amp;#39;s a pretty useful thing!&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20230508/3bfa2b54/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230508/3bfa2b54/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:21:02&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswlul9emm63amw2u7l69rkk9cn4m8ph8exr84aacsd4d8wer8zusszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ux8mvkw</id>
    
      <title type="html">📅 Original date posted:2023-05-01 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswlul9emm63amw2u7l69rkk9cn4m8ph8exr84aacsd4d8wer8zusszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ux8mvkw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspx00kr2umgsjdq427ufwcua5euyu8wfg9aanfktehw4cdpa2w56ckrc8lm&#39;&gt;nevent1q…c8lm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-01&lt;br/&gt;🗒️ Summary of this message: A new analysis on the security of using signature adaptors for multiparty swaps has been posted on GitHub, focusing on scenarios of multiple adaptors at once or multiple signing sessions at once with the same adaptor. The analysis is based on MuSig and not MuSig2.&lt;br/&gt;📝 Original message:Hi waxwing,&lt;br/&gt;&lt;br/&gt;I think your view of the uselessness of single signer adaptors is too&lt;br/&gt;pessimistic. The claim you make is that they &amp;#34;don&amp;#39;t provide a way to&lt;br/&gt;create  enforcement that the publication of signature on a pre-defined&lt;br/&gt;message will reveal a secret&amp;#39;&amp;#39; and so are useless. I think this is wrong.&lt;br/&gt;If I hold a secret key for X and create a signature adaptor with some&lt;br/&gt;encryption key Y with message m and do not create any further signatures&lt;br/&gt;(adaptor or otherwise) on m, then any signature on m that is published&lt;br/&gt;necessarily reveals the secret on Y to me. This is very useful and has&lt;br/&gt;already been used for years by DLCs in production.&lt;br/&gt;&lt;br/&gt;I haven&amp;#39;t read the proofs in detail but I am optimistic about your&lt;br/&gt;approach. One thing I was considering while reading is that you could make&lt;br/&gt;a general proof against all secure Schnorr signing scheme in the ROM by&lt;br/&gt;simply extending the ROM forwarding approach from Aumayer et al to all&lt;br/&gt;&amp;#34;tweak&amp;#34; operations on the elements that go into the Schnorr challenge hash&lt;br/&gt;i.e. the public key and the nonce. After all whether it&amp;#39;s MuSig2, MuSig,&lt;br/&gt;FROST they all must call some RO. I think we can prove that if we apply any&lt;br/&gt;bijective map to the (X,R) tuple before they go into the challenge hash&lt;br/&gt;function then any Schnorr-like scheme that was secure before will be secure&lt;br/&gt;when bip32/TR tweaking (i.e. tweaking X) and adaptor tweaking (tweaking R)&lt;br/&gt;is applied to it. This would be cool because then we could prove all these&lt;br/&gt;variants secure for all schemes past and present in one go. I haven&amp;#39;t got a&lt;br/&gt;concrete approach but the proofs I&amp;#39;ve looked at all seem to share this&lt;br/&gt;structure.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Sun, 30 Apr 2023 at 00:20, AdamISZ 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; Hi list,&lt;br/&gt;&amp;gt; I was motivated to look more carefully at the question of the security of&lt;br/&gt;&amp;gt; using signature adaptors after recently getting quite enthused about the&lt;br/&gt;&amp;gt; idea of using adaptors across N signing sessions to do a kind of multiparty&lt;br/&gt;&amp;gt; swap. But of course security analysis is also much more important for the&lt;br/&gt;&amp;gt; base case of 2 party swapping, which is of .. some considerable practical&lt;br/&gt;&amp;gt; importance :)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There is work (referenced in Section 3 here) that&amp;#39;s pretty substantial on&lt;br/&gt;&amp;gt; &amp;#34;how secure are adaptors&amp;#34; (think in terms of security reductions) already&lt;br/&gt;&amp;gt; from I guess the 2019-2021 period. But I wanted to get into scenarios of&lt;br/&gt;&amp;gt; multiple adaptors at once or multiple signing sessions at once with the&lt;br/&gt;&amp;gt; *same* adaptor (as mentioned above, probably this is the most important&lt;br/&gt;&amp;gt; scenario).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To be clear this is the work of an amateur and is currently unreviewed -&lt;br/&gt;&amp;gt; hence (a) me posting it here and (b) putting the paper on github so people&lt;br/&gt;&amp;gt; can easily add specific corrections or comments if they like:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/AdamISZ/AdaptorSecurityDoc/blob/main/adaptorsecurity.pdf&#34;&gt;https://github.com/AdamISZ/AdaptorSecurityDoc/blob/main/adaptorsecurity.pdf&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;ll note that I did the analysis only around MuSig, not MuSig2.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The penultimate (&amp;#34;third case&amp;#34;), that as mentioned, of &amp;#34;multiple signing&lt;br/&gt;&amp;gt; sessions, same adaptor&amp;#34; proved to be the most interesting: in trying to&lt;br/&gt;&amp;gt; reduce this to ECDLP I found an issue around sequencing. It may just be&lt;br/&gt;&amp;gt; irrelevant but I&amp;#39;d be curious to hear what others think about that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If nothing else, I&amp;#39;d be very interested to hear what experts in the field&lt;br/&gt;&amp;gt; have to say about security reductions for this primitive in the case of&lt;br/&gt;&amp;gt; multiple concurrent signing sessions (which of course has been analyzed&lt;br/&gt;&amp;gt; very carefully already for base MuSig(2)).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; AdamISZ/waxwing&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; Sent with Proton Mail secure email.&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/20230501/5c70f1ea/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230501/5c70f1ea/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:21:00&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgssnq2sgyfv77r768tzwnqugpzg2l2wp6xwmjrtxx49gm36p8aqqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uxxre3h</id>
    
      <title type="html">📅 Original date posted:2023-02-07 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgssnq2sgyfv77r768tzwnqugpzg2l2wp6xwmjrtxx49gm36p8aqqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uxxre3h" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2yqa9fmlvdq6nd74e0qxcsz207txywvpegp4dgr207rvnkl3sk7q59fg08&#39;&gt;nevent1q…fg08&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: An attack on Taproot/Multi-Asset Script Transactions (MAST) allows the last input to use a larger signature to extract a fee from other parties, stealing fees from Alice et al. Mitigations include negotiating a lower feerate, enforcing a minimum weight before signing, or using a trusted coordinator.&lt;br/&gt;📝 Original message:Hi Yuval,&lt;br/&gt;&lt;br/&gt;This is an interesting attack. Usually I think of spending with a big&lt;br/&gt;weight witness in the context of slowing down a confirmation of a&lt;br/&gt;transaction, especially a DLC creation tx. There you can delay its&lt;br/&gt;confirmation past some time (i.e. see if your team won the game, and then&lt;br/&gt;either trying to confirm it by providing the slimmed down witness or double&lt;br/&gt;cancelling it by double spending). In this case you are not trying to delay&lt;br/&gt;it but to dilute your portion of the fee.&lt;br/&gt;&lt;br/&gt;Another mitigation is to aggresively RBF double spend your input any time a&lt;br/&gt;counterparty doesn&amp;#39;t use the spending path they said they would and don&amp;#39;t&lt;br/&gt;deal with them again. Of course, various pinning attacks may prevent this&lt;br/&gt;depending on how your joint tx is structured.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Tue, 7 Feb 2023 at 13:59, 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/95202031/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230207/95202031/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:19:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgv44cr3p63hsffkgwanfxj3ppn24d8qe2gkprpgv9n7jtga2j43gzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9udav2l4</id>
    
      <title type="html">📅 Original date posted:2022-01-24 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgv44cr3p63hsffkgwanfxj3ppn24d8qe2gkprpgv9n7jtga2j43gzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9udav2l4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxmu5qtx323xpdhzdxpwqw3r0e0sn30e0z9098v96fewgv238cpuql9jlg8&#39;&gt;nevent1q…jlg8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-01-24&lt;br/&gt;📝 Original message:Hi dlc-dev and bitcoin-dev,&lt;br/&gt;&lt;br/&gt;tl;dr OP_CTV simplifies and improves performance of DLCs by a factor of *a lot*.&lt;br/&gt;&lt;br/&gt;## Introduction&lt;br/&gt;&lt;br/&gt;Dryja introduced the idea of Discreet Log Contracts (DLC) in his&lt;br/&gt;breakthrough work[1].&lt;br/&gt;Since then (DLC) has become an umbrella term for Bitcoin protocols&lt;br/&gt;that map oracle secret revelation to an on-chain transaction which&lt;br/&gt;apportions coins accordingly.&lt;br/&gt;The key property that each protocol iteration preserves is that the&lt;br/&gt;oracle is an *oblivious trusted party* -- they do not interact with&lt;br/&gt;the blockchain and it is not possible to tell which event or which&lt;br/&gt;oracle the two parties were betting on with blockchain data alone.&lt;br/&gt;&lt;br/&gt; `OP_CHECKTEMPLATEVERIFY` (CTV) a.k.a. BIP119 [2] is a proposed&lt;br/&gt;upgrade to Bitcoin which is being actively discussed.&lt;br/&gt;CTV makes possible an optimized protocol which improves DLC&lt;br/&gt;performance so dramatically that it solves several user experience&lt;br/&gt;concerns and engineering difficulties.&lt;br/&gt;To me this is the most compelling and practical application of CTV so&lt;br/&gt;I thought it&amp;#39;s about time to share it!&lt;br/&gt;&lt;br/&gt;## Present state of DLC specification&lt;br/&gt;&lt;br/&gt;The DLC specifications[3] use adaptor signatures to condition each&lt;br/&gt;possible payout.&lt;br/&gt;The protocol works roughly like this:&lt;br/&gt;&lt;br/&gt;1. Oracle(s) announce events along with a nonce `R` for each event.&lt;br/&gt;Let&amp;#39;s say each event has `N` outcomes.&lt;br/&gt;2. Two users who wish to make a bet take the `R` from the oracle&lt;br/&gt;announcement and construct a set of attestation points `S` and their&lt;br/&gt;corresponding payouts.&lt;br/&gt;3. Each attestation point for each of the `N` outcomes is calculated&lt;br/&gt;like `S_i = R &#43; H(R || X || outcome_i) * X` where `X` is the oracle&amp;#39;s&lt;br/&gt;static key.&lt;br/&gt;4. The users combine the attestation points into *contract execution&lt;br/&gt;transaction* (CET) points e.g `CET_i = S1_i &#43; S2_i &#43; S3_i`.&lt;br/&gt;   Here `CET_i` is the conjunction (`AND`) between the event outcomes&lt;br/&gt;represented by `S1_i, S2_i, S3_i`.&lt;br/&gt;5. The oracle(s) reveals the attestation `s_i` where `s_i * G = S_i`&lt;br/&gt;if the `i`th is the outcome transpired.&lt;br/&gt;6. Either of the parties takes the `s_i`s from each of the&lt;br/&gt;attestations and combines them e.g. `cet_i = s1_i &#43; s2_i &#43; s3_i` and&lt;br/&gt;uses `cet_i` to decrypt the CET adaptor signature encrypted by `CET_i`&lt;br/&gt;and broadcast the transaction.&lt;br/&gt;&lt;br/&gt;## Performance issues with DLCs&lt;br/&gt;&lt;br/&gt;In the current DLC protocol both parties compute:&lt;br/&gt;  - `E * N` attestation points where `E` is the number of events you&lt;br/&gt;are combining and `N` is the number of outcomes per event. (1 mul)&lt;br/&gt;  - `C &amp;gt;= E * N` CET adaptor signatures and verify them. (2 mul -- or&lt;br/&gt;with MuSig2, 3 muls).&lt;br/&gt;&lt;br/&gt;Note that the number of CETs can be much greater than the number of&lt;br/&gt;attestation points. For example,&lt;br/&gt;if an oracle decomposes the price of BTC/USD into 20 binary digits&lt;br/&gt;e.g. 0..(2^20 -1), you could have&lt;br/&gt;`E=20,N=2,C=2^20`. So the biggest concern for worst case performance&lt;br/&gt;is the adaptor signatures multiplications.&lt;br/&gt;&lt;br/&gt;If we take a multiplication as roughly 50 microseconds computing&lt;br/&gt;MuSig2 adaptor signatures for ~6000 CETs would take around a second of&lt;br/&gt;cpu time (each) or so.&lt;br/&gt;6000 CETs is by no means sufficient if you wanted, for example, to bet&lt;br/&gt;on the BTC/USD price per dollar.&lt;br/&gt;Note there may be various ways of precomputing multiplications and&lt;br/&gt;using fast linear combination algorithms and so on but I hope this&lt;br/&gt;provides an idea of the scale of the issue.&lt;br/&gt;Then consider that you may want to use a threshold of oracles which&lt;br/&gt;will combinatorially increase this number (e.g. 3/5 threshold would&lt;br/&gt;10x this).&lt;br/&gt;&lt;br/&gt;You also would end up sending data on the order of megabytes to each other.&lt;br/&gt;&lt;br/&gt;## committing to each CET in a tapleaf with CHECKTEMPLATEVERIFY&lt;br/&gt;&lt;br/&gt;What can we do with OP_CTV &#43; Taproot to improve this?&lt;br/&gt;&lt;br/&gt;Instead of creating an adaptor signature for every CET, commit to the&lt;br/&gt;CET with OP_CTV in a tapleaf:&lt;br/&gt;&lt;br/&gt;```&lt;br/&gt;&amp;lt;CET-hash_i&amp;gt; CHECKTEMPLATEVERIFY &amp;lt;CET_i&amp;gt; CHECKSIG&lt;br/&gt;```&lt;br/&gt;&lt;br/&gt;When the oracle(s) reveals their attestations either party can combine&lt;br/&gt;them to get the secret key&lt;br/&gt;corresponding to `CET_i` and spend the coins to the CET (whose CTV&lt;br/&gt;hash is `CET-hash`) which&lt;br/&gt;distributes the funds according to the contract.&lt;br/&gt;&lt;br/&gt;This replaces all the multiplications needed for the adaptor signature&lt;br/&gt;with a few hashes!&lt;br/&gt;You will still need to compute the `CET_i` which will involve a point&lt;br/&gt;normalisation but it still brings the computational cost per CET down&lt;br/&gt;from hundreds of microseconds to around 5 (per party).&lt;br/&gt;There will be a bit more data on chain (and a small privacy loss) in&lt;br/&gt;the uncooperative case but even with tens of thousands of outcomes&lt;br/&gt;it&amp;#39;s only going to roughly double the virtual size of the transaction.&lt;br/&gt;Keep in mind the uncooperative case should hopefully be rare too esp&lt;br/&gt;when we are doing this in channels.&lt;br/&gt;&lt;br/&gt;The amount of data that the parties need to exchange is also reduced&lt;br/&gt;to a small constant size.&lt;br/&gt;&lt;br/&gt;## getting rid of combinatorial complexity of oracle thresholds&lt;br/&gt;&lt;br/&gt;Now that we&amp;#39;re using script it&amp;#39;s very easy to do a threshold along&lt;br/&gt;with the script. e.g. a 2/3:&lt;br/&gt;&lt;br/&gt;```&lt;br/&gt;&amp;lt;CET-hash&amp;gt; CHECKTEMPLATEVERIFY&lt;br/&gt;&amp;lt;attestation-point1&amp;gt; CHECKSIG&lt;br/&gt;&amp;lt;attestation-point2&amp;gt; CHECKSIGADD&lt;br/&gt;&amp;lt;attestation-point3&amp;gt; CHECKSIGADD&lt;br/&gt;2 EQUAL&lt;br/&gt;```&lt;br/&gt;&lt;br/&gt;The improvement here is that the amount of computation and&lt;br/&gt;communication does not increase with the number of oracles in the&lt;br/&gt;threshold.&lt;br/&gt;The size of the witness only increases linearly in the number of&lt;br/&gt;oracles and only in the un-cooperative case.&lt;br/&gt;This also solves a security issue with the current spec because&lt;br/&gt;attestation points from different oracles are no longer summed (which&lt;br/&gt;is a problem [4]).&lt;br/&gt;&lt;br/&gt;## Getting rid of the attestation point multiplication&lt;br/&gt;&lt;br/&gt;It&amp;#39;s possible to get rid of the EC multiplications from the&lt;br/&gt;attestation point computation too.&lt;br/&gt;This is optimistically a 10x improvement but in the most important&lt;br/&gt;cases it&amp;#39;s a negligible improvement since computing the `E*N`&lt;br/&gt;attestion points is a small fraction of the total CET point&lt;br/&gt;computation.&lt;br/&gt;&lt;br/&gt;Recall the original Schnorr style DLC attestation point was computed like:&lt;br/&gt;&lt;br/&gt;```&lt;br/&gt;S_i = R &#43; H(R || X || outcome_i) * X&lt;br/&gt;```&lt;br/&gt;&lt;br/&gt;So for each outcome we have to hash it and multiply the result by the&lt;br/&gt;oracle&amp;#39;s public key.&lt;br/&gt;I don&amp;#39;t think hashing is necessary[6].&lt;br/&gt;&lt;br/&gt;First note that an oracle attestation scheme is not a signature scheme:&lt;br/&gt;&lt;br/&gt;1. The users need to be able to compute the attestation point&lt;br/&gt;beforehand (signature schemes do not require the verifier to be able&lt;br/&gt;to compute anything before hand).&lt;br/&gt;2. There is a very different concept of a forgery -- you don&amp;#39;t care&lt;br/&gt;about someone being able to forge signatures under the oracle&amp;#39;s key in&lt;br/&gt;general you only care about them being able to forge an attestation&lt;br/&gt;corresponding to some previously announced event i.e. you only care&lt;br/&gt;about forgeries of things that people are actually betting on.&lt;br/&gt;&lt;br/&gt;Long story[6] short we can get rid of the hash and do the following&lt;br/&gt;instead for the `outcome_i`:&lt;br/&gt;&lt;br/&gt;```&lt;br/&gt;S_i = R &#43; i * X&lt;br/&gt;```&lt;br/&gt;&lt;br/&gt;For each `outcome_i` the oracle will reveal a different linear&lt;br/&gt;combination of `R` and `X`.&lt;br/&gt;However, if we still want to preserve the ability to add attestation&lt;br/&gt;points together to create an AND like condition for points&lt;br/&gt;attestations from the same oracle so we have to do:&lt;br/&gt;&lt;br/&gt;```&lt;br/&gt;S_i = i * R &#43; X&lt;br/&gt;```&lt;br/&gt;&lt;br/&gt;which when we combine two attestations from the same oracle becomes:&lt;br/&gt;&lt;br/&gt;`S1_i &#43; S2_j = (i*R1 &#43; X) &#43; (j*R2 &#43; X) = i*R1 &#43; j*R2 &#43; 2*X`&lt;br/&gt;&lt;br/&gt;As you can see the addition preserves the linear structure.&lt;br/&gt;If you were to do the original suggestion it would be:&lt;br/&gt;&lt;br/&gt;`S1_i &#43; S2_j = (i*X &#43; R1 &#43; (j*X &#43; R2) = (i &#43; j)*X &#43; R1 &#43; R2)`&lt;br/&gt;&lt;br/&gt;Which loses the structure and creates collisions e.g. `S1_1 &#43; S2_2 =&lt;br/&gt;S1_2 &#43; S2_1` .&lt;br/&gt;Note that this collision problem also exists in the current spec and&lt;br/&gt;original paper[4,5] but requires a solving a hashing k-sum that should&lt;br/&gt;be hard to do in practice.&lt;br/&gt;&lt;br/&gt;So, when we compute for `i in 1..N`, `S_1 = R &#43; X` and each subsequent&lt;br/&gt;is `S_i = S_{i-1} &#43; R` and so we only need to do one addition for each&lt;br/&gt;attestation point.&lt;br/&gt;&lt;br/&gt;## In summary&lt;br/&gt;&lt;br/&gt;In the worst case this improves DLC performance by ~30x compared to&lt;br/&gt;using MuSig2 adaptor signatures because it gets rid of all&lt;br/&gt;multiplications for both parties.&lt;br/&gt;In the case of a 3/5 threshold performance would be improved by another 10x.&lt;br/&gt;Depending on the kind of event, removing the attestation point&lt;br/&gt;multiplication will also help.&lt;br/&gt;Communication complexity also becomes constant.&lt;br/&gt;&lt;br/&gt;In other words, from the user&amp;#39;s perspective everything can happen&lt;br/&gt;pretty much instantly even on more resource constrained devices and&lt;br/&gt;bad internet connections.&lt;br/&gt;&lt;br/&gt;The downside of the protocol is that in the un-cooperative case, the&lt;br/&gt;size of the witness is bigger and the transaction is distinguishable&lt;br/&gt;from other protocols (it&amp;#39;s not longer scriptless).&lt;br/&gt;&lt;br/&gt;## Credits&lt;br/&gt;&lt;br/&gt;Special thanks to:&lt;br/&gt;&lt;br/&gt;- Ruben Somsen who first made the observation that OP_CTV could be&lt;br/&gt;applied to DLCs in the way presented here.&lt;br/&gt;- Thibaut Le Guilly who did benchmarking on getting rid of the&lt;br/&gt;attestation point multiplication.&lt;br/&gt;- Nadav Cohen who pointed out that doing `R &#43; i*X` was broken.&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://adiabat.github.io/dlc.pdf&#34;&gt;https://adiabat.github.io/dlc.pdf&lt;/a&gt;&lt;br/&gt;[2]: &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki&lt;/a&gt;&lt;br/&gt;[3]: &lt;a href=&#34;https://github.com/discreetlogcontracts/dlcspecs&#34;&gt;https://github.com/discreetlogcontracts/dlcspecs&lt;/a&gt;&lt;br/&gt;[4]: &lt;a href=&#34;https://bitcoinproblems.org/problems/secure-dlcs.html&#34;&gt;https://bitcoinproblems.org/problems/secure-dlcs.html&lt;/a&gt;&lt;br/&gt;[5]: &lt;a href=&#34;https://mailmanlists.org/pipermail/dlc-dev/2021-March/000065.html&#34;&gt;https://mailmanlists.org/pipermail/dlc-dev/2021-March/000065.html&lt;/a&gt;&lt;br/&gt;[6]: &lt;a href=&#34;https://github.com/LLFourn/dlc-sec/blob/master/main.pdf&#34;&gt;https://github.com/LLFourn/dlc-sec/blob/master/main.pdf&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/20220124/cec80a59/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220124/cec80a59/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:02:40&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfpv84jc8aevwgh7nqjdlcluu22lnnykxjm4vp647nwd8uucfddjczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u7xn7ux</id>
    
      <title type="html">📅 Original date posted:2021-06-13 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfpv84jc8aevwgh7nqjdlcluu22lnnykxjm4vp647nwd8uucfddjczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u7xn7ux" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrknza2xvfec48lteccah4zluqd2u69hmec3kttd975rplt5d6nfqj7eq35&#39;&gt;nevent1q…eq35&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-06-13&lt;br/&gt;📝 Original message:On Fri, 11 Jun 2021 at 07:45, Antoine Riard &amp;lt;antoine.riard at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Lloyd,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for this tx mutation proposal extending the scope of fee-bumping&lt;br/&gt;&amp;gt; techniques. IIUC, the &amp;lt;output_index&amp;gt; serves as a pointer to increase the&lt;br/&gt;&amp;gt; output amount by value to recover the recompute the transaction hash&lt;br/&gt;&amp;gt; against which the original signature is valid ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Right.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Let&amp;#39;s do a quick analysis of this scheme.&lt;br/&gt;&amp;gt; * onchain footprint : one tapleaf per contract participant, with O(log n)&lt;br/&gt;&amp;gt; increase of witness size, also one output per contract participant&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Yes but we can fix this (see below).&lt;br/&gt;&lt;br/&gt;* tx-relay bandwidth rebroadcast : assuming aforementioned in-place mempool&lt;br/&gt;&amp;gt; substitution policy, the mutated transaction&lt;br/&gt;&amp;gt;&lt;br/&gt;* batching : fee-bumping value is extract from contract transaction itself,&lt;br/&gt;&amp;gt; so O(n) per contract&lt;br/&gt;&amp;gt; * mempool flexibility : the mutated transaction&lt;br/&gt;&amp;gt; * watchtower key management : to enable outsourcing, the mutating key must&lt;br/&gt;&amp;gt; be shared, in theory enabling contract value siphoning to miner fees ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Yes. You could use OP_LESSTHAN to make sure the value being deducted by the&lt;br/&gt;watchtower is not above a threshold.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Further, I think tx mutation scheme can be achieved in another way, with&lt;br/&gt;&amp;gt; SIGHASH_ANYAMOUNT. A contract participant tapscript will be the following :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;lt;contract_key&amp;gt; &amp;lt;finalizing_alice_key&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Where &amp;lt;contract_signature&amp;gt; is committed with SIGHASH_ANYAMOUNT, blanking&lt;br/&gt;&amp;gt; nValue of one or more outputs. That way, the fee-to-contract-value&lt;br/&gt;&amp;gt; distribution can be unilaterally finalized at a later time through the&lt;br/&gt;&amp;gt; finalizing key [0].&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Yes, that&amp;#39;s also a way to do it. I was trying to preserve the original&lt;br/&gt;external key signature in my attempt but this is probably not necessary. L2&lt;br/&gt;protocols could just exchange two signatures instead. One optimistic one on&lt;br/&gt;the external key and one pessimistic SIGHASH_ANYAMOUNT one on the&lt;br/&gt;&amp;lt;contract_key&amp;gt;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Note, I think that the tx mutation proposal relies on interactivity in the&lt;br/&gt;&amp;gt; worst-case scenario where a counterparty wants to increase its fee-bumping&lt;br/&gt;&amp;gt; output from the contract balance. This interactivity may lure a&lt;br/&gt;&amp;gt; counterparty to alway lock the worst-case fee-bumping reserve in the&lt;br/&gt;&amp;gt; output. I believe anchor output enables more &amp;#34;real-time&amp;#34; fee-bumping&lt;br/&gt;&amp;gt; reserve adjustment ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Hmmm well I was hoping that you wouldn&amp;#39;t need interaction ever. I can see&lt;br/&gt;that my commitment TX example was too contrived because it has balance&lt;br/&gt;outputs that go exclusively to one party.&lt;br/&gt;Let&amp;#39;s take a better example: A PTLC output with both timeout and success&lt;br/&gt;pre-signed transactions spending from it. We must only let the person&lt;br/&gt;offering the PTLC reduce the output of the timeout tx and the converse for&lt;br/&gt;the success tx.&lt;br/&gt;Note very carefully that if we naively apply OP_CHECKSIG_MUTATED or&lt;br/&gt;SIGHASH_ANYAMOUNT with one tapleaf for each party then we risk one party&lt;br/&gt;being able to lower the other party&amp;#39;s output by doing a switcharoo on the&lt;br/&gt;tapleaf after they see the signature for their counterparty&amp;#39;s tx in the&lt;br/&gt;mempool. In your example you could fix it by having a different&lt;br/&gt;&amp;lt;contract_key&amp;gt; but this means we can&amp;#39;t compress &amp;lt;contract_key&amp;gt; by just&lt;br/&gt;using the taproot internal/external key.&lt;br/&gt;&lt;br/&gt;What about this: Instead of party specific &amp;#34;finalizing_alice_key&amp;#34; or&lt;br/&gt;p1-fee-bump-key as I denoted it, we just use the key of the output whose&lt;br/&gt;value we are reducing. This also solves the O(log(n)) tapleaves for&lt;br/&gt;OP_CHECKSIG_MUTATED approach as well -- just have one tapleaf for fee&lt;br/&gt;bumping but authorize it under the key of the output we are reducing. Thus&lt;br/&gt;we need something like OP_PUSH_TAPROOT_OUTPUT_KEY &amp;lt;output index&amp;gt; which&lt;br/&gt;takes the taproot external key at that output (fail if not taproot) and&lt;br/&gt;puts it on the stack. So to be clear you have the &amp;lt;output index&amp;gt; on the&lt;br/&gt;witness stack rather than having it fixed in a particular tapleaf (as per&lt;br/&gt;my original post) and then use OP_DUP to pass it to both&lt;br/&gt;OP_CHECKSIG_MUTATED and OP_PUSH_TAPROOT_OUTPUT_KEY.&lt;br/&gt;This makes a lot of sense as it matches the semantics of what we are trying&lt;br/&gt;to achieve: allow the owner of an output (whether an individual or group)&lt;br/&gt;to reduce that output&amp;#39;s value to pay a higher fee.&lt;br/&gt;Furthermore this removes all keys from the tapleaf since they are all&lt;br/&gt;aliased to either the input we are spending or one of the output keys of&lt;br/&gt;the tx we are spending to. This is quite a big improvement over my original&lt;br/&gt;idea.&lt;br/&gt;&lt;br/&gt;This works for lightning commit tx and for the case of a PTLC contract. It&lt;br/&gt;also seems to work for the DLC funding output. I&amp;#39;d be interested to know if&lt;br/&gt;anyone can think of a protocol where this would be inconvenient or&lt;br/&gt;impossible to use as the main pre-signed tx fee bumping system.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;Le dim. 6 juin 2021 à 22:28, Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; a&lt;br/&gt;&amp;gt; é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&lt;br/&gt;&amp;gt;&amp;gt; another class of solutions over input based, CPFP and sponsorship. I&amp;#39;ll&lt;br/&gt;&amp;gt;&amp;gt; call them tx mutation schemes. The idea is that you can set a key that can&lt;br/&gt;&amp;gt;&amp;gt; increase the fee by lowering a particular output after the tx is signed&lt;br/&gt;&amp;gt;&amp;gt; without invalidating the signature. The premise is that anytime you need to&lt;br/&gt;&amp;gt;&amp;gt; bump the fee of a transaction you must necessarily have funds in an output&lt;br/&gt;&amp;gt;&amp;gt; that are going to you and therefore you can sacrifice some of them to&lt;br/&gt;&amp;gt;&amp;gt; increase the fee. This is obviously destructive to txids so child presigned&lt;br/&gt;&amp;gt;&amp;gt; transactions will have to use ANYPREVOUT as in your proposal. The advantage&lt;br/&gt;&amp;gt;&amp;gt; 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;&lt;br/&gt;&amp;gt;&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&lt;br/&gt;&amp;gt;&amp;gt; current transaction had the output at &amp;lt;output index&amp;gt; reduced by &amp;lt;value&amp;gt;. To&lt;br/&gt;&amp;gt;&amp;gt; make this more efficient, if the public key is one byte: 0x02 it references&lt;br/&gt;&amp;gt;&amp;gt; the taproot *external key* (similar to how ANYPREVOUT uses 0x01 to refer to&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; bump a commitment transaction. They use MuSig to sign the commitment tx&lt;br/&gt;&amp;gt;&amp;gt; under the external key with a decent fee for the current conditions. But in&lt;br/&gt;&amp;gt;&amp;gt; case it proves insufficient they have added the following two leaves to&lt;br/&gt;&amp;gt;&amp;gt; their key in the funding output as a backup so that p1 and p2 can&lt;br/&gt;&amp;gt;&amp;gt; unilaterally bump the fee of anything they sign spending from the funding&lt;br/&gt;&amp;gt;&amp;gt; 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;)&lt;br/&gt;&amp;gt;&amp;gt; OP_CHECKSIGADD(p1-fee-bump-key, &amp;lt;p1-fee-bump-signature&amp;gt;)  OP_2&lt;br/&gt;&amp;gt;&amp;gt; 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;)&lt;br/&gt;&amp;gt;&amp;gt; OP_CHECKSIGADD(p2-fee-bump-key, &amp;lt;p2-fee-bump-signature&amp;gt;) OP_2&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; takes the &amp;lt;original-signature&amp;gt; and adds a signature under their&lt;br/&gt;&amp;gt;&amp;gt; fee-bump-key for the new tx and reveals their fee bump leaf.&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;original-signature&amp;gt; is checked against the old transaction while the fee&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt; accommodate this kind of fee bumping without DoS or pinning attacks but&lt;br/&gt;&amp;gt;&amp;gt; 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;br/&gt;&amp;gt;&amp;gt; &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;&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;&lt;br/&gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; strategies for second-layer protocols. It draws out a comparison between&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; input-based and CPFP fee-bumping techniques, and their apparent trade-offs&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; in terms of onchain footprint, tx-relay bandwidth rebroadcast, batching&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the Bitcoin ecosystem. However, its usage in contract protocols with&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; distrusting counterparties raised some security issues. As mempool&amp;#39;s chain&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; of unconfirmed transactions are limited in size, if any output is spendable&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; by any contract participant, it can be leveraged as a pinning vector to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; carve-out logic require to add a new output for any contract participant,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; primitive for L2s [1]. One variant of input-based fee-bumping usable today&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; is the leverage of the SIGHASH_ANYONECANPAY/SIGHASH_SINGLE malleability&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; flags. If the transaction is the latest stage of the contract, a bumping&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; input can be attached just-in-time, thus increasing the feerate of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; stages of contract transactions as it&amp;#39;s destructive of the txid, and as&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; such breaks chain of pre-signed transactions. A first improvement would be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the deployment of the SIGHASH_ANYPREVOUT softfork proposal. This new&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; malleability flag allows a transaction to be signed without reference to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; any specific previous output. That way,  spent transactions can be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; transaction includes multiple outputs (e.g the LN&amp;#39;s commitment tx has&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; multiple HTLC outputs), SIGHASH_SINGLE can&amp;#39;t be used and the fee-bumping&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; input value might be wasted. This edge can be smoothed by broadcasting a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; preliminary fan-out transaction with a set of outputs providing a range of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; advanced sighash malleability flags like SIGHASH_IOMAP, allowing&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; transaction signers to commit to a map of inputs/outputs [2]. In the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; context of input-based, the overflowed fee value could be redirected to an&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; commitment transaction. To this anchor must be attached a child transaction&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; with 2 inputs (one for the commitment, one for the bumping utxo) and 1&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; point in function of network mempools congestion at time of broadcast, only&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 1 input. If a preliminary fan-out transaction to adjust feerate point must&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; be broadcasted first, 1 input and 2 outputs more must be accounted for.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; utxo&amp;#39;s value is wide enough to cover the worst-case of mempools congestion,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the bumped transaction can be attached 1 input and 1 output. Onchain&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; rationality of the participants w.r.t to an unconfirmed spend of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; contract utxo across network mempools. Under this assumption, the bumped&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; transaction might have been replaced by a concurrent state. To guarantee&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; efficiency of the CPFP the whole chain of transactions should be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; rebroadcast, perhaps wasting bandwidth consumption for a still-identical&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bumped transaction [3]. Rebroadcast footprint: the whole chain of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; attached to the root of the chain of transactions and as such breaks the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; chain validity in itself. Beyond the rebroadcast of the updated root under&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; replacement policy, the remaining transactions must be updated and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the fee-bumping is attached to the root of the chain of transactions but it&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; doesn&amp;#39;t break the chain validity in itself. Assuming a future mempool&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; acceptance logic to authorize in-place substitution, the rest of the chain&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; could be preserved. Rebroadcast footprint: the root of the chain of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; we can assume aggregation of multiple chains of transactions. For e.g, a LN&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; operator is desirous to non-cooperatively close multiple channels at the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; same time and would like to combine their fee-bumping. With CPFP, one&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; anchor output and one bumping input must be consumed per aggregated chain,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; even if the child transaction fields can be shared. Batching perf: 1&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; chains of transactions cannot be aggregated. One bumping input must be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; attached per chain, though if a preliminary fan-out transaction is relied&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; on to offer multiple feerate points, transaction fields can be shared.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; transactions might be aggregated together *non-interactively*. One bumping&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; input and outgoing output can be attached to the aggregated root. Batching&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; counterparties might build a branch of transactions from one of the root&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; outputs thus saturating the in-mempool package limits. To avoid these&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; shenanigans, LN channels are relying on the carve-out mechanism. Though,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the carve-out mechanism includes its own limitation and doesn&amp;#39;t scale&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; oldest ancestor, so package limits don&amp;#39;t restrain its acceptance and it&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; protocols on a range of factors. It hopes to unravel the ground for a real&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; significant onchain footprint savings, especially in case of batching, b)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; future package relay bandwidth efficiency should account for rebroadcast&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; frequency of CPFPing multi-party protocols. On this latter point one&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; follow-up might be to evaluate differing package relay *announcement*&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; schemes in function of odds of non-cooperative protocol broadcast/odds of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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;br/&gt;&amp;gt;&amp;gt;&amp;gt; &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;br/&gt;&amp;gt;&amp;gt;&amp;gt; &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;br/&gt;&amp;gt;&amp;gt;&amp;gt; &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&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; `filterInventoryKnown`. In practice, if the transaction is announced as&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; part of a package_id, the child might have changed, not the parent, leading&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 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;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;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/20210613/065d7cbf/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210613/065d7cbf/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:54:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv2fys7mtkrply8wyncshzeevv9npmkseesdgfmj6tezqjrv73smczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uujj070</id>
    
      <title type="html">📅 Original date posted:2021-06-06 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv2fys7mtkrply8wyncshzeevv9npmkseesdgfmj6tezqjrv73smczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uujj070" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspxkw3qdaucvekgxzc6yhvll385hvltgf9mfje4ag5rue0csxjpjgzd6384&#39;&gt;nevent1q…6384&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-06-06&lt;br/&gt;📝 Original message:Hi Antione,&lt;br/&gt;&lt;br/&gt;Thanks for bringing up this important topic. I think there might be another&lt;br/&gt;class of solutions over input based, CPFP and sponsorship. I&amp;#39;ll call them&lt;br/&gt;tx mutation schemes. The idea is that you can set a key that can increase&lt;br/&gt;the fee by lowering a particular output after the tx is signed without&lt;br/&gt;invalidating the signature. The premise is that anytime you need to bump&lt;br/&gt;the fee of a transaction you must necessarily have funds in an output that&lt;br/&gt;are going to you and therefore you can sacrifice some of them to increase&lt;br/&gt;the fee. This is obviously destructive to txids so child presigned&lt;br/&gt;transactions will have to use ANYPREVOUT as in your proposal. The advantage&lt;br/&gt;is that it does not require keeping extra inputs around to bump the fee.&lt;br/&gt;&lt;br/&gt;So imagine a new opcode OP_CHECKSIG_MUTATED &amp;lt;output index&amp;gt; &amp;lt;publickey&amp;gt;&lt;br/&gt;&amp;lt;value&amp;gt; &amp;lt;signature&amp;gt;.&lt;br/&gt;This would check that &amp;lt;signature&amp;gt; is valid against &amp;lt;publickey&amp;gt; if the&lt;br/&gt;current transaction had the output at &amp;lt;output index&amp;gt; reduced by &amp;lt;value&amp;gt;. To&lt;br/&gt;make this more efficient, if the public key is one byte: 0x02 it references&lt;br/&gt;the taproot *external key* (similar to how ANYPREVOUT uses 0x01 to refer to&lt;br/&gt;internal key[1]).&lt;br/&gt;Now for our protocol we want both parties (p1 and p2) to be able to fee&lt;br/&gt;bump a commitment transaction. They use MuSig to sign the commitment tx&lt;br/&gt;under the external key with a decent fee for the current conditions. But in&lt;br/&gt;case it proves insufficient they have added the following two leaves to&lt;br/&gt;their key in the funding output as a backup so that p1 and p2 can&lt;br/&gt;unilaterally bump the fee of anything they sign spending from the funding&lt;br/&gt;output:&lt;br/&gt;&lt;br/&gt;1. OP_CHECKSIG_MUTATED(0, 0x02, &amp;lt;fee-bump-value&amp;gt;, &amp;lt;original-signature&amp;gt;)&lt;br/&gt;OP_CHECKSIGADD(p1-fee-bump-key, &amp;lt;p1-fee-bump-signature&amp;gt;)  OP_2&lt;br/&gt;OP_NUMEQUALVERIFY&lt;br/&gt;2. OP_CHECKSIG_MUTATED(1, 0x02, &amp;lt;fee-bump-value&amp;gt;, &amp;lt;original-signature&amp;gt;)&lt;br/&gt;OP_CHECKSIGADD(p2-fee-bump-key, &amp;lt;p2-fee-bump-signature&amp;gt;) OP_2&lt;br/&gt;OP_NUMEQUALVERIFY&lt;br/&gt;&lt;br/&gt;where &amp;lt;...&amp;gt; indicates the thing comes from the witness stack.&lt;br/&gt;So to bump the fee of the commit tx after it has been signed either party&lt;br/&gt;takes the &amp;lt;original-signature&amp;gt; and adds a signature under their&lt;br/&gt;fee-bump-key for the new tx and reveals their fee bump leaf.&lt;br/&gt;&amp;lt;original-signature&amp;gt; is checked against the old transaction while the fee&lt;br/&gt;bumped transaction is checked against the fee bump key.&lt;br/&gt;&lt;br/&gt;I know I have left out how to change mempool eviction rules to accommodate&lt;br/&gt;this kind of fee bumping without DoS or pinning attacks but hopefully I&lt;br/&gt;have demonstrated that this class of solutions also exists.&lt;br/&gt;&lt;br/&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;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Fri, 28 May 2021 at 07:13, Antoine Riard 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; Hi,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This post is pursuing a wider discussion around better fee-bumping&lt;br/&gt;&amp;gt; strategies for second-layer protocols. It draws out a comparison between&lt;br/&gt;&amp;gt; input-based and CPFP fee-bumping techniques, and their apparent trade-offs&lt;br/&gt;&amp;gt; in terms of onchain footprint, tx-relay bandwidth rebroadcast, batching&lt;br/&gt;&amp;gt; opportunity and mempool flexibility.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks to Darosior for reviews, ideas and discussions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Child-Pay-For-Parent&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; CPFP is a mature fee-bumping technique, known and used for a while in the&lt;br/&gt;&amp;gt; Bitcoin ecosystem. However, its usage in contract protocols with&lt;br/&gt;&amp;gt; distrusting counterparties raised some security issues. As mempool&amp;#39;s chain&lt;br/&gt;&amp;gt; of unconfirmed transactions are limited in size, if any output is spendable&lt;br/&gt;&amp;gt; by any contract participant, it can be leveraged as a pinning vector to&lt;br/&gt;&amp;gt; downgrade odds of transaction confirmation [0].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That said, contract transactions interested to be protected under the&lt;br/&gt;&amp;gt; carve-out logic require to add a new output for any contract participant,&lt;br/&gt;&amp;gt; even if ultimately only one of them serves as an anchor to attach a CPFP.&lt;br/&gt;&amp;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&lt;br/&gt;&amp;gt; primitive for L2s [1]. One variant of input-based fee-bumping usable today&lt;br/&gt;&amp;gt; is the leverage of the SIGHASH_ANYONECANPAY/SIGHASH_SINGLE malleability&lt;br/&gt;&amp;gt; flags. If the transaction is the latest stage of the contract, a bumping&lt;br/&gt;&amp;gt; input can be attached just-in-time, thus increasing the feerate of the&lt;br/&gt;&amp;gt; whole package.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, as of today, input-based fee-bumping doesn&amp;#39;t work to bump first&lt;br/&gt;&amp;gt; stages of contract transactions as it&amp;#39;s destructive of the txid, and as&lt;br/&gt;&amp;gt; such breaks chain of pre-signed transactions. A first improvement would be&lt;br/&gt;&amp;gt; the deployment of the SIGHASH_ANYPREVOUT softfork proposal. This new&lt;br/&gt;&amp;gt; malleability flag allows a transaction to be signed without reference to&lt;br/&gt;&amp;gt; any specific previous output. That way,  spent transactions can be&lt;br/&gt;&amp;gt; fee-bumped without altering validity of the chain of transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Even assuming SIGHASH_ANYPREVOUT, if the first stage contract transaction&lt;br/&gt;&amp;gt; includes multiple outputs (e.g the LN&amp;#39;s commitment tx has multiple HTLC&lt;br/&gt;&amp;gt; outputs), SIGHASH_SINGLE can&amp;#39;t be used and the fee-bumping input value&lt;br/&gt;&amp;gt; might be wasted. This edge can be smoothed by broadcasting a preliminary&lt;br/&gt;&amp;gt; fan-out transaction with a set of outputs providing a range of feerate&lt;br/&gt;&amp;gt; points for the bumped transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This overhead could be smoothed even further in the future with more&lt;br/&gt;&amp;gt; advanced sighash malleability flags like SIGHASH_IOMAP, allowing&lt;br/&gt;&amp;gt; transaction signers to commit to a map of inputs/outputs [2]. In the&lt;br/&gt;&amp;gt; context of input-based, the overflowed fee value could be redirected to an&lt;br/&gt;&amp;gt; outgoing output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Onchain Footprint&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; CPFP: One anchor output per participant must be included in the commitment&lt;br/&gt;&amp;gt; transaction. To this anchor must be attached a child transaction with 2&lt;br/&gt;&amp;gt; inputs (one for the commitment, one for the bumping utxo) and 1 output.&lt;br/&gt;&amp;gt; Onchain footprint: 2 inputs &#43; 3 outputs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Input-based (today): If the bumping utxo is offering an adequate feerate&lt;br/&gt;&amp;gt; point in function of network mempools congestion at time of broadcast, only&lt;br/&gt;&amp;gt; 1 input. If a preliminary fan-out transaction to adjust feerate point must&lt;br/&gt;&amp;gt; be broadcasted first, 1 input and 2 outputs more must be accounted for.&lt;br/&gt;&amp;gt; Onchain footprint: 2 inputs &#43; 3 outputs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Input-based (SIGHASH_ANYPREVOUT&#43;SIGHASH_IOMAP): As long as the bumping&lt;br/&gt;&amp;gt; utxo&amp;#39;s value is wide enough to cover the worst-case of mempools congestion,&lt;br/&gt;&amp;gt; the bumped transaction can be attached 1 input and 1 output. Onchain&lt;br/&gt;&amp;gt; footprint: 1 input &#43; 1 output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Tx-Relay Bandwidth Rebroadcast&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; CPFP: In the context of multi-party protocols, we should assume bounded&lt;br/&gt;&amp;gt; rationality of the participants w.r.t to an unconfirmed spend of the&lt;br/&gt;&amp;gt; contract utxo across network mempools. Under this assumption, the bumped&lt;br/&gt;&amp;gt; transaction might have been replaced by a concurrent state. To guarantee&lt;br/&gt;&amp;gt; efficiency of the CPFP the whole chain of transactions should be&lt;br/&gt;&amp;gt; rebroadcast, perhaps wasting bandwidth consumption for a still-identical&lt;br/&gt;&amp;gt; bumped transaction [3]. Rebroadcast footprint: the whole chain of&lt;br/&gt;&amp;gt; transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Input-based (today): In case of rebroadcast, the fee-bumping input is&lt;br/&gt;&amp;gt; attached to the root of the chain of transactions and as such breaks the&lt;br/&gt;&amp;gt; chain validity in itself. Beyond the rebroadcast of the updated root under&lt;br/&gt;&amp;gt; replacement policy, the remaining transactions must be updated and&lt;br/&gt;&amp;gt; rebroadcast. Rebroadcast footprint: the whole chain of transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Input-based(SIGHASH_ANYPREVOUT&#43;SIGHASH_IOMAP): In case of rebroadcast, the&lt;br/&gt;&amp;gt; fee-bumping is attached to the root of the chain of transactions but it&lt;br/&gt;&amp;gt; doesn&amp;#39;t break the chain validity in itself. Assuming a future mempool&lt;br/&gt;&amp;gt; acceptance logic to authorize in-place substitution, the rest of the chain&lt;br/&gt;&amp;gt; could be preserved. Rebroadcast footprint: the root of the chain of&lt;br/&gt;&amp;gt; transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Fee-Bumping Batching&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; CPFP: In the context of multi-party protocols, in optimistic scenarios, we&lt;br/&gt;&amp;gt; can assume aggregation of multiple chains of transactions. For e.g, a LN&lt;br/&gt;&amp;gt; operator is desirous to non-cooperatively close multiple channels at the&lt;br/&gt;&amp;gt; same time and would like to combine their fee-bumping. With CPFP, one&lt;br/&gt;&amp;gt; anchor output and one bumping input must be consumed per aggregated chain,&lt;br/&gt;&amp;gt; even if the child transaction fields can be shared. Batching perf: 1&lt;br/&gt;&amp;gt; input/1 output per aggregated chain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Input-based (today): Unless the contract allows interactivity, multiple&lt;br/&gt;&amp;gt; chains of transactions cannot be aggregated. One bumping input must be&lt;br/&gt;&amp;gt; attached per chain, though if a preliminary fan-out transaction is relied&lt;br/&gt;&amp;gt; on to offer multiple feerate points, transaction fields can be shared.&lt;br/&gt;&amp;gt; Batching perf: 1 input/1 output per aggregated chain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Input-based (SIGHASH_ANYPREVOUT&#43;SIGHASH_IOMAP): Multiple chains of&lt;br/&gt;&amp;gt; transactions might be aggregated together *non-interactively*. One bumping&lt;br/&gt;&amp;gt; input and outgoing output can be attached to the aggregated root. Batching&lt;br/&gt;&amp;gt; perf: 1 input/1 output per aggregation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Fee-Bumping Mempool Flexibility&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; CPFP: In the context of multi-party protocols, one of your counterparties&lt;br/&gt;&amp;gt; might build a branch of transactions from one of the root outputs thus&lt;br/&gt;&amp;gt; saturating the in-mempool package limits. To avoid these shenanigans, LN&lt;br/&gt;&amp;gt; channels are relying on the carve-out mechanism. Though, the carve-out&lt;br/&gt;&amp;gt; mechanism includes its own limitation and doesn&amp;#39;t scale beyond 2 contract&lt;br/&gt;&amp;gt; participants.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Input-based: The root of the chain of transaction is the package&amp;#39;s oldest&lt;br/&gt;&amp;gt; ancestor, so package limits don&amp;#39;t restrain its acceptance and it works&lt;br/&gt;&amp;gt; whatever the number of contract participants.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To conclude, this post scores 2 fee-bumping primitives for multi-party&lt;br/&gt;&amp;gt; protocols on a range of factors. It hopes to unravel the ground for a real&lt;br/&gt;&amp;gt; feerate performance framework of second-layers protocols .&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Beyond that, few points can be highlighted a) future soft forks allow&lt;br/&gt;&amp;gt; significant onchain footprint savings, especially in case of batching, b)&lt;br/&gt;&amp;gt; future package relay bandwidth efficiency should account for rebroadcast&lt;br/&gt;&amp;gt; frequency of CPFPing multi-party protocols. On this latter point one&lt;br/&gt;&amp;gt; follow-up might be to evaluate differing package relay *announcement*&lt;br/&gt;&amp;gt; schemes in function of odds of non-cooperative protocol broadcast/odds of&lt;br/&gt;&amp;gt; concurrent broadcast/rebroadcast frequencies.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thoughts ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Antoine&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0]&lt;br/&gt;&amp;gt; &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; [1] Beyond the revault architecture :&lt;br/&gt;&amp;gt; &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; [2] Already proposed a while back :&lt;br/&gt;&amp;gt; &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; [3] In theory, an already-relayed transaction shouldn&amp;#39;t pass Core&amp;#39;s&lt;br/&gt;&amp;gt; `filterInventoryKnown`. In practice, if the transaction is announced as&lt;br/&gt;&amp;gt; part of a package_id, the child might have changed, not the parent, leading&lt;br/&gt;&amp;gt; to a redundant relay of the latter.&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/20210607/49ff1a08/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210607/49ff1a08/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:54:25&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvh39t0quyflmgmx588ua5yfdhqqdyjqfzysk8sdwfmfe0fdq2whczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u4ts65t</id>
    
      <title type="html">📅 Original date posted:2021-06-16 📝 Original message:@James ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvh39t0quyflmgmx588ua5yfdhqqdyjqfzysk8sdwfmfe0fdq2whczyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u4ts65t" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs280sajrr3ev6da4zyknqnx0h2a6sde9cjvy5scf5m5kl50r7v27s98evyk&#39;&gt;nevent1q…evyk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-06-16&lt;br/&gt;📝 Original message:@James wrote:&lt;br/&gt;&lt;br/&gt;On Tue, 15 Jun 2021 at 21:13, James MacWhyte &amp;lt;macwhyte at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; @Lloyd wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course in reality no one wants to keep their coin holding keys online&lt;br/&gt;&amp;gt;&amp;gt; so in Alogorand you can authorize a set of &amp;#34;participation keys&amp;#34;[1] that&lt;br/&gt;&amp;gt;&amp;gt; will be used to create blocks on your coin holding key&amp;#39;s behalf.&lt;br/&gt;&amp;gt;&amp;gt; Hopefully you&amp;#39;ve spotted the problem.&lt;br/&gt;&amp;gt;&amp;gt; You can send your participation keys to any malicious party with a nice&lt;br/&gt;&amp;gt;&amp;gt; website (see random example [2]) offering you a good return.&lt;br/&gt;&amp;gt;&amp;gt; Damn it&amp;#39;s still Proof-of-SquareSpace!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe we are talking about a comparison to PoW, correct? If you want&lt;br/&gt;&amp;gt; to mine PoW, you need to buy expensive hardware and configure it to work,&lt;br/&gt;&amp;gt; and wait a long time to get any return by solo mining. Or you can join a&lt;br/&gt;&amp;gt; mining pool, which might use your hashing power for nefarious purposes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;A mining pool using your hashrate for nefarious purposes can easily be&lt;br/&gt;observed since they send you the contents of the block you are mining&lt;br/&gt;before your hardware starts working on it. This difference is crucial.&lt;br/&gt;Mining pools exist just to reduce income variance.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Or you might skip the hardware all together and fall for some &amp;#34;cloud&lt;br/&gt;&amp;gt; mining&amp;#34; scheme with a pretty website and a high rate of advertised return.&lt;br/&gt;&amp;gt; So as you can see, Proof-of-SquareSpace exists in PoW as well!&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I&amp;#39;d agree that &amp;#34;cloud mining&amp;#34; pretty much is Proof-of-SquareSpace for PoW.&lt;br/&gt;Fortunately these services make up a tiny fraction of hashrate.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; The PoS equivalent of buying mining hardware is setting up your own&lt;br/&gt;&amp;gt; validator and not outsourcing that to anyone else. So both PoW and PoS have&lt;br/&gt;&amp;gt; the professional/expert way of participating, and the fraud-prone, amateur&lt;br/&gt;&amp;gt; way of participating. The only difference is, with PoS the&lt;br/&gt;&amp;gt; professional/expert way is accessible to anyone with a raspberry Pi and a&lt;br/&gt;&amp;gt; web connection, which is a much lower barrier to entry than PoW.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;And yet despite this, the fraud-prone amteur way of participating accounts&lt;br/&gt;for the majority of stake in PoS systems while the professional/expert way&lt;br/&gt;of participating accounts for the overwhelming majority of hashpower in&lt;br/&gt;Bitcoin. It looks like you have elegantly proved my point!&lt;br/&gt;&lt;br/&gt;LL&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/20210617/672a53bd/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210617/672a53bd/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:54:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswcqeqnwy378lu63c3yvd42np34vau9407vf0glnqt0guexc49rmqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ukz07wa</id>
    
      <title type="html">📅 Original date posted:2021-05-23 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswcqeqnwy378lu63c3yvd42np34vau9407vf0glnqt0guexc49rmqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ukz07wa" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyvglk0rg8ga7l7l309tyyquun5s2f5v7rjyf5sqlcq9grsxcegssvf9x3q&#39;&gt;nevent1q…9x3q&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-05-23&lt;br/&gt;📝 Original message:Hi Billy,&lt;br/&gt;&lt;br/&gt;I was going to write a post which started by dismissing many of the weak&lt;br/&gt;arguments that are made against PoS made in this thread and elsewhere.&lt;br/&gt;Although I don&amp;#39;t agree with all your points you have done a decent job here&lt;br/&gt;so I&amp;#39;ll focus on the second part: why I think Proof-of-Stake is&lt;br/&gt;inappropriate for a Bitcoin-like system.&lt;br/&gt;&lt;br/&gt;Proof of stake is not fit for purpose for a global settlement layer in a&lt;br/&gt;pure digital asset (i.e. &amp;#34;digital gold&amp;#34;) which is what Bitcoin is trying to&lt;br/&gt;be.&lt;br/&gt;PoS necessarily gives responsibilities to the holders of coins that they do&lt;br/&gt;not want and cannot handle.&lt;br/&gt;In Bitcoin, large unsophisticated coin holders can put their coins in cold&lt;br/&gt;storage without a second thought given to the health of the underlying&lt;br/&gt;ledger.&lt;br/&gt;As much as hardcore Bitcoiners try to convince them to run their own node,&lt;br/&gt;most don&amp;#39;t, and that&amp;#39;s perfectly acceptable.&lt;br/&gt;At no point do their personal decisions affect the underlying consensus --&lt;br/&gt;it only affects their personal security assurance (not that of the system&lt;br/&gt;itself).&lt;br/&gt;In PoS systems this clean separation of responsibilities does not exist.&lt;br/&gt;&lt;br/&gt;I think that the more rigorously studied PoS protocols will work fine&lt;br/&gt;within the security claims made in their papers.&lt;br/&gt;People who believe that these protocols are destined for catastrophic&lt;br/&gt;consensus failure are certainly in for a surprise.&lt;br/&gt;But the devil is in the detail.&lt;br/&gt;Let&amp;#39;s look at what the implications of using the leading proof of stake&lt;br/&gt;protocols would have on Bitcoin:&lt;br/&gt;&lt;br/&gt;### Proof of SquareSpace (Cardano, Polkdadot)&lt;br/&gt;&lt;br/&gt;Cardano is a UTXO based PoS coin based on Ouroboros Praos[3] with an&lt;br/&gt;inbuilt on-chain delegation system[5].&lt;br/&gt;In these protocols, coin holders who do not want to run their node with&lt;br/&gt;their hot keys in it delegate it to a &amp;#34;Stake Pool&amp;#34;.&lt;br/&gt;I call the resulting system Proof-of-SquareSpace since most will choose a&lt;br/&gt;pool by looking around for one with a nice website and offering the largest&lt;br/&gt;share of the block reward.&lt;br/&gt;On the surface this might sound no different than someone with an mining&lt;br/&gt;rig shopping around for a good mining pool but there are crucial&lt;br/&gt;differences:&lt;br/&gt;&lt;br/&gt;1. The person making the decision is forced into it just because they own&lt;br/&gt;the currency -- someone with a mining rig has purchased it with the intent&lt;br/&gt;to make profit by participating in consensus.&lt;br/&gt;&lt;br/&gt;2. When you join a mining pool your systems are very much still online. You&lt;br/&gt;are just partaking in a pool to reduce your profit variance. You still see&lt;br/&gt;every block that you help create and *you never help create a block without&lt;br/&gt;seeing it first*.&lt;br/&gt;&lt;br/&gt;3. If by SquareSpace sybil attack you gain a dishonest majority and start&lt;br/&gt;censoring transactions how are the users meant to redelegate their stake to&lt;br/&gt;honest pools?&lt;br/&gt;I guess they can just send a transaction delegating to another pool...oh&lt;br/&gt;wait I guess that might be censored too! This seems really really bad.&lt;br/&gt;In Bitcoin, miners can just join a different pool at a whim. There is&lt;br/&gt;nothing the attacker can do to stop them. A temporary dishonest majority&lt;br/&gt;heals relatively well.&lt;br/&gt;&lt;br/&gt;There is another severe disadvantage to this on-chain delegation system:&lt;br/&gt;every UTXO must indicate which staking account this UTXO belongs to so the&lt;br/&gt;appropriate share of block rewards can be transferred there.&lt;br/&gt;Being able to associate every UTXO to an account ruins one of the main&lt;br/&gt;privacy advantages of the UTXO model.&lt;br/&gt;It also grows the size of the blockchain significantly.&lt;br/&gt;&lt;br/&gt;### &amp;#34;Pure&amp;#34; proof of stake (Algorand)&lt;br/&gt;&lt;br/&gt;Algorand&amp;#39;s[4] approach is to only allow online stake to participate in the&lt;br/&gt;protocol.&lt;br/&gt;Theoretically, This means that keys holding funds have to be online in&lt;br/&gt;order for them to author blocks when they are chosen.&lt;br/&gt;Of course in reality no one wants to keep their coin holding keys online so&lt;br/&gt;in Alogorand you can authorize a set of &amp;#34;participation keys&amp;#34;[1] that will&lt;br/&gt;be used to create blocks on your coin holding key&amp;#39;s behalf.&lt;br/&gt;Hopefully you&amp;#39;ve spotted the problem.&lt;br/&gt;You can send your participation keys to any malicious party with a nice&lt;br/&gt;website (see random example [2]) offering you a good return.&lt;br/&gt;Damn it&amp;#39;s still Proof-of-SquareSpace!&lt;br/&gt;The minor advantage is that at least the participation keys expire after a&lt;br/&gt;certain amount of time so eventually the SquareSpace attacker will lose&lt;br/&gt;their hold on consensus.&lt;br/&gt;Importantly there is also less junk on the blockchain because the&lt;br/&gt;participation keys are delegated off-chain and so are not making as much of&lt;br/&gt;a mess.&lt;br/&gt;&lt;br/&gt;### Conclusion&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t see a way to get around the conflicting requirement that the keys&lt;br/&gt;for large amounts of coins should be kept offline but those are exactly the&lt;br/&gt;coins we need online to make the scheme secure.&lt;br/&gt;If we allow delegation then we open up a new social attack surface and it&lt;br/&gt;degenerates to Proof-of-SquareSpace.&lt;br/&gt;&lt;br/&gt;For a &amp;#34;digital gold&amp;#34; like system like Bitcoin we optimize for simplicity&lt;br/&gt;and desperately want to avoid extraneous responsibilities for the holder of&lt;br/&gt;the coin.&lt;br/&gt;After all, gold is an inert element on the periodic table that doesn&amp;#39;t&lt;br/&gt;confer responsibilities on the holder to maintain the quality of all the&lt;br/&gt;other bars of gold out there.&lt;br/&gt;Bitcoin feels like this too and in many ways is more inert and beautifully&lt;br/&gt;boring than gold.&lt;br/&gt;For Bitcoin to succeed I think we need to keep it that way and&lt;br/&gt;Proof-of-Stake makes everything a bit too exciting.&lt;br/&gt;&lt;br/&gt;I suppose in the end the market will decide what is real digital gold and&lt;br/&gt;whether these bad technical trade offs are worth being able to say it uses&lt;br/&gt;less electricity. It goes without saying that making bad technical&lt;br/&gt;decisions to appease the current political climate is an anathema to&lt;br/&gt;Bitcoin.&lt;br/&gt;&lt;br/&gt;Would be interested to know if you or others think differently on these&lt;br/&gt;points.&lt;br/&gt;&lt;br/&gt;[1]:&lt;br/&gt;&lt;a href=&#34;https://developer.algorand.org/docs/run-a-node/participate/generate_keys/&#34;&gt;https://developer.algorand.org/docs/run-a-node/participate/generate_keys/&lt;/a&gt;&lt;br/&gt;[2]: &lt;a href=&#34;https://staking.staked.us/algorand-staking&#34;&gt;https://staking.staked.us/algorand-staking&lt;/a&gt;&lt;br/&gt;[3]: &lt;a href=&#34;https://eprint.iacr.org/2017/573.pdf&#34;&gt;https://eprint.iacr.org/2017/573.pdf&lt;/a&gt;&lt;br/&gt;[4]:&lt;br/&gt;&lt;a href=&#34;https://algorandcom.cdn.prismic.io/algorandcom%2Fece77f38-75b3-44de-bc7f-805f0e53a8d9_theoretical.pdf&#34;&gt;https://algorandcom.cdn.prismic.io/algorandcom%2Fece77f38-75b3-44de-bc7f-805f0e53a8d9_theoretical.pdf&lt;/a&gt;&lt;br/&gt;[5]:&lt;br/&gt;&lt;a href=&#34;https://hydra.iohk.io/build/790053/download/1/delegation_design_spec.pdf&#34;&gt;https://hydra.iohk.io/build/790053/download/1/delegation_design_spec.pdf&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Fri, 21 May 2021 at 19:21, Billy Tetrud 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; I think there is a lot of misinformation and bias against Proof of Stake.&lt;br/&gt;&amp;gt; Yes there have been lots of shady coins that use insecure PoS mechanisms.&lt;br/&gt;&amp;gt; Yes there have been massive issues with distribution of PoS coins (of&lt;br/&gt;&amp;gt; course there have also been massive issues with PoW coins as well).&lt;br/&gt;&amp;gt; However, I want to remind everyone that there is a difference between&lt;br/&gt;&amp;gt; &amp;#34;proved to be impossible&amp;#34; and &amp;#34;have not achieved recognized success yet&amp;#34;.&lt;br/&gt;&amp;gt; Most of the arguments levied against PoS are out of date or rely on&lt;br/&gt;&amp;gt; unproven assumptions or extrapolation from the analysis of a particular PoS&lt;br/&gt;&amp;gt; system. I certainly don&amp;#39;t think we should experiment with bitcoin by&lt;br/&gt;&amp;gt; switching to PoS, but from my research, it seems very likely that there is&lt;br/&gt;&amp;gt; a proof of stake consensus protocol we could build that has substantially&lt;br/&gt;&amp;gt; higher security (cost / capital required to execute an attack) while at the&lt;br/&gt;&amp;gt; same time costing far less resources (which do translate to fees on the&lt;br/&gt;&amp;gt; network) *without* compromising any of the critical security properties&lt;br/&gt;&amp;gt; bitcoin relies on. I think the critical piece of this is the disagreements&lt;br/&gt;&amp;gt; around hardcoded checkpoints, which is a critical piece solving attacks&lt;br/&gt;&amp;gt; that could be levied on a PoS chain, and how that does (or doesn&amp;#39;t) affect&lt;br/&gt;&amp;gt; the security model.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; @Eric Your proof of stake fallacy seems to be saying that PoS is worse&lt;br/&gt;&amp;gt; when a 51% attack happens. While I agree, I think that line of thinking&lt;br/&gt;&amp;gt; omits important facts:&lt;br/&gt;&amp;gt; * The capital required to 51% attack a PoS chain can be made substantially&lt;br/&gt;&amp;gt; greater than on a PoS chain.&lt;br/&gt;&amp;gt; * The capital the attacker stands to lose can be substantially greater as&lt;br/&gt;&amp;gt; well if the attack is successful.&lt;br/&gt;&amp;gt; * The effectiveness of paying miners to raise the honest fraction of&lt;br/&gt;&amp;gt; miners above 50% may be quite bad.&lt;br/&gt;&amp;gt; * Allowing a 51% attack is already unacceptable. It should be considered&lt;br/&gt;&amp;gt; whether what happens in the case of a 51% may not be significantly&lt;br/&gt;&amp;gt; different. The currency would likely be critically damaged in a 51% attack&lt;br/&gt;&amp;gt; regardless of consensus mechanism.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Proof-of-stake tends towards oligopolistic control&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; People repeat this often, but the facts support this. There is no&lt;br/&gt;&amp;gt; centralization pressure in any proof of stake mechanism that I&amp;#39;m aware of.&lt;br/&gt;&amp;gt; IE if you have 10 times as much coin that you use to mint blocks, you&lt;br/&gt;&amp;gt; should expect to earn 10x as much minting revenue - not more than 10x. By&lt;br/&gt;&amp;gt; contrast, proof of work does in fact have clear centralization pressure -&lt;br/&gt;&amp;gt; this is not disputed. Our goal in relation to that is to ensure that the&lt;br/&gt;&amp;gt; centralization pressure remains insignifiant. Proof of work also clearly&lt;br/&gt;&amp;gt; has a lot more barriers to entry than any proof of stake system does. Both&lt;br/&gt;&amp;gt; of these mean the tendency towards oligopolistic control is worse for PoW.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Energy usage, in-and-of-itself, is nothing to be ashamed of!!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I certainly agree. Bitcoin&amp;#39;s energy usage at the moment is I think quite&lt;br/&gt;&amp;gt; warranted. However, the question is: can we do substantially better. I&lt;br/&gt;&amp;gt; think if we can, we probably should... eventually.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Proof of Stake is only resilient to ⅓ of the network demonstrating a&lt;br/&gt;&amp;gt; Byzantine Fault, whilst Proof of Work is resilient up to the ½ threshold&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I see no mention of this in the pos.pdf&lt;br/&gt;&amp;gt; &amp;lt;&lt;a href=&#34;https://download.wpsoftware.net/bitcoin/pos.pdf&amp;gt&#34;&gt;https://download.wpsoftware.net/bitcoin/pos.pdf&amp;gt&lt;/a&gt;; you linked to. I&amp;#39;m not&lt;br/&gt;&amp;gt; aware of any proof that *all *PoS systems have a failure threshold of&lt;br/&gt;&amp;gt; 1/3. I know that staking systems like Casper do in fact have that 1/3&lt;br/&gt;&amp;gt; requirement. However there are PoS designs that should exceed that up to&lt;br/&gt;&amp;gt; nearly 50% as far as I&amp;#39;m aware. Proof of work is not in fact resilient up&lt;br/&gt;&amp;gt; to the 1/2 threshold in the way you would think. IE, if 100% of miners are&lt;br/&gt;&amp;gt; currently honest and have a collective 100 exahashes/s hashpower, an&lt;br/&gt;&amp;gt; attacker does not need to obtain 100 exahashes/s, but actually only needs&lt;br/&gt;&amp;gt; to accumulate 50 exahashes/s. This is because as the attacker accumulates&lt;br/&gt;&amp;gt; hashpower, it drives honest miners out of the market as the difficulty&lt;br/&gt;&amp;gt; increases to beyond what is economically sustainable. Also, its been shown&lt;br/&gt;&amp;gt; that the best proof of work can do is require an attacker to obtain 33% of&lt;br/&gt;&amp;gt; the hashpower because of the selfish mining attack&lt;br/&gt;&amp;gt; &amp;lt;&lt;a href=&#34;https://github.com/fresheneesz/quantificationOfConsensusProtocolSecurity#the-selfish-economic-attack&amp;gt&#34;&gt;https://github.com/fresheneesz/quantificationOfConsensusProtocolSecurity#the-selfish-economic-attack&amp;gt&lt;/a&gt;; discussed&lt;br/&gt;&amp;gt; in depth in this paper: &lt;a href=&#34;https://arxiv.org/abs/1311.0243&#34;&gt;https://arxiv.org/abs/1311.0243&lt;/a&gt;. Together, both&lt;br/&gt;&amp;gt; of these things reduce PoW&amp;#39;s security by a factor of about 83% (1 -&lt;br/&gt;&amp;gt; 50%*33%).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  &amp;gt; Proof of Stake requires other trade-offs which are incompatible with&lt;br/&gt;&amp;gt; Bitcoin&amp;#39;s objective (to be a trustless digital cash) — specifically the&lt;br/&gt;&amp;gt; famous &amp;#34;security vs. liveness&amp;#34; guarantee&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Do you have a good source that talks about why you think proof of stake&lt;br/&gt;&amp;gt; cannot be used for a trustless digital cash?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; You cannot gain tokens without someone choosing to give up those coins -&lt;br/&gt;&amp;gt; a form of permission.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is not a practical constraint. Just like in mining, some nodes may&lt;br/&gt;&amp;gt; reject you, but there will likely be more that will accept you, some&lt;br/&gt;&amp;gt; sellers may reject you, but most would accept your money as payment for&lt;br/&gt;&amp;gt; bitcoins. I don&amp;#39;t think requiring the &amp;#34;permission&amp;#34; of one of millions of&lt;br/&gt;&amp;gt; people in the market can be reasonably considered a &amp;#34;permissioned&lt;br/&gt;&amp;gt; currency&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 2. Proof of stake must have a trusted means of timestamping to regulate&lt;br/&gt;&amp;gt; overproduction of blocks&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Both PoW and PoS could mine/mint blocks twice as fast if everyone agreed&lt;br/&gt;&amp;gt; to double their clock speeds. Both systems rely on an honest majority&lt;br/&gt;&amp;gt; sticking to standard time.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, May 19, 2021 at 5:32 AM Michael Dubrovsky 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; Ah sorry, I didn&amp;#39;t realize this was, in fact, a different thread! :)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Wed, May 19, 2021 at 10:07 AM Michael Dubrovsky &amp;lt;mike at powx.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Folks, I suggest we keep the discussion to PoW, oPoW, and the BIP&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; itself. PoS, VDFs, and so on are interesting but I guess there are other&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; threads going on these topics already where they would be relevant.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Also, it&amp;#39;s important to distinguish between oPoW and these other&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;#34;alternatives&amp;#34; to Hashcash. oPoW is a true Proof of Work that doesn&amp;#39;t alter&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the core game theory or security assumptions of Hashcash and actually&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; contains SHA (can be SHA3, SHA256, etc hash is interchangeable).&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; Mike&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; On Tue, May 18, 2021 at 4:55 PM Erik Aronesty via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1. i never suggested vdf&amp;#39;s to replace pow.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2. my suggestion was specifically *in the context of* a working&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; proof-of-burn protocol&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - vdfs used only for timing (not block height)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - blind-burned coins of a specific age used to replace proof of work&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - the required &amp;#34;work&amp;#34; per block would simply be a competition to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; acquire rewards, and so miners would have to burn coins, well in&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; advance, and hope that their burned coins got rewarded in some far&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; future&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - the point of burned coins is to mimic, in every meaningful way, the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; value gained from proof of work... without some of the security&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; drawbacks&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - the miner risks losing all of his burned coins (like all miners risk&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; losing their work in each block)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - new burns can&amp;#39;t be used&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - old burns age out (like ASICs do)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - other requirements on burns might be needed to properly mirror the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; properties of PoW and the incentives Bitcoin uses to mine honestly.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 3. i do believe it is *possible* that a &amp;#34;burned coin &#43; vdf system&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; might be more secure in the long run, and that if the entire space&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; agreed that such an endeavor was worthwhile, a test net could be spun&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; up, and a hard-fork could be initiated.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 4. i would never suggest such a thing unless i believed it was&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; possible that consensus was possible.  so no, this is not an &amp;#34;alt&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; coin&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Tue, May 18, 2021 at 10:02 AM Zac Greenwood &amp;lt;zachgrw at gmail.com&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; wrote:&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; Hi ZmnSCPxj,&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; Please note that I am not suggesting VDFs as a means to save energy,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; but solely as a means to make the time between blocks more constant.&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; Zac&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; On Tue, 18 May 2021 at 12:42, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; wrote:&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; Good morning Zac,&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; &amp;gt; VDFs might enable more constant block times, for instance by&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; having a two-step PoW:&lt;br/&gt;&amp;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; &amp;gt; 1. Use a VDF that takes say 9 minutes to resolve (VDF being&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; subject to difficulty adjustments similar to the as-is). As per the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; property of VDFs, miners are able show proof of work.&lt;br/&gt;&amp;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; &amp;gt; 2. Use current PoW mechanism with lower difficulty so finding a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; block takes 1 minute on average, again subject to as-is difficulty&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; adjustments.&lt;br/&gt;&amp;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; &amp;gt; As a result, variation in block times will be greatly reduced.&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; As I understand it, another weakness of VDFs is that they are not&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; inherently progress-free (their sequential nature prevents that; they are&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; inherently progress-requiring).&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; Thus, a miner which focuses on improving the amount of energy that&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it can pump into the VDF circuitry (by overclocking and freezing the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; circuitry), could potentially get into a winner-takes-all situation,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; possibly leading to even *worse* competition and even *more* energy&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; consumption.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; After all, if you can start mining 0.1s faster than the competition,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; that is a 0.1s advantage where *only you* can mine *in the entire world*.&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; Regards,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; ZmnSCPxj&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;&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; Michael Dubrovsky&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Founder; PoWx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; www.PoWx.org &amp;lt;&lt;a href=&#34;http://www.powx.org/&amp;gt&#34;&gt;http://www.powx.org/&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;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; Michael Dubrovsky&lt;br/&gt;&amp;gt;&amp;gt; Founder; PoWx&lt;br/&gt;&amp;gt;&amp;gt; www.PoWx.org &amp;lt;&lt;a href=&#34;http://www.powx.org/&amp;gt&#34;&gt;http://www.powx.org/&amp;gt&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;&amp;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/20210523/732fa3c5/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210523/732fa3c5/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:52:53&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvj9gpc6kwvmavwg7383308uqwvtyv6fnrrp7t6ym4jxmru52gjngzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ulx9njy</id>
    
      <title type="html">📅 Original date posted:2021-04-16 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvj9gpc6kwvmavwg7383308uqwvtyv6fnrrp7t6ym4jxmru52gjngzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ulx9njy" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstp5rju8n5n5zv7ujk7dnmg3kfeu8vegp2c3glme7g4gx450ug8lg5y5y0f&#39;&gt;nevent1q…5y0f&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-16&lt;br/&gt;📝 Original message:On Fri, 16 Apr 2021 at 13:47, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning LL,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Tue, 16 Mar 2021 at 11:25, David A. Harding via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt; 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; I curious about whether anyone informed about ECC and QC&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; knows how to create output scripts with lower difficulty that could be&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; used to measure the progress of QC-based EC key cracking.  E.g.,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; NUMS-based ECDSA- or taproot-compatible scripts with a security&lt;br/&gt;&amp;gt; strength&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; equivalent to 80, 96, and 112 bit security.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hi Dave,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This is actually relatively easy if you are willing to use a trusted&lt;br/&gt;&amp;gt; setup. The trusted party takes a secp256k1 secret key and verifiably&lt;br/&gt;&amp;gt; encrypt it under a NUMS public key from the weaker group. Therefore if you&lt;br/&gt;&amp;gt; can crack the weaker group&amp;#39;s public key you get the secp256k1 secret key.&lt;br/&gt;&amp;gt; Camenisch-Damgard[1] cut-and-choose verifiable encryption works here.&lt;br/&gt;&amp;gt; &amp;gt; People then pay the secp256k1 public key funds to create the bounty. As&lt;br/&gt;&amp;gt; long as the trusted party deletes the secret key afterwards the scheme is&lt;br/&gt;&amp;gt; secure.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Splitting the trusted setup among several parties where only one of them&lt;br/&gt;&amp;gt; needs to be honest looks doable but would take some engineering and&lt;br/&gt;&amp;gt; analysis work.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To simplify this, perhaps `OP_CHECKMULTISIG` is sufficient?&lt;br/&gt;&amp;gt; Simply have the N parties generate individual private keys, encrypt each&lt;br/&gt;&amp;gt; of them with the NUMS pubkey from the weaker group, then pay out to an&lt;br/&gt;&amp;gt; N-of-N `OP_CHECKMULTISIG` address of all the participants.&lt;br/&gt;&amp;gt; Then a single honest participant is enough to ensure security of the&lt;br/&gt;&amp;gt; bounty.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Knowing the privkey from the weaker groups would then be enough to extract&lt;br/&gt;&amp;gt; all of the SECP256K1 privkeys that would unlock the funds in Bitcoin.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Yes! Nice idea.&lt;br/&gt;&lt;br/&gt;Another idea that came to mind is that you could also just prove equality&lt;br/&gt;between the weak group&amp;#39;s key and the secp256k1 key. e.g. generate a 160-bit&lt;br/&gt;key and use it both as a secp256k1 and a 160-bit curve key and prove&lt;br/&gt;equality between them and give funds to the secp256k1 key. I implemented a&lt;br/&gt;proof between ed25519 and secp256k1 a little while ago for example:&lt;br/&gt;&lt;a href=&#34;https://docs.rs/sigma_fun/0.3.0/sigma_fun/ext/dl_secp256k1_ed25519_eq/index.html&#34;&gt;https://docs.rs/sigma_fun/0.3.0/sigma_fun/ext/dl_secp256k1_ed25519_eq/index.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This would come with the extra assumption that it&amp;#39;s easier to break the&lt;br/&gt;160-bit key on the 160-bit curve as opposed to just breaking the 160-bit&lt;br/&gt;key on the 256-bit curve. Intuitively I think this is the case but I would&lt;br/&gt;want to study that further before taking this approach.&lt;br/&gt;&lt;br/&gt;LL&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/20210416/dc5ad2f2/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210416/dc5ad2f2/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:51:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw9v2x8x6jlzsu0rzxwz32shrj3y8xxyy0vwathtw7z0yspfdldcszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9un870tp</id>
    
      <title type="html">📅 Original date posted:2021-04-04 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw9v2x8x6jlzsu0rzxwz32shrj3y8xxyy0vwathtw7z0yspfdldcszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9un870tp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyagve4pqddxeq39gpapu775vr3djvjmg8gyc6vt2xmsj7py6xsqsjk5yng&#39;&gt;nevent1q…5yng&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-04&lt;br/&gt;📝 Original message:On Tue, 16 Mar 2021 at 11:25, David A. Harding 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;&lt;br/&gt;&amp;gt; I curious about whether anyone informed about ECC and QC&lt;br/&gt;&amp;gt; knows how to create output scripts with lower difficulty that could be&lt;br/&gt;&amp;gt; used to measure the progress of QC-based EC key cracking.  E.g.,&lt;br/&gt;&amp;gt; NUMS-based ECDSA- or taproot-compatible scripts with a security strength&lt;br/&gt;&amp;gt; equivalent to 80, 96, and 112 bit security.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Hi Dave,&lt;br/&gt;&lt;br/&gt;This is actually relatively easy if you are willing to use a trusted setup.&lt;br/&gt;The trusted party takes a secp256k1 secret key and verifiably encrypt it&lt;br/&gt;under a NUMS public key from the weaker group. Therefore if you can crack&lt;br/&gt;the weaker group&amp;#39;s public key you get the secp256k1 secret key.&lt;br/&gt;Camenisch-Damgard[1] cut-and-choose verifiable encryption works here.&lt;br/&gt;People then pay the secp256k1 public key funds to create the bounty. As&lt;br/&gt;long as the trusted party deletes the secret key afterwards the scheme is&lt;br/&gt;secure.&lt;br/&gt;&lt;br/&gt;Splitting the trusted setup among several parties where only one of them&lt;br/&gt;needs to be honest looks doable but would take some engineering and&lt;br/&gt;analysis work.&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://link.springer.com/content/pdf/10.1007/3-540-44448-3_25.pdf&#34;&gt;https://link.springer.com/content/pdf/10.1007/3-540-44448-3_25.pdf&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20210405/599aee9f/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210405/599aee9f/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:51:14&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf4mjjadgg5vdepp6urfcpshjr0h3phma9m5nwlcxymev5m57dleqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9un4scuj</id>
    
      <title type="html">📅 Original date posted:2021-04-04 📝 Original message:On ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf4mjjadgg5vdepp6urfcpshjr0h3phma9m5nwlcxymev5m57dleqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9un4scuj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrwlnaq03zgprhurfzpys8zg43zcchwgp45xgjcvqzm304zv8wj5snql9lz&#39;&gt;nevent1q…l9lz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-04&lt;br/&gt;📝 Original message:On Wed, 10 Mar 2021 at 11:20, Lloyd Fournier &amp;lt;lloyd.fourn at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Andrew &amp;amp; all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;ve been working with PSBTs for a little while now. FWIW I agree with the&lt;br/&gt;&amp;gt; change of removing the global tx and having the input/output data stored&lt;br/&gt;&amp;gt; together in the new unified structures.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One thing I&amp;#39;ve been wondering about is how output descriptors could fit&lt;br/&gt;&amp;gt; into PSBTs. They are useful since they allow you to determine the maximum&lt;br/&gt;&amp;gt; satisfaction weight for inputs so you can properly align fees as things get&lt;br/&gt;&amp;gt; added. I haven&amp;#39;t seen any discussion about including them in this revision.&lt;br/&gt;&amp;gt; Is it simply a matter of time before they make it into a subsequent PSBT&lt;br/&gt;&amp;gt; spec or is there something I&amp;#39;m missing conceptually?&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Sipa replied to me off list some time ago and explained what I was missing.&lt;br/&gt;PSBTs have all the information you could want from a descriptor already.&lt;br/&gt;For example the maximum satisfaction weight can be determined from the&lt;br/&gt;witness/redeem script (I had forgot these fields existed). Therefore&lt;br/&gt;descriptors are more useful in higher level applications while PSBTs are&lt;br/&gt;useful for communicating with signing devices. Therefore there is no reason&lt;br/&gt;for PSBTs to support descriptors.&lt;br/&gt;&lt;br/&gt;LL&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/20210405/911a07fe/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210405/911a07fe/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:31:12&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs84j9r3qt84nuysuxmvsrw3xjkfvavf5darfukqr4wjdlqrp4utrqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uj9xt2h</id>
    
      <title type="html">📅 Original date posted:2020-10-04 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs84j9r3qt84nuysuxmvsrw3xjkfvavf5darfukqr4wjdlqrp4utrqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uj9xt2h" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsx9v9t4xplv0wwp8shwkdqclzjms4zy0dpqc6q7q396yzw2xzzcxgpvm3fl&#39;&gt;nevent1q…m3fl&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-04&lt;br/&gt;📝 Original message:Hi Leonardo,&lt;br/&gt;&lt;br/&gt;I can&amp;#39;t tell you what the BIP32 author was thinking but if I put&lt;br/&gt;myself in their shoes these are the reasons I might have done it this&lt;br/&gt;way:&lt;br/&gt;&lt;br/&gt;1. Use HMAC rather than normal SHA2 -- this is just best practice for&lt;br/&gt;key derivation (even though I don&amp;#39;t think it would make a difference&lt;br/&gt;to security if you are strictly following the spec).&lt;br/&gt;2. Use 512-bit rather than 256-bit -- Probably something to do with&lt;br/&gt;(1) -- since I&amp;#39;m using an HMAC I&amp;#39;ve gotta put something as the key. I&lt;br/&gt;don&amp;#39;t want re-use the 256-bits for the secp256k1 secret key for this&lt;br/&gt;since an integer mod q is not the same as 256 random bits (or I don&amp;#39;t&lt;br/&gt;want to have to make the argument in the design doc that it actually&lt;br/&gt;is; plus what if someone starts using this for different curve and I&amp;#39;m&lt;br/&gt;not around to tell them no). So I split the 512-bits and use the last&lt;br/&gt;256bits as the key for the child derivation.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think there is any fundamental flaw with what you suggest (I&lt;br/&gt;am doing something similar for a project).  I guess the issues you&lt;br/&gt;pointed out with the scheme were probably not on the author&amp;#39;s mind. To&lt;br/&gt;me they don&amp;#39;t seem too severe but I haven&amp;#39;t spent much time developing&lt;br/&gt;wallets.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Wed, Sep 30, 2020 at 4:02 AM Leonardo Comandini via bitcoin-dev&lt;br/&gt;&amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; BIP32 [1] says: &amp;#34;In order to prevent these from depending solely on the key&lt;br/&gt;&amp;gt; itself, we extend both private and public keys first with an extra 256 bits of&lt;br/&gt;&amp;gt; entropy. This extension, called the chain code...&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; My argument is that the chain code is not needed.&lt;br/&gt;&amp;gt; To support such claim, I&amp;#39;ll show a schematic of BIP32 operations to be compared&lt;br/&gt;&amp;gt; with an alternative proposal and discuss the differences.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I have two main questions:&lt;br/&gt;&amp;gt; - Is this claim false?&lt;br/&gt;&amp;gt; - Has anyone shared this idea before?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## BIP32 schematic&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let `G` be the secp256k1 generator.&lt;br/&gt;&amp;gt; Let `i` be the child index.&lt;br/&gt;&amp;gt; Let `(p, P=pG)` and `(p_i, P_i=p_iG)` be the parent and i-th child keypairs&lt;br/&gt;&amp;gt; respectively.&lt;br/&gt;&amp;gt; Let `c` and `c_i` be the corresponding chain codes.&lt;br/&gt;&amp;gt; Let `h1, h2, h3, h4` be hash functions so that the formulae below match the&lt;br/&gt;&amp;gt; definitions given in BIP32 [2].&lt;br/&gt;&amp;gt; Define private and public child derivation as follow:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     p_i(p, c, i) = (i &amp;lt; 2^31)  p &#43; h1(c, pG, i)&lt;br/&gt;&amp;gt;                    (i &amp;gt;= 2^31) p &#43; h2(c, p, i)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     c_i(p, c, i) = (i &amp;lt; 2^31)  h3(c, pG, i)&lt;br/&gt;&amp;gt;                    (i &amp;gt;= 2^31) h4(c, p, i)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     P_i(P, c, i) = (i &amp;lt; 2^31)  P &#43; h1(c, P, i)G&lt;br/&gt;&amp;gt;                    (i &amp;gt;= 2^31) not possible&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     c_i(P, c, i) = (i &amp;lt; 2^31)  h3(c, P, i)&lt;br/&gt;&amp;gt;                    (i &amp;gt;= 2^31) not possible&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The above formula for unhardened public derivation resembles a pay-to-contract&lt;br/&gt;&amp;gt; [3] scheme.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Alternative proposal&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let `h` be an adequately strong hash function which converts its output to&lt;br/&gt;&amp;gt; integer.&lt;br/&gt;&amp;gt; Consider the following derivation scheme:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     p_i(p, i) = (i &amp;lt; 2^31)  p &#43; h(pG, i)&lt;br/&gt;&amp;gt;                 (i &amp;gt;= 2^31) h(p, i)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     P_i(P, i) = (i &amp;lt; 2^31)  P &#43; h(P, i)G&lt;br/&gt;&amp;gt;                 (i &amp;gt;= 2^31) not possible&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Which is basically the above one without the chaincode.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Considerations&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I claim that this has the same properties as BIP32 [4]:&lt;br/&gt;&amp;gt; - The problem of finding `p` given `p_i, i` relies on brute-forcing `h` in the&lt;br/&gt;&amp;gt;   same way the analogous problem relies on brute-forcing `h2` in BIP32.&lt;br/&gt;&amp;gt; - The problem of determining whether `{p_i, i}_i=1..n` are derived from a common&lt;br/&gt;&amp;gt;   parent `p` relies on brute-forcing `h` in the same way the analogous problem&lt;br/&gt;&amp;gt;   relies on brute-forcing `h2` in BIP32.&lt;br/&gt;&amp;gt; - Given `i &amp;lt; 2^31, p_i, P`, an attacker can find `p`. This is analogous to&lt;br/&gt;&amp;gt;   BIP32, where the parent extended pubkey is needed (`P, c`). One could argue&lt;br/&gt;&amp;gt;   that `c` is never published on the blockchain, while `P` may be. On the other&lt;br/&gt;&amp;gt;   hand most wallets either use hardened derivation (so the attack does not work)&lt;br/&gt;&amp;gt;   or derive scriptpubkeys from keys at the same depth (so the parent key is&lt;br/&gt;&amp;gt;   never published on the blockchain).&lt;br/&gt;&amp;gt;   Anyway, if the parent public key is kept as secret as BIP32 extended keys are,&lt;br/&gt;&amp;gt;   then the situation is analogous to BIP32&amp;#39;s.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _If_ these claims are correct, the proposed derivation scheme has two main&lt;br/&gt;&amp;gt; advantages:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1) Shorter backups for public and private derivable keys&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Backups are especially relevant for output descriptors. For instance, when using&lt;br/&gt;&amp;gt; a NofM multisig, each participant must backup M-1 exteneded public keys and its&lt;br/&gt;&amp;gt; extended private key, which can be included in an output descriptor. Using the&lt;br/&gt;&amp;gt; proposed derivation reduces the backup size by `~M*32` bytes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2) User-friendly backup for child keys&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Most wallets use user-friendly backups, such as BIP39 [5] mnemonics. They map&lt;br/&gt;&amp;gt; 16-32 bytes of entropy to 12-24 words. However BIP32 exteneded keys are at least&lt;br/&gt;&amp;gt; 64(65) bytes (key and chain code), so they cannot be mapped back to a&lt;br/&gt;&amp;gt; mnemonic.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A common wallet setup is (`-&amp;gt;` one-way derivation, `&amp;lt;-&amp;gt;` two-way mapping):&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     entropy (16-32 bytes) &amp;lt;-&amp;gt; user-friendly backup&lt;br/&gt;&amp;gt;       -&amp;gt; BIP32 extended key (64-65 bytes)&lt;br/&gt;&amp;gt;          -&amp;gt; BIP32 extended child keys (64-65 bytes)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With the proposed derivation, it would be possible to have:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     derivable private key (32 bytes) &amp;lt;-&amp;gt; user-friendly backup&lt;br/&gt;&amp;gt;       -&amp;gt; derivable public key (33 bytes) &amp;lt;-&amp;gt; user-friendly backup&lt;br/&gt;&amp;gt;       -&amp;gt; derivable child keys (32-33 bytes) &amp;lt;-&amp;gt; user-friendly backup&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This would allow having mnemonics for subaccount keys.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## References&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [2] h1, h2, h3 and h4 can be defined as follows&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     Ip(c, p, i) = (i &amp;gt;= 2^31) HMAC-SHA512(c, 0x00 || ser256(p) || ser32(i))&lt;br/&gt;&amp;gt;                   (i &amp;lt; 2^31)  HMAC-SHA512(c, pG || ser32(i))&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     IP(c, P, i) = (i &amp;gt;= 2^31) not possible&lt;br/&gt;&amp;gt;                   (i &amp;lt; 2^31)  HMAC-SHA512(c, P || ser32(i))&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     h1(c, P, i) = parse256(IP(c, P, i)[:32])&lt;br/&gt;&amp;gt;     h2(c, p, i) = parse256(Ip(c, p, i)[:32])&lt;br/&gt;&amp;gt;     h3(c, P, i) = IP(c, P, i)[32:]&lt;br/&gt;&amp;gt;     h4(c, p, i) = Ip(c, p, i)[32:]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [3] &lt;a href=&#34;https://blockstream.com/sidechains.pdf&#34;&gt;https://blockstream.com/sidechains.pdf&lt;/a&gt; Appendix A&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [4] &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#security&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#security&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [5] &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Leonardo&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-07T20:27:19&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsd5flevgdze7k742dm5trzre4hxwphqzamd58sc7rrh96t7a2kyuszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ueesrd0</id>
    
      <title type="html">📅 Original date posted:2020-08-13 📝 Original message:Thanks ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsd5flevgdze7k742dm5trzre4hxwphqzamd58sc7rrh96t7a2kyuszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ueesrd0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp0f0t5rgmuanq3lmtjn2y54lz26uj0c35mayjpgutw8k4dg3lh7qz4ylp0&#39;&gt;nevent1q…ylp0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-08-13&lt;br/&gt;📝 Original message:Thanks for bringing this discovery up and a big thanks to Peter Dettman for&lt;br/&gt;working on this.&lt;br/&gt;&lt;br/&gt;I second what Nadav said. Removing pointless complexity is worth it even at&lt;br/&gt;this stage. I also maintain a non-libsecp implementation of BIP340 etc.&lt;br/&gt;Having two ways to convert an xonly to a point is a pain if you are trying&lt;br/&gt;to maintain type safe apis. If there is no performance penalty (or even a&lt;br/&gt;small one in the short term) to unifying xonly -&amp;gt; point conversion it&amp;#39;s&lt;br/&gt;worth it from my perspective.&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Thu, Aug 13, 2020 at 6:29 AM Nadav Kohen 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; Hello Pieter and all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I am one of the maintainers of Bitcoin-S[1] and I maintain our secp256k1&lt;br/&gt;&amp;gt; bindings (via JNI) as well as our (inefficient) bouncy castle fallback&lt;br/&gt;&amp;gt; implementations of all secp256k1 functionality we depend on including&lt;br/&gt;&amp;gt; Schnorr signatures. In light of this new information that there is no real&lt;br/&gt;&amp;gt; downside to using evenness as the nonce tie-breaker, I am personally very&lt;br/&gt;&amp;gt; in favor of this change as it strictly simplifies things as well as making&lt;br/&gt;&amp;gt; types consistent between nonces and persistent signing keys (I can get rid&lt;br/&gt;&amp;gt; of our SchnorrNonce type :). An additional minor benefit not already&lt;br/&gt;&amp;gt; mentioned is that in places in our codebase where deserialized data is just&lt;br/&gt;&amp;gt; being passed around and not used, we currently require a computation to go&lt;br/&gt;&amp;gt; from a (x-only) SchnorrNonce to an ECPublicKey whereas going from a&lt;br/&gt;&amp;gt; SchnorrPublicKey simply requires pre-pending a 0x02 byte.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I am likely not aware of the entire impact that changing the BIP at this&lt;br/&gt;&amp;gt; stage would have but from my view (of having to update bindings and test&lt;br/&gt;&amp;gt; vectors and my fallback implementation, as well as wanting to get a stable&lt;br/&gt;&amp;gt; branch on secp256k1-zkp containing both ECDSA adaptor signatures and&lt;br/&gt;&amp;gt; Schnorr signatures for use in Discreet Log Contracts), I think this change&lt;br/&gt;&amp;gt; is totally worth it and it will only become harder to make this&lt;br/&gt;&amp;gt; simplification in the future. The schnorrsig branch has not yet been merged&lt;br/&gt;&amp;gt; into secp256k1 (and is nearing this stage I think) and so long as making&lt;br/&gt;&amp;gt; this change doesn&amp;#39;t set us back more than a month (which seems unlikely) I&lt;br/&gt;&amp;gt; am personally in favor of making this change. Glad to hear other&amp;#39;s thoughts&lt;br/&gt;&amp;gt; on this of course but I figured I&amp;#39;d voice my support :)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Nadav&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] &lt;a href=&#34;https://github.com/bitcoin-s/bitcoin-s/&#34;&gt;https://github.com/bitcoin-s/bitcoin-s/&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Aug 12, 2020 at 2:04 PM Pieter Wuille 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; Hello all,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The current BIP340 draft[1] uses two different tiebreakers for conveying&lt;br/&gt;&amp;gt;&amp;gt; the Y coordinate of points: for the R point inside signatures squaredness&lt;br/&gt;&amp;gt;&amp;gt; is used, while for public keys evenness is used. Originally both used&lt;br/&gt;&amp;gt;&amp;gt; squaredness, but it was changed[2] for public keys after observing this&lt;br/&gt;&amp;gt;&amp;gt; results in additional complexity for compatibility with existing systems.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The reason for choosing squaredness as tiebreaker was performance: in&lt;br/&gt;&amp;gt;&amp;gt; non-batch signature validation, the recomputed R point must be verified to&lt;br/&gt;&amp;gt;&amp;gt; have the correct sign, to guarantee consistency with batch validation.&lt;br/&gt;&amp;gt;&amp;gt; Whether the Y coordinate is square can be computed directly in Jacobian&lt;br/&gt;&amp;gt;&amp;gt; coordinates, while determining evenness requires a conversion to affine&lt;br/&gt;&amp;gt;&amp;gt; coordinates first.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This argument of course relies on the assumption that determining whether&lt;br/&gt;&amp;gt;&amp;gt; the Y coordinate is square can be done more efficiently than a conversion&lt;br/&gt;&amp;gt;&amp;gt; to affine coordinates. It appears now that this assumption is incorrect,&lt;br/&gt;&amp;gt;&amp;gt; and the justification for picking the squaredness tiebreaking doesn&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt; really exist. As it comes with other trade-offs (it slows down signing, and&lt;br/&gt;&amp;gt;&amp;gt; is a less conventional choice), it would seem that we should reconsider the&lt;br/&gt;&amp;gt;&amp;gt; option of having the R point use the evenness tiebreaker (like public keys).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; It is late in the process, but I feel I owe this explanation so that at&lt;br/&gt;&amp;gt;&amp;gt; least the possibility of changing can be discussed with all information. On&lt;br/&gt;&amp;gt;&amp;gt; the upside, this was discovered in the context of looking into a cool&lt;br/&gt;&amp;gt;&amp;gt; improvement to libsecp256k1[5], which makes things faster in general, but&lt;br/&gt;&amp;gt;&amp;gt; specifically benefits the evenness variant.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; # 1. What happened?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Computing squaredness is done through the Jacobi symbol (same inventor,&lt;br/&gt;&amp;gt;&amp;gt; but unrelated to Jacobian coordinates). Computing evenness requires&lt;br/&gt;&amp;gt;&amp;gt; converting points to affine coordinates first, and that needs a modular&lt;br/&gt;&amp;gt;&amp;gt; inverse. The assumption that Jacobi symbols are faster to compute than&lt;br/&gt;&amp;gt;&amp;gt; inverses was based on:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * A (possibly) mistaken belief about the theory: fast algorithms for both&lt;br/&gt;&amp;gt;&amp;gt; Jacobi symbols and inverses are internally based on variants of the same&lt;br/&gt;&amp;gt;&amp;gt; extended GCD algorithm[3]. Since an inverse needs to extract a full big&lt;br/&gt;&amp;gt;&amp;gt; integer out of the transition steps made in the extgcd algorithm, while the&lt;br/&gt;&amp;gt;&amp;gt; Jacobi symbol just extracts a single bit, it had seemed that any advances&lt;br/&gt;&amp;gt;&amp;gt; applicable to one would be applicable to the other, but inverses would&lt;br/&gt;&amp;gt;&amp;gt; always need additional work on top. It appears however that a class of&lt;br/&gt;&amp;gt;&amp;gt; extgcd algorithms exists (LSB based ones) that cannot be used for Jacobi&lt;br/&gt;&amp;gt;&amp;gt; calculations without losing efficiency. Recent developments[4] and a&lt;br/&gt;&amp;gt;&amp;gt; proposed implementation in libsecp256k1[5] by Peter Dettman show that using&lt;br/&gt;&amp;gt;&amp;gt; this, inverses in some cases can in fact be faster than Jacobi symbols.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * A broken benchmark. This belief was incorrectly confirmed by a broken&lt;br/&gt;&amp;gt;&amp;gt; benchmark[6] in libsecp256k1 for the libgmp-based Jacobi symbol calculation&lt;br/&gt;&amp;gt;&amp;gt; and modular inverse. The benchmark was repeatedly testing the same constant&lt;br/&gt;&amp;gt;&amp;gt; input, which apparently was around 2.5x faster than the average speed. It&lt;br/&gt;&amp;gt;&amp;gt; is a variable-time algorithm, so a good variation of inputs matters. This&lt;br/&gt;&amp;gt;&amp;gt; mistake had me (and probably others) convinced for years that Jacobi&lt;br/&gt;&amp;gt;&amp;gt; symbols were amazingly fast, while in reality they were always very close&lt;br/&gt;&amp;gt;&amp;gt; in performance to inverses.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; # 2. What is the actual impact of picking evenness instead?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; It is hard to make very generic statements here, as BIP340 will hopefully&lt;br/&gt;&amp;gt;&amp;gt; be used for a long time, and hardware advancements and algorithmic&lt;br/&gt;&amp;gt;&amp;gt; improvements may change the balance. That said, performance on current&lt;br/&gt;&amp;gt;&amp;gt; hardware with optimized algorithms is the best approximation we have.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The numbers below give the expected performance change from squareness to&lt;br/&gt;&amp;gt;&amp;gt; evenness, for single BIP340 validation, and for signing. Positive numbers&lt;br/&gt;&amp;gt;&amp;gt; mean evenness is faster. Batch validation is not impacted at all.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In the short term, for block validation in Bitcoin Core, the numbers for&lt;br/&gt;&amp;gt;&amp;gt; master-nogmp are probably the most relevant (as Bitcoin Core uses&lt;br/&gt;&amp;gt;&amp;gt; libsecp256k1 without libgmp, to reduce consensus-critical dependencies).&lt;br/&gt;&amp;gt;&amp;gt; If/when [5] gets merged, safegcd-nogmp will be what matters. On a longer&lt;br/&gt;&amp;gt;&amp;gt; time scale, the gmp numbers may be more relevant, as the Jacobi&lt;br/&gt;&amp;gt;&amp;gt; implementation there is certainly closer to the state of the art.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * i7-7820HQ: (verify) (sign)&lt;br/&gt;&amp;gt;&amp;gt;   - master-nogmp: -0.3% &#43;16.1%&lt;br/&gt;&amp;gt;&amp;gt;   - safegcd-nogmp: &#43;6.7% &#43;17.1%&lt;br/&gt;&amp;gt;&amp;gt;   - master-gmp: &#43;0.6% &#43;7.7%&lt;br/&gt;&amp;gt;&amp;gt;   - safegcd-gmp: &#43;1.6% &#43;8.6%&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * Cortex-A53: (verify) (sign)&lt;br/&gt;&amp;gt;&amp;gt;   - master-nogmp: -0.3% &#43;15.7%&lt;br/&gt;&amp;gt;&amp;gt;   - safegcd-nogmp: &#43;7.5% &#43;16.9%&lt;br/&gt;&amp;gt;&amp;gt;   - master-gmp: &#43;0.3% &#43;4.1%&lt;br/&gt;&amp;gt;&amp;gt;   - safegcd-gmp: 0.0% &#43;3.5%&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * EPYC 7742: (verify) (sign)&lt;br/&gt;&amp;gt;&amp;gt;   - master-nogmp: -0.3% &#43;16.8%&lt;br/&gt;&amp;gt;&amp;gt;   - safegcd-nogmp: &#43;8.6% &#43;18.4%&lt;br/&gt;&amp;gt;&amp;gt;   - master-gmp: 0.0% &#43;7.4%&lt;br/&gt;&amp;gt;&amp;gt;   - safegcd-gmp: &#43;2.3% &#43;7.8%&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In well optimized cryptographic code speedups as large as a couple&lt;br/&gt;&amp;gt;&amp;gt; percent are difficult to come by, so we would usually consider changes of&lt;br/&gt;&amp;gt;&amp;gt; this magnitude relevant. Note however that while the percentages for&lt;br/&gt;&amp;gt;&amp;gt; signing speed are larger, they are not what is unexpected here. The choice&lt;br/&gt;&amp;gt;&amp;gt; for the square tiebreaker was intended to improve verification speed at the&lt;br/&gt;&amp;gt;&amp;gt; cost of signing speed. As it turns out that it doesn&amp;#39;t actually benefit&lt;br/&gt;&amp;gt;&amp;gt; verification speed, this is a bad trade-off.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; # 3. How big a change is it&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * In the BIP:&lt;br/&gt;&amp;gt;&amp;gt;   - Changing both invocations of `has_square_y` to `has_even_y`.&lt;br/&gt;&amp;gt;&amp;gt;   - Changing the `lift_x_square_y` invocation to `lift_x_even_y`.&lt;br/&gt;&amp;gt;&amp;gt;   - Applying the same change to the test vector generation code, and the&lt;br/&gt;&amp;gt;&amp;gt; resulting test vectors.&lt;br/&gt;&amp;gt;&amp;gt; * In the libsecp256k1:&lt;br/&gt;&amp;gt;&amp;gt;   - An 8-line patch to the proposed BIP340 implementation[7]: see [8]&lt;br/&gt;&amp;gt;&amp;gt; * In Bitcoin Core:&lt;br/&gt;&amp;gt;&amp;gt;   - Similarly small changes to the Python test reimplementation[9]&lt;br/&gt;&amp;gt;&amp;gt; * Duplicating these changes in other draft implementations that may&lt;br/&gt;&amp;gt;&amp;gt; already exist.&lt;br/&gt;&amp;gt;&amp;gt; * Review for all the above.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; # 4. Conclusion&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We discovered that the justification for using squaredness tiebreakers in&lt;br/&gt;&amp;gt;&amp;gt; BIP340 is based on a misunderstanding, and recent developments show that it&lt;br/&gt;&amp;gt;&amp;gt; may in fact be a somewhat worse choice than the alternative. It is a&lt;br/&gt;&amp;gt;&amp;gt; relatively simple change to address this, but that has be weighed against&lt;br/&gt;&amp;gt;&amp;gt; the impact of changing the standard at this stage.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thoughts?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; # 5. References&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;   [1]&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#design&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#design&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;   [2]&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-February/017639.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-February/017639.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;   [3] &lt;a href=&#34;https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm&#34;&gt;https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;   [4] &lt;a href=&#34;https://gcd.cr.yp.to/safegcd-20190413.pdf&#34;&gt;https://gcd.cr.yp.to/safegcd-20190413.pdf&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;   [5] &lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/767&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/767&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;   [6] &lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/797&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/797&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;   [7] &lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/558&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/558&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;   [8]&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/sipa/secp256k1/commit/822311ca230a48d2c373f3e48b91b2a59e1371d6&#34;&gt;https://github.com/sipa/secp256k1/commit/822311ca230a48d2c373f3e48b91b2a59e1371d6&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;   [9] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/17977&#34;&gt;https://github.com/bitcoin/bitcoin/pull/17977&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;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; --&lt;br/&gt;&amp;gt;&amp;gt; Pieter&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;&amp;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/20200813/45cce79a/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200813/45cce79a/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:26:20&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrrjkr9h2lc6rsuvjcxlgdxvlkem5yv0ym20zdnlahcql6lclw53szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uf0p78l</id>
    
      <title type="html">📅 Original date posted:2020-05-12 📝 Original message:A ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrrjkr9h2lc6rsuvjcxlgdxvlkem5yv0ym20zdnlahcql6lclw53szyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9uf0p78l" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszngu2tz8rw7d6gydztftm7434zhtyfx3zdag3jgheeww7te500dsqslrru&#39;&gt;nevent1q…lrru&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-12&lt;br/&gt;📝 Original message:A quick correction to my post:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here&amp;#39;s where the truly novel part comes in. Ruben solves this by extending&lt;br/&gt;&amp;gt; the standard *TLC contract:&lt;br/&gt;&amp;gt; 1. Bob redeem with secret&lt;br/&gt;&amp;gt; 2. Alice refund after T1&lt;br/&gt;&amp;gt; 3. Bob redeem without secret after T2&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is actually:&lt;br/&gt;&lt;br/&gt;1. Bob redeem with redeem secret&lt;br/&gt;2. Alice refund after T1 with refund secret&lt;br/&gt;3. Bob redeem without secret after T2&lt;br/&gt;&lt;br/&gt;The fact that Alice reveals a secret when she refunds is crucial.&lt;br/&gt;&lt;br/&gt;LL&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/20200512/86347834/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200512/86347834/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:24:39&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszngu2tz8rw7d6gydztftm7434zhtyfx3zdag3jgheeww7te500dszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ups4s9s</id>
    
      <title type="html">📅 Original date posted:2020-05-12 📝 Original message:Ruben, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszngu2tz8rw7d6gydztftm7434zhtyfx3zdag3jgheeww7te500dszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ups4s9s" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswhqe2x2ghxtvuegkw7k08avzd57s5j6t26vmn5adpdfvn8wyrppqmjm2ec&#39;&gt;nevent1q…m2ec&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-12&lt;br/&gt;📝 Original message:Ruben,&lt;br/&gt;&lt;br/&gt;In my opinion, this protocol is theoretical breakthrough as well as a&lt;br/&gt;practical protocol. Well done! I want to try and distil the core abstract&lt;br/&gt;ideas here as they appear to me. From my view, the protocol is a&lt;br/&gt;combination of two existing ideas and one new one:&lt;br/&gt;&lt;br/&gt;1. In atomic swaps you can make the refund transaction on one chain&lt;br/&gt;dependent on the refund on the other using secret revelation. Thus only one&lt;br/&gt;chain needs to have a timelock and the other refund can be conditioned on a&lt;br/&gt;secret that is revealed when that first refund goes through. (This idea is&lt;br/&gt;in the monero atomic swap [1]).&lt;br/&gt;2. Secret revelations can be used to give unconstrained spending power to&lt;br/&gt;one party. With an adaptor signature, rather than reveal a decryption key&lt;br/&gt;for another signature, you can just make the decryption key your signing&lt;br/&gt;key in the multisig so when you reveal it with the adaptor signautre the&lt;br/&gt;other party gains full knowledge of the private key for the output and can&lt;br/&gt;spend it arbitrarily. (this is just folklore and already what happens in&lt;br/&gt;HTLCs -- though it looks like lightning people are about to get rid of the&lt;br/&gt;unconstrained spend I think).&lt;br/&gt;&lt;br/&gt;The combination of these two ideas is novel in itself. The problem with&lt;br/&gt;idea (2) is that your unconstrained spending power over an output doesn&amp;#39;t&lt;br/&gt;matter much if there is a pre-signed refund transaction spending from it --&lt;br/&gt;you still have to spend it before the refund becomes valid. But if you&lt;br/&gt;bring in idea (1)  this problem goes away!&lt;br/&gt;However, you are left with a new problem: What if the party with the&lt;br/&gt;timelock never refunds? Then the funds are locked forever.&lt;br/&gt;&lt;br/&gt;Here&amp;#39;s where the truly novel part comes in. Ruben solves this by extending&lt;br/&gt;the standard *TLC contract:&lt;br/&gt;1. Bob redeem with secret&lt;br/&gt;2. Alice refund after T1&lt;br/&gt;3. Bob redeem without secret after T2&lt;br/&gt;&lt;br/&gt;We might call this a &amp;#34;Forced Refund *TLC&amp;#34;. Alice must claim the refund or&lt;br/&gt;lose her money. This forces the refund secret revelation through&lt;br/&gt;punishment. If Alice refuses to refund Bob gets the asset he wanted anyway!&lt;br/&gt;&lt;br/&gt;The resulting protocol you get from applying these ideas is three&lt;br/&gt;transactions. At the end, one party has their funds in a non HD key output&lt;br/&gt;but if they want that they can just transfer it to an HD output in which&lt;br/&gt;case you get four transactions again. Thus I consider this to be a strict&lt;br/&gt;improvement over the four transaction protocol. Furthermore, one of the&lt;br/&gt;chains does not need a timelock. This is remarkable as the four transaction&lt;br/&gt;atomic swap is one of the most basic and most studied protocols. I&lt;br/&gt;considered it to be kind of &amp;#34;perfect&amp;#34; in a way. It just goes to show that&lt;br/&gt;this field is still very new and there are still things to discover in what&lt;br/&gt;we think is the most well trodden ground.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t want to ignore that Ruben presents us with a two transaction&lt;br/&gt;protocol. He made a nice video explaining it here:&lt;br/&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=TlCxpdNScCA&#34;&gt;https://www.youtube.com/watch?v=TlCxpdNScCA&lt;/a&gt;. It is harder to see the&lt;br/&gt;elegance of the idea in the two tx protocol because it involves revocation&lt;br/&gt;and relative timelocks etc. Actually, it is straightforward to naively&lt;br/&gt;achieve a two tx atomic swap with payment channels:&lt;br/&gt;1. Alice and Bob set up payment channels to each other on different chains&lt;br/&gt;2. They atomic swap the balances of the channels off-chain using HTLCs&lt;br/&gt;using the standard protocol.&lt;br/&gt;3. Since one party exclusively owns the funds in each channel the party&lt;br/&gt;with no funds simply reveals their key in the funding OP_CHECKMULTISIG to&lt;br/&gt;the other&lt;br/&gt;4. Both parties now watch the chain to see if the other tries to post a&lt;br/&gt;commitment transactions.&lt;br/&gt;&lt;br/&gt;The advantages that Ruben&amp;#39;s two tx protocol has over this is that timelocks&lt;br/&gt;and monitoring is only needed on one of the chains. This is nothing to&lt;br/&gt;scoff at but for me the three tx protocol is the most elegant expression of&lt;br/&gt;the idea and the two tx protocol is a more optimised version that might&lt;br/&gt;make sense in some circumstances.&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/h4sh3d/xmr-btc-atomic-swap/blob/master/README.md&#34;&gt;https://github.com/h4sh3d/xmr-btc-atomic-swap/blob/master/README.md&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;LL&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/20200512/b0a4d1a9/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200512/b0a4d1a9/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:24:39&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxg4a5djhfndj0cqrek4m455tj2z95avg7uunytkljzsw0euw7vlszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ukn297c</id>
    
      <title type="html">📅 Original date posted:2020-03-24 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxg4a5djhfndj0cqrek4m455tj2z95avg7uunytkljzsw0euw7vlszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ukn297c" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9v927k6ma35pkgle5u2cnxyzu4pqad4zu6ccnf3x8qzg9zdah5yg466rta&#39;&gt;nevent1q…6rta&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-24&lt;br/&gt;📝 Original message:Hi List,&lt;br/&gt;&lt;br/&gt;I felt this topic deserved it&amp;#39;s own thread but it follows on from the&lt;br/&gt;mailing list post [2] announcing a new PR [1] to change BIP-340 in several&lt;br/&gt;ways, including adding random auxiliary data into the nonce&lt;br/&gt;derivation function. Rather than hashing the randomness with the secret key&lt;br/&gt;and message etc, the randomness is hashed then XOR&amp;#39;d (^) with the secret&lt;br/&gt;key and the result is hashed like so to determine the secret nonce k:&lt;br/&gt;&lt;br/&gt;(1) k = H_derive( sec_key ^ H_aux(rand) || pub_key_x || message)&lt;br/&gt;&lt;br/&gt;The claim made in the mailing list post is that this is more secure against&lt;br/&gt;&amp;#34;differential power analysis&amp;#34; (DPA) attacks than just doing the simpler and&lt;br/&gt;more efficient:&lt;br/&gt;&lt;br/&gt;(2) k = H_derive(sec_key || rand || pub_key_x || message)&lt;br/&gt;&lt;br/&gt;The TL;DR here is that I don&amp;#39;t think this is the case.&lt;br/&gt;&lt;br/&gt;There was no citation for this claim, so I did some digging and found two&lt;br/&gt;papers that seemed like they might be the origin of the idea [3,4] (I had&lt;br/&gt;no idea about these attacks before). A relatively easy to understand&lt;br/&gt;explanation of DPA attacks against is in [3]:&lt;br/&gt;&lt;br/&gt;The fundamental principle behind all DPA attacks is that at some point in&lt;br/&gt;&amp;gt; an algorithm’s execution, a function f exists that combines a fixed secret&lt;br/&gt;&amp;gt; value with a variable which an attacker knows. An attacker can form&lt;br/&gt;&amp;gt; hypotheses about the fixed secret value, and compute the corresponding&lt;br/&gt;&amp;gt; output values of f by using an appropriate leakage model, such as the&lt;br/&gt;&amp;gt; Hamming Distance model. The attacker can then use the acquired power&lt;br/&gt;&amp;gt; consumption traces to verify her hypotheses, by partitioning the&lt;br/&gt;&amp;gt; acquisitions or using Pearson’s correlation coefficient. These side-channel&lt;br/&gt;&amp;gt; analysis attacks are aided by knowledge of details of the implementation&lt;br/&gt;&amp;gt; under attack. Moreover, these attacks can be used to validate hypotheses&lt;br/&gt;&amp;gt; about implementation details. In subsequent sections, these side-channel&lt;br/&gt;&amp;gt; analysis attacks are referred to as DPA attacks.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;For example, in the original BIP-340 proposal the nonce derivation was&lt;br/&gt;vulnerable to DPA attacks as it was derived simply by doing&lt;br/&gt;H_derive(sec_key || message). Since, the message is known to the attacker&lt;br/&gt;and variable (even if it is not controller by her), the SHA256 compression&lt;br/&gt;function run on (sec_key || message) may leak information about sec_key. It&lt;br/&gt;is crucial to understand that just hashing sec_key before passing it into&lt;br/&gt;the H_derive does *not* fix the problem. Although the attacker would be&lt;br/&gt;unable to find sec_key directly, they could learn H(sec_key) and with that&lt;br/&gt;know all the inputs into H_derive and therefore get the value of the secret&lt;br/&gt;nonce k and from there extract the secret key from any signature made with&lt;br/&gt;this nonce derivation algorithm.&lt;br/&gt;&lt;br/&gt;The key thing I want to argue with this post is that there is no advantage&lt;br/&gt;of (1) over (2) against DPA attacks, at least not given my understanding of&lt;br/&gt;these papers. The way the attack in [3] works is by assuming that&lt;br/&gt;operations in the compression function leak the &amp;#34;hamming distance&amp;#34; [5] (HD)&lt;br/&gt;between the static secret thing that is being combined with the variable&lt;br/&gt;public thing. In practice the attack involves many particulars about SHA256&lt;br/&gt;but that is, at a high level, the right way to simplify it I think. The way&lt;br/&gt;the paper suggests to fix the problem is to mask the secret data with&lt;br/&gt;secret randomness before each sensitive operation and then strip off the&lt;br/&gt;secret randomness afterwards. This seems to be the inspiration for the&lt;br/&gt;structure of updated BIP-340 (1), however I don&amp;#39;t believe that it provides&lt;br/&gt;any extra protection over (2). My argument is as follows:&lt;br/&gt;&lt;br/&gt;Claim A: If the randomness used during signing is kept secret from the&lt;br/&gt;attacker then (2) is secure against DPA.&lt;br/&gt;&lt;br/&gt;Since SHA256 has 64-byte blocks the hash H_derive(sec_key || rand ||&lt;br/&gt;pub_key_x || message) will be split up into two 64 byte blocks, one&lt;br/&gt;containing secret data (sec_key || rand) and the other containing data&lt;br/&gt;known to the attacker (pub_key_x || message). The compression function will&lt;br/&gt;run on (sec_key || rand) but DPA will be useless here because the&lt;br/&gt;HD(sec_key, rand) will contain no information about sec_key since rand is&lt;br/&gt;also secret. The output of the compression function on the first block will&lt;br/&gt;be secret but *variable* so the intermediate hash state will not reveal&lt;br/&gt;useful information when compressed with the second block.&lt;br/&gt;&lt;br/&gt;Then I thought perhaps (1) is more robust in the case where the randomness&lt;br/&gt;is known by the attacker (maybe the attacker can physically modify the&lt;br/&gt;chipset to control the rng). We&amp;#39;d have to assume that the sec_key ^&lt;br/&gt;H_aux(rand) isn&amp;#39;t vulnerable to DPA (the LHS is under the control of the&lt;br/&gt;attacker) to be true. Even under this assumption it turned out not to be&lt;br/&gt;the case:&lt;br/&gt;&lt;br/&gt;Claim B: If the randomness used during signing is known to the attacker,&lt;br/&gt;then (1) is not secure against DPA.&lt;br/&gt;&lt;br/&gt;In (1)  there are 96 bytes to be hashed and therefore two SHA256 blocks:&lt;br/&gt;(H_aux(sec_key) ^ rand || pub_key_x) and (message). During the first&lt;br/&gt;compression function call the attacker gets the HD of:&lt;br/&gt;HD( sec_key ^ H_aux(rand),  pub_key_x)&lt;br/&gt;which is equal to the following as applying the same XOR to both sides does&lt;br/&gt;not change the HD.&lt;br/&gt;HD(sec_key, H_aux(rand) ^ pub_key_x)&lt;br/&gt;Since the LHS is secret and static, and the RHS is variable and known to&lt;br/&gt;the adversary we have a successful DPA attack -- the attacker will learn&lt;br/&gt;sec_key after enough runs.&lt;br/&gt;&lt;br/&gt;Maybe it&amp;#39;s just a general rule if you can&amp;#39;t produce randomness hidden to&lt;br/&gt;the attacker then no defence is possible against DPA but I wanted to check&lt;br/&gt;this anyway.&lt;br/&gt;&lt;br/&gt;My conclusion from this is that (2) is preferable to (1) because it is&lt;br/&gt;simpler and more efficient (it has one less SHA256 compression run) and no&lt;br/&gt;less secure against DPA (in this model). This is not really my area so&lt;br/&gt;perhaps there is a justification for (1) over (2) that I don&amp;#39;t understand&lt;br/&gt;yet. If so, someone needs to write it down! If not then I think changing&lt;br/&gt;the proposal to (2) is preferable.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/bitcoin/bips/pull/893&#34;&gt;https://github.com/bitcoin/bips/pull/893&lt;/a&gt;&lt;br/&gt;[2]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-February/017639.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-February/017639.html&lt;/a&gt;&lt;br/&gt;[3] &lt;a href=&#34;http://www.oocities.org/mike.tunstall/papers/MTMM07.pdf&#34;&gt;http://www.oocities.org/mike.tunstall/papers/MTMM07.pdf&lt;/a&gt;&lt;br/&gt;[4] &lt;a href=&#34;https://www.cryptoexperts.com/sbelaid/articleHMAC.pdf&#34;&gt;https://www.cryptoexperts.com/sbelaid/articleHMAC.pdf&lt;/a&gt;&lt;br/&gt;[5] &lt;a href=&#34;https://en.wikipedia.org/wiki/Hamming_distance&#34;&gt;https://en.wikipedia.org/wiki/Hamming_distance&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/20200325/e3675bf9/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200325/e3675bf9/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:23:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdvgpgpggd3u9zhc4vgfvun06gyfv5kuns4m5xg2z9wk8eknxn52czyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u7xmk9v</id>
    
      <title type="html">📅 Original date posted:2020-03-04 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdvgpgpggd3u9zhc4vgfvun06gyfv5kuns4m5xg2z9wk8eknxn52czyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9u7xmk9v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg2ydt4vgxa2ylhv298y4ppueq7g93lew8n88uzsz0eaynzq7dsdqe42jhd&#39;&gt;nevent1q…2jhd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-04&lt;br/&gt;📝 Original message:Hi List,&lt;br/&gt;&lt;br/&gt;I recently presented a poster at the Financial Cryptography conference&lt;br/&gt;&amp;#39;2020 which you can find here:&lt;br/&gt;&lt;a href=&#34;https://github.com/LLFourn/taproot-ggm/blob/master/main.pdf&#34;&gt;https://github.com/LLFourn/taproot-ggm/blob/master/main.pdf&lt;/a&gt;.  It attempts&lt;br/&gt;to show the security requirements for the tweak hash function in Taproot.&lt;br/&gt;In this post I&amp;#39;ll give a long description of it but first let me tl;dr:&lt;br/&gt;&lt;br/&gt;Taproot requires no new assumptions of SHA256 over what are already made by&lt;br/&gt;Schnorr signatures themselves with one exception: when using a&lt;br/&gt;non-interactive key generation protocol to produce a Taproot internal key&lt;br/&gt;(e.g MuSig). To prove security in this scenario we need a make an&lt;br/&gt;additional assumption about SHA256: as well as being collision resistant&lt;br/&gt;(i.e. find two hashes h_1 - h_2 = 0), it must satisfy a more general kind&lt;br/&gt;of collision resistance where it is hard to find h_1 - h_2 = d for *any d*&lt;br/&gt;when the adversary is challenged to find h_1 and h_2 with random prefixes.&lt;br/&gt;This is obviously a plausible assumption. Put informally, it says that zero&lt;br/&gt;is not a special case where finding collisions is difficult but rather&lt;br/&gt;solving the 2-sum problem is hard for all values of d (when challenged with&lt;br/&gt;random prefixes).&lt;br/&gt;&lt;br/&gt;Now the long version.&lt;br/&gt;&lt;br/&gt;My motivation for creating this poster came from questions I had after&lt;br/&gt;discussions in Taproot Study Group #18 (this study group initiative was a&lt;br/&gt;great idea btw). The main question I had was &amp;#34;Why is Taproot binding?&amp;#34; i.e.&lt;br/&gt;why is it true that I can only commit to one Merkle root. Isn&amp;#39;t it possible&lt;br/&gt;that a malicious party could produce a second covert Taproot spend that&lt;br/&gt;none of the other parties to the output agreed to? I submitted a poster&lt;br/&gt;proposal to FC to force myself to get to the bottom of it.&lt;br/&gt;&lt;br/&gt;The premise of the poster is to use the Generic Group Model to try and&lt;br/&gt;figure out how the hash function would have to fail for Taproot to be&lt;br/&gt;insecure. Most of the poster is taken up cartoon reductions I made to&lt;br/&gt;remind myself as to why what I was saying might be true. They are&lt;br/&gt;incomplete and difficult to parse on their own so hopefully this post is a&lt;br/&gt;useful companion to them.&lt;br/&gt;&lt;br/&gt;=== The Security of Taproot ===&lt;br/&gt;&lt;br/&gt;There are three scenarios/games we must consider when asking whether&lt;br/&gt;Taproot is secure in the context of Bitcoin:&lt;br/&gt;&lt;br/&gt;1. Taproot Forge: Forging taproot spends must be hard. The adversary must&lt;br/&gt;not be able to take a public key off the blockchain and produce a forged&lt;br/&gt;Taproot spend from it.&lt;br/&gt;2. Covert Taproot: When an adversary is executing a multi-party key&lt;br/&gt;generation protocol (e.g. MuSig) it should be hard for them to produce a&lt;br/&gt;covert malicious Taproot spend from the joint key  i.e. when honest parties&lt;br/&gt;think there is no Taproot on a key there shouldn&amp;#39;t be any Taproot on the&lt;br/&gt;key. Note this is not guaranteed to be hard by 1 being hard.&lt;br/&gt;3. Second Covert Taproot: Like 2, except that if honest parties agree to a&lt;br/&gt;Taproot spend then the adversary shouldn&amp;#39;t be able to generate a second&lt;br/&gt;Taproot spend they are unaware of.&lt;br/&gt;&lt;br/&gt;Properties (1) and (2) can be argued succinctly if we just prove that&lt;br/&gt;Taproot is a secure commitment scheme. It should be clear that if a Taproot&lt;br/&gt;external key T = X &#43; H(X||m)*G is a secure commitment scheme (Hiding and&lt;br/&gt;Binding) to any arbitrary message m, then it is a secure commitment scheme&lt;br/&gt;to a Merkle root. If so, then properties (1) and (3) hold. (1) holds&lt;br/&gt;because if you can create an opening to a commitment not generated by you,&lt;br/&gt;you either broke hiding (if your opening is the same as the honest one) or&lt;br/&gt;broke binding (if it&amp;#39;s different). (3) holds because you must have broken&lt;br/&gt;binding as there are now two openings to the same commitment.&lt;br/&gt;&lt;br/&gt;Property (2) is more difficult to argue as it depends on the multi-party&lt;br/&gt;key generation protocol. Case in point: Taproot is completely broken when&lt;br/&gt;combined with a proof of knowledge key generation protocol where along with&lt;br/&gt;their public keys each party provides a proof of knowledge of the secret&lt;br/&gt;key. Where X_1 is the key of the honest party, the malicious party can&lt;br/&gt;choose their key X_2 to be G*H(X_1 || m) where m is a malicious Merkle&lt;br/&gt;root. Clearly the malicious party has a covert Taproot for X = X_1 &#43; X_2&lt;br/&gt;and can produce a proof of knowledge for X_2.&lt;br/&gt;&lt;br/&gt;Given this definition of security, we now move onto how we should model the&lt;br/&gt;problem to prove they hold.&lt;br/&gt;&lt;br/&gt;=== Generic Group Model vs Random Oracle Model ===&lt;br/&gt;&lt;br/&gt;For practical cryptographic schemes you often have to idealise one of its&lt;br/&gt;components to prove it secure. The most popular candidate for idealisation&lt;br/&gt;is the hash function in the Random Oracle Model (ROM), which idealises a&lt;br/&gt;hash function as a &amp;#34;random oracle&amp;#34;, a black box which spits out random&lt;br/&gt;values for each input. For example, the original &amp;#34;forking lemma&amp;#34; proof by&lt;br/&gt;Pointcheval and Stern [1] shows the Schnorr signature scheme is unforgeable&lt;br/&gt;in this model if the discrete logarithm problem is hard. In other words,&lt;br/&gt;idealising the hash function allows us to isolate what security assumptions&lt;br/&gt;we are making about the group (e.g. the discrete logarithm problem being&lt;br/&gt;hard in it).&lt;br/&gt;&lt;br/&gt;But what if we want to know what assumptions we are making about the hash&lt;br/&gt;function? Does the challenge hash in Schnorr signatures have to be&lt;br/&gt;collision resistant or pre-image resistant or something else? To answer&lt;br/&gt;this question Neven et al.[2] analysed Schnorr signatures by idealising the&lt;br/&gt;group in the &amp;#34;Generic Group Model&amp;#34; (GGM). By idealising the group, they&lt;br/&gt;were able to isolate the security requirements of the hash function away&lt;br/&gt;from any assumptions being made about the group. In the GGM, the group&lt;br/&gt;becomes a black box which, when given two group elements, spits out their&lt;br/&gt;subtraction (for technical reasons it&amp;#39;s subtraction rather than addition).&lt;br/&gt;The adversary can only produce new group elements by querying the oracle.&lt;br/&gt;Using the GGM they prove that the hash function needs to be Random-Prefix&lt;br/&gt;Preimage (RPP) resistant (and Random-Prefix Second-Preimage resistant)&lt;br/&gt;which are strictly weaker assumptions than collision resistance.&lt;br/&gt;&lt;br/&gt;=== Taproot in the Random Oracle Model ===&lt;br/&gt;&lt;br/&gt;Proving that Taproot is a binding commitment scheme in the ROM is&lt;br/&gt;straightforward (hiding is too but I&amp;#39;m going to skip that). To produce two&lt;br/&gt;openings for the same external key, the adversary must have two random&lt;br/&gt;oracle queries H(X || m) that result in the same external key T = X &#43;&lt;br/&gt;H(X||m)*G. Since H(X||m)*G is an (almost) uniformly distributed group&lt;br/&gt;element in the ROM, T is also uniformly distributed, thus breaking the&lt;br/&gt;binding of Taproot is equivalent to solving a birthday problem of size&lt;br/&gt;2^256 (the same as finding hash collisions in the ROM). Note that this&lt;br/&gt;statement is true regardless of the discrete logarithm problem being hard&lt;br/&gt;or not. This proves properties (1) and (3).&lt;br/&gt;&lt;br/&gt;For property (2) let&amp;#39;s consider MuSig as the key generation protocol. If we&lt;br/&gt;model the MuSig key tweak hash function as a random oracle as well then for&lt;br/&gt;every key X_2,  the adversary has to query the MuSig hash oracle to&lt;br/&gt;determine the joint key X = X_1*H(X_1||L) &#43; X_2*H(X_2| L). As before, it is&lt;br/&gt;clear to see that this makes X a uniform group element for every X_2 in the&lt;br/&gt;ROM. Liekwise for every covert Taproot internal key C and message pair the&lt;br/&gt;external key T = C &#43; H(C||m) *G will be uniform as before in the ROM. Thus,&lt;br/&gt;breaking property (2) is the same as finding T = X, where you the adversary&lt;br/&gt;can only sample T and X from uniform distributions and so we have another&lt;br/&gt;birthday problem. This completes the proof of all three properties.&lt;br/&gt;&lt;br/&gt;Poelstra presented a proof in the ROM for the security of Taproot [3]. It&lt;br/&gt;frames Taproot as a way of combining two signature schemes into one public&lt;br/&gt;key (in our case Schnorr and Tapscript). He uses a similar line of&lt;br/&gt;reasoning to what I have just presented in his proof (Lemma 1, step 3) but&lt;br/&gt;this approach brings in many other considerations that I think can be&lt;br/&gt;avoided by modelling it as a commitment scheme. Note that this proof only&lt;br/&gt;shows that Taproot forgeries are hard i.e. property (1).&lt;br/&gt;&lt;br/&gt;=== Taproot in the Generic Group Model ===&lt;br/&gt;&lt;br/&gt;The ROM proof is an important first step -- if it couldn&amp;#39;t be proved secure&lt;br/&gt;in ROM then it would probably be completely broken. But Taproot, unlike&lt;br/&gt;Schnorr, only relies on the security of its hash function when viewed as a&lt;br/&gt;commitment scheme so it would be prudent to figure out what those&lt;br/&gt;properties are. By using the ROM we artificially hide what those properties&lt;br/&gt;from our analysis. As in the case of Schnorr, we can idealise the group in&lt;br/&gt;the GGM to help isolate the hash function&amp;#39;s properties.&lt;br/&gt;&lt;br/&gt;To prove Taproot was a binding commitment scheme in the GGM I had to&lt;br/&gt;introduce a new property I called &amp;#34;Chosen Offset Prefix-Collision&amp;#34; (COPC)&lt;br/&gt;resistance. The precise security game is sketched in the poster, but I like&lt;br/&gt;to describe it as a more general kind of collision resistance. Instead of&lt;br/&gt;it being hard to find two preimages a and b where H(a) - H(b) = 0, it must&lt;br/&gt;be hard to find H(P_1 || a) - H(P_2 || b) = d for any d (not just d  = 0)&lt;br/&gt;with random prefixes P_1 and P_2 given by the challenger (d chosen by the&lt;br/&gt;adversary). COPC is necessary and sufficient to prove Taproot is a secure&lt;br/&gt;commitment scheme in the GGM (the proof for this isn&amp;#39;t in the poster but is&lt;br/&gt;very similar to Second Covert Taproot proof).&lt;br/&gt;&lt;br/&gt;This was not the ideal outcome, so I decided to analyse properties Taproot&lt;br/&gt;(1) and (3) independently rather than just imply them from the commitment&lt;br/&gt;scheme result. What ended up in the poster is three independent proofs for&lt;br/&gt;each Taproot security property with MuSig assumed to be key generation&lt;br/&gt;scheme for properties (2) and (3). Here&amp;#39;s a summary of what I concluded for&lt;br/&gt;each property.&lt;br/&gt;&lt;br/&gt;1. Taproot Forge: In the GGM, an adversary who forges Taproot openings can&lt;br/&gt;be used as a black box to mount a &amp;#34;Random Prefix-Preimage&amp;#34; (RPP) attack&lt;br/&gt;against the hash function. This is a very good result as RPP is already&lt;br/&gt;required by Schnorr. Essentially, this means anyone who can forge Taproot&lt;br/&gt;spends can also forge Schnorr signatures.&lt;br/&gt;&lt;br/&gt;2. Covert Taproot (MuSig): For this problem I had to split the adversary&lt;br/&gt;into two types: those who query their MuSig public key X_2 from the group&lt;br/&gt;oracle before their malicious internal key C and those that query C first&lt;br/&gt;or set X_2 = C. For the first case I was able to show another reduction&lt;br/&gt;from RRP (which shown in the poster).  The other case I was able to break&lt;br/&gt;preimage resistance as long as I modelled the MuSig hash function as a&lt;br/&gt;random oracle (not shown in the poster and this is only from memory). In&lt;br/&gt;both cases the reduction does not work for n-party MuSig (only for 2&lt;br/&gt;parties). Obviously, this is not totally satisfying. The problem with&lt;br/&gt;n-party MuSig is it becomes exponentially more unlikely (in n) for the&lt;br/&gt;reduction to guess which keys the adversary will use for their MuSig keys.&lt;br/&gt;&lt;br/&gt;3. Second Covert Taproot (MuSig): Once again, this is where honest parties&lt;br/&gt;agree on a joint key and Taproot spend from it, but the adversary is&lt;br/&gt;somehow able to create a second covert spend during the key generation&lt;br/&gt;phase. This is where I found that COPC does actually need to be hard to&lt;br/&gt;ensure this property. This is true regardless of the number of parties.&lt;br/&gt;Thus this is the only scenario where you need the additional security&lt;br/&gt;assumption to prove security.&lt;br/&gt;&lt;br/&gt;== Concluding Remarks ==&lt;br/&gt;&lt;br/&gt;The main important take away of this is that there is actually a small&lt;br/&gt;security cost to using a group element as both a commitment scheme and as a&lt;br/&gt;public key. It would be very surprising if we got this for free. By using&lt;br/&gt;the random oracle model we merely hide this in the idealisation of the hash&lt;br/&gt;function. The generic group model exposes it. The question is: is the cost&lt;br/&gt;worth it and who bears it? Here&amp;#39;s what I consider to be the most important&lt;br/&gt;points:&lt;br/&gt;&lt;br/&gt;1. You only take on this COPC assumption if you use Tapscript. If you&amp;#39;re&lt;br/&gt;just putting your funds into a Taproot output without an internal key,&lt;br/&gt;either as a group or an individual there is no extra security assumption.&lt;br/&gt;(with the caveat that my technique only really works for  2-party MuSig).&lt;br/&gt;2. The COPC assumption seems to be very plausible.&lt;br/&gt;3. Even if COPC is broken and an adversary can output two openings to the&lt;br/&gt;same external key, both those openings must be valid taproot spends for&lt;br/&gt;anyone to lose coins (i.e. Merkle roots with valid paths to leaves with&lt;br/&gt;valid tapscript).&lt;br/&gt;4. Even if COPC was that badly broken on SHA256, old taproot outputs would&lt;br/&gt;not be affected, the adversary has to break it during key generation before&lt;br/&gt;funds are put into the output.&lt;br/&gt;5. You can completely circumvent this result by using coin-tossing rather&lt;br/&gt;than MuSig for the key generation protocol. In most cases this doesn&amp;#39;t even&lt;br/&gt;add any extra rounds of communication since you are doing 3-round coin&lt;br/&gt;tossing to choose the R values for the signatures that spend from the joint&lt;br/&gt;output anyway. You can just toss your public keys in parallel.&lt;br/&gt;&lt;br/&gt;In my opinion, the cost of Taproot is mostly borne by theoreticians. They&lt;br/&gt;can no longer treat a a public key ideally but have to consider the&lt;br/&gt;implications of it also being a commitment. For the user and Bitcoin as a&lt;br/&gt;whole it seems to offer an overwhelming benefit. In exchange for the&lt;br/&gt;complexity it adds to making security claims in the GGM (if using&lt;br/&gt;Taprscript and MuSig), it offers exciting new opportunities for&lt;br/&gt;non-interactivity and fungibility over what just what Schnorr would provide.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t consider my work to be a final proof of anything. I would welcome&lt;br/&gt;anyone who wants to take over this research direction and do a proper job&lt;br/&gt;of it! I didn&amp;#39;t have any personal motivation for doing this work other than&lt;br/&gt;curiosity and that curiosity has been satisfied. Questions and thoughts&lt;br/&gt;welcome :)&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://www.di.ens.fr/david.pointcheval/Documents/Papers/2000_joc.pdf&#34;&gt;https://www.di.ens.fr/david.pointcheval/Documents/Papers/2000_joc.pdf&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;http://www.neven.org/papers/schnorr.pdf&#34;&gt;http://www.neven.org/papers/schnorr.pdf&lt;/a&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://github.com/apoelstra/taproot/blob/master/main.pdf&#34;&gt;https://github.com/apoelstra/taproot/blob/master/main.pdf&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&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/20200304/1254933a/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200304/1254933a/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:23:17&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqmqyt43lc0whk72w5uuwwclzanx5c8rcnk8xht0lq2kjc2jfgcwszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ujyd6h4</id>
    
      <title type="html">📅 Original date posted:2020-03-05 📝 Original message:&amp;gt; I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqmqyt43lc0whk72w5uuwwclzanx5c8rcnk8xht0lq2kjc2jfgcwszyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9ujyd6h4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsymk8l8zgtv3a0jv3nles0c0fxlj20techm84u28asfq9hs6cwr3qr085rc&#39;&gt;nevent1q…85rc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-05&lt;br/&gt;📝 Original message:&amp;gt; I am uncertain what you mean here by &amp;#34;coin-tossing&amp;#34;.&lt;br/&gt;&amp;gt; From the comparison to MuSig, I imagine it is an interactive key&lt;br/&gt;generation protocol like this:&lt;br/&gt;&lt;br/&gt;&amp;gt; * Everybody generates fresh keypairs.&lt;br/&gt;&amp;gt; * Everybody sends the hash of their pubkey to everyone else.&lt;br/&gt;&amp;gt; * After receiving a hash of pubkey from everyone else, everybody sends&lt;br/&gt;their pubkey to everyone else.&lt;br/&gt;&amp;gt; * They add all their pubkeys to generate the aggregate key (and if using&lt;br/&gt;Taproot, use it as the internal key).&lt;br/&gt;&lt;br/&gt;&amp;gt; Is that correct?&lt;br/&gt;&lt;br/&gt;Yes exactly. The reason it&amp;#39;s called coin tossing is that the resulting key&lt;br/&gt;is guaranteed to be uniformly random (in the random oracle model at least),&lt;br/&gt;so it&amp;#39;s like tossing a fair 2^256 sided coin. This is not true in MuSig for&lt;br/&gt;example, where the aggregate key is not guaranteed to be from a uniform&lt;br/&gt;distribution against a malicious party (but still secure as an aggregate&lt;br/&gt;key).&lt;br/&gt;&lt;br/&gt;&amp;gt; However, it can generally be pointed out that, before you put anything&lt;br/&gt;into an n-of-n, you would damn well sure want to have *some* assurance that&lt;br/&gt;you can get it out later. So in general you would need coordination and&lt;br/&gt;interaction anyway to arrange getting into an n-of-n in the first place.&lt;br/&gt;&lt;br/&gt;Right. Taking your example of a lightning channel, when you set it up I&lt;br/&gt;don&amp;#39;t *think* there is a way to use the non-interactivity of MuSig to&lt;br/&gt;remove any rounds of communication to get to the starting state where there&lt;br/&gt;is a channel funding on-chain and both parties have a tx that spends from&lt;br/&gt;it which returns their funds. Doing coin tossing for the aggregate key as&lt;br/&gt;well as the aggregate nonce shouldn&amp;#39;t lead to any extra rounds of&lt;br/&gt;communication. The downside of coin tossing is that it requires honest&lt;br/&gt;parties to sample their keys non-deterministically (or at least have a&lt;br/&gt;counter to avoid using the same key twice).&lt;br/&gt;&lt;br/&gt;&amp;gt; On the other hand, it would be best to have at least some minimum of&lt;br/&gt;privacy by always interacting over Tor and having a Tor .onion address,&lt;br/&gt;which has absolutely horrid latency because human beings cry when peeling&lt;br/&gt;onions.&lt;br/&gt;&amp;gt; So in general reducing the latency by reducing communication rounds is&lt;br/&gt;better in general.&lt;br/&gt;&amp;gt; Counter to this, assuming you use an n-of-n in an offchain protocol of&lt;br/&gt;some sort, the number of communication rounds to generate the aggregate key&lt;br/&gt;may be dwarfed by the total number of communication rounds to create&lt;br/&gt;signatures to update the offchain protocol.&lt;br/&gt;&amp;gt; Counter counter to this is that one plan for reducing communications&lt;br/&gt;rounds for creating signatures during offchain operation is to (haha) use a&lt;br/&gt;Taproot with an n-of-n internal key and a tapscript that has n&lt;br/&gt;`OP_CHECKSIG` operations, so that for normal operation you just toss&lt;br/&gt;individual signatures at each other but at termination of the offchain&lt;br/&gt;protocol you can do the heavy MuSig-style signing with the n-of-n aggregate&lt;br/&gt;key.&lt;br/&gt;&lt;br/&gt;Counter³ to this is that, in the case of lightning, the aggregate key for a&lt;br/&gt;PTLC does not need to be chosen at payment time.  They channel members&lt;br/&gt;could simply use the &amp;#34;master&amp;#34; aggregate key they generated by coin tossing&lt;br/&gt;at the channel&amp;#39;s inception and pseudorandomly randomise it every time they&lt;br/&gt;need a new joint key (so the keys do not look related to everyone else on&lt;br/&gt;the chain but you would effectively just be reusing the same public key).&lt;br/&gt;&lt;br/&gt;Having said that if there is some advantage to using MuSig in some&lt;br/&gt;particular case I wouldn&amp;#39;t hesitate to use it in combination with Taproot.&lt;br/&gt;I don&amp;#39;t think the new assumption that I think you have to make wrt to the&lt;br/&gt;hash function really weighs up against most design considerations. In&lt;br/&gt;general, it is probably worth considering whether your protocol actually&lt;br/&gt;benefits from the non-interactivity MuSig gives in the key generation&lt;br/&gt;stage. If it doesn&amp;#39;t due to the fact that it doesn&amp;#39;t make signing anymore&lt;br/&gt;non-interactive, then coin tossing might be the answer.&lt;br/&gt;&lt;br/&gt;LL&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/20200305/fdfb6b5c/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200305/fdfb6b5c/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:23:17&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq3npunefp8lrx8cp2twqrpamwj3p5cd6pdys5e5q3qwv7g0l3zxqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9untycva</id>
    
      <title type="html">📅 Original date posted:2019-10-06 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq3npunefp8lrx8cp2twqrpamwj3p5cd6pdys5e5q3qwv7g0l3zxqzyz6l7lrsf7gwfm4l5s2vpgqh4pz5fse9s6sm6t7gd36v9y2dq0p9untycva" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp9qrdm804ng9su8pja3vr8r4u46jykk8ulz86zde8py0mtnwxsecmfcmnp&#39;&gt;nevent1q…cmnp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-06&lt;br/&gt;📝 Original message:Hi Thread,&lt;br/&gt;&lt;br/&gt;I made a reply to the OP but didn&amp;#39;t &amp;#34;reply all&amp;#34; so it just went directly to&lt;br/&gt;Ethan. Since the comments were interesting I&amp;#39;ll attempt to salvage them by&lt;br/&gt;posting them in full:&lt;br/&gt;&lt;br/&gt;== Lloyd&amp;#39;s post ==&lt;br/&gt;Hi Ethan,&lt;br/&gt;&lt;br/&gt;I&amp;#39;d be interested to know what protocols you need OP_CAT for. I&amp;#39;m trying to&lt;br/&gt;figure out if there really exists any script based protocol that doesn&amp;#39;t&lt;br/&gt;have a more efficient scriptless counterpart.  For example,&lt;br/&gt;A²L[1] achieves the same thing as Tumblebit but requires no script. I can&lt;br/&gt;imagine paying based on a merkle path could be useful, but a protocol was&lt;br/&gt;recently suggested on lightning-dev [2] that does this but without OP_CAT&lt;br/&gt;(and without any script!).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://eprint.iacr.org/2019/589.pdf&#34;&gt;https://eprint.iacr.org/2019/589.pdf&lt;/a&gt;&lt;br/&gt;[2]&lt;br/&gt;&lt;a href=&#34;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg01427.html&#34;&gt;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg01427.html&lt;/a&gt;&lt;br/&gt;(*I linked to the wrong thread in the original email*).&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;== Ethan&amp;#39;s response ==&lt;br/&gt;Hi Lloyd,&lt;br/&gt;&lt;br/&gt;Thanks for your response. I am not sure if you intended to take this off&lt;br/&gt;list or not.&lt;br/&gt;&lt;br/&gt;I plan to at some point to enumerate in detail protocols that OP_CAT would&lt;br/&gt;benefit. A more important point is that OP_CAT is a basic building block&lt;br/&gt;and that we don&amp;#39;t know what future protocols it would allow. In my own&lt;br/&gt;research I have avoiding going down certain paths because it isn&amp;#39;t worth&lt;br/&gt;the time to investigate knowing that OP_CAT wouldn&amp;#39;t make the protocol&lt;br/&gt;practical.&lt;br/&gt;&lt;br/&gt;In regards to scriptless scripts they almost always require an interactive&lt;br/&gt;protocol and sometimes ZKPs. A2L is very impressive but like TumbleBit it&lt;br/&gt;places a large burden on the developer. Additionally I am aware of no way&lt;br/&gt;to reveal a subset of preimages with scriptless scripts, do a conditioned&lt;br/&gt;reveal i.e. these preimages can only spend under these two pubkeys and&lt;br/&gt;timelockA where after timelockZ this other pubkey can spend without a&lt;br/&gt;preimages. Scriptless scripts are a fantastic tool but they shouldn&amp;#39;t be&lt;br/&gt;the only tool that we have.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure I follow what you are saying with [2]&lt;br/&gt;&lt;br/&gt;This brings me back a philosophical point:&lt;br/&gt;Bitcoin should give people basic tools to build protocols without first&lt;br/&gt;knowing what all those protocols are especially when those tools have very&lt;br/&gt;little downside.&lt;br/&gt;&lt;br/&gt;I really appreciate your comments.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Ethan&lt;br/&gt;==&lt;br/&gt;&lt;br/&gt;*Back to normal thread*&lt;br/&gt;&lt;br/&gt;Hi Ethan,&lt;br/&gt;&lt;br/&gt;Thanks for the insightful reply and sorry for my mailing list errors.&lt;br/&gt;&lt;br/&gt;&amp;gt; I plan to at some point to enumerate in detail protocols that OP_CAT&lt;br/&gt;would benefit.&lt;br/&gt;&lt;br/&gt;Sweet. Thanks.&lt;br/&gt;&lt;br/&gt;&amp;gt; Additionally I am aware of no way to reveal a subset of preimages with&lt;br/&gt;scriptless scripts, do a conditioned reveal i.e. these preimages can only&lt;br/&gt;spend under these two pubkeys and timelockA where after timelockZ this&lt;br/&gt;other pubkey can spend without a preimages. Scriptless scripts are a&lt;br/&gt;fantastic tool but they shouldn&amp;#39;t be the only tool that we have.&lt;br/&gt;&lt;br/&gt;Yes. With adaptor signatures there is no way to reveal more than one&lt;br/&gt;pre-image; you are limited to revealing a single scalar. But you can have&lt;br/&gt;multiple transactions spending from the same output, each with a different&lt;br/&gt;set of scriptless conditions (absolute time locks, relative time locks and&lt;br/&gt;pre-image reveal). This is enough to achieve what I think you are&lt;br/&gt;describing. FWIW there&amp;#39;s a growing consensus that you can do lightning&lt;br/&gt;without script [1]. Perhaps we can&amp;#39;t do everything with this technique. My&lt;br/&gt;current focus is figuring out what useful things we can&amp;#39;t do like this&lt;br/&gt;(even if we were to go wild and add whatever opcodes we wanted). So far it&lt;br/&gt;looks like covenants are the main exception.&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not sure I follow what you are saying with [2]&lt;br/&gt;&lt;br/&gt;That is perfectly understandable as I linked the wrong thread (sorry!).&lt;br/&gt;Here&amp;#39;s the right one:&lt;br/&gt;&lt;a href=&#34;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg01427.html&#34;&gt;https://www.mail-archive.com/lightning-dev@lists.linuxfoundation.org/msg01427.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I was pointing to the surprising result that you can actually pay for a&lt;br/&gt;merkle path with a particular merkle root leading to a particular leaf that&lt;br/&gt;you&amp;#39;re interested in without validating the merkle path on chain (e.g.&lt;br/&gt;OP_CAT and OP_SHA256). The catch is that the leaves have to be pedersen&lt;br/&gt;commitments and you prove the existence of your data in the merkle root by&lt;br/&gt;showing an opening to the leaf pedersen commitment. This may not be general&lt;br/&gt;enough to cover every merkle tree use case (but I&amp;#39;m not sure what those&lt;br/&gt;are!).&lt;br/&gt;&lt;br/&gt;&amp;gt; This brings me back a philosophical point:&lt;br/&gt;&amp;gt; Bitcoin should give people basic tools to build protocols without first&lt;br/&gt;knowing what all those protocols are especially when those tools have very&lt;br/&gt;little downside.&lt;br/&gt;&lt;br/&gt;This is a really powerful idea. But I&amp;#39;ve started feeling like you have to&lt;br/&gt;just design the layer 2 protocols first and then design layer 1! It seems&lt;br/&gt;like almost every protocol that people want to make requires very&lt;br/&gt;particular fundamental changes: SegWit for LN-penalty and NOINPUT for eltoo&lt;br/&gt;for example. On top of that it seems like just having the right signature&lt;br/&gt;scheme (schnorr) at layer 1 is enough to enable most useful stuff in an&lt;br/&gt;elegant way.&lt;br/&gt;&lt;br/&gt;[1]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-September/017309.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-September/017309.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;LL&lt;br/&gt;&lt;br/&gt;On Fri, Oct 4, 2019 at 1:08 AM Ethan Heilman &amp;lt;eth3rs at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; To avoid derailing the NO_INPUT conversation, I have changed the&lt;br/&gt;&amp;gt; subject to OP_CAT.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Responding to:&lt;br/&gt;&amp;gt; &amp;#34;&amp;#34;&amp;#34;&lt;br/&gt;&amp;gt; * `SIGHASH` flags attached to signatures are a misdesign, sadly&lt;br/&gt;&amp;gt; retained from the original BitCoin 0.1.0 Alpha for Windows design, on&lt;br/&gt;&amp;gt; par with:&lt;br/&gt;&amp;gt; [..]&lt;br/&gt;&amp;gt; * `OP_CAT` and `OP_MULT` and `OP_ADD` and friends&lt;br/&gt;&amp;gt; [..]&lt;br/&gt;&amp;gt; &amp;#34;&amp;#34;&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; OP_CAT is an extremely valuable op code. I understand why it was&lt;br/&gt;&amp;gt; removed as the situation at the time with scripts was dire. However&lt;br/&gt;&amp;gt; most of the protocols I&amp;#39;ve wanted to build on Bitcoin run into the&lt;br/&gt;&amp;gt; limitation that stack values can not be concatenated. For instance&lt;br/&gt;&amp;gt; TumbleBit would have far smaller transaction sizes if OP_CAT was&lt;br/&gt;&amp;gt; supported in Bitcoin. If it happens to me as a researcher it is&lt;br/&gt;&amp;gt; probably holding other people back as well. If I could wave a magic&lt;br/&gt;&amp;gt; wand and turn on one of the disabled op codes it would be OP_CAT.  Of&lt;br/&gt;&amp;gt; course with the change that size of each concatenated value must be 64&lt;br/&gt;&amp;gt; Bytes or less.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Tue, Oct 1, 2019 at 10:04 PM ZmnSCPxj via bitcoin-dev&lt;br/&gt;&amp;gt; &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; Good morning lists,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Let me propose the below radical idea:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * `SIGHASH` flags attached to signatures are a misdesign, sadly retained&lt;br/&gt;&amp;gt; from the original BitCoin 0.1.0 Alpha for Windows design, on par with:&lt;br/&gt;&amp;gt; &amp;gt;   * 1 RETURN&lt;br/&gt;&amp;gt; &amp;gt;   * higher-`nSequence` replacement&lt;br/&gt;&amp;gt; &amp;gt;   * DER-encoded pubkeys&lt;br/&gt;&amp;gt; &amp;gt;   * unrestricted `scriptPubKey`&lt;br/&gt;&amp;gt; &amp;gt;   * Payee-security-paid-by-payer (i.e. lack of P2SH)&lt;br/&gt;&amp;gt; &amp;gt;   * `OP_CAT` and `OP_MULT` and `OP_ADD` and friends&lt;br/&gt;&amp;gt; &amp;gt;   * transaction malleability&lt;br/&gt;&amp;gt; &amp;gt;   * probably many more&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; So let me propose the more radical excision, starting with SegWit v1:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * Remove `SIGHASH` from signatures.&lt;br/&gt;&amp;gt; &amp;gt; * Put `SIGHASH` on public keys.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Public keys are now encoded as either 33-bytes (implicit `SIGHASH_ALL`)&lt;br/&gt;&amp;gt; or 34-bytes (`SIGHASH` byte, followed by pubkey type, followed by pubkey&lt;br/&gt;&amp;gt; coordinate).&lt;br/&gt;&amp;gt; &amp;gt; `OP_CHECKSIG` and friends then look at the *public key* to determine&lt;br/&gt;&amp;gt; sighash algorithm rather than the signature.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As we expect public keys to be indirectly committed to on every output&lt;br/&gt;&amp;gt; `scriptPubKey`, this is automatically output tagging to allow particular&lt;br/&gt;&amp;gt; `SIGHASH`.&lt;br/&gt;&amp;gt; &amp;gt; However, we can then utilize the many many ways to hide public keys away&lt;br/&gt;&amp;gt; until they are needed, exemplified in MAST-inside-Taproot.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I propose also the addition of the opcode:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     &amp;lt;sighash&amp;gt; &amp;lt;pubkey&amp;gt; OP_SETPUBKEYSIGHASH&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * `sighash` must be one byte.&lt;br/&gt;&amp;gt; &amp;gt; * `pubkey` may be the special byte `0x1`, meaning &amp;#34;just use the Taproot&lt;br/&gt;&amp;gt; internal pubkey&amp;#34;.&lt;br/&gt;&amp;gt; &amp;gt; * `pubkey` may be 33-byte public key, in which case the `sighash` byte&lt;br/&gt;&amp;gt; is just prepended to it.&lt;br/&gt;&amp;gt; &amp;gt; * `pubkey` may be 34-byte public key with sighash, in which case the&lt;br/&gt;&amp;gt; first byte is replaced with `sighash` byte.&lt;br/&gt;&amp;gt; &amp;gt; * If `sighash` is `0x00` then the result is a 33-byte public key (the&lt;br/&gt;&amp;gt; sighash byte is removed) i.e. `SIGHASH_ALL` implicit.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This retains the old feature where the sighash is selected at&lt;br/&gt;&amp;gt; time-of-spending rather than time-of-payment.&lt;br/&gt;&amp;gt; &amp;gt; This is done by using the script:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     &amp;lt;pubkey&amp;gt; OP_SETPUBKEYSIGHASH OP_CHECKSIG&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Then the sighash can be put in the witness stack after the signature,&lt;br/&gt;&amp;gt; letting the `SIGHASH` flag be selected at time-of-signing, but only if the&lt;br/&gt;&amp;gt; SCRIPT specifically is formed to do so.&lt;br/&gt;&amp;gt; &amp;gt; This is malleability-safe as the signature still commits to the&lt;br/&gt;&amp;gt; `SIGHASH` it was created for.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; However, by default, public keys will not have an attached `SIGHASH`&lt;br/&gt;&amp;gt; byte, implying `SIGHASH_ALL` (and disallowing-by-default non-`SIGHASH_ALL`).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This removes the problems with `SIGHASH_NONE` `SIGHASH_SINGLE`, as they&lt;br/&gt;&amp;gt; are allowed only if the output specifically says they are allowed.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Would this not be a superior solution?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt; &amp;gt; ZmnSCPxj&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; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&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;&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/20191006/f0e27c02/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20191006/f0e27c02/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:20:58&#43;02:00</updated>
  </entry>

</feed>