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

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




  <entry>
    <id>https://nostr.ae/nevent1qqsffknh3y3tfk4ksg7mn0adc8rj268wvt02kswz85p87kx4m3pjplqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vjnpdgh</id>
    
      <title type="html">📅 Original date posted:2023-07-28 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsffknh3y3tfk4ksg7mn0adc8rj268wvt02kswz85p87kx4m3pjplqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vjnpdgh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxfkgnc4zlt5l8zmzalg368v066cepfjn9769smdfnj6pr5mvjeqqxg7u08&#39;&gt;nevent1q…7u08&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-07-28&lt;br/&gt;🗒️ Summary of this message: The email discusses a scheme for creating a multipath payment protocol using keysend, allowing the receiver to claim the payment once all parts have arrived.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Z,&lt;br/&gt;&lt;br/&gt;Or you can just use AMP and call it a day:&lt;br/&gt;&lt;a href=&#34;https://github.com/lightning/bolts/pull/658&#34;&gt;https://github.com/lightning/bolts/pull/658&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;On Fri, Jul 28, 2023 at 12:24 AM 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; I would like to share a simple scheme for creating a `keysend` protocol&lt;br/&gt;&amp;gt; that allows for multipath payments.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In `keysend`, the preimage is embedded as TLV 5482373484 with length 32.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the multipath case, we want the receiver to only be able to claim the&lt;br/&gt;&amp;gt; payment once all parts have arrived at the receiver.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For example, suppose we want to split the `keysend` into 2 parts.&lt;br/&gt;&amp;gt; Let us select a true preimage `p` at random.&lt;br/&gt;&amp;gt; Then, we generate the payment hash `h = SHA256(p)`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then, we generate a new 256-bit scalar, `a`.&lt;br/&gt;&amp;gt; For one part, we send `a` for TLV 5482373484, and for the second part, we&lt;br/&gt;&amp;gt; send `a ^ p`, where `^` is XOR.&lt;br/&gt;&amp;gt; All parts use the same payment hash `h`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The receiver, on receiving either part, will find that the supposed&lt;br/&gt;&amp;gt; preimage does not match the actual HTLC payment hashes.&lt;br/&gt;&amp;gt; Instead of failing, it holds the payment, using the usual basic multipath&lt;br/&gt;&amp;gt; payment rules.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When the receiver receives another part, it will XOR together the supposed&lt;br/&gt;&amp;gt; preimages.&lt;br/&gt;&amp;gt; In the above case, it would get `a` and `a ^ p`, which when XORed together&lt;br/&gt;&amp;gt; result in `a ^ a ^ p` or `p`, which is now the correct preimage, and the&lt;br/&gt;&amp;gt; receiver can now claim the entire complete funds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The same technique would work with any number of parts --- if we split&lt;br/&gt;&amp;gt; into `n` parts, we generate `n - 1` additional random scalars and use it&lt;br/&gt;&amp;gt; for the first `n - 1` parts, then XOR all of them with the&lt;br/&gt;&amp;gt; scalar-to-be-split for the `n`th part.&lt;br/&gt;&amp;gt; This scheme also works for dynamic splitting, i.e. if you are splitting a&lt;br/&gt;&amp;gt; part that was already split off from a part that was already split off from&lt;br/&gt;&amp;gt; a part etc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A sender can detect if the receiver does not support multipath `keysend`&lt;br/&gt;&amp;gt; if a part reaches the receiver and it errors with&lt;br/&gt;&amp;gt; `incorrect_or_unknown_payment_details`.&lt;br/&gt;&amp;gt; If the receiver is aware of multipath `keysend`, it would hold onto the&lt;br/&gt;&amp;gt; incoming HTLCs until MPP timeout, and instead error with `mpp_timeout`.&lt;br/&gt;&amp;gt; Thus, support for this on the receiver side does not need to be specially&lt;br/&gt;&amp;gt; announced via a new feature bit --- an MPP-capable sender can simply try to&lt;br/&gt;&amp;gt; split, and if it gets an `incorrect_or_unknown_payment_details`, knows that&lt;br/&gt;&amp;gt; the receiver does not support multipath `keysend`.&lt;br/&gt;&amp;gt; The same feature bit 55 can be reused.&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; 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/20230728/540be4b8/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230728/540be4b8/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-07-31T00:54:54&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9nksfl33hg4cx8vhjzp869rqneugvff9qp9qsncagd8ywec64kkgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vzj97uk</id>
    
      <title type="html">📅 Original date posted:2023-06-13 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9nksfl33hg4cx8vhjzp869rqneugvff9qp9qsncagd8ywec64kkgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vzj97uk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdnhh3r2h2vjwtqsg43ffhq7rdpy0sfkun7pnjyjfpymw43l2vwucrr2p2r&#39;&gt;nevent1q…2p2r&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-06-13&lt;br/&gt;🗒️ Summary of this message: An extension to BOLT-11 is proposed for invoices to contain two bundled payments with distinct preimages and amounts for non-custodial exchanges. This is useful for services that require prepayment of mining fees, such as submarine swaps and JIT channels. However, dedicated logic is still required for full verification of swap parameters and on-chain sweep/timeout, which is necessary for a trust-minimized swap.&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt;  Their website shows an invoice to the user, whose wallet that is agnostic&lt;br/&gt;&amp;gt;  about the swap, and it would be unpractical for them to show two invoices&lt;br/&gt;&amp;gt;  to be paid simultaneously&lt;br/&gt;&lt;br/&gt;In order to be properly non-custodial, a submarine swap client needs to be&lt;br/&gt;able to unilaterally sweep or timeout an on chain HTLC and also validate all&lt;br/&gt;the swap parameters.&lt;br/&gt;&lt;br/&gt;Assuming I understand this web based flow correctly, it still requires&lt;br/&gt;&amp;#34;dedicated logic&amp;#34; on the client side to sweep (reveal the preimage) or&lt;br/&gt;timeout the on chain HTLC.  If one wishes to avoid the awareness of the&lt;br/&gt;subswap itself, then a user would need to manually go to the website in&lt;br/&gt;order to obtain a signed sweep transaction (for a Loop Out like sub-swap, so&lt;br/&gt;off-chain to on-chain).  However, that would still require the wallet to&lt;br/&gt;sign&lt;br/&gt;the HTLC sweep path, once again requiring dedicated logic. A website could&lt;br/&gt;have an option to give a user a signed sweep or refund transaction, but that&lt;br/&gt;can&amp;#39;t be created until user goes on chain as something like no_input doesn&amp;#39;t&lt;br/&gt;exist today on mainnet. Even then, a website can let the user act first,&lt;br/&gt;then just never give them the necessary signed transaction.&lt;br/&gt;&lt;br/&gt;In other words: one always requires dedicated logic in order to fully verify&lt;br/&gt;the swap parameters and also perform an on-chain sweep/timeout, which is a&lt;br/&gt;requirement for a trust minified swap. A user can trust the service to just&lt;br/&gt;send to the given address or pay an invoice for them, but that&amp;#39;s not a trust&lt;br/&gt;minimized swap.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;On Tue, Jun 13, 2023 at 6:52 AM Thomas Voegtlin &amp;lt;thomasv at electrum.org&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I would like to propose an extension to BOLT-11, where an invoice can&lt;br/&gt;&amp;gt; contain two bundled payments, with distinct preimages and amounts.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The use case is for services that require the prepayment of a mining fee&lt;br/&gt;&amp;gt; in order for a non-custodian exchange to take place:&lt;br/&gt;&amp;gt;   - Submarine swaps&lt;br/&gt;&amp;gt;   - JIT channels&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In both cases, the service provider receives a HTLC for which they do not&lt;br/&gt;&amp;gt; have the preimage, have to send funds on-chain (to the channel or submarine&lt;br/&gt;&amp;gt; swap funding address), and wait for the client to reveal the preimage when&lt;br/&gt;&amp;gt; they claim the payment. Because there is no guarantee that the client will&lt;br/&gt;&amp;gt; actually claim the payment, the service providers need to ask prepayment of&lt;br/&gt;&amp;gt; mining fees.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the case of submarine swaps, services that use dedicated client&lt;br/&gt;&amp;gt; software, such as Loop by Lightning Labs, can ask for a prepayment, because&lt;br/&gt;&amp;gt; their software can handle it (this is called &amp;#34;no show penalty&amp;#34; on the Loop&lt;br/&gt;&amp;gt; website). However, competitors who do require a dedicated wallet, not such&lt;br/&gt;&amp;gt; as the Boltz exchange, cannot do that. Their website shows an invoice to&lt;br/&gt;&amp;gt; the user, whose wallet that is agnostic about the swap, and it would be&lt;br/&gt;&amp;gt; unpractical for them to show two invoices to be paid simultaneously. This&lt;br/&gt;&amp;gt; creates a situation where Boltz is vulnerable to DoS attacks, where the&lt;br/&gt;&amp;gt; attacker forces them to pay on-chain fees.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the case of JIT channels, providers who want to protect themselves&lt;br/&gt;&amp;gt; against this mining fee attack need to ask the preimage of the main payment&lt;br/&gt;&amp;gt; before they open the channel. I believe this is what Phoenix does (although&lt;br/&gt;&amp;gt; their pay-to-open service is not open-source, so I cannot really check).&lt;br/&gt;&amp;gt; The issue is that a service that asks for the preimage first becomes&lt;br/&gt;&amp;gt; custodian. From a legal perspective, it does not matter whether they open&lt;br/&gt;&amp;gt; the channel immediately after receiving the preimage, the ordering of&lt;br/&gt;&amp;gt; events makes their service custodian. In Europe, such a service will fall&lt;br/&gt;&amp;gt; within the European MICA regulation. Competitors who refuse to offer&lt;br/&gt;&amp;gt; custodian services, such as Electrum, are excluded from that game.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to solve that, it would be beneficial to bundle the prepayment&lt;br/&gt;&amp;gt; and the main payment in the same BOLT-11 invoice.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The semantics of bundled payments is as follows:&lt;br/&gt;&amp;gt;   - 1. the BOLT-11 invoice contains two preimages and two amounts:&lt;br/&gt;&amp;gt; prepayment and main payment.&lt;br/&gt;&amp;gt;   - 2. the receiver should wait until all the HTLCs of both payments have&lt;br/&gt;&amp;gt; arrived, before they fulfill the HTLCs of the pre-payment. If the main&lt;br/&gt;&amp;gt; payment does not arrive, they should fail the pre-payment with a MPP&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;   - 3. once the HTLCs of both payments have arrived, the receiver fulfills&lt;br/&gt;&amp;gt; the HTLCs of the prepayment, and they broadcast their on-chain transaction.&lt;br/&gt;&amp;gt; Note that the main payment can still fail if the sender never reveal the&lt;br/&gt;&amp;gt; preimage of the main payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, nothing in my proposal prevents the service provider from&lt;br/&gt;&amp;gt; stealing the pre-payment, but that is already the case today.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe this proposal would level the field in terms of competition&lt;br/&gt;&amp;gt; between lightning service providers. Currently, you need to use a dedicated&lt;br/&gt;&amp;gt; client in order to use Loop, and competitors who do not have an established&lt;br/&gt;&amp;gt; user base running a dedicated client are exposed to the mining fee attack.&lt;br/&gt;&amp;gt; I also believe that ACINQ would benefit from this, because it would make it&lt;br/&gt;&amp;gt; possible for them to make their pay-to-open service fully non-custodian. My&lt;br/&gt;&amp;gt; understanding is that in its current form, the &amp;#39;pay-to-open&amp;#39; service used&lt;br/&gt;&amp;gt; by Phoenix will fall into the scope of the European MICA regulation, which&lt;br/&gt;&amp;gt; they should consider as a serious issue.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Finally, I believe that such a change should be implemented in BOLT-11,&lt;br/&gt;&amp;gt; and not using BOLT-12 or onion messages. Indeed, my proposal does not&lt;br/&gt;&amp;gt; require the exchange of new messages. Some of the initial feedback I&lt;br/&gt;&amp;gt; received was that this is a use case for BOLT-12 or OM, but I think that&lt;br/&gt;&amp;gt; this is making things unnecessarily complicated. We should not add new&lt;br/&gt;&amp;gt; messages when things can be done in a non-interactive way.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; ThomasV&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/20230613/f69bf61e/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230613/f69bf61e/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-14T16:16:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszv8kac5hcu890w4mc2hydvj3mwfghckec3lj633qx5g3lrq0hkzgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v6p659c</id>
    
      <title type="html">📅 Original date posted:2023-01-04 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszv8kac5hcu890w4mc2hydvj3mwfghckec3lj633qx5g3lrq0hkzgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v6p659c" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstaxs59k7w4fnl5ndwdlq6pdndjg5zyc2ck6cdjhgr74x477k74cgy604vv&#39;&gt;nevent1q…04vv&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 proposal for a faster way to move funds from an on-chain address to the Lightning Network using regular swaps, which simplifies the process and reduces trust requirements.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Z,&lt;br/&gt;&lt;br/&gt;&amp;gt; * Submarine swap/peerswap: Requires confirmation before the swap service&lt;br/&gt;&amp;gt; will send out the HTLC on Lightning.&lt;br/&gt;&lt;br/&gt;I might be missing something, but I don&amp;#39;t see how this is different from a&lt;br/&gt;normal on-chain to off-chain swap (calling this Loop In for short in the&lt;br/&gt;remainder of the email).&lt;br/&gt;&lt;br/&gt;Given some static swap server params (server key, user key, preimage), a&lt;br/&gt;user can derive a tapscript tree and use that to make addresses that any 3rd&lt;br/&gt;party can send to. Services like Loop return a few addrs (including P2TR!)&lt;br/&gt;the client can use depending on their wallet sophistication [1] (in this&lt;br/&gt;case the command is: `loop in --amt=X --external\, external means a 3rd&lt;br/&gt;party will send to the addr). After a 3rd party sends to the script, the&lt;br/&gt;swap can be completed at anytime as soon as the client is online (assuming&lt;br/&gt;swap server is always there).&lt;br/&gt;&lt;br/&gt;In the scenario above, the newly created outputs to our swap addr need to be&lt;br/&gt;confirmed before the swap server will initiate the swap. As you mention,&lt;br/&gt;this could even be zero conf assuming all sides take w/e precautions they&amp;#39;re&lt;br/&gt;comfortable with. If the swap server goes away for w/e reason, a long&lt;br/&gt;timeout in the swap can let the user sweep the funds via some other&lt;br/&gt;means eventually. This doesn&amp;#39;t need to be a direct swap either, and it can&lt;br/&gt;flow multi-hop like any other swap.&lt;br/&gt;&lt;br/&gt;In your scheme you say that:&lt;br/&gt;&lt;br/&gt;&amp;gt; If so, then the &amp;#34;timer for confirmation&amp;#34; starts as soon as the wallet&lt;br/&gt;&amp;gt; receives on the blockchain, not as soon as the wallet decides to move&lt;br/&gt;&amp;gt; funds from blockchain to Lightning.&lt;br/&gt;&lt;br/&gt;Which seems to be the exact same as the flow I described above. For our&lt;br/&gt;newer musig2-enabled swaps, the top level keyspend can be spent by both&lt;br/&gt;parties, so you also emulate the ability for Alice to move the funds on&lt;br/&gt;chain anywhere else w/ the server&amp;#39;s cooperation.&lt;br/&gt;&lt;br/&gt;Using regular swaps also simplified the &amp;#34;Bob Security&amp;#34; section a lot, as Bob&lt;br/&gt;sends out an HTLC w/ the corresponding swap hash (he watches the chain for&lt;br/&gt;the scripts, then initiates the swap once they&amp;#39;re seen).&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://lightning.engineering/api-docs/api/loop/swap-client/loop-in&#34;&gt;https://lightning.engineering/api-docs/api/loop/swap-client/loop-in&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;On Tue, Jan 3, 2023 at 5:58 AM 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/20230103/5b5b2cad/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230103/5b5b2cad/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:12:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspxcgnt2zxar94z9hld4fvplynp47aufswqggnchnhmjdep2aqg2gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vdz9tu8</id>
    
      <title type="html">📅 Original date posted:2023-01-05 📝 Original message: Hi Z, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspxcgnt2zxar94z9hld4fvplynp47aufswqggnchnhmjdep2aqg2gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vdz9tu8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdjsyeyasxrw6xaktq8f0nsm75hxwffxuf772tqjlzeh3hkevh8gcupj4y7&#39;&gt;nevent1q…j4y7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Z,&lt;br/&gt;&lt;br/&gt;&amp;gt; Quick question: is the address given by the `loop in --external` command&lt;br/&gt;safe&lt;br/&gt;&amp;gt; for reuse?&lt;br/&gt;&lt;br/&gt;Thx for this question, I think this is the key difference I was looking for&lt;br/&gt;(not the aspect about confirmations, since that&amp;#39;s no different). Since that&lt;br/&gt;address contains a swap hash in the script, it&amp;#39;s not safe to reuse (just&lt;br/&gt;like a&lt;br/&gt;vanilla invoice on LN today: ppl will learn the pre-image).&lt;br/&gt;&lt;br/&gt;The potentiam swap is effectively a sort of deferred two stage swap. The&lt;br/&gt;Loop&lt;br/&gt;In swap I described earlier it complete after two transactions: initial&lt;br/&gt;swap tx&lt;br/&gt;confirmation, and the swap by the user. This swap can only be complete after&lt;br/&gt;three transactions: initial deferred &amp;#34;no-premium swaption&amp;#34; (Alice can swap,&lt;br/&gt;or&lt;br/&gt;just leave it for a while), swap transaction confirmation (Alice initiates&lt;br/&gt;w/&lt;br/&gt;the HTLC added), and final sweep.&lt;br/&gt;&lt;br/&gt;So this swap is less efficient from an on-chain perspective (2 vs 3 txns),&lt;br/&gt;but&lt;br/&gt;it gives Alice more optionality. Both variants however enable the final step&lt;br/&gt;(sweeping on chain) to be batched with other related or distinct swaps.&lt;br/&gt;&lt;br/&gt;I think one can make the Loop In swap addr pseudo-reusable by adding a&lt;br/&gt;&amp;#34;cancel&amp;#34;&lt;br/&gt;leaf in the rooted tapscript. It would slow down the process though, as&lt;br/&gt;you&amp;#39;d&lt;br/&gt;need another level of relative timeout for Alice to get the funds back. Ofc,&lt;br/&gt;all this is muuuch nicer w/ proper covenants ;).&lt;br/&gt;&lt;br/&gt;&amp;gt; The fact that `loop in` requires a specific `--amt=X` flag suggests to me&lt;br/&gt;&amp;gt; that the address generated is not safe for address reuse&lt;br/&gt;&lt;br/&gt;The amt field can in theory be left out of the flow, with the swap server&lt;br/&gt;just&lt;br/&gt;assuming w/e was sent to the address is the sending amt.&lt;br/&gt;&lt;br/&gt;&amp;gt; Swap-in-potentiam is safe for address reuse, because each UTXO for the&lt;br/&gt;same&lt;br/&gt;&amp;gt; address backs a new, separate swap (if Alice wanted it).  The advantage is&lt;br/&gt;&amp;gt; that:&lt;br/&gt;&lt;br/&gt;Indeed, if I were to re-write your initial post, I&amp;#39;d lead with this as (to&lt;br/&gt;myself at least) it makes the contribution of this scheme much clearer.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, Jan 4, 2023 at 7:11 AM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Good morning Laolu,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hi Z,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; * Submarine swap/peerswap: Requires confirmation before the swap&lt;br/&gt;&amp;gt; service&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; will send out the HTLC on Lightning.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I might be missing something, but I don&amp;#39;t see how this is different from&lt;br/&gt;&amp;gt; a&lt;br/&gt;&amp;gt; &amp;gt; normal on-chain to off-chain swap (calling this Loop In for short in the&lt;br/&gt;&amp;gt; &amp;gt; remainder of the email).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Given some static swap server params (server key, user key, preimage), a&lt;br/&gt;&amp;gt; &amp;gt; user can derive a tapscript tree and use that to make addresses that any&lt;br/&gt;&amp;gt; 3rd&lt;br/&gt;&amp;gt; &amp;gt; party can send to. Services like Loop return a few addrs (including&lt;br/&gt;&amp;gt; P2TR!)&lt;br/&gt;&amp;gt; &amp;gt; the client can use depending on their wallet sophistication [1] (in this&lt;br/&gt;&amp;gt; &amp;gt; case the command is: `loop in --amt=X --external\, external means a 3rd&lt;br/&gt;&amp;gt; &amp;gt; party will send to the addr). After a 3rd party sends to the script, the&lt;br/&gt;&amp;gt; &amp;gt; swap can be completed at anytime as soon as the client is online&lt;br/&gt;&amp;gt; (assuming&lt;br/&gt;&amp;gt; &amp;gt; swap server is always there).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In the scenario above, the newly created outputs to our swap addr need&lt;br/&gt;&amp;gt; to be&lt;br/&gt;&amp;gt; &amp;gt; confirmed before the swap server will initiate the swap. As you mention,&lt;br/&gt;&amp;gt; &amp;gt; this could even be zero conf assuming all sides take w/e precautions&lt;br/&gt;&amp;gt; they&amp;#39;re&lt;br/&gt;&amp;gt; &amp;gt; comfortable with. If the swap server goes away for w/e reason, a long&lt;br/&gt;&amp;gt; &amp;gt; timeout in the swap can let the user sweep the funds via some other&lt;br/&gt;&amp;gt; &amp;gt; means eventually. This doesn&amp;#39;t need to be a direct swap either, and it&lt;br/&gt;&amp;gt; can&lt;br/&gt;&amp;gt; &amp;gt; flow multi-hop like any other swap.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In your scheme you say that:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; If so, then the &amp;#34;timer for confirmation&amp;#34; starts as soon as the wallet&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; receives on the blockchain, not as soon as the wallet decides to move&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; funds from blockchain to Lightning.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Which seems to be the exact same as the flow I described above. For our&lt;br/&gt;&amp;gt; &amp;gt; newer musig2-enabled swaps, the top level keyspend can be spent by both&lt;br/&gt;&amp;gt; &amp;gt; parties, so you also emulate the ability for Alice to move the funds on&lt;br/&gt;&amp;gt; &amp;gt; chain anywhere else w/ the server&amp;#39;s cooperation.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Using regular swaps also simplified the &amp;#34;Bob Security&amp;#34; section a lot, as&lt;br/&gt;&amp;gt; Bob&lt;br/&gt;&amp;gt; &amp;gt; sends out an HTLC w/ the corresponding swap hash (he watches the chain&lt;br/&gt;&amp;gt; for&lt;br/&gt;&amp;gt; &amp;gt; the scripts, then initiates the swap once they&amp;#39;re seen).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [1]: &lt;a href=&#34;https://lightning.engineering/api-docs/api/loop/swap-client/loop-in&#34;&gt;https://lightning.engineering/api-docs/api/loop/swap-client/loop-in&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Quick question: is the address given by the `loop in --external` command&lt;br/&gt;&amp;gt; safe for reuse?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In many common onchain-only wallets **available today**, you can do&lt;br/&gt;&amp;gt; something like get a receive address and add it to your forum sig or on a&lt;br/&gt;&amp;gt; static webpage or forum post or whatever, and then anyone can send to it,&lt;br/&gt;&amp;gt; possibly multiple times with different amounts coming from different people.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The fact that `loop in` requires a specific `--amt=X` flag suggests to me&lt;br/&gt;&amp;gt; that the address generated is not safe for address reuse (in particular,&lt;br/&gt;&amp;gt; once *one* swap has completed, I am almost sure that any future funds to&lt;br/&gt;&amp;gt; the same address can be stolen by the swap server without handing it over&lt;br/&gt;&amp;gt; to the purported owner of the funds).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Swap-in-potentiam is safe for address reuse, because each UTXO for the&lt;br/&gt;&amp;gt; same address backs a new, separate swap (if Alice wanted it).&lt;br/&gt;&amp;gt; The advantage is that:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * You get stable addresses that are safe for reuse (which is already&lt;br/&gt;&amp;gt; possible today on non-Lightning wallets, so people already do this today).&lt;br/&gt;&amp;gt; * Those stable addresses can still be spent from quickly on the Lightning&lt;br/&gt;&amp;gt; Network as soon as they are reasonably confirmed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230104/75286083/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230104/75286083/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:07:49&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfcs5c6ydkq0ewkhdzzptqsee8f2pat879zhzfc5nyew3w8xc2kkgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vh8w4cj</id>
    
      <title type="html">📅 Original date posted:2022-11-04 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfcs5c6ydkq0ewkhdzzptqsee8f2pat879zhzfc5nyew3w8xc2kkgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vh8w4cj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsduf2v58ynhrp3rcgj43sgk6pg0gt6cr74528hzlmsznymlhp9nmszcxc0h&#39;&gt;nevent1q…xc0h&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-11-04&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Johan,&lt;br/&gt;&lt;br/&gt;I haven&amp;#39;t really been able to find a precise technical explanation of the&lt;br/&gt;&amp;#34;utxo teleport&amp;#34; scheme, but after thinking about your example use cases a&lt;br/&gt;bit, I don&amp;#39;t think the scheme is actually sound. Consider that the scheme&lt;br/&gt;attempts to target transmitting &amp;#34;ownership&amp;#34; to a UTXO. However, by the time&lt;br/&gt;that transaction hits the chain, the UTXO may no longer exist. At that&lt;br/&gt;point, what happens to the asset? Is it burned? Can you retry it again? Does&lt;br/&gt;it go back to the sender?&lt;br/&gt;&lt;br/&gt;As a concrete example, imagine I have a channel open, and give you an&lt;br/&gt;address to &amp;#34;teleport&amp;#34; some additional assets to it. You take that addr, then&lt;br/&gt;make a transaction to commit to the transfer. However, the block before you&lt;br/&gt;commit to the transfer, my channel closes for w/e reason. As a result, when&lt;br/&gt;the transaction committing to the UTXO (blinded or not), hits the chain, the&lt;br/&gt;UTXO no longer exists. Alternatively, imagine the things happen in the&lt;br/&gt;expected order, but then a re-org occurs, and my channel close is mined in a&lt;br/&gt;block before the transfer. Ultimately, as a normal Bitcoin transaction isn&amp;#39;t&lt;br/&gt;used as a serialization point, the scheme seems to lack a necessary total&lt;br/&gt;ordering to ensure safety.&lt;br/&gt;&lt;br/&gt;If we look at Taro&amp;#39;s state transition model in contrast, everything is fully&lt;br/&gt;bound to a single synchronization point: a normal Bitcoin transaction with&lt;br/&gt;inputs consumed and outputs created. All transfers, just like Bitcoin&lt;br/&gt;transactions, end up consuming assets from the set of inputs, and&lt;br/&gt;re-creating them with a different distribution with the set of outputs. As a&lt;br/&gt;result, Taro transfers inherit the same re-org safety traits as regular&lt;br/&gt;Bitcoin transactions. It also isn&amp;#39;t possible to send to something that won&amp;#39;t&lt;br/&gt;ultimately exist, as sends create new outputs just like Bitcoin&lt;br/&gt;transactions.&lt;br/&gt;&lt;br/&gt;Taro&amp;#39;s state transition model also means anything you can do today with&lt;br/&gt;Bitcoin/LN also apply. As an example, it would be possible for you to&lt;br/&gt;withdrawn from your exchange into a Loop In address (on chain to off chain&lt;br/&gt;swap), and have everything work as expected, with you topping off your&lt;br/&gt;channel. Stuff like splicing, and other interactive transaction construction&lt;br/&gt;schemes (atomic swaps, MIMO swaps, on chain auctions, etc) also just work.&lt;br/&gt;&lt;br/&gt;Ignoring the ordering issue I mentioned above, I don&amp;#39;t think this is a great&lt;br/&gt;model for anchoring assets in channels either. With Taro, when you make the&lt;br/&gt;channel, you know how many assets are committed since they&amp;#39;re all committed&lt;br/&gt;to in the funding output when the channel is created. However, let&amp;#39;s say we&lt;br/&gt;do teleporting instead: at which point would we recognize the new asset&lt;br/&gt;&amp;#34;deposits&amp;#34;? What if we close before a pending deposits confirms, how can one&lt;br/&gt;regain those funds? Once again you lose the serialization of events/actions&lt;br/&gt;the blockchain provides. I think you&amp;#39;d also run into similar issues when you&lt;br/&gt;start to think about how these would even be advertised on a hypothetical&lt;br/&gt;gossip network.&lt;br/&gt;&lt;br/&gt;I think one other drawback of the teleport model iiuc is that: it either&lt;br/&gt;requires an OP_RETURN, or additional out of band synchronization to complete&lt;br/&gt;the transfer. Since it needs to commit to w/e hash description of the&lt;br/&gt;teleport, it either needs to use an OP_RETURN (so the receiver can see the&lt;br/&gt;on chain action), or the sender needs to contact the receiver to initiate&lt;br/&gt;the resolution of the transfer (details committed to in a change addr or&lt;br/&gt;w/e).&lt;br/&gt;&lt;br/&gt;With Taro, sending to an address creates an on-chain taproot output just&lt;br/&gt;like sending to a P2TR address. The creation of the output directly creates&lt;br/&gt;the new asset anchor/output as well, which allows the receiver to look for&lt;br/&gt;that address on chain just like a normal on chain transaction. To 3rd party&lt;br/&gt;observers, it just looks like a normal P2TR transfer. In order to finalize&lt;br/&gt;the receipt of the asset, the receiver needs to obtain the relevant&lt;br/&gt;provenance proofs, which can be obtained from a multi-verse gRPC/HTTP&lt;br/&gt;service keyed by the input outpoint and output index. In short, the send&lt;br/&gt;process is fully async, with the sender and receiver using the blockchain&lt;br/&gt;itself as a synchronization point like a normal Bitcoin wallet.&lt;br/&gt;&lt;br/&gt;-- Laolu&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/20221104/354c256b/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20221104/354c256b/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:07:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvzdzhqh60mg0vmtsqqlcltc232nwzzrymae8sqsvjgdx9apggeegzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vyurzwk</id>
    
      <title type="html">📅 Original date posted:2022-09-01 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvzdzhqh60mg0vmtsqqlcltc232nwzzrymae8sqsvjgdx9apggeegzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vyurzwk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfk6hsvsvwv8mt5c54fl2qv2q2tz03qhdgk2quavmshgqlqehwjuskxhgxf&#39;&gt;nevent1q…hgxf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Alex,&lt;br/&gt;&lt;br/&gt;This is a super cool project! I&amp;#39;ve shared some thoughts here in a comment on&lt;br/&gt;the draft PR:&lt;br/&gt;PR:&lt;br/&gt;&lt;a href=&#34;https://github.com/lightningnetwork/lnd/pull/6843#issuecomment-1234933319&#34;&gt;https://github.com/lightningnetwork/lnd/pull/6843#issuecomment-1234933319&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Also I cc&amp;#39;d the lnd mailing list on this reply, perhaps we can move the&lt;br/&gt;discussion over there (or in the issue) since this is more of an lnd&lt;br/&gt;specific thing. In the future, the lnd mailing list is also probably a&lt;br/&gt;better place for lnd architecture specific proposals/discussions.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Sep 1, 2022 at 10:56 AM Alex Akselrod 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; At NYDIG, we&amp;#39;re considering ways to harden large LND deployments. Joost&lt;br/&gt;&amp;gt; and I discussed that currently, when external untrusted peers make inbound&lt;br/&gt;&amp;gt; connections, LND must verify the identity of the peer during the noise&lt;br/&gt;&amp;gt; handshake, and it must do this before enforcing any potential key-based&lt;br/&gt;&amp;gt; allow lists. This is done in the same process as the node&amp;#39;s other critical&lt;br/&gt;&amp;gt; tasks, such as monitoring the chain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To reduce the attack area of the main node process, we&amp;#39;d like to propose a&lt;br/&gt;&amp;gt; means to optionally separate the peer communication into a separate&lt;br/&gt;&amp;gt; process: something like CLN&amp;#39;s connectd, running separately, and the&lt;br/&gt;&amp;gt; connections would be multiplexed over a single network connection initiated&lt;br/&gt;&amp;gt; from the node to the proxy. The core of our current idea is demonstrated in&lt;br/&gt;&amp;gt; a draft PR: &lt;a href=&#34;https://github.com/lightningnetwork/lnd/pull/6843&#34;&gt;https://github.com/lightningnetwork/lnd/pull/6843&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;d love some early feedback on the general direction of this. If this&lt;br/&gt;&amp;gt; would be interesting, I&amp;#39;ll build it out into a fully working feature.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alex Akselrod&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/20220901/a7c7cf81/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220901/a7c7cf81/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:06:45&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstltk6aq7jaum2rgrzxk4pdule92sl6jewvzsev95agf98lj4nt5gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vfdvyv0</id>
    
      <title type="html">📅 Original date posted:2022-06-07 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstltk6aq7jaum2rgrzxk4pdule92sl6jewvzsev95agf98lj4nt5gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vfdvyv0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdc58tkj3nawmg2kwms0cljzdfmexlwmy9zugdac95nt5t9t2lv8cqvwqt5&#39;&gt;nevent1q…wqt5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-06-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi y&amp;#39;all,&lt;br/&gt;&lt;br/&gt;Last week nearly 30 (!) Lightning developers and researchers gathered in&lt;br/&gt;Oakland, California for three day to discuss a number of matters related to&lt;br/&gt;the current state and evolution of the protocol.  This time around, we had&lt;br/&gt;much better representation for all the major Lightning Node implementations&lt;br/&gt;compared to the last LN Dev Summit (Zurich, Oct 2021).&lt;br/&gt;&lt;br/&gt;Similar to the prior LN Dev Summit, notes were kept throughout the day that&lt;br/&gt;attempted on a best effort basis to capture the relevant discussions,&lt;br/&gt;decisions, and new relevant research or follow up areas to circle back on.&lt;br/&gt;Last time around, I sent out an email that summarized some key takeaways&lt;br/&gt;(from my PoV) of the last multi-day dev summit [1]. What follows in this&lt;br/&gt;email is a similar summary/recap of the three day summit. Just like last&lt;br/&gt;time: if you attended and felt I missed out on a key point, or inadvertently&lt;br/&gt;misrepresented a statement/idea, please feel free to reply, correcting or&lt;br/&gt;adding additional detail.&lt;br/&gt;&lt;br/&gt;The meeting notes in full can be found here:&lt;br/&gt;&lt;a href=&#34;https://docs.google.com/document/d/1KHocBjlvg-XOFH5oG_HwWdvNBIvQgxwAok3ZQ6bnCW0/edit?usp=sharing&#34;&gt;https://docs.google.com/document/d/1KHocBjlvg-XOFH5oG_HwWdvNBIvQgxwAok3ZQ6bnCW0/edit?usp=sharing&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;# Simple Taproot Channels&lt;br/&gt;&lt;br/&gt;During the last summit, Taproot was a major discussion topic as though the&lt;br/&gt;soft fork had been deployed, we we&amp;#39;re all still watching the 🟩 &amp;#39;s stack up&lt;br/&gt;on the road to ultimately activation. Fast forward several months later and&lt;br/&gt;Taproot has now been fully activated, with ecosystem starting to&lt;br/&gt;progressively deploy more and more advanced systems/applications that take&lt;br/&gt;advantage of the new features.&lt;br/&gt;&lt;br/&gt;One key deployment model that came out of the last LN Dev summit was the&lt;br/&gt;concept of an iterative roadmap that progressively revamped the system to&lt;br/&gt;use more taprooty features, instead of a &amp;#34;big bang&amp;#34; approach that would&lt;br/&gt;attempt to package up as many things as possible into one larger update. At&lt;br/&gt;a high level the iterative roadmap proposed that we unroll an existing&lt;br/&gt;larger proposal [2] into more bite sized pieces that can be incrementally&lt;br/&gt;reviewed, implemented, and ultimately deployed (see my post on the LN Dev&lt;br/&gt;Summit 2021 for more details).&lt;br/&gt;&lt;br/&gt;## Extension BOLTs&lt;br/&gt;&lt;br/&gt;Riiight before we started on the first day, I wrote up a minimal proposal&lt;br/&gt;that attempted to tackle the first two items of the Taproot iterative&lt;br/&gt;deployment schedule (musig2 funding outputs and simple tapscript mapping)&lt;br/&gt;[3]. I called the proposal &amp;#34;Simple Taproot Channels&amp;#34; as it set out to do a&lt;br/&gt;mechanical mapping of the current commitment and script structure to a more&lt;br/&gt;taprooty domain. Rather than edit 4 or 5 different BOLTs with a series of&lt;br/&gt;&amp;#34;if this feature bit applies&amp;#34; nested clauses, I instead opted to create a&lt;br/&gt;new standalone &amp;#34;extension bolt&amp;#34; that defines _new_ behavior on top of the&lt;br/&gt;existing BOLTs, referring to the BOLTs when necessary. The style of the&lt;br/&gt;document was inspired by the &amp;#34;proposals&amp;#34; proposal (very meta), which was&lt;br/&gt;popularized by cdecker and adopted by t-bast with his documents on&lt;br/&gt;Trampoline and Blinded Paths.&lt;br/&gt;&lt;br/&gt;If the concept catches on, extension BOLTs provide us with a new way to&lt;br/&gt;extend the spec: rather than insert everything in-line, we could instead&lt;br/&gt;create new standalone documents for larger features. Having a single self&lt;br/&gt;contained document makes the proposal easier to review, and also gives the&lt;br/&gt;author more room to provide any background knowledge, primaries, and also&lt;br/&gt;rationale. Overtime, as the new extensions become widespread (eg: taproot is&lt;br/&gt;the default channel type), we can fold in the extensions back to the main&lt;br/&gt;set of &amp;#34;core&amp;#34; BOLTs (or make new ones as relevant).&lt;br/&gt;&lt;br/&gt;Smaller changes to the spec like deprecating an old field or tightening up&lt;br/&gt;some language will likely still follow the old approach of mutating the&lt;br/&gt;existing BOLTs, but larger overhauls like the planned PTLC update may find&lt;br/&gt;the extension BOLTs to be a better tool.&lt;br/&gt;&lt;br/&gt;## Tapscript, Musig2, and Lightning&lt;br/&gt;&lt;br/&gt;As mentioned above the Simple Taproot Channels proposal does two main&lt;br/&gt;things:&lt;br/&gt;  1. Move the existing 2-of-2 p2wsh segwit v0 funding output to a _single&lt;br/&gt;  key_ p2tr output, with the single key actually being an aggregated musig2&lt;br/&gt;  key.&lt;br/&gt;&lt;br/&gt;  2. Map all our existing scripts to the tapscript domain, using the&lt;br/&gt;  internal key (keyspend path) for things like revocations, which an&lt;br/&gt;  potentially allow nodes to store less state for HTLCs.&lt;br/&gt;&lt;br/&gt;Of the two components #1 is by far the trickiest. Musig2 is a very elegant&lt;br/&gt;protocol (not to mention the spec which y&amp;#39;all should totally check out) but&lt;br/&gt;as the signatures aren&amp;#39;t deterministic (like RFC 6979 [5]), both signers&lt;br/&gt;need to &amp;#34;protect themselves at all times&amp;#34; to ensure they don&amp;#39;t ever re-use&lt;br/&gt;nonces, which can lead to a private key leak (!!).&lt;br/&gt;&lt;br/&gt;Rather than try to create some sort of psuedo-deterministic nonces scheme&lt;br/&gt;(which maaybe works until the Blockstream Research team squints vaguely in&lt;br/&gt;its direction), I opted to just make all nonces 100% ephemeral and tied to&lt;br/&gt;the lifetime of a connection. Musig2 defines something called a public&lt;br/&gt;nonces, which is actually two individual 33-byte nonces. This value needs to&lt;br/&gt;be exchanged before signing can begin (but can be sent before sides know&lt;br/&gt;they&amp;#39;re aggregated keys). One important thing to note is that given that the&lt;br/&gt;channels today have _asymmetric_ state, we actually need a _pair_ of public&lt;br/&gt;nonces: one that I&amp;#39;ll use to sign my commitment, and one I&amp;#39;ll use to sign&lt;br/&gt;yours. Lightning channels w/ symmetric state like eltoo can get by w/ only&lt;br/&gt;exchange a single set of nonces, as there&amp;#39;s only one message per state.&lt;br/&gt;&lt;br/&gt;Nonce exchange takes place in a few places:&lt;br/&gt;&lt;br/&gt;  * During initial funding: I send my public nonce in the open_channel&lt;br/&gt;    message, you send yours in the accept_channel message. After this&lt;br/&gt;    exchange we can both generate signatures for the refund commitment&lt;br/&gt;    transactions.&lt;br/&gt;&lt;br/&gt;  * After the channel is &amp;#34;ready&amp;#34; we send another set of nonces, so we can&lt;br/&gt;    sign the next state. This is similar to the existing revocation key&lt;br/&gt;    exchange: I need your next nonce/key before I can sign a new state.&lt;br/&gt;&lt;br/&gt;  * Upon channel re-establishment a _new_ set of nonces is sent, as they&amp;#39;re&lt;br/&gt;    100% ephemeral. The current draft also requires that if you were&lt;br/&gt;    re-transmitting a sig, then you use the _new_ nonces to sign again, as&lt;br/&gt;    it&amp;#39;s possible you went to retransmit but left off an expired/trimmed&lt;br/&gt;    HLTC (could lead to nonce re-use and also needing to remember nonces).&lt;br/&gt;&lt;br/&gt;  * Each time I revoke my channel, I send to you a single nonce, my &amp;#34;local&lt;br/&gt;    nonce&amp;#34; (naming needs some work here), which lets you sign for a new&lt;br/&gt;    state.&lt;br/&gt;&lt;br/&gt;  * Each time I send a new sig, I also send you another nonce, my &amp;#34;remote&amp;#34;&lt;br/&gt;    nonce&amp;#34;, which&lt;br/&gt;&lt;br/&gt;  * When I send a shutdown (co-op close) I send a single public nonce so we&lt;br/&gt;    can sign the next co-opc close offer.&lt;br/&gt;&lt;br/&gt;  * When I send a closing_signed I send another nonce so once you send your&lt;br/&gt;    offer, we sign another set.&lt;br/&gt;&lt;br/&gt;The final flows aren&amp;#39;t 100% yet finalized, as we&amp;#39;ll need some&lt;br/&gt;implementations drafted to make sure the nonce handling and script mapping&lt;br/&gt;works out properly.&lt;br/&gt;&lt;br/&gt;### Lightning Channels &amp;amp; Recursive Musig2&lt;br/&gt;&lt;br/&gt;One other cool topic that came up is the concept of leveraging recursive&lt;br/&gt;musig2 (so musig2 within musig2) to make channels even _more_ multi-sigy.&lt;br/&gt;The benefit here is that Bob &amp;amp; Carol can each have their individual keys&lt;br/&gt;(which might actually be aggregated keys themselves) and make a channel w/&lt;br/&gt;Alice, who only knows of them as Barol, and doesn&amp;#39;t know there&amp;#39;re actually&lt;br/&gt;another pair of keys at play. This is _really_ cool as it allows node&lt;br/&gt;operators, wallets, and lightning platforms to experiment with various&lt;br/&gt;key/signing trees that may add more security, redundancy, or flexibility.&lt;br/&gt;&lt;br/&gt;When this first came up, someone brought up the fact that while the scheme&lt;br/&gt;is &amp;#34;known&amp;#34; the initial paper as they weren&amp;#39;t sure how to actually write a&lt;br/&gt;proof for it. During the session, someone emailed one of the musig2 authors&lt;br/&gt;asking for more details, and if it&amp;#39;s safe to implement and roll out.&lt;br/&gt;Thankfully they quickly replied and explained that the proof recursive musig&lt;br/&gt;(pls someone correct me again here if I&amp;#39;m wrong) wasn&amp;#39;t left out due to&lt;br/&gt;impossibility, but that a proof in the existing Random Oracle Model (which&lt;br/&gt;was used to derive a bound for the number of nonces needed) would lead to a&lt;br/&gt;blow up in the number of nonces required. Attempting to write the proof in&lt;br/&gt;some other model would likely lead to better results (proved w/ two nonces&lt;br/&gt;as base musig2), but would end up being pretty complicated, so hard to read&lt;br/&gt;and even review for correctness.&lt;br/&gt;&lt;br/&gt;Assuming everything checks out, then a useful mental model explained by the&lt;br/&gt;musig2 BIP author is a sort of tree structure. Assuming I&amp;#39;m a signer, and we&lt;br/&gt;assemble the other signer as a sibling leaf in a binary tree, then I just&lt;br/&gt;need to wait for the sibling nonce/key, before I can aggregate that into&lt;br/&gt;the final value. So if there&amp;#39;re 3 signers, I wait for the regular public&lt;br/&gt;nonce, but the other signers sum their respective nonces into a single&lt;br/&gt;nonce, then send that to me. A similar operation is carried out for key&lt;br/&gt;aggregation, with the rest of the protocol being mostly the same.&lt;br/&gt;&lt;br/&gt;Ultimately, even if wallets/nodes aren&amp;#39;t ready to roll something like this&lt;br/&gt;out today, we at least want to make sure the proposed flow is compatible&lt;br/&gt;with Simple Taproot Channels, and ideally we&amp;#39;d have a toy implementation to&lt;br/&gt;verify out understanding and show it&amp;#39;s possible/sound. I volunteered to hack&lt;br/&gt;up a simple recursive musig2 demo, as there doesn&amp;#39;t seem to be any code in&lt;br/&gt;the wild that implements it.&lt;br/&gt;&lt;br/&gt;## Lightning Gossip&lt;br/&gt;&lt;br/&gt;# Gossip V2: Now Or Later?&lt;br/&gt;&lt;br/&gt;Another big topic related to Taproot was the question of how we should&lt;br/&gt;update the gossip network: the gossip protocol today has all channels&lt;br/&gt;validated by node, which requires that the nodes understand how to&lt;br/&gt;reconstruct the funding output based on the set of advertised keys. The&lt;br/&gt;protocol today assumes a segwit v0 p2wsh multi-sig is used. Assuming we had&lt;br/&gt;everything implemented today, a node wouldn&amp;#39;t be able to advertise its new&lt;br/&gt;taproot channels to the rest of the public graph as they wouldn&amp;#39;t understand&lt;br/&gt;how to validate it.&lt;br/&gt;&lt;br/&gt;This presents a new opportunity: we already need to rework gossip for&lt;br/&gt;taproot, so should we go ahead and re-design the entire thing with an eye&lt;br/&gt;for better privacy and future extensibility?&lt;br/&gt;&lt;br/&gt;A proposal for the &amp;#34;re-design the entire thing&amp;#34; was floated in the past by&lt;br/&gt;Rusty [6]. It does away with the strict coupling of channels to channel&lt;br/&gt;announcements, and instead moves them to the _node_ level. Each node would&lt;br/&gt;then advertise the set of &amp;#34;outputs&amp;#34; they have control of, which would then&lt;br/&gt;be mapped to the total capacity of a node, without requiring that these&lt;br/&gt;outputs self identify themselves on-chain as Lightning Channels. This also&lt;br/&gt;opens up the door to different, potentially more privacy preserving&lt;br/&gt;proofs-of-channel-ownership (something something zkp).&lt;br/&gt;&lt;br/&gt;On the other hand, we could just follow the path of Simple Taproot Channels&lt;br/&gt;and map musig2&#43;schnorr onto the existing gossip network. This is less&lt;br/&gt;changes in total, with the main benefit being the ability to only send 1 sig&lt;br/&gt;(aggregated musig2 sig of keys) instead of 4 individual sigs. I made a very&lt;br/&gt;lofty proposal in this direction here [7].&lt;br/&gt;&lt;br/&gt;Ultimately we decided to take the &amp;#34;just musig2 aspects&amp;#34; from gossip v1.5&lt;br/&gt;(not the real name), and the &amp;#34;let&amp;#39;s refresh all the messages w/ TLV&lt;br/&gt;goodness&amp;#34; from the gossip v2 proposal. This gives us a smaller package to&lt;br/&gt;implement, and lets us potentially rejigger the messages to be more&lt;br/&gt;extensible and remove cruft like the node color that almost nothing uses,&lt;br/&gt;but we all validate/store.&lt;br/&gt;&lt;br/&gt;The follow up work in this area is a more concrete proposal that updates the&lt;br/&gt;relevant gossip messages to be taproot aware and TLV&amp;#39;d and also update the&lt;br/&gt;set of requirements w.r.t _how_ to validate the channels in the first place&lt;br/&gt;(so given two keys verify that applying the keyagg method of musig2 lead to&lt;br/&gt;what&amp;#39; in the funding output).&lt;br/&gt;&lt;br/&gt;Gossip v2 will likely happen &amp;#34;eventually&amp;#34;, but the rather large design space&lt;br/&gt;needs to be explored a bit more so we can properly analyze exactly what&lt;br/&gt;privacy and extensibility properties we&amp;#39;ll get out of it.&lt;br/&gt;&lt;br/&gt;# Applying Mini Sketch to LN Gossip&lt;br/&gt;&lt;br/&gt;One issue we have today, is that other than the initial scid query mechanism&lt;br/&gt;added to the protocol, there isn&amp;#39;t a great way to ensure you have all the&lt;br/&gt;latest updates your peer has. These days, many nodes pretty aggressively&lt;br/&gt;rate limit other nodes, so you might even have trouble sending out your&lt;br/&gt;update in the first place. A recent paper (that I haven&amp;#39;t actually fully&lt;br/&gt;read yet) [8] analyzes the gossip network today to work out things like:&lt;br/&gt;exactly how long it takes things to propagate, total bandwidth usage, etc.&lt;br/&gt;&lt;br/&gt;Minisketch [9] (the grandchild of IBLTs ;)), is an efficient set&lt;br/&gt;reconciliation protocol that was designed for Bitcoin p2p mempool syncing,&lt;br/&gt;but can be applied to other protocols. An attendee has been working on&lt;br/&gt;brushing off some older work to try to see how we could apply it to the LN&lt;br/&gt;protocol to give nodes a more bandwidth efficient way to sync channel&lt;br/&gt;updates, and also achieve better update propagation. This supplements some&lt;br/&gt;existing investigative work done by Alex Meyers [10], with more concrete&lt;br/&gt;designs w.r.t: what goes into the sketch, and the various size parameters&lt;br/&gt;that need to be chosen.&lt;br/&gt;&lt;br/&gt;# Channel Jamming&lt;br/&gt;&lt;br/&gt;An attendee gave a talk on the various proposed solutions to channel&lt;br/&gt;jamming, evaluating them on several axis including: punishment/monetary,&lt;br/&gt;local vs global reputation, feasibility of mechanism design, UX&lt;br/&gt;implications, and implementation complexity. The presenter didn&amp;#39;t present a&lt;br/&gt;new concrete proposal, but instead went through the various trade-offs,&lt;br/&gt;ultimately concluding that they factor monetary penalties wherein the funds&lt;br/&gt;are distributed across the route, rather than being provably burnt to&lt;br/&gt;miners. However they alluded to some future upcoming work that attempts a&lt;br/&gt;more rigorous analysis of the proposed solutions, their tradeoffs, and&lt;br/&gt;potential ways we can parametrize solutions to be more effective (how much&lt;br/&gt;should they pay, etc).&lt;br/&gt;&lt;br/&gt;For those looking to brush up on the latest state of research/mitigations in&lt;br/&gt;this area, I recommend this blog post by Bitmex research [11].&lt;br/&gt;&lt;br/&gt;# Onion Messages &amp;amp; DoS&lt;br/&gt;&lt;br/&gt;The topic of DoS concerns related to onion messages (in isolation, so not&lt;br/&gt;necessarily related to things like bolt12 that take advantage of them came&lt;br/&gt;up.  During a white boarding session some argued that DoS isn&amp;#39;t actually&lt;br/&gt;much of an issue, as nodes can leverage &amp;#34;back propagation congestion&lt;br/&gt;control&amp;#34; to inform the source (who may not actually be the sender) that&lt;br/&gt;they&amp;#39;ll start to drop or limit their packets, with each node doing this&lt;br/&gt;iteratively until the actual source of the spam has been clamped. A few&lt;br/&gt;lofty designs were thrown around, but more work needs to be done to&lt;br/&gt;concretely specify something so it can be properly analyzed.&lt;br/&gt;&lt;br/&gt;On the other side of the spectrum, rather than attempt to rate limit at the&lt;br/&gt;node level (which each node having their own policy), nodes could opt&lt;br/&gt;instead to forward _anything_ as long as the sender pays them enough. I&lt;br/&gt;proposed a lofty approach that combined AMP and Onion Messages earlier this&lt;br/&gt;year [12]. At a high level I make an AMP payment, which pushes extra coins&lt;br/&gt;to all nodes on a route, and also drops off a special identifier to them.&lt;br/&gt;When I send an onion message I include this identifier, with each node&lt;br/&gt;performing their own account w.r.t the amount of bandwidth an ID has&lt;br/&gt;remaining.&lt;br/&gt;&lt;br/&gt;Ultimately a few implementations are pretty close to deploying their&lt;br/&gt;implementation of onion messages, so no matter the intended use case, it&lt;br/&gt;would be good to have code deployed along side to either rate limit or price&lt;br/&gt;resource consumption accordingly. Otherwise, we might end up in a scenario&lt;br/&gt;where DoS concerns were brushed aside, but end up being a huge issue later.&lt;br/&gt;&lt;br/&gt;# Blinded Paths, QR Codes &amp;amp; Invoices&lt;br/&gt;&lt;br/&gt;Blinded paths [13] is a new-er proposal to solve the &amp;#34;last mile&amp;#34; privacy&lt;br/&gt;issue when receiving payments on LN. Today invoices to unadvertised channels&lt;br/&gt;contain a set of hop hints, which are anchored at public nodes in the graph,&lt;br/&gt;and also leak the scid of the unadvertised channel (points on-chain to the&lt;br/&gt;channel receiving payments). A solution for the on-chain leak, SCID channel&lt;br/&gt;aliases [15] are in the process of being widely rolled out. Channel aliases&lt;br/&gt;instead use a random value in the invoice, allowing receiving nodes to break&lt;br/&gt;that on-chain link and even rotate out the value periodically. With the&lt;br/&gt;on-chain leak addressed, it&amp;#39;s still the case that you give away your&lt;br/&gt;&amp;#34;position&amp;#34; in the network, since as a sender I know that you&amp;#39;re connected to&lt;br/&gt;node N with a private channel.&lt;br/&gt;&lt;br/&gt;Blinded paths address this node-level last mile privacy leak by replacing&lt;br/&gt;hop hints with a new cryptographically blinded path. At a high level, the&lt;br/&gt;receiver can construct a &amp;#34;hop hint&amp;#34; of length greater than 1, gather the&lt;br/&gt;public keys of each of the nodes, then blinded them such that: the sender&lt;br/&gt;can use them for path finding, but doesn&amp;#39;t actually now exactly _which_&lt;br/&gt;nodes they actually are.&lt;br/&gt;&lt;br/&gt;There&amp;#39;re two type of blinded paths: those in onion messages and those used&lt;br/&gt;for actual payments. The latter variant was only formalized earlier this&lt;br/&gt;year, as before people were mainly interested in using them to fetch BOLT 12&lt;br/&gt;invoice via onion messages. One issue that pops up when attempting to use&lt;br/&gt;blinded paths for normal payments is: the size of the resulting invoice. As&lt;br/&gt;blinded paths are actually fragments of publicly known paths, as a receiver,&lt;br/&gt;you want to stuff as many of them into the invoice as possible, since they&lt;br/&gt;MUST be taken in order to route towards you. Invoices are typically&lt;br/&gt;communicated via QR codes, which have a hard limit w.r.t the amount of&lt;br/&gt;information that can be packed in. On the other hand for invoice fetching,&lt;br/&gt;all that matters is that a path exists, so you can get by with stuffing less&lt;br/&gt;of then in a QR code.&lt;br/&gt;&lt;br/&gt;As a result, blinded paths aren&amp;#39;t necessarily compatible with the widely&lt;br/&gt;deployed BOLT 11 based QR codes. Instead a way to fetch invoice on demand is&lt;br/&gt;required. Both BOLT-12 and LN-URL provide standardized ways for nodes to&lt;br/&gt;fetch invoices, though their transport/signalling medium of choice differs.&lt;br/&gt;Blinded routes are technically compatible with BOLT 11 invoices, but may be&lt;br/&gt;hampered by the fact that you can only include so many routes.&lt;br/&gt;&lt;br/&gt;Another consideration is that unlike hop hints, blinded paths require more&lt;br/&gt;maintain once, as since they traverse public route, policy changes like a&lt;br/&gt;fee update may invalidate an entire set set of routes. One proposed solution&lt;br/&gt;is that forwarding nodes should observe their older policy for a period of&lt;br/&gt;time (so a grace period), and also that blinded paths should have an&lt;br/&gt;explicit expiry (similar to the existing invoice expiry).&lt;br/&gt;&lt;br/&gt;One other implication is that the set of routes the receiver includes&lt;br/&gt;matters&lt;br/&gt;more: if they don&amp;#39;t send enough or select them poorly, the sender may never&lt;br/&gt;be&lt;br/&gt;able to reach them even though a path exists in theory. More hands on&lt;br/&gt;experience is needed so the spec authors can better guide implementations&lt;br/&gt;and&lt;br/&gt;wallets w.r.t best practices.&lt;br/&gt;&lt;br/&gt;# Friend-of-a-friend Balance Sharing &amp;amp; Probing&lt;br/&gt;&lt;br/&gt;A presentation was given on friend-of-a-friend balance sharing [16]. The&lt;br/&gt;high level idea is that if we share _some_ information within a local&lt;br/&gt;radius, then this gives the sender more information to choose a path that&amp;#39;s&lt;br/&gt;potentially more reliable. The tradeoff here ofc is that nodes will be&lt;br/&gt;giving away more information that can potentially be used to ascertain&lt;br/&gt;payment flows. In an attempt to minimize the amount of information shared,&lt;br/&gt;the presenter proposed that just 2 bits of information be shared. Some&lt;br/&gt;initial simulations showed that sharing local information actually performed&lt;br/&gt;better than sharing global information (?). Some were puzzled w.r.t how&lt;br/&gt;that&amp;#39;s possible, but assuming the slides&#43;methods are published others can&lt;br/&gt;dig further into the model/parameter used to signal the inclusion.&lt;br/&gt;&lt;br/&gt;Arguably, information like this is already available via probing, so one&lt;br/&gt;line of thinking is something like: &amp;#34;why not just share _some_ of it&amp;#34; that&lt;br/&gt;may actually lead to less internal failures? This is related to a sort of&lt;br/&gt;tension between probing as a tool to increase payment reliability and also&lt;br/&gt;as a tool to degrade privacy in the network. On the other hand, others&lt;br/&gt;argued that probing provides natural cover traffic, since they actually&lt;br/&gt;_are_ payments, though they may not be intended to succeed.&lt;br/&gt;&lt;br/&gt;On the topic of channel probing, a sort of makeshift protocol was devised to&lt;br/&gt;make it harder in practice, sacrificing too much on the axis of payment&lt;br/&gt;reliability.  At a high level it proposes that:&lt;br/&gt;&lt;br/&gt;  * nodes more diligently set both their max_htlc amount, as well as the&lt;br/&gt;    max_htlc_value_in_flight amount&lt;br/&gt;&lt;br/&gt;  * a 50ms (or select other value) timer should be used when sending out&lt;br/&gt;    commitment signatures, independent of HTLC arrival&lt;br/&gt;&lt;br/&gt;  * nodes leverage the max_htlc value to set a false ceiling on the max in&lt;br/&gt;    flight parameter&lt;br/&gt;&lt;br/&gt;  * for each HTLC sent/forwarded, select 2 other channels at random and&lt;br/&gt;    reduce the &amp;#34;fake&amp;#34; in-flight ceiling for a period of time&lt;br/&gt;&lt;br/&gt;Some more details still need to be worked out, but some felt that this would&lt;br/&gt;kick start more research into this area, and also make balance mapping&lt;br/&gt;_slightly_ more difficult. From afar, it may be the case that achieving&lt;br/&gt;balance privacy while also achieving acceptable levels of payment&lt;br/&gt;reliability might be at odds with each other.&lt;br/&gt;&lt;br/&gt;# Eltoo &amp;amp; ANYPREVOUT&lt;br/&gt;&lt;br/&gt;One of the attendees is currently working on both fully implementing eltoo,&lt;br/&gt;as well as specifying the exact channel funding&#43;update interaction were it&lt;br/&gt;to be rolled out align side the existing penalty based channels in the&lt;br/&gt;protocol. As this version of eltoo is based on Taproot, we were able to&lt;br/&gt;compare notes a bit to find the overlapping set of changes (nonce handling,&lt;br/&gt;etc), which permits cross review of the proposals. This type of work is&lt;br/&gt;cool, as only by fully implementing something end to end can you reaaally&lt;br/&gt;work out all the edge cases and nuances.&lt;br/&gt;&lt;br/&gt;ANYPREVOUT as hasn&amp;#39;t changed significantly as of late. An attendee shared&lt;br/&gt;plans to create a sort of mega all-future-feasible-soft-forks fork of&lt;br/&gt;bitcoind, that would package up various unmerged (from bitcoind&amp;#39;s) proposal&lt;br/&gt;soft fork packages into an easy to run&#43;install binary/project attached to a&lt;br/&gt;signet. The hop is that by giving developers an easy way to interact with&lt;br/&gt;proposed soft fork proposals (vs debasing some ancient pull request), wider&lt;br/&gt;participation in testing/implementation/review can be facilitated.&lt;br/&gt;&lt;br/&gt;# Trampoline Routing&lt;br/&gt;&lt;br/&gt;There was a presentation on Trampoline routing explaining the motivation,&lt;br/&gt;history, and current state of the proposal. The two main cases we&amp;#39;ve&lt;br/&gt;narrowed down on are:&lt;br/&gt;&lt;br/&gt;  1. A mobile user doesn&amp;#39;t necessarily want to sync the _entire_ graph, so&lt;br/&gt;  they can use trampoline to maintain a subset and still be able to send&lt;br/&gt;  payments.&lt;br/&gt;&lt;br/&gt;  2. A mobile user wants to be able to instate a payment, go offline, and&lt;br/&gt;  return at a later time to learn about the final state of the payment.&lt;br/&gt;&lt;br/&gt;Use case #2 seems to be the most promising when combined with other&lt;br/&gt;proposals for holding HTLCs at an origin node (call it an &amp;#34;LSP&amp;#34;) [13].&lt;br/&gt;Combined together, this would allow a mobile node to send a payment, then go&lt;br/&gt;offline, with the LSP being able to retry the payment either continuously or&lt;br/&gt;only when it knows the receiver is online to accept the payment. This may&lt;br/&gt;potentially dramatically improve the UX for LN on mobile, as things suddenly&lt;br/&gt;become a lot more asynchronous: I do something go offline, and the LSP node&lt;br/&gt;can fulfil the payment in the background, then wait for me to come online to&lt;br/&gt;settle the final.  hop.&lt;br/&gt;&lt;br/&gt;Trampoline can also be composed well with blinded routes (blinded route from&lt;br/&gt;last trampoline to receiver) and also MPP (internal nodes can split&lt;br/&gt;themselves with local information).&lt;br/&gt;&lt;br/&gt;One added trade-off is that since the sender doesn&amp;#39;t know the entire route,&lt;br/&gt;they need to sort of overshoot w.r.t fees and CTLVs. This is something&lt;br/&gt;we&amp;#39;ve known for a while, but until Trampoline is more widely rolled out, we&lt;br/&gt;won&amp;#39;t have a very good feel w.r.t how much extra senders will need to&lt;br/&gt;allocate.&lt;br/&gt;&lt;br/&gt;# Node Fee Optimization &amp;amp; Fee Rate Cards&lt;br/&gt;&lt;br/&gt;Over the past few years, a common thread we&amp;#39;ve seen across successful&lt;br/&gt;routing nodes is dynamic fee setting as a way to encourage/discourage&lt;br/&gt;traffic. A routing nodes can utilize the set of fees of a channel to either&lt;br/&gt;make it too expensive for other nodes to route through (it&amp;#39;s already&lt;br/&gt;depleted don&amp;#39;t try unless you&amp;#39;ll give be 10 mil sats, which no one would) or&lt;br/&gt;very cheap, which&amp;#39;ll incentivize flows in the other direction. If all nodes&lt;br/&gt;are constantly sending out updates of this nature, then it can generate a&lt;br/&gt;lot of traffic, and also sort of leak more balance information overtime&lt;br/&gt;(which some nodes are already doing: using fees/max_htlc to communicate&lt;br/&gt;available balances).&lt;br/&gt;&lt;br/&gt;One attendee proposed allowing nodes to express a sort of fee gradient via a&lt;br/&gt;static curve/bucket/function, instead of dynamically communicating what the&lt;br/&gt;latest state of the fee&#43;liquidity distribution looks like. A possible&lt;br/&gt;manifestation could be a series of buckets, each of which with varying fee&lt;br/&gt;rates. If your payment consumes 50% of channel balance, then you pay this&lt;br/&gt;rate, otherwise if it&amp;#39;s 5% you pay this rate, etc, etc. This might allow for&lt;br/&gt;nodes to capture the same dynamics as they do with more dynamic fee updates,&lt;br/&gt;but in a way that leaks less information and also consumes less gossip&lt;br/&gt;bandwidth.&lt;br/&gt;&lt;br/&gt;# The Return of Splicing&lt;br/&gt;&lt;br/&gt;Splicing is one of those things that was discussed a long time ago, but was&lt;br/&gt;never really fully implemented and rolled out. A few attendees have started&lt;br/&gt;to take a closer look at the problem, building off of the interactive-tx&lt;br/&gt;scheme that the dual-funding protocol extension uses. The main intricacy&lt;br/&gt;discussed was if concurrent splices should be allowed or not, and if so, how&lt;br/&gt;we would handle the various edge cases. As an example, if I propose a splice&lt;br/&gt;to add more funds via my input, but that turns out to already be spent, then&lt;br/&gt;the splicing transaction we created is invalid and can never be confirmed.&lt;br/&gt;However if we allow _another_ splice to take place, and another one, and&lt;br/&gt;another one, then ideally _one_ of them will confirm and serve as the new&lt;br/&gt;anchor for the channel.&lt;br/&gt;&lt;br/&gt;In a world of concurrent splices, the question of &amp;#34;what is my Lightning&lt;br/&gt;balance&amp;#34; becomes even more murky. Wallet and implementations will likely&lt;br/&gt;want to show the most pessimistic value, while also ensuring that the user&lt;br/&gt;is able to effectively account for where all their funds and what they can&lt;br/&gt;spend on/off chain.&lt;br/&gt;&lt;br/&gt;# LN-URL &#43; BOLT 12&lt;br/&gt;&lt;br/&gt;LN-URL and BOLT 12 are both standardized ways that answer the question of:&lt;br/&gt;how can I fetch an invoice from Bob? LN-URL differs from BOLT 12 in that it&lt;br/&gt;uses the existing BOLT 11 invoice format, and uses an HTTP based protocol&lt;br/&gt;for the negotiation process. BOLT 12 on the other hand is a suite of&lt;br/&gt;protocol additions that includes (amongst other things) a new invoice format&lt;br/&gt;(yay TLV!) and also a way to use onion messages to fetch an invoice _via_&lt;br/&gt;the network.&lt;br/&gt;&lt;br/&gt;Assuming blinded paths is widely rolled out, then the question of how&lt;br/&gt;invoices are obtained becomes more important as blinded paths means that you&lt;br/&gt;can&amp;#39;t fit much in the traditional QR encoding. As a result, fetching&lt;br/&gt;invoices on demand may become a more common place flow, with all its&lt;br/&gt;trade-offs.  There was a group discussion on how we could sort of unifying&lt;br/&gt;everything either by allowing BOLT 12 to be used over LN-URL or the other&lt;br/&gt;way around.&lt;br/&gt;&lt;br/&gt;One proposal was to add a new query parameter to the normal LN-URL QR code&lt;br/&gt;contents. This would mean that when a wallet goes to scan an LN-URL QR code,&lt;br/&gt;if they know of the extra param, and what BOLT 12, they can just use the&lt;br/&gt;enclosed offer to fetch the invoice.&lt;br/&gt;&lt;br/&gt;An alternative proposal was to instead extract the BOLT 12 _invoice_ format&lt;br/&gt;from the greater BOLT 12 &amp;#34;Offers&amp;#34; proposal. Assuming blinded paths is only&lt;br/&gt;specified w.r.t BOLT 12 _invoices_, then this would mean an LN-URL extension&lt;br/&gt;could be rolled out that allowed returning BOLT 12 invoice rather than BOLT&lt;br/&gt;11 invoices. This would allow the ecosystem to slowly transition to a shared&lt;br/&gt;invoice format, even if there may be fundamental disagreements w.r.t _how_&lt;br/&gt;the invoices should be fetched in the first place.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s worth noting that both of these proposals can be combined:&lt;br/&gt;&lt;br/&gt;  * If a wallet knows how to BOLT 12 Offers, they can take the enclosed&lt;br/&gt;    offer and run w/ it.&lt;br/&gt;&lt;br/&gt;  * If they don&amp;#39;t know about Offers, but can send w/ the BOLT _invoice_&lt;br/&gt;    format, then they can fetch that and complete the payment.&lt;br/&gt;&lt;br/&gt;This might be a nice middle ground as it would tend all&lt;br/&gt;wallets/implementations to being able to decode and send w/ a BOLT 12&lt;br/&gt;_invoice_, and leave the question of _how_ it should be fetched up to the&lt;br/&gt;application/wallet/service. In the end, if paths never quite intersect, then&lt;br/&gt;it&amp;#39;s still possible to add route blinding to BOLT 11, with LN-URL sticking&lt;br/&gt;with that invoice format to take advantage of the new privacy enhancements&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[1]:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-November/003336.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-November/003336.html&lt;/a&gt;&lt;br/&gt;[2]:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-October/003278.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-October/003278.html&lt;/a&gt;&lt;br/&gt;[3]: &lt;a href=&#34;https://github.com/lightning/bolts/pull/995&#34;&gt;https://github.com/lightning/bolts/pull/995&lt;/a&gt;&lt;br/&gt;[4]: &lt;a href=&#34;https://github.com/jonasnick/bips/blob/musig2/bip-musig2.mediawiki&#34;&gt;https://github.com/jonasnick/bips/blob/musig2/bip-musig2.mediawiki&lt;/a&gt;&lt;br/&gt;[5]: &lt;a href=&#34;https://datatracker.ietf.org/doc/html/rfc6979&#34;&gt;https://datatracker.ietf.org/doc/html/rfc6979&lt;/a&gt;&lt;br/&gt;[6]:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003470.html&lt;/a&gt;&lt;br/&gt;[7]:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-March/003526.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-March/003526.html&lt;/a&gt;&lt;br/&gt;[8]: &lt;a href=&#34;https://arxiv.org/abs/2205.12737&#34;&gt;https://arxiv.org/abs/2205.12737&lt;/a&gt;&lt;br/&gt;[9]: &lt;a href=&#34;https://bitcoinops.org/en/topics/minisketch/&#34;&gt;https://bitcoinops.org/en/topics/minisketch/&lt;/a&gt;&lt;br/&gt;[10]:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-April/003551.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-April/003551.html&lt;/a&gt;&lt;br/&gt;[11]: &lt;a href=&#34;https://blog.bitmex.com/preventing-channel-jamming/&#34;&gt;https://blog.bitmex.com/preventing-channel-jamming/&lt;/a&gt;&lt;br/&gt;[12]:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003498.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-February/003498.html&lt;/a&gt;&lt;br/&gt;[13]: &lt;a href=&#34;https://github.com/lightning/bolts/pull/765&#34;&gt;https://github.com/lightning/bolts/pull/765&lt;/a&gt;&lt;br/&gt;[14]:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-October/003307.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-October/003307.html&lt;/a&gt;&lt;br/&gt;[15]: &lt;a href=&#34;https://github.com/lightning/bolts/pull/910&#34;&gt;https://github.com/lightning/bolts/pull/910&lt;/a&gt;&lt;br/&gt;[16]: &lt;a href=&#34;https://github.com/lightning/bolts/pull/780&#34;&gt;https://github.com/lightning/bolts/pull/780&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-- Laolu&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/20220607/eb9e8d17/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220607/eb9e8d17/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:06:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfvagvu0n2dp4ydn26ftq6eltzclvtfezcfhxdwhyxdne55h5l64czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vm246up</id>
    
      <title type="html">📅 Original date posted:2022-05-02 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfvagvu0n2dp4ydn26ftq6eltzclvtfezcfhxdwhyxdne55h5l64czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vm246up" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgvu5ff2tqc7ywe94yd7p2ys8xtdvkvj3yrfkmjy9jk233edjymkq5hevlh&#39;&gt;nevent1q…evlh&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-02&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi John,&lt;br/&gt;&lt;br/&gt;&amp;gt; That said, I believe that the correct approach to supporting &amp;#34;tokens on&lt;br/&gt;&amp;gt; Lightning&amp;#34; is to make it a separate concern from Taro, and that LL should&lt;br/&gt;&amp;gt; create a separate BOLT proposal from the current Taro BIPs to ensure it LN&lt;br/&gt;&amp;gt; standards have a genericized protocol that all LN implementations would be&lt;br/&gt;&amp;gt; interested in supporting.&lt;br/&gt;&lt;br/&gt;The current Taro BIPs describe just about everything needed in order to&lt;br/&gt;create, validate, and interact with assets on chain. Naturally, the system&lt;br/&gt;needs to exist on-chain before any off-chain constructs can be built on top&lt;br/&gt;of it.&lt;br/&gt;&lt;br/&gt;On the topic of a BOLT, I don&amp;#39;t think something like Taro (particularly our&lt;br/&gt;vision for the deployment path) should exist at the _BOLT level_. Instead,&lt;br/&gt;we aim to create a bLIP that fully specifies the _optional_ series of TLV&lt;br/&gt;extensions needed to open channels using Taro assets, and send them&lt;br/&gt;off-chain. IMO this isn&amp;#39;t something that needs to be a BOLT as: it isn&amp;#39;t&lt;br/&gt;intended to be 100% universal (most LN routing nodes and users will only&lt;br/&gt;know of the core bitcoin backbone), isn&amp;#39;t critical to the operation of the&lt;br/&gt;core LN network, and it&amp;#39;s something that will only initial be deployed at&lt;br/&gt;the edges (sender&#43;receiver).&lt;br/&gt;&lt;br/&gt;On the BOLT side, there&amp;#39;re a number of important upgrades/extensions being&lt;br/&gt;proposed, and imo it doesn&amp;#39;t make sense to attempt to soak up the already&lt;br/&gt;scarce review bandwidth into something like Taro that will live purely at&lt;br/&gt;the edges of the network. I also don&amp;#39;t want to speak for the other LN devs,&lt;br/&gt;but I think most would prefer to just focus on the core LN protocol and&lt;br/&gt;ignore anything non-bitcoin on the sides. The implementations/developers&lt;br/&gt;that think this is something worth implementing will be able to contribute&lt;br/&gt;to and review the bLIPs as they wish.&lt;br/&gt;&lt;br/&gt;A few implementations support LTC today, but that was mainly an exercise in&lt;br/&gt;helping to build consensus for segwit so we could ultimately deploy LN on&lt;br/&gt;Bitcoin&amp;#39;s mainnet (iirc some implementations are in the process of even&lt;br/&gt;removing support).  A prior version of the onion payload (now called the&lt;br/&gt;legacy payload) had a &amp;#34;realm&amp;#34; field that was intended to be used for&lt;br/&gt;multi-chain stuff. The newer modern TLV payload dropped that field as it&lt;br/&gt;wasn&amp;#39;t being used anywhere.  IMO that was the right move as it allows us to&lt;br/&gt;keep the core protocol simple and let other ppl be concerned w/ building&lt;br/&gt;multi-asset stuff on top of the base protocol.&lt;br/&gt;&lt;br/&gt;&amp;gt; but instead the requirement to add several feature concepts to LN that&lt;br/&gt;&amp;gt; would allow tokens to interact with LN nodes and LN routing:&lt;br/&gt;&lt;br/&gt;&amp;gt;From this list of items, I gather that your vision is actually pretty&lt;br/&gt;different from ours. Rather than update the core network to understand the&lt;br/&gt;existence of the various Taro assets, instead we plan on leaving the core&lt;br/&gt;protocol essentially unchanged, with the addition of new TLV extensions to&lt;br/&gt;allow the edges to be aware of and interact w/ the Taro assets. As an&lt;br/&gt;example, we wouldn&amp;#39;t need to do anything like advertise exchange rates in&lt;br/&gt;the core network over the existing gossip protocol (which doesn&amp;#39;t seem like&lt;br/&gt;the best idea in any case given how quickly they can change and the existing&lt;br/&gt;challenges we have today in ensuring speedy update propagation).&lt;br/&gt;&lt;br/&gt;&amp;gt; So, I ask that Lightning Labs coordinate with the LN community to ensure&lt;br/&gt;&amp;gt; such support for other networks and other assets not be dedicated only to&lt;br/&gt;&amp;gt; Taro, and instead genericized enough so that other networks may compete&lt;br/&gt;&amp;gt; fairly in the market,&lt;br/&gt;&lt;br/&gt;If you&amp;#39;re eager to create a generalized series of extensions to enable your&lt;br/&gt;vision, then of course you&amp;#39;re welcome to pursue that. However, I don&amp;#39;t think&lt;br/&gt;the other LN developers will really care much about building some&lt;br/&gt;generalized multi-chain/multi-asset system given all the existing work we&lt;br/&gt;still need to do to make sure the bitcoin backbone works properly and can&lt;br/&gt;scale up sufficiently. I&amp;#39;d also caution you against making the same mistakes&lt;br/&gt;that Interledger did: they set out to build a generalized off-chain system&lt;br/&gt;which abstracts over the assets/chains entirely, but years later, and&lt;br/&gt;several hundred wc3 mailing list posts later, virtually nothing uses it.&lt;br/&gt;Why? IMO, because it was overly generalized and they assumed that if they&lt;br/&gt;built it, the entities that actually needed it would magically pop up&lt;br/&gt;(spoiler alert -- *SpongeBob narrator voice*: several years later, they&lt;br/&gt;didn&amp;#39;t).&lt;br/&gt;&lt;br/&gt;&amp;gt; Otherwise, we will be left with LL&amp;#39;s advantage being that LND supports&lt;br/&gt;&amp;gt; Taro, and weird narratives that Taro is somehow superior because LND&lt;br/&gt;&amp;gt; specifically added support for it, without creating a generic spec or BOLT&lt;br/&gt;&amp;gt; that all nodes could adopt for multi-network, multi-asset LN-as-rails use&lt;br/&gt;&amp;gt; cases.&lt;br/&gt;&lt;br/&gt;Given that all the specs so far are in the open, and we opted to first build&lt;br/&gt;out the specifications before releasing our own implementation, I don&amp;#39;t&lt;br/&gt;foresee Taro being something that only LL or lnd implements. All the BIPs&lt;br/&gt;are public, and the bLIP will be soon as well, so any motivated individual&lt;br/&gt;or set of individuals will also be able to implement and adopt the protocol.&lt;br/&gt;If you or anyone else reading this is interested in contributing: I&amp;#39;m&lt;br/&gt;accepting PRs to my fork of the BIP repo [1] (where I&amp;#39;ve already made&lt;br/&gt;several modifications based on feedback from the wider community, and merged&lt;br/&gt;a few PRs as well), and I&amp;#39;m also hanging out on IRC at ##taro on Libera.&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://github.com/Roasbeef/bips/tree/bip-taro&#34;&gt;https://github.com/Roasbeef/bips/tree/bip-taro&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-- Laolu&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/20220502/d9b6768e/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220502/d9b6768e/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:05:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyzzxvm9zak6ss3tw3cxxgnvepmgjaeykl0fnvs7acakfacjcuu9gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vtkmz3x</id>
    
      <title type="html">📅 Original date posted:2021-11-03 📝 Original message: Oh, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyzzxvm9zak6ss3tw3cxxgnvepmgjaeykl0fnvs7acakfacjcuu9gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vtkmz3x" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqnpcnpjuc5lrn0d9a37j9m0plw0ll2yyzvfsvrs4hynpyhp2fwgsrqlfkd&#39;&gt;nevent1q…lfkd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-11-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Oh, also there&amp;#39;s currently this sort of placeholder logo from waaay back&lt;br/&gt;that&amp;#39;s used as the org&amp;#39;s avatar/image. Perhaps it&amp;#39;s time we roll an&lt;br/&gt;&amp;#34;official&amp;#34; logo/avatar? Otherwise we can just switch over the randomly&lt;br/&gt;generated blocks thingy that Github uses when an account/org has no&lt;br/&gt;avatar.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;On Tue, Nov 2, 2021 at 7:34 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Circling back to close the loop here:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   * The new Github org (&lt;a href=&#34;https://github.com/lightning&#34;&gt;https://github.com/lightning&lt;/a&gt;) now exists, and all&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt;     major implementation maintainers have been added to the organization as&lt;br/&gt;&amp;gt;     admins.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   * A new blips repo (&lt;a href=&#34;https://github.com/lightning/blips&#34;&gt;https://github.com/lightning/blips&lt;/a&gt;) has been&lt;br/&gt;&amp;gt; created to&lt;br/&gt;&amp;gt;     continue the PR that was originally started in the lightning-rfc&lt;br/&gt;&amp;gt; repo.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   * The old lightning-rfc repo has been moved over, and been renamed to&lt;br/&gt;&amp;gt; &amp;#34;bolts&amp;#34;&lt;br/&gt;&amp;gt;     (&lt;a href=&#34;https://github.com/lightning/bolts&#34;&gt;https://github.com/lightning/bolts&lt;/a&gt; -- should it be all caps? )&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks to all that participated in the discussion (particularly in&lt;br/&gt;&amp;gt; meatspace&lt;br/&gt;&amp;gt; during the recent protocol dev meetup!), happy we were able to resolve&lt;br/&gt;&amp;gt; things&lt;br/&gt;&amp;gt; and begin the next chapter in the evolution of the Lightning protocol!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Fri, Oct 15, 2021 at 1:49 AM Fabrice Drouin &amp;lt;fabrice.drouin at acinq.fr&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Tue, 12 Oct 2021 at 21:57, 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; &amp;gt; Also note that lnd has _never_ referred to itself as the &amp;#34;reference&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; implementation.  A few years ago some other implementations adopted that&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; title themselves, but have since adopted softer language.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I don&amp;#39;t remember that but if you&amp;#39;re referring to c-lightning it was&lt;br/&gt;&amp;gt;&amp;gt; the first lightning implementation, and the only one for a while, so&lt;br/&gt;&amp;gt;&amp;gt; in a way it was a &amp;#34;reference&amp;#34; at the time ?&lt;br/&gt;&amp;gt;&amp;gt; Or it could have been a reference to their policy of &amp;#34;implementing the&lt;br/&gt;&amp;gt;&amp;gt; spec, all the spec and nothing but the spec&amp;#34;  ?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I think it&amp;#39;s worth briefly revisiting a bit of history here w.r.t the&lt;br/&gt;&amp;gt;&amp;gt; github&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; org in question. In the beginning, the lightningnetwork github org was&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; created by Joseph, and the lightningnetwork/paper repo was added, the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; manuscript that kicked off this entire thing. Later&lt;br/&gt;&amp;gt;&amp;gt; lightningnetwork/lnd was&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; created where we started to work on an initial implementation (before&lt;br/&gt;&amp;gt;&amp;gt; the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; BOLTs in their current form existed), and we were added as owners.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Eventually we (devs of current impls) all met up in Milan and decided to&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; converge on a single specification, thus we added the BOLTs to the same&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; repo, despite it being used for lnd and knowingly so.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yes, work on c-lightning then eclair then lnd all began a long time&lt;br/&gt;&amp;gt;&amp;gt; before the BOLTs process was implemented, and we all set up repos,&lt;br/&gt;&amp;gt;&amp;gt; accounts...&lt;br/&gt;&amp;gt;&amp;gt; I agree that we all inherited things  from the &amp;#34;pre-BOLTS&amp;#34; era and&lt;br/&gt;&amp;gt;&amp;gt; changing them will create some friction but I still believe it should&lt;br/&gt;&amp;gt;&amp;gt; be done. You also mentioned potential admin rights issues on the&lt;br/&gt;&amp;gt;&amp;gt; current specs repos which would be solved by moving them to a new&lt;br/&gt;&amp;gt;&amp;gt; clean repo.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; As it seems the primary grievance here is collocating an implementation&lt;br/&gt;&amp;gt;&amp;gt; of&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Lightning along with the _specification_ of the protocol, and given&lt;br/&gt;&amp;gt;&amp;gt; that the&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; spec was added last, how about we move the spec to an independent repo&lt;br/&gt;&amp;gt;&amp;gt; owned&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; by the community? I currently have github.com/lightning, and would be&lt;br/&gt;&amp;gt;&amp;gt; happy&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; to donate it to the community, or we could create a new org like&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;#34;lightning-specs&amp;#34; or something similar.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Sounds great! github.com/lightning is nice (and I like Damian&amp;#39;s idea&lt;br/&gt;&amp;gt;&amp;gt; of using github.com/lightning/bolts) and seems to please everyone so&lt;br/&gt;&amp;gt;&amp;gt; it looks that we have a plan!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Fabrice&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211102/4644941c/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211102/4644941c/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:22&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqnpcnpjuc5lrn0d9a37j9m0plw0ll2yyzvfsvrs4hynpyhp2fwgszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vg5swn8</id>
    
      <title type="html">📅 Original date posted:2021-11-03 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqnpcnpjuc5lrn0d9a37j9m0plw0ll2yyzvfsvrs4hynpyhp2fwgszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vg5swn8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs05v7arzlm7rdlncm0wdg8zu6jh9q05k4873mc6g3059r046ce9ecf6s6lt&#39;&gt;nevent1q…s6lt&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-11-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Circling back to close the loop here:&lt;br/&gt;&lt;br/&gt;  * The new Github org (&lt;a href=&#34;https://github.com/lightning&#34;&gt;https://github.com/lightning&lt;/a&gt;) now exists, and all&lt;br/&gt;the&lt;br/&gt;    major implementation maintainers have been added to the organization as&lt;br/&gt;    admins.&lt;br/&gt;&lt;br/&gt;  * A new blips repo (&lt;a href=&#34;https://github.com/lightning/blips&#34;&gt;https://github.com/lightning/blips&lt;/a&gt;) has been created&lt;br/&gt;to&lt;br/&gt;    continue the PR that was originally started in the lightning-rfc&lt;br/&gt;repo.&lt;br/&gt;&lt;br/&gt;  * The old lightning-rfc repo has been moved over, and been renamed to&lt;br/&gt;&amp;#34;bolts&amp;#34;&lt;br/&gt;    (&lt;a href=&#34;https://github.com/lightning/bolts&#34;&gt;https://github.com/lightning/bolts&lt;/a&gt; -- should it be all caps? )&lt;br/&gt;&lt;br/&gt;Thanks to all that participated in the discussion (particularly in meatspace&lt;br/&gt;during the recent protocol dev meetup!), happy we were able to resolve&lt;br/&gt;things&lt;br/&gt;and begin the next chapter in the evolution of the Lightning protocol!&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Fri, Oct 15, 2021 at 1:49 AM Fabrice Drouin &amp;lt;fabrice.drouin at acinq.fr&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Tue, 12 Oct 2021 at 21:57, Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; Also note that lnd has _never_ referred to itself as the &amp;#34;reference&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt; implementation.  A few years ago some other implementations adopted that&lt;br/&gt;&amp;gt; &amp;gt; title themselves, but have since adopted softer language.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t remember that but if you&amp;#39;re referring to c-lightning it was&lt;br/&gt;&amp;gt; the first lightning implementation, and the only one for a while, so&lt;br/&gt;&amp;gt; in a way it was a &amp;#34;reference&amp;#34; at the time ?&lt;br/&gt;&amp;gt; Or it could have been a reference to their policy of &amp;#34;implementing the&lt;br/&gt;&amp;gt; spec, all the spec and nothing but the spec&amp;#34;  ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I think it&amp;#39;s worth briefly revisiting a bit of history here w.r.t the&lt;br/&gt;&amp;gt; github&lt;br/&gt;&amp;gt; &amp;gt; org in question. In the beginning, the lightningnetwork github org was&lt;br/&gt;&amp;gt; &amp;gt; created by Joseph, and the lightningnetwork/paper repo was added, the&lt;br/&gt;&amp;gt; &amp;gt; manuscript that kicked off this entire thing. Later lightningnetwork/lnd&lt;br/&gt;&amp;gt; was&lt;br/&gt;&amp;gt; &amp;gt; created where we started to work on an initial implementation (before the&lt;br/&gt;&amp;gt; &amp;gt; BOLTs in their current form existed), and we were added as owners.&lt;br/&gt;&amp;gt; &amp;gt; Eventually we (devs of current impls) all met up in Milan and decided to&lt;br/&gt;&amp;gt; &amp;gt; converge on a single specification, thus we added the BOLTs to the same&lt;br/&gt;&amp;gt; &amp;gt; repo, despite it being used for lnd and knowingly so.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes, work on c-lightning then eclair then lnd all began a long time&lt;br/&gt;&amp;gt; before the BOLTs process was implemented, and we all set up repos,&lt;br/&gt;&amp;gt; accounts...&lt;br/&gt;&amp;gt; I agree that we all inherited things  from the &amp;#34;pre-BOLTS&amp;#34; era and&lt;br/&gt;&amp;gt; changing them will create some friction but I still believe it should&lt;br/&gt;&amp;gt; be done. You also mentioned potential admin rights issues on the&lt;br/&gt;&amp;gt; current specs repos which would be solved by moving them to a new&lt;br/&gt;&amp;gt; clean repo.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As it seems the primary grievance here is collocating an implementation&lt;br/&gt;&amp;gt; of&lt;br/&gt;&amp;gt; &amp;gt; Lightning along with the _specification_ of the protocol, and given that&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; &amp;gt; spec was added last, how about we move the spec to an independent repo&lt;br/&gt;&amp;gt; owned&lt;br/&gt;&amp;gt; &amp;gt; by the community? I currently have github.com/lightning, and would be&lt;br/&gt;&amp;gt; happy&lt;br/&gt;&amp;gt; &amp;gt; to donate it to the community, or we could create a new org like&lt;br/&gt;&amp;gt; &amp;gt; &amp;#34;lightning-specs&amp;#34; or something similar.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sounds great! github.com/lightning is nice (and I like Damian&amp;#39;s idea&lt;br/&gt;&amp;gt; of using github.com/lightning/bolts) and seems to please everyone so&lt;br/&gt;&amp;gt; it looks that we have a plan!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Fabrice&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/20211102/c53feb8f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211102/c53feb8f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:21&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs89xlmeag84mt00auvhfenx2g8t6q2za95lxfcedwcnxq00ryrnxgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v768qxj</id>
    
      <title type="html">📅 Original date posted:2020-10-12 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs89xlmeag84mt00auvhfenx2g8t6q2za95lxfcedwcnxq00ryrnxgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v768qxj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvj38pmtwnvmytr079n39hg3vnf9el0er6m3v7lkj7wunhu3kuf7gjwejm6&#39;&gt;nevent1q…ejm6&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-12&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt; I suggest adding tlv records in `commitment_signed` to tell our channel &amp;gt;&lt;br/&gt;&amp;gt; peer that we&amp;#39;re changing the values of these fields.&lt;br/&gt;&lt;br/&gt;I think this fits in nicely with the &amp;#34;parameter re-negotiation&amp;#34; portion of&lt;br/&gt;my&lt;br/&gt;loose Dynamic commitments proposal. Note that in that paradigm, something&lt;br/&gt;like this would be a distinct message, and also only be allowed with a&lt;br/&gt;&amp;#34;clean commitment&amp;#34; (as otherwise what if I reduce the number of slots to a&lt;br/&gt;value that is lower than the number of active slots?). With this, both sides&lt;br/&gt;would be able to propose/accept/deny updates to the flow control parameters&lt;br/&gt;that can be used to either increase the security of a channel, or implement&lt;br/&gt;a sort of &amp;#34;slow start&amp;#34; protocol for any new peers that connect to you.&lt;br/&gt;&lt;br/&gt;Similar to congestion window expansion/contraction in TCP, when a new peer&lt;br/&gt;connects to you, you likely don&amp;#39;t want to allow them to be able to consume&lt;br/&gt;all the newly allocated bandwidth in an outgoing direction. Instead, you may&lt;br/&gt;want to only allow them to utilize say 10% of the available HTLC bandwidth,&lt;br/&gt;slowly increasing based on successful payments, and drastically&lt;br/&gt;(multiplicatively) decreasing when you encounter very long lived HTLCs, or&lt;br/&gt;an excessive number of failures.&lt;br/&gt;&lt;br/&gt;A dynamic HTLC bandwidth allocation mechanism would serve to mitigate&lt;br/&gt;several classes of attacks (supplementing any mitigations by &amp;#34;channel&lt;br/&gt;acceptor&amp;#34; hooks), and also give forwarding nodes more _control_ of exactly&lt;br/&gt;how their allocated bandwidth is utilized by all connected peers.  This is&lt;br/&gt;possible to some degree today (by using an implicit value lower than&lt;br/&gt;the negotiated values), but the implicit route doesn&amp;#39;t give the other party&lt;br/&gt;any information, and may end up in weird re-send loops (as they _why_ an&lt;br/&gt;HTLC was rejected) wasn&amp;#39;t communicated. Also if you end up in a half-sign&lt;br/&gt;state, since we don&amp;#39;t have any sort of &amp;#34;unadd&amp;#34;, then the channel may end up&lt;br/&gt;borked if the violating party keeps retransmitting the same update upon&lt;br/&gt;reconnection.&lt;br/&gt;&lt;br/&gt;&amp;gt; Are there other fields you think would need to become dynamic as well?&lt;br/&gt;&lt;br/&gt;One other value that IMO should be dynamic to protect against future&lt;br/&gt;unexpected events is the dust limit. &amp;#34;It Is Known&amp;#34;, that this value &amp;#34;doesn&amp;#39;t&lt;br/&gt;really change&amp;#34;, but we should be able to upgrade _all_ channels on the fly&lt;br/&gt;if it does for w/e reason.&lt;br/&gt;&lt;br/&gt;-- Laolu&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/20201012/1700eb6d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201012/1700eb6d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsraa2m52pszfqazwex2h5z5khwyvalqw6v3qafkf4tfmnn9ycxckszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vp9v0u3</id>
    
      <title type="html">📅 Original date posted:2020-09-10 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsraa2m52pszfqazwex2h5z5khwyvalqw6v3qafkf4tfmnn9ycxckszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vp9v0u3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspdscpwtey4r7a77nz7tc5e8xvzxc6sd6x0h9gzy00z44vher2jzg4rzsl5&#39;&gt;nevent1q…zsl5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-09-10&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Antoine,&lt;br/&gt;&lt;br/&gt;Great findings!&lt;br/&gt;&lt;br/&gt;I think an even simpler mitigation is just for the non-initiator to _reject_&lt;br/&gt;update_fee proposals that are &amp;#34;unreasonable&amp;#34;. The non-initiator can run a&lt;br/&gt;&amp;#34;fee leak calculation&amp;#34; to compute the worst-case leakage of fees in the&lt;br/&gt;revocation case. This can be done to day without any significant updates to&lt;br/&gt;implementations, and some implementations may already be doing this.&lt;br/&gt;&lt;br/&gt;One issue is that we don&amp;#39;t have a way to do a &amp;#34;soft reject&amp;#34; of an update_fee&lt;br/&gt;as is. However, depending on the implementations, it may be possible to just&lt;br/&gt;reconnect and issue a co-op close if there&amp;#39;re no HTLCs on the commitment&lt;br/&gt;transaction.&lt;br/&gt;&lt;br/&gt;As you mentioned by setting proper values for max allowed htlcs, max in&lt;br/&gt;flight, reserve, etc, nodes are able to quantify this fee leak risk ahead of&lt;br/&gt;time, and set reasonable parameters based on their security model. One issue&lt;br/&gt;is that these values are set in stone rn when the channel is opened, but&lt;br/&gt;future iterations of dynamic commitments may allow us to update them on the&lt;br/&gt;fly.&lt;br/&gt;&lt;br/&gt;In the mid-term, implementations can start to phase out usage of update_fee&lt;br/&gt;by setting a minimal commitment fee when the channel is first opened, then&lt;br/&gt;relying on CPFP to bump up the commitment and any HTLCs if needed. This&lt;br/&gt;discovery might very well hasten the demise of update_fee in the protocol&lt;br/&gt;all together as well.  I don&amp;#39;t think we need to depend entirely on a&lt;br/&gt;theoretical package relay Bitcoin p2p upgrade assuming implementations are&lt;br/&gt;willing to make an assumption that say 20 sat/byte or w/e has a good chance&lt;br/&gt;of widespread propagation into mempools.&lt;br/&gt;&lt;br/&gt;&amp;gt;From the perspective of channel safety, and variations of attacks like&lt;br/&gt;&amp;#34;flood &amp;amp; loot&amp;#34;, imo it&amp;#39;s absolutely critical that nodes are able to update&lt;br/&gt;the fees on their second-level HTLC transactions. As this is where the real&lt;br/&gt;danger lies: if nodes aren&amp;#39;t able to get 2nd level HTLCs in the chain in&lt;br/&gt;time, then the incoming HTLC expiry will expire, creating a race condition&lt;br/&gt;across both commitments which can potentially cascade.&lt;br/&gt;&lt;br/&gt;In lnd today, anchors is still behind a build flag, but we plan to enable&lt;br/&gt;it by default for our upcoming 0.12 release. The blockers on our end were to&lt;br/&gt;add support for towers, and add basic deadline aware bumping, both of which&lt;br/&gt;are currently on track. We&amp;#39;ll now also look into setting clamps on the&lt;br/&gt;receiver end to just not accept unreasonable values for the fee rate of a&lt;br/&gt;commitment, as this ends up eating into the true HTLC values for both sides.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Sep 10, 2020 at 9:28 AM Antoine Riard &amp;lt;antoine.riard at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In this post, I would like to expose a potential vulnerability introduced&lt;br/&gt;&amp;gt; by the recent anchor output spec update related to the new usage of&lt;br/&gt;&amp;gt; SIGHASH_SINGLE for HTLC transactions. This new malleability combined with&lt;br/&gt;&amp;gt; the currently deployed mechanism of `update_fee` is likely harmful for&lt;br/&gt;&amp;gt; funds safety.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This has been previously shared with deployed implementations devs, as&lt;br/&gt;&amp;gt; anchor channels are flagged as experimental it&amp;#39;s better to discuss and&lt;br/&gt;&amp;gt; solve this publicly. That said, if you&amp;#39;re currently running experimental&lt;br/&gt;&amp;gt; anchor channels with non-trusted parties on mainnet, you might prefer to&lt;br/&gt;&amp;gt; close them.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # SIGHASH_SINGLE and `update_fee` (skip it if you&amp;#39;re familiar)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; First, let&amp;#39;s get started by a quick reminder of the data set committed by&lt;br/&gt;&amp;gt; signature digest algorithm of Segwit transactions (BIP 143):&lt;br/&gt;&amp;gt; * nVersion&lt;br/&gt;&amp;gt; * hashPrevouts&lt;br/&gt;&amp;gt; * hashSequence&lt;br/&gt;&amp;gt; * outpoint&lt;br/&gt;&amp;gt; * scriptCode of the input&lt;br/&gt;&amp;gt; * value of the output spent by this input&lt;br/&gt;&amp;gt; * nSequence of the input&lt;br/&gt;&amp;gt; * hashOutputs&lt;br/&gt;&amp;gt; * nLocktime&lt;br/&gt;&amp;gt; * sighash type of the signature&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Anchor output switched the sighash type from SIGHASH_ALL to SIGHASH_SINGLE&lt;br/&gt;&amp;gt; | SIGHASH_ANYONECANPAY for HTLC signatures sent to your counterparty. Thus&lt;br/&gt;&amp;gt; it can spend non-cooperatively its HTLC outputs on its commitment&lt;br/&gt;&amp;gt; transactions. I.e when Alice broadcasts her commitment transaction, every&lt;br/&gt;&amp;gt; Bob&amp;#39;s signatures on Alice&amp;#39;s HTLC-Success/Timeout transactions are now&lt;br/&gt;&amp;gt; flagging the new sighash type.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus `hashPrevouts`, `hashSequence` (ANYONECANPAY) and `hashOutputs`&lt;br/&gt;&amp;gt; (SINGLE) aren&amp;#39;t committed anymore. SINGLE only enforces commitment to the&lt;br/&gt;&amp;gt; output scriptpubkey/amount at the same index that&lt;br/&gt;&amp;gt; the spending input. Alice is free to attach additional inputs/outputs to&lt;br/&gt;&amp;gt; her HTLC transaction. This change is aiming to let a single-party bump the&lt;br/&gt;&amp;gt; feerate of 2nd-stage HTLC transactions in case of mempool-congestion,&lt;br/&gt;&amp;gt; without counterparty cooperation and thus make HTLC funds safer.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The attached outputs are _not_ encumbered by a revokeable redeemscript for&lt;br/&gt;&amp;gt; a potential punishment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That said, anchor ouput spec didn&amp;#39;t change disable the current fee&lt;br/&gt;&amp;gt; mechanism already covering HTLC transactions. Pre/post-anchor channels are&lt;br/&gt;&amp;gt; negotiating a feerate through `update_fee` exchange, initiated by the&lt;br/&gt;&amp;gt; channel funder. This `update_fee` can be rejected by the receiver if it&amp;#39;s&lt;br/&gt;&amp;gt; deemed unreasonable compared to your local fee estimator view, but as of&lt;br/&gt;&amp;gt; today implementations are pretty liberal in their acceptance, admitting a&lt;br/&gt;&amp;gt; divergence from a scale of 1 to no-bound at all.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This negotiated feerate (`feerate_per_kw`) is used by channel participants&lt;br/&gt;&amp;gt; to compute effective fees which have to be deduced either from the funder&lt;br/&gt;&amp;gt; balance output for commitment transactions or from HTLC output value for&lt;br/&gt;&amp;gt; HTLC transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # The Vulnerability : a Penalty Escape Vector&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; By increasing the feerate thanks to `update_fee`, a malicious party can&lt;br/&gt;&amp;gt; inflate fees committed on HTLC input/output pairs and redirect this&lt;br/&gt;&amp;gt; inflated fee to a single-controlled output attached to these malleable&lt;br/&gt;&amp;gt; pairs. This won&amp;#39;t be punishable by an honest party in case of revoked state&lt;br/&gt;&amp;gt; broadcast and thus enable to partially escape the penalty.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As an example, Alice and Bob have a 100_000 sats channel. `feerate_per_kw`&lt;br/&gt;&amp;gt; is 10000 sats.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At state N, Alice balance is all on her side. She announces 10 outgoing&lt;br/&gt;&amp;gt; HTLCs of value 7000 sats.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As Commitment tx weight with 10 outputs is 2844 (post-anchor), the&lt;br/&gt;&amp;gt; absolute fee committed is 28440 sats.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As HTLC-timeout weight is 666 (post-anchor), the absolute fee committed is&lt;br/&gt;&amp;gt; of 6660 sat, the HTLC tx output as counter-signed by Bob is of 340 sat.&lt;br/&gt;&amp;gt; This absolute fee aims to pay the miner fee in case Alice needs to timeout&lt;br/&gt;&amp;gt; HTLC onchain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Her remaining balance is 1560 sat, above both dust_limit_satoshi and the&lt;br/&gt;&amp;gt; channel reserve as constrained by Bob (likely 1%).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice waits for HTLCs to expire and advances state to N&#43;1. Then she&lt;br/&gt;&amp;gt; empties her balance minus reserve by sending a HTLC relayed by Bob either&lt;br/&gt;&amp;gt; to a colluding channel on the rest of network or back to an onchain address&lt;br/&gt;&amp;gt; thanks to a swap service.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At state N&#43;2, Alice finalizes HTLC-timeout of state N by capturing almost&lt;br/&gt;&amp;gt; all of the absolute fee to a new P2WPKH output only controlled by her. She&lt;br/&gt;&amp;gt; broadcasts the revoked commitment tx N and burns 28440 sats in commitment&lt;br/&gt;&amp;gt; fee.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Her balance of 1560 sats is punished by Bob&amp;#39;s justice transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; After confirmation and thus maturing of the CSV of 1 on her HTLC output&lt;br/&gt;&amp;gt; Alice broadcasts her 10 HTLC-timeout sending back to her 6660 sat - 660 to&lt;br/&gt;&amp;gt; pay a low-fee. Bob punishes the 10 HTLC-timeout outputs of 340 sats.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice gain =  99_000 (swap spend) &#43; 66_660 (HTLCs escape) - 1560&lt;br/&gt;&amp;gt; (commitment balance punishment) - 28440 (commitment fee) - 660*10 (HTLCs&lt;br/&gt;&amp;gt; fees) - 340*10 (HTLCs output) = 125600 sats.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice&amp;#39;s gain is superior at channel value as it has been partially&lt;br/&gt;&amp;gt; double-spend by bypassing the revocation punishment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # Limitations of Attacker Success&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A first limitation of attack success which can be point of is the fact&lt;br/&gt;&amp;gt; that post-anchor HTLC outputs are CSV&amp;#39;ed by 1, which means in theory a&lt;br/&gt;&amp;gt; honest party can punish this output before the malicious spend them with&lt;br/&gt;&amp;gt; the revoked HTLC txn. In practice a malicious party can attach a branch of&lt;br/&gt;&amp;gt; descendants to its anchor output and that way only allowing one more&lt;br/&gt;&amp;gt; mempool victim&amp;#39;s transaction on the revoked commitment. The victim must&lt;br/&gt;&amp;gt; spend all outputs at once or otherwise they&amp;#39;re going to obstrucate each&lt;br/&gt;&amp;gt; other at mempool acceptance.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Secondly, other limitations  are the per-implementation channel policy&lt;br/&gt;&amp;gt; `max_accepted_htlcs`, `max_htlc_value_in_flight`, `channel_reserve` and&lt;br/&gt;&amp;gt; acceptance bound of `update_fee`. A quick look at default policies, even if&lt;br/&gt;&amp;gt; they vary between deploy implementations, let it think there is room to&lt;br/&gt;&amp;gt; escape a substantial part of channel value.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Lastly, after the revoked commitment transaction is confirmed, both&lt;br/&gt;&amp;gt; attacker and victim are in a feerate race to confirm either a justice&lt;br/&gt;&amp;gt; transaction or a malicious HTLC-timeout. As fee estimator logic of the&lt;br/&gt;&amp;gt; victim&amp;#39;s implementation is a public piece of knowledge, it shouldn&amp;#39;t be&lt;br/&gt;&amp;gt; hard for the attacker to know the range of the first fee bid and override&lt;br/&gt;&amp;gt; it by a bit to confirm it before the victim RBF at next block. Currently,&lt;br/&gt;&amp;gt; not all implementations have RBF of justice transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As of today, if anchor output is deployed and given how LN implementations&lt;br/&gt;&amp;gt; are managing fees/rebroadcast of onchain transactions, the chance of attack&lt;br/&gt;&amp;gt; success sounds high in my opinion.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # Countermeasures&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Channel policies could be tighter, like bounded further down&lt;br/&gt;&amp;gt; `max_accepted_htlcs` or restraining acceptance of `update_fee`. For the&lt;br/&gt;&amp;gt; latter, it&amp;#39;s pretty hard as a) fee estimators diverge on mempool views b)&lt;br/&gt;&amp;gt; an attacker can craft escape HTLC-txn in a period of high-fee and patiently&lt;br/&gt;&amp;gt; waits a low-fee period to launch the exploitation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Justice transactions can adopt a scorched earth approach binding their&lt;br/&gt;&amp;gt; feerate to the max to increase odds of winning the feerate race and thus&lt;br/&gt;&amp;gt; deter attackers. But this sounds like introducing a griefing attack vector.&lt;br/&gt;&amp;gt; Your counterparty can burn more of your lawful balance in fees than you&amp;#39;ll&lt;br/&gt;&amp;gt; punish its revoked balance.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A workable option would be to patch current anchor spec to remove&lt;br/&gt;&amp;gt; `feerate_per_kw` appliance on 2nd-stage transactions, maybe just committing&lt;br/&gt;&amp;gt; a minimal relay fee.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thoughts of further countermeasures ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think the vulnerability described is mostly right but please point any&lt;br/&gt;&amp;gt; missing details.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Antoine&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/20200910/24240038/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200910/24240038/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:51&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsp3teqsf3yzpjuzljkxu3qp3wf4jl5phrttk89echr855gkr8c80czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v9ft084</id>
    
      <title type="html">📅 Original date posted:2020-06-21 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsp3teqsf3yzpjuzljkxu3qp3wf4jl5phrttk89echr855gkr8c80czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v9ft084" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdf39prkrd0vls42addke7s05zu895jrnx7vhksssjugg7phkunsqmr6ds8&#39;&gt;nevent1q…6ds8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-21&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Rene,&lt;br/&gt;&lt;br/&gt;IMO this is mostly mitigated by anchor commitments.  The impact of this&lt;br/&gt;attack is predicated on the &amp;#34;victim&amp;#34; paying 5x on-chain fees (for their&lt;br/&gt;confirmation target) to sweep all their HTLCs.  Anchor commitments let the&lt;br/&gt;initiator of the channel select a very low starting fee (just enough to get&lt;br/&gt;into the mempool), and also let them actually bump the fees of second-level&lt;br/&gt;HTLC transactions.&lt;br/&gt;&lt;br/&gt;In addition to being able to pay much lower fees (&amp;#34;just enough&amp;#34; to get into&lt;br/&gt;the chain), anchor commitments allow second-level HTLC _aggregation_, This&lt;br/&gt;means that for HTLCs with the same expiry height, a peer is able to _batch_&lt;br/&gt;them all into a single transaction, further saving on fees.&lt;br/&gt;&lt;br/&gt;lnd shipped with a form of anchor commitments in our past major release&lt;br/&gt;(v0.10.0-beta). In that release the format is opt in, and is enabled with a&lt;br/&gt;startup command-line flag. For 0.11, we&amp;#39;re planning on making this the&lt;br/&gt;default commitment type, giving all users that update the ability to&lt;br/&gt;_finally_ have proper fee control of their commitments, and second-level&lt;br/&gt;HTLC transactions.&lt;br/&gt;&lt;br/&gt;&amp;gt; The direction of HTLCs are chosen so that the amount is taken from the&lt;br/&gt;&amp;gt; `to_remote` output of the attacker (obviously on the victims side it will&lt;br/&gt;&amp;gt; be the `to_local` output)&lt;br/&gt;&lt;br/&gt;One relevant detail here is that if the attacker is to attempt this with&lt;br/&gt;minimal setup, then they&amp;#39;ll need to be the ones that open the channel.&lt;br/&gt;Since they&amp;#39;re the initiator, they&amp;#39;ll actually be the ones paying the fees&lt;br/&gt;rendering this attempt moot.&lt;br/&gt;&lt;br/&gt;Alternatively, they could use something like Lightning Loop to gain the&lt;br/&gt;_outbound_ bandwidth (Loop In) needed to attempt this attack (using inbound&lt;br/&gt;opened channels, but they&amp;#39;ll need to pay for that bandwidth, adding a&lt;br/&gt;further cost to the attack. Not to mention that they&amp;#39;ll need to pay on-chain&lt;br/&gt;fees to sweep the HTLCs they created themselves. In short, this attack isn&amp;#39;t&lt;br/&gt;costless as they&amp;#39;ll need to acquire outbound liquidity for an incoming&lt;br/&gt;channel, and also need to pay fees independent of the &amp;#34;success&amp;#34; of their&lt;br/&gt;attack.&lt;br/&gt;&lt;br/&gt;&amp;gt; I quote from BOLT 02 which suggests a buffer of a factor of 5&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure how many implementations actually follow this in practice.&lt;br/&gt;FWIW, lnd doesn&amp;#39;t.&lt;br/&gt;&lt;br/&gt;&amp;gt; Additionally the victim will also have to swipe all offered HTLCs (which&lt;br/&gt;&amp;gt; will be additional costs but could be done once the fees came down) so we&lt;br/&gt;&amp;gt; neglect them.&lt;br/&gt;&lt;br/&gt;No, the attacker is the one that needs to sweep these HTLCs, since they&lt;br/&gt;offered them. This adds to their costs.&lt;br/&gt;&lt;br/&gt;&amp;gt; Knowing that this will happen and that the victim has to spend those funds&lt;br/&gt;&amp;gt; (publishing old state obviously does not work!) the attacker has a time&lt;br/&gt;&amp;gt; window to blackmail the victim outside of the lightning network protocol&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think this is always the case. Depending on the minimum HTLC&lt;br/&gt;settings in the channel (another mitigation), and the distribution of funds&lt;br/&gt;in the channel, it may be the case that the victim doesn&amp;#39;t have any funds in&lt;br/&gt;the channel at all (everything was on the attacker&amp;#39;s side). In that case,&lt;br/&gt;the &amp;#34;victim&amp;#34; doesn&amp;#39;t really care if this channel is clogged up as they&lt;br/&gt;really have no stake in this channel.&lt;br/&gt;&lt;br/&gt;&amp;gt; Also you might say that an attacker needs many incoming channels to&lt;br/&gt;&amp;gt; execute this attack. This can be achieved by gaming the autopilot.&lt;br/&gt;&lt;br/&gt;As mentioned above, gaining purely incoming channels doesn&amp;#39;t allow the&lt;br/&gt;attacker to launch this attack, as they&amp;#39;ll be unable to _send out_ from any&lt;br/&gt;of those channels.&lt;br/&gt;&lt;br/&gt;&amp;gt; 1. The current solution is to just not use up the max value of htlc&amp;#39;s.&lt;br/&gt;&amp;gt; Eclaire and c-lightning by default only use up to 30 htlcs.&lt;br/&gt;&lt;br/&gt;IMO, this isn&amp;#39;t a solution. Lowering the max number of HTLCs in-flight just&lt;br/&gt;makes it easier (lowers the capital costs) to jam a channel. The authors of&lt;br/&gt;the paper you linked have another paper exploring these types of attacks&lt;br/&gt;[1], and cite the _hard coded_ limit of 483 HTLCS as an enabling factor.&lt;br/&gt;&lt;br/&gt;&amp;gt; 2. Probably the best fix (not sure if I understand the consequences&lt;br/&gt;&amp;gt; correctly) is coming from this PR to bitcoin core&lt;br/&gt;&lt;br/&gt;I think you&amp;#39;re misinterpreting this PR, but see my first paragraph about&lt;br/&gt;anchor commitments which that PR enables.&lt;br/&gt;&lt;br/&gt;&amp;gt; 3. Don&amp;#39;t overpay fees in commitment transactions. We can&amp;#39;t foresee the&lt;br/&gt;&amp;gt; future anyway&lt;br/&gt;&lt;br/&gt;Anchors let you do this ;)&lt;br/&gt;&lt;br/&gt;&amp;gt; 4. Don&amp;#39;t add htlcs for which the on chain fee is higher than the HTLCs&lt;br/&gt;&amp;gt; value (like we do with sub dust amounts and sub satoshi amounts.&lt;br/&gt;&lt;br/&gt;This is already how &amp;#34;dust HTLCs&amp;#34; are calculated. The amount remaining from&lt;br/&gt;the HTLC after it pays for its second-level transaction needs to be above&lt;br/&gt;dust. This policy can be asymmetric across commitments in the channel.&lt;br/&gt;&lt;br/&gt;&amp;gt; 5. Somehow be able to aggregate htlc&amp;#39;s.&lt;br/&gt;&lt;br/&gt;Anchors let you do this on the transaction level (MIMO 2nd level HTLC&lt;br/&gt;transactions).&lt;br/&gt;&lt;br/&gt;I hope other implementations join lnd in deploying anchor commitments to&lt;br/&gt;mitigate nuisance attacks like this, and _finally_ give users better fee&lt;br/&gt;control for channels and any off-chain contracts within those channels.&lt;br/&gt;&lt;br/&gt;BTW, the &amp;#34;Flood &amp;amp; Loot&amp;#34; paper you linked mentions anchor commitments as a&lt;br/&gt;solution towards the end of the paper. However, they erroneously state that&lt;br/&gt;an attacker would be able to spend their HTLC with a _non replaceable_&lt;br/&gt;transaction. This isn&amp;#39;t the case since all redemption paths are encumbered&lt;br/&gt;with a CSV delay of 1. This delay forces the attacker to spend the output&lt;br/&gt;with an input that has a non-final sequence, meaning the transaction is&lt;br/&gt;RBF-able.&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://arxiv.org/abs/2002.06564&#34;&gt;https://arxiv.org/abs/2002.06564&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, Jun 17, 2020 at 3:30 AM René Pickhardt 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; Hey everyone and of course good morning ZmnSCPxj (:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; about 11 months ago I discovered a potential blackmail attack with HTLCs&lt;br/&gt;&amp;gt; after answering this question on stack exchange (c.f&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://bitcoin.stackexchange.com/questions/89232/why-is-my-spendable-msat-much-lower-than-msatoshi-to-us/89235#89235&#34;&gt;https://bitcoin.stackexchange.com/questions/89232/why-is-my-spendable-msat-much-lower-than-msatoshi-to-us/89235#89235&lt;/a&gt;).&lt;br/&gt;&amp;gt; This attack is similar to the one that was possible with tx malleability on&lt;br/&gt;&amp;gt; the funding transaction without the segwit upgrade (c.f.&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://commons.wikimedia.org/w/index.php?title=File:Introduction_to_the_Lightning_Network_Protocol_and_the_Basics_of_Lightning_Technology_(BOLT_aka_Lightning-rfc).pdf&amp;amp;page=126&#34;&gt;https://commons.wikimedia.org/w/index.php?title=File:Introduction_to_the_Lightning_Network_Protocol_and_the_Basics_of_Lightning_Technology_(BOLT_aka_Lightning-rfc).pdf&amp;amp;page=126&lt;/a&gt;).&lt;br/&gt;&amp;gt; Meaning an attacker can force a victim to lose money and use this fact to&lt;br/&gt;&amp;gt; blackmail the victim, to potentially gain / steal some of the lost funds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; TL;DR:&lt;br/&gt;&amp;gt; =====&lt;br/&gt;&amp;gt; * Depending on the circumstances this attack allows an attacker to make&lt;br/&gt;&amp;gt; channel partners lose a substantial amount of BTC without substantial costs&lt;br/&gt;&amp;gt; for the attacker.&lt;br/&gt;&amp;gt; * Depending on the exact circumstances this could be for example ~0.15&lt;br/&gt;&amp;gt; BTC. In particular it demonstrates why opening a channel is not an entirely&lt;br/&gt;&amp;gt; trustless activity.&lt;br/&gt;&amp;gt; * The attacker will reliably only be able to force the victim to lose this&lt;br/&gt;&amp;gt; amount of Bitcoin.&lt;br/&gt;&amp;gt; * It is not clear how in practice the attacker could gain this amount or&lt;br/&gt;&amp;gt; parts of it as this would involve not only game theory but also rather&lt;br/&gt;&amp;gt; quick communication between attacker and victim and customized Lightning&lt;br/&gt;&amp;gt; nodes which at least for the victim would be unlikely to exist.&lt;br/&gt;&amp;gt; * None of the suggested fixes seems to be satisfying though the current&lt;br/&gt;&amp;gt; solution of lowering the maximum amount of HTLCs that can concurrently be&lt;br/&gt;&amp;gt; in flight seems to be a reasonable start for now.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Timeline on Disclosure&lt;br/&gt;&amp;gt; =================&lt;br/&gt;&amp;gt; I have disclosed this attack on Sunday July 21st 2019 to Fabrice Drouin&lt;br/&gt;&amp;gt; (and shortly after to Christian Decker) in a phone call who in turn has&lt;br/&gt;&amp;gt; discussed it with people from the other implementations. From his feedback&lt;br/&gt;&amp;gt; I understood that people working on implementations have been more or less&lt;br/&gt;&amp;gt; aware of the possibility of this attack. Fabrice also mentioned that he&lt;br/&gt;&amp;gt; believed implementations currently try to mitigate this by setting low&lt;br/&gt;&amp;gt; limits of allowed / accepted HTLCs in flight. However at that time this was&lt;br/&gt;&amp;gt; only true for e-clair. It is now also true for c-lightning and as far as I&lt;br/&gt;&amp;gt; know still not true for lnd. Fabrice said that the people he talked to have&lt;br/&gt;&amp;gt; suggested that I should eventually describe the attack in public to raise&lt;br/&gt;&amp;gt; awareness (also from the group of node operators) for the problems related&lt;br/&gt;&amp;gt; to this attack. He also suggested that - if I wanted to - I should update&lt;br/&gt;&amp;gt; the rfc with recommendations  and warnings. While I already have in mind&lt;br/&gt;&amp;gt; how to change the rfc I wanted to start the discussion first. Maybe some&lt;br/&gt;&amp;gt; people find better fixes than just a warning that I have in mind. So far I&lt;br/&gt;&amp;gt; didn&amp;#39;t do anything because I wanted to also give lnd the chance to handle&lt;br/&gt;&amp;gt; the problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are two reasons I disclose this attack today:&lt;br/&gt;&amp;gt; 1.) I think almost 1 year is enough time to do something about it. The&lt;br/&gt;&amp;gt; only implementation that afaik didn&amp;#39;t yet is lnd (see below) but I got&lt;br/&gt;&amp;gt; roasbeefs ok last week to go ahead and publish the attack anyway so that we&lt;br/&gt;&amp;gt; can have a broader discussion on mitigation strategies.&lt;br/&gt;&amp;gt; 2.) The attack seems actually very similar to the one described in the&lt;br/&gt;&amp;gt; &amp;#34;Flood &amp;amp; Loot: A Systemic Attack On The Lightning Network&amp;#34; - paper which&lt;br/&gt;&amp;gt; came out 2 days ago (c.f.: &lt;a href=&#34;https://arxiv.org/abs/2006.08513&#34;&gt;https://arxiv.org/abs/2006.08513&lt;/a&gt; ). I believe&lt;br/&gt;&amp;gt; any person reading that paper will understand the possibility of the attack&lt;br/&gt;&amp;gt; that I describe anyway so I believe it is now more or less public anyway&lt;br/&gt;&amp;gt; and thus time for an open / public discussion.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The main difference between the two attacks (if I understand this novel&lt;br/&gt;&amp;gt; paper correctly) is: In the &amp;#34;flood and loot&amp;#34;-attack one tries to steal the&lt;br/&gt;&amp;gt; HTLC output of the victims. Where in the &amp;#34;flood and blackmail&amp;#34;-attack that&lt;br/&gt;&amp;gt; I describe I try to to force the victim to lose almost all its funds due to&lt;br/&gt;&amp;gt; high on chain fees (Which I could use to blackmail the victim)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Description of the attack&lt;br/&gt;&amp;gt; ===================&lt;br/&gt;&amp;gt; Let us assume the victim has funded a channel with an attacker meaning it&lt;br/&gt;&amp;gt; will have to pay the fees for the commitment transaction in case of a force&lt;br/&gt;&amp;gt; close.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; During a fee spike (let us assume fee estimators suggest 150 sat / byte)&lt;br/&gt;&amp;gt; the attacker spams this channel with the maximum possible amount of HTLCs&lt;br/&gt;&amp;gt; that the protocol allows. The HTLCs can be of a small value but need to be&lt;br/&gt;&amp;gt; bigger than the dust limit so that additional outputs are actually added to&lt;br/&gt;&amp;gt; the commitment transaction which makes it quite large in Bytes. According&lt;br/&gt;&amp;gt; to the BOLTs these are 483 additional outputs to the commitment&lt;br/&gt;&amp;gt; transaction.&lt;br/&gt;&amp;gt; The direction of HTLCs are chosen so that the amount is taken from the&lt;br/&gt;&amp;gt; `to_remote` output of the attacker (obviously on the victims side it will&lt;br/&gt;&amp;gt; be the `to_local` output) For the actual attack it does not matter in which&lt;br/&gt;&amp;gt; direction the HTLCs are spammed but economically the direction I propose&lt;br/&gt;&amp;gt; makes even more sense for the attacker and can be achieved with circular&lt;br/&gt;&amp;gt; onions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The attacked channel partner will happily - according to the protocol -&lt;br/&gt;&amp;gt; use a higher fee than the current fee rate. I quote from BOLT 02 which&lt;br/&gt;&amp;gt; suggests a buffer of a factor of 5&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#updating-fees-update_fee&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#updating-fees-update_fee&lt;/a&gt;:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The node responsible for paying the Bitcoin fee [...] SHOULD send&lt;br/&gt;&amp;gt; update_fee to ensure the current fee rate is sufficient (by a significant&lt;br/&gt;&amp;gt; margin) for timely processing of the commitment transaction. [...] Given&lt;br/&gt;&amp;gt; the variance in fees, and the fact that the transaction may be spent in the&lt;br/&gt;&amp;gt; future, it&amp;#39;s a good idea for the fee payer to keep a good margin (say 5x&lt;br/&gt;&amp;gt; the expected fee requirement); but, due to differing methods of fee&lt;br/&gt;&amp;gt; estimation, an exact value is not specified.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This overpayment of fees will result in 750 sat / byte for this fee spike&lt;br/&gt;&amp;gt; scenario. This is by the way not completely unrealistic [I recently opened&lt;br/&gt;&amp;gt; a channel with 2.56 sat / byte (c.f.:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://www.smartbit.com.au/tx/c0ac6cfe15e0d0c921362ab9fad998a8a8e16cd8d9d4159487dd69141ea2b9b0&#34;&gt;https://www.smartbit.com.au/tx/c0ac6cfe15e0d0c921362ab9fad998a8a8e16cd8d9d4159487dd69141ea2b9b0&lt;/a&gt;)&lt;br/&gt;&amp;gt; and the channel was force closed a couple minutes later due to an&lt;br/&gt;&amp;gt; implementation bug resulting in fees of 101.17 sat / byte (c.f.:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://www.smartbit.com.au/tx/e32135315ec147bb27f771b2e15c7178ea573afd16cd4970bf814c9b18bc46e3&#34;&gt;https://www.smartbit.com.au/tx/e32135315ec147bb27f771b2e15c7178ea573afd16cd4970bf814c9b18bc46e3&lt;/a&gt;&lt;br/&gt;&amp;gt; )&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As far as I understand the appendix of BOLT 03 offered HTLCs are 43 Byte&lt;br/&gt;&amp;gt; in size (c.f.:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#appendix-a-expected-weights&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#appendix-a-expected-weights&lt;/a&gt;)&lt;br/&gt;&amp;gt; resulting in the following additional fees for the spammed commitment&lt;br/&gt;&amp;gt; transaction:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; fee (for 483 htlcs)  = 483 * 43 byte * 750 sat / byte = 15576750 sat =&lt;br/&gt;&amp;gt; 0.1557675 BTC&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Additionally the victim will also have to swipe all offered HTLCs (which&lt;br/&gt;&amp;gt; will be additional costs but could be done once the fees came down) so we&lt;br/&gt;&amp;gt; neglect them.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Once all HTLCs are set up the attacker will stop signing commitment&lt;br/&gt;&amp;gt; transactions. In the beginning this is not suspicious as the HTLCs will&lt;br/&gt;&amp;gt; take some time to settle anyway. But also when fees go down and the victim&lt;br/&gt;&amp;gt; who funded the channel wants to update the fees the attacker will just not&lt;br/&gt;&amp;gt; be responsive. Eventually the victim will dare to force close the channel&lt;br/&gt;&amp;gt; with all those expensive HTLCs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Knowing that this will happen and that the victim has to spend those funds&lt;br/&gt;&amp;gt; (publishing old state obviously does not work!) the attacker has a time&lt;br/&gt;&amp;gt; window to blackmail the victim outside of the lightning network protocol:&lt;br/&gt;&amp;gt; &amp;#34;Either you will pay those 0.1557675 BTC of fees or we will collaboratively&lt;br/&gt;&amp;gt; close the channel but that will cost you part of the amount you lost.&amp;#34; Game&lt;br/&gt;&amp;gt; theory suggests that the attacker will be able to claim the major fraction&lt;br/&gt;&amp;gt; of the BTC (c.f. &lt;a href=&#34;https://en.wikipedia.org/wiki/Ultimatum_game&#34;&gt;https://en.wikipedia.org/wiki/Ultimatum_game&lt;/a&gt; that are&lt;br/&gt;&amp;gt; frozen in tx fees as the victim effectively already has lost that money and&lt;br/&gt;&amp;gt; can only gain something back.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thoughts&lt;br/&gt;&amp;gt; =======&lt;br/&gt;&amp;gt; You might say that the blackmail part of this attack is unrealistic as the&lt;br/&gt;&amp;gt; blackmailing person will not have enough time to successfully do the&lt;br/&gt;&amp;gt; blackmail as the channel that is not operational will fail.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1.) The only thing that lightning nodes might do is a fee update as the&lt;br/&gt;&amp;gt; htlcs stuffed the channel so I believe there is actually some time to&lt;br/&gt;&amp;gt; contact the victim.&lt;br/&gt;&amp;gt; 2.) What if the attacker is a mining pool who is just interested in high&lt;br/&gt;&amp;gt; fees who does not even need to do the blackmailing stuff but will just&lt;br/&gt;&amp;gt; force close the channel once the htlcs are set up?&lt;br/&gt;&amp;gt; 3.) The attacker might not even be interested in blackmailing the victim.&lt;br/&gt;&amp;gt; The attacker could just be interested in harming the victim. Though it&lt;br/&gt;&amp;gt; might certainly be a challenge to target a specific victim and trick it&lt;br/&gt;&amp;gt; into opening a channel with an attacker.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Also you might say that an attacker needs many incoming channels to&lt;br/&gt;&amp;gt; execute this attack. This can be achieved by gaming the autopilot. an&lt;br/&gt;&amp;gt; attacker can start by creating many channels making him a highly likely&lt;br/&gt;&amp;gt; channel partner for autopilot users (who will also fund the channel). Such&lt;br/&gt;&amp;gt; a highly connected node might also be interesting for non autopilot users.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Implementations&lt;br/&gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I looked at the code myself. I hope I do oversee things but to me it looks&lt;br/&gt;&amp;gt; like only eclaire was somehow mitigating this attack from being exploited.&lt;br/&gt;&amp;gt; (by a default config of 30 accepted htlcs which will protect the average&lt;br/&gt;&amp;gt; user and is much lower than the 483) and c-lightning has merged a patch&lt;br/&gt;&amp;gt; from me which I provided after I disclosed the attack:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## clightning:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; c-lightning did not by default set a hard cap on htlcs before version&lt;br/&gt;&amp;gt; 0.7.2 but then merged my patch&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/ElementsProject/lightning/pull/2858&#34;&gt;https://github.com/ElementsProject/lightning/pull/2858&lt;/a&gt; which tried to&lt;br/&gt;&amp;gt; resemble the eclair defaults&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## eclaire:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; the max accepted htlc value per channel is set as a constant to 483 which&lt;br/&gt;&amp;gt; follows the recommendation of the BOLTs:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/ACINQ/eclair/blob/e62adf2deae213d2cd0f2a6874227dcfc57880ae/eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala#L52&#34;&gt;https://github.com/ACINQ/eclair/blob/e62adf2deae213d2cd0f2a6874227dcfc57880ae/eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala#L52&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The value is tested against at:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/ACINQ/eclair/blob/f724efaa76b256048de18f706e9cb58ecbebd6aa/eclair-core/src/main/scala/fr/acinq/eclair/channel/Helpers.scala#L99&#34;&gt;https://github.com/ACINQ/eclair/blob/f724efaa76b256048de18f706e9cb58ecbebd6aa/eclair-core/src/main/scala/fr/acinq/eclair/channel/Helpers.scala#L99&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; and:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/ACINQ/eclair/blob/f724efaa76b256048de18f706e9cb58ecbebd6aa/eclair-core/src/main/scala/fr/acinq/eclair/channel/Helpers.scala#L132&#34;&gt;https://github.com/ACINQ/eclair/blob/f724efaa76b256048de18f706e9cb58ecbebd6aa/eclair-core/src/main/scala/fr/acinq/eclair/channel/Helpers.scala#L132&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; and:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/ACINQ/eclair/blob/93d9369f900766171f2ddf579e8b12e28d8f0d25/eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala#L154&#34;&gt;https://github.com/ACINQ/eclair/blob/93d9369f900766171f2ddf579e8b12e28d8f0d25/eclair-core/src/main/scala/fr/acinq/eclair/channel/Commitments.scala#L154&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However the default config file specifies a maximum amount of 30 accepted&lt;br/&gt;&amp;gt; htlcs at:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/ACINQ/eclair/blob/9afb26e09c69dd5d6a14732baf5dcdf2b7a9142b/eclair-core/src/main/resources/reference.conf#L62&#34;&gt;https://github.com/ACINQ/eclair/blob/9afb26e09c69dd5d6a14732baf5dcdf2b7a9142b/eclair-core/src/main/resources/reference.conf#L62&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## lnd&lt;br/&gt;&amp;gt; It seems like lnd did not and last time I checked (maybe I oversaw&lt;br/&gt;&amp;gt; something) does not set a hard cap on htlcs by default. The way how I&lt;br/&gt;&amp;gt; understand the code they allow up to 483 htlcs by default:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The test when adding an htlc if it is beyond the maximum accepted values&lt;br/&gt;&amp;gt; is here:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lnd/blob/970d7604071baae227db42d4665ef9d1b56988e8/lnwallet/channel.go#L3795&#34;&gt;https://github.com/lightningnetwork/lnd/blob/970d7604071baae227db42d4665ef9d1b56988e8/lnwallet/channel.go#L3795&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; the default configuration seems to be here (and in the most recent commit&lt;br/&gt;&amp;gt; the line still exists):&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lnd/blob/8b04cfbf12f460853e8c55611cd1bba21b1510ef/input/size.go#L187&#34;&gt;https://github.com/lightningnetwork/lnd/blob/8b04cfbf12f460853e8c55611cd1bba21b1510ef/input/size.go#L187&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; the software will accept up to 483 htlcs according to this line:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lnd/blob/111cbeaa990cba78563d6cc8c19b152e2d3042f6/lnwallet/reservation.go#L314&#34;&gt;https://github.com/lightningnetwork/lnd/blob/111cbeaa990cba78563d6cc8c19b152e2d3042f6/lnwallet/reservation.go#L314&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I could not find any spec lower than that in the suggested sample config&lt;br/&gt;&amp;gt; at:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf&#34;&gt;https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ideas for Fixes&lt;br/&gt;&amp;gt; ===========&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I am completely unhappy with each of the following ideas. I hope you will&lt;br/&gt;&amp;gt; come up with smarter solutions. I believe the solution is not obvious. Thus&lt;br/&gt;&amp;gt; I thought it makes sense in the brainstorm phase to even post some ideas&lt;br/&gt;&amp;gt; with obvious drawbacks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. The current solution is to just not use up the max value of&lt;br/&gt;&amp;gt; htlc&amp;#39;s. Eclaire and c-lightning by default only use up to 30 htlcs.&lt;br/&gt;&amp;gt; 2. Probably the best fix (not sure if I understand the consequences&lt;br/&gt;&amp;gt; correctly) is coming from this PR to bitcoin core (c.f.&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/15681&#34;&gt;https://github.com/bitcoin/bitcoin/pull/15681&lt;/a&gt; by @TheBlueMatt . If I get&lt;br/&gt;&amp;gt; it correctly with that we could always have low fees and ask the person who&lt;br/&gt;&amp;gt; want to claim their outputs to pay fees. This excludes overpayment and&lt;br/&gt;&amp;gt; could happen at a later stage when fees are not spiked. Still the victim&lt;br/&gt;&amp;gt; who offered the htlcs would have to spend those outputs at some time.&lt;br/&gt;&amp;gt; 3. Don&amp;#39;t overpay fees in commitment transactions. We can&amp;#39;t foresee the&lt;br/&gt;&amp;gt; future anyway&lt;br/&gt;&amp;gt; 4. Don&amp;#39;t add htlcs for which the on chain fee is higher than the HTLCs&lt;br/&gt;&amp;gt; value (like we do with sub dust amounts and sub satoshi amounts. This would&lt;br/&gt;&amp;gt; at least make the attack expensive as the attacker would have to bind a lot&lt;br/&gt;&amp;gt; of liquidity.&lt;br/&gt;&amp;gt; 5. Somehow be able to aggregate htlc&amp;#39;s. In a world where we use payment&lt;br/&gt;&amp;gt; points instead of preimages we might be able to do so. It would be really&lt;br/&gt;&amp;gt; cool if separate HTLC&amp;#39;s could be combined to 1 single output. I played&lt;br/&gt;&amp;gt; around a little bit but I have not come up with a scheme that is more&lt;br/&gt;&amp;gt; compact in all cases. Thus I just threw in the idea.&lt;br/&gt;&amp;gt; 6. Split onchain fees differently (now the attacker would also lose fees&lt;br/&gt;&amp;gt; by conducting this attack) - No I don&amp;#39;t want to start yet another fee&lt;br/&gt;&amp;gt; bikeshadding debate. (In particular I believe that a different split of&lt;br/&gt;&amp;gt; fees might make the Flood &amp;amp; Loot attack economically more viable which&lt;br/&gt;&amp;gt; relies on the same principle)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Independently I think we should have a hint in our readme file about where&lt;br/&gt;&amp;gt; and how people can disclose attacks and vulnerabilities. Implementations&lt;br/&gt;&amp;gt; have this but the BOLTs do not.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; with kind regards Rene&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://www.rene-pickhardt.de&#34;&gt;https://www.rene-pickhardt.de&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Skype: rene.pickhardt&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/20200621/992826d6/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200621/992826d6/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstf69f2t5tgqjnxg9j6sf3kcppgzv3s54j0lwfl6wtj4tawrceazczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v44ecnr</id>
    
      <title type="html">📅 Original date posted:2020-04-23 📝 Original message: (this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstf69f2t5tgqjnxg9j6sf3kcppgzv3s54j0lwfl6wtj4tawrceazczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v44ecnr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrdstsc6lusnrznapxhucqd0sxk7dpsntha7uext9j48y229d95zg7rh2jj&#39;&gt;nevent1q…h2jj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-23&lt;br/&gt;📝 Original message:&lt;br/&gt;(this may be kind of off-topic, more about DLC deployment than PTLCs&lt;br/&gt;themselves)&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;this date since the paper was originally released. Tadge has had working&lt;br/&gt;code than can be deployed today for some time now, and other parties like&lt;br/&gt;DG-Lab have created full-fledge demos with the system working end to end.&lt;br/&gt;Instead, the real impediment has been the bootstrapping of the oracles&lt;br/&gt;which the scheme critically depends upon.&lt;br/&gt;&lt;br/&gt;Without oracles, none of it really works. Although, it&amp;#39;s also the case that&lt;br/&gt;there&amp;#39;re measures to prevent the oracles from equivocating (reporting two&lt;br/&gt;conflicting prices/events for a particular instance), bootstrapping a new&lt;br/&gt;oracle still requires a very high degree of trust as they can lie or report&lt;br/&gt;incorrect data. As a result, actually deploying an oracle for a system like&lt;br/&gt;this is tricky business, as it&amp;#39;s a trusted centralized entity, so it will&lt;br/&gt;run into all the normal meatspace/legal/operational risk that any trusted&lt;br/&gt;centralized service would encounter.&lt;br/&gt;&lt;br/&gt;Earlier today, Coinbase announced that they were releasing a new price&lt;br/&gt;oracle for the ETH ecosystem [1]. This caught my attention as one can&lt;br/&gt;imagine, that it would be even simpler for them to deploy a DLC oracle which&lt;br/&gt;exports an API to obtain signed prices/events. As an existing large company&lt;br/&gt;in the space (depending on who you talk to), they&amp;#39;re a trusted entity, which&lt;br/&gt;has earned a good reputation over the years (solving this&lt;br/&gt;bootstrapping/trust issue). If they do eventually grow the service to also&lt;br/&gt;encompass this use case, then it enables a number of possibilities, as&lt;br/&gt;there&amp;#39;s still a ton of value in just base DLC-specific channels (or one off&lt;br/&gt;contracts), without all the fancy barrier escrow scriptless scipts swappy&lt;br/&gt;swap swap stuff.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;[1]:&lt;br/&gt;&lt;a href=&#34;https://blog.coinbase.com/introducing-the-coinbase-price-oracle-6d1ee22c7068&#34;&gt;https://blog.coinbase.com/introducing-the-coinbase-price-oracle-6d1ee22c7068&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Apr 23, 2020 at 7:52 AM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Laolu,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for the response :)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I agree that some more framing probably would have been good to have in my&lt;br/&gt;&amp;gt; update.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; First, I want to clarify that my intention is not to implement a&lt;br/&gt;&amp;gt; PTLC-based lightning network on top of ECDSA adaptor signatures, as I do&lt;br/&gt;&amp;gt; believe that using Schnorr will be superior, but rather I wish to get some&lt;br/&gt;&amp;gt; PoC sandbox with which to start implementing and testing out the long list&lt;br/&gt;&amp;gt; of currently theoretical proposals surrounding PTLCs, most of which are&lt;br/&gt;&amp;gt; implementation agnostic (to a degree anyway). I think it would be super&lt;br/&gt;&amp;gt; beneficial to have more fleshed out with respect to what some challenges of&lt;br/&gt;&amp;gt; a Payment Point LN are going to be than we understand now, before Schnorr&lt;br/&gt;&amp;gt; is implemented and it is time to commit to some PTLC scheme for real.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Second, I agree that I&amp;#39;ve probably understated somewhat the changes that&lt;br/&gt;&amp;gt; will be needed in most implementations as I was mostly thinking about what&lt;br/&gt;&amp;gt; would need to change in the BOLTs, which does actually seem relatively&lt;br/&gt;&amp;gt; minimal (although as you mention, these minimal changes to the BOLTs do&lt;br/&gt;&amp;gt; trigger large changes in many implementations). Also, good point on how&lt;br/&gt;&amp;gt; BOLT 11 (invoicing) will have to be altered as well, must&amp;#39;ve slipped my&lt;br/&gt;&amp;gt; mind.&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; On Wed, Apr 22, 2020 at 8:17 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi Nadav,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&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; and integrate new technologies as they pop up.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&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;&lt;br/&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; network-level&lt;br/&gt;&amp;gt;&amp;gt; update undertaken to the Lightning Network thus far. In the past, we&lt;br/&gt;&amp;gt;&amp;gt; rolled&lt;br/&gt;&amp;gt;&amp;gt; out the new onion blob format (which enables changes like this), but none&lt;br/&gt;&amp;gt;&amp;gt; of&lt;br/&gt;&amp;gt;&amp;gt; the intermediate nodes actually need to modify their behavior. New payment&lt;br/&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; end-to-end update that has been rolled out so far in a de-synchronized&lt;br/&gt;&amp;gt;&amp;gt; manner.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Re-phrasing deploying this requires changes to: the core channel state&lt;br/&gt;&amp;gt;&amp;gt; machine (the protocol we use to make commitment updates), HTLC scripts,&lt;br/&gt;&amp;gt;&amp;gt; on-chain HTLC handling and resolution, path finding algorithms (to only&lt;br/&gt;&amp;gt;&amp;gt; see&lt;br/&gt;&amp;gt;&amp;gt; out the new PTLC-enabled nodes), invoice changes and onion blob&lt;br/&gt;&amp;gt;&amp;gt; processing.&lt;br/&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; practice, and the degree of synchronization required to pull it all off&lt;br/&gt;&amp;gt;&amp;gt; properly.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&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; for&lt;br/&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; technique? As dual deployment is compatible (we can make the onion blobs&lt;br/&gt;&amp;gt;&amp;gt; for&lt;br/&gt;&amp;gt;&amp;gt; both types the same), a path has always existed to first roll out with the&lt;br/&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; version as well. However there&amp;#39;s also a risk here as depending on how&lt;br/&gt;&amp;gt;&amp;gt; quickly things can be rolled out, schnorr may become available&lt;br/&gt;&amp;gt;&amp;gt; mid-development, which would possibly cause us to reconsider the ECDSA&lt;br/&gt;&amp;gt;&amp;gt; path&lt;br/&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;&lt;br/&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; scriptless-scripts &#43; taproot&amp;#34; is rather large [1], and the addition of&lt;br/&gt;&amp;gt;&amp;gt; this&lt;br/&gt;&amp;gt;&amp;gt; new technique allows for an even larger set of deployment possibilities.&lt;br/&gt;&amp;gt;&amp;gt; This latest ECDSA variant is much simpler than the prior ones (which had a&lt;br/&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; can&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt; be used to modify the funding output.&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://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;&lt;br/&gt;&amp;gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Hello all,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&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; surrounding replacing Hash-TimeLock Contracts (HTLCs) with Point-TimeLock&lt;br/&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; sparking interest, discussion, development, etc.&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; We Want Payment Points!&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; Using point-locks (in PTLCs) instead of hash-locks (in HTLCs) for&lt;br/&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; the same hash across payment routes (barring fancy ZKPs which are inferior&lt;br/&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; introduction to the topic, see&lt;br/&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;&lt;br/&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; wormhole attacks, PTLC-based lightning channels open the door to a large&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Stuckless (retry-able) Payments with proof of payment (&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Escrow contracts over Lightning (&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; High/DLOG AMP (&lt;br/&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; )&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Stuckless &#43; AMP (an improvement on Boomerang) (&lt;br/&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; )&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Pay-for-signature (&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Pay-for-commitment (&lt;br/&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; )&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Monotonic access structures on payment completion (&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Ideal Barrier Escrow Implementation (&lt;br/&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;&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Atomic multi-payment setup (&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Lightning Discreet Log Contract (&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Atomic multi-payment update (&lt;br/&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;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Lightning Discreet Log Contract Novation/Transfer (&lt;br/&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;&lt;br/&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; so make sure to respond if I&amp;#39;ve missed any known ones.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; How Do We Get Payment Points?&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; Eventually, once we have Taproot, we can use 2p-Schnorr adaptor&lt;br/&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; here&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; In the meantime, Lloyd has written about a way to do 1p-ECDSA adaptor&lt;br/&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 with&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; OP_CHECKMULTISIG to allows us to execute PTLCs on Bitcoin today!&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&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; &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; it in Bouncy Castle in Bitcoin-S with some testing against this branch (&lt;br/&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; that as nickler states on his PR, &amp;#34;IT IS EXTREMELY DANGEROUS AND RECKLESS&lt;br/&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;&lt;br/&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; 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;&lt;br/&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; &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;&lt;br/&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; implementation (or Rust Lightning) to be a proof of concept ECDSA-PTLC node&lt;br/&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; above.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&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; 1) update_add_ptlc will have a 32 byte x-coordinate (of a point) rather&lt;br/&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; byte scalar tweak for each hop. As per [link multi-hop locks]. The last&lt;br/&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; tweaks.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&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; than valid (71/72 byte) ECDSA signatures on PTLC-success transactions.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&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; little simpler as we no longer need to explicitly check the payment&lt;br/&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;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; the same) and require no pre-image in the witness, only a valid signature.&lt;br/&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; since only an adaptor signature was provided by remote so that the payment&lt;br/&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; pre-image can be then deduced by comparing adaptor and valid signatures).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&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; them!&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&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; Lightning Network that is safe and stable as soon as possible, and so I&lt;br/&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; so that when Taproot is finally at our disposal we can cleanly start moving&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; towards a more ideal Lightning :)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Nadav&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&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;&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/lightning-dev/attachments/20200423/61661e72/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200423/61661e72/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:54&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsruhrxcwa86rs4asrmd82pe2t4n3u09hfj7ggsekqdxktstl9x3wszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vsnm6tv</id>
    
      <title type="html">📅 Original date posted:2020-04-22 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsruhrxcwa86rs4asrmd82pe2t4n3u09hfj7ggsekqdxktstl9x3wszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vsnm6tv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgucdn9p2nrz4l44ql6605ey4krxf0k8p4pzjru58vmckfk0hfklstpnad8&#39;&gt;nevent1q…nad8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-22&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Nadav,&lt;br/&gt;&lt;br/&gt;Thanks for the updates! Super cool to see this concept continue to evolve&lt;br/&gt;and integrate new technologies as they pop up.&lt;br/&gt;&lt;br/&gt;&amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&lt;br/&gt;Rather than a &amp;#34;few changes&amp;#34;, this would to date be the largest network-level&lt;br/&gt;update undertaken to the Lightning Network thus far. In the past, we rolled&lt;br/&gt;out the new onion blob format (which enables changes like this), but none of&lt;br/&gt;the intermediate nodes actually need to modify their behavior. New payment&lt;br/&gt;types like MPP&#43;AMP only needed the _end points_ to update making this an&lt;br/&gt;end-to-end update that has been rolled out so far in a de-synchronized&lt;br/&gt;manner.&lt;br/&gt;&lt;br/&gt;Re-phrasing deploying this requires changes to: the core channel state&lt;br/&gt;machine (the protocol we use to make commitment updates), HTLC scripts,&lt;br/&gt;on-chain HTLC handling and resolution, path finding algorithms (to only see&lt;br/&gt;out the new PTLC-enabled nodes), invoice changes and onion blob processing.&lt;br/&gt;I&amp;#39;d caution against underestimating how long all of this will take in&lt;br/&gt;practice, and the degree of synchronization required to pull it all off&lt;br/&gt;properly.&lt;br/&gt;&lt;br/&gt;For a few years now the question we&amp;#39;ve all been pondering is: do we wait for&lt;br/&gt;scnhorr to roll out multi-hop locks, or just use the latest ECDSA based&lt;br/&gt;technique? As dual deployment is compatible (we can make the onion blobs for&lt;br/&gt;both types the same), a path has always existed to first roll out with the&lt;br/&gt;latest ECDSA based technique then follow up later to roll out the schnorr&lt;br/&gt;version as well. However there&amp;#39;s also a risk here as depending on how&lt;br/&gt;quickly things can be rolled out, schnorr may become available&lt;br/&gt;mid-development, which would possibly cause us to reconsider the ECDSA path&lt;br/&gt;and have the network purely use scnhorr to make things nice and uniform.&lt;br/&gt;&lt;br/&gt;Zooming out for a bit, the solution space of &amp;#34;how channels can look post&lt;br/&gt;scriptless-scripts &#43; taproot&amp;#34; is rather large [1], and the addition of this&lt;br/&gt;new technique allows for an even larger set of deployment possibilities.&lt;br/&gt;This latest ECDSA variant is much simpler than the prior ones (which had a&lt;br/&gt;few rounds of more involved ZKPs), but since it still uses OP_CMS, it can&amp;#39;t&lt;br/&gt;be used to modify the funding output.&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;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, Apr 22, 2020 at 8:13 AM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hello all,&lt;br/&gt;&amp;gt;&lt;br/&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; surrounding replacing Hash-TimeLock Contracts (HTLCs) with Point-TimeLock&lt;br/&gt;&amp;gt; Contracts (PTLCs) (aka Payment Hashes -&amp;gt; Payment Points) in hopes of&lt;br/&gt;&amp;gt; sparking interest, discussion, development, etc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We Want Payment Points!&lt;br/&gt;&amp;gt; -----------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Using point-locks (in PTLCs) instead of hash-locks (in HTLCs) for&lt;br/&gt;&amp;gt; lightning payments is an all around improvement. HTLCs require the use of&lt;br/&gt;&amp;gt; the same hash across payment routes (barring fancy ZKPs which are inferior&lt;br/&gt;&amp;gt; to PTLCs) while PTLCs allow for payment de-correlation along routes. For an&lt;br/&gt;&amp;gt; introduction to the topic, see&lt;br/&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;&lt;br/&gt;&amp;gt; In addition to improving privacy in this way and protecting against&lt;br/&gt;&amp;gt; wormhole attacks, PTLC-based lightning channels open the door to a large&lt;br/&gt;&amp;gt; variety of interesting applications that cannot be accomplished with HTLCs:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Stuckless (retry-able) Payments with proof of payment (&lt;br/&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;&lt;br/&gt;&amp;gt; Escrow contracts over Lightning (&lt;br/&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;&lt;br/&gt;&amp;gt; High/DLOG AMP (&lt;br/&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; )&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Stuckless &#43; AMP (an improvement on Boomerang) (&lt;br/&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; )&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Pay-for-signature (&lt;br/&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;&lt;br/&gt;&amp;gt; Pay-for-commitment (&lt;br/&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; )&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Monotonic access structures on payment completion (&lt;br/&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;&lt;br/&gt;&amp;gt; Ideal Barrier Escrow Implementation (&lt;br/&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;&lt;br/&gt;&amp;gt; And allowing for Barrier Escrows, we can even have&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Atomic multi-payment setup (&lt;br/&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;&lt;br/&gt;&amp;gt; Lightning Discreet Log Contract (&lt;br/&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;&lt;br/&gt;&amp;gt; Atomic multi-payment update (&lt;br/&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;&lt;br/&gt;&amp;gt; Lightning Discreet Log Contract Novation/Transfer (&lt;br/&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;&lt;br/&gt;&amp;gt; There are likely even more things that can be done with Payment Points so&lt;br/&gt;&amp;gt; make sure to respond if I&amp;#39;ve missed any known ones.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; How Do We Get Payment Points?&lt;br/&gt;&amp;gt; -----------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Eventually, once we have Taproot, we can use 2p-Schnorr adaptor signatures&lt;br/&gt;&amp;gt; in Lightning channels. For a detailed thread by ZmnSCPxj, see here&lt;br/&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;&lt;br/&gt;&amp;gt; In the meantime, Lloyd has written about a way to do 1p-ECDSA adaptor sigs&lt;br/&gt;&amp;gt; (&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 with&lt;br/&gt;&amp;gt; OP_CHECKMULTISIG to allows us to execute PTLCs on Bitcoin today!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Nickler has implemented this in a branch of secp256k1 (&lt;br/&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 it&lt;br/&gt;&amp;gt; in Bouncy Castle in Bitcoin-S with some testing against this branch (&lt;br/&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; that as nickler states on his PR, &amp;#34;IT IS EXTREMELY DANGEROUS AND RECKLESS&lt;br/&gt;&amp;gt; TO USE THIS MODULE IN PRODUCTION. DON&amp;#39;T!&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A demo of an on-chain PTLC I executed using nickler&amp;#39;s implementation on&lt;br/&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;&lt;br/&gt;&amp;gt; And waxwing did a lovely write-up about the crypto itself&lt;br/&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;&lt;br/&gt;&amp;gt; I would be very interested in having a fork of (at least) one lightning&lt;br/&gt;&amp;gt; implementation (or Rust Lightning) to be a proof of concept ECDSA-PTLC node&lt;br/&gt;&amp;gt; with which we can test and play with the plethora of PTLC-based proposals&lt;br/&gt;&amp;gt; above.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1) update_add_ptlc will have a 32 byte x-coordinate (of a point) rather&lt;br/&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; byte scalar tweak for each hop. As per [link multi-hop locks]. The last&lt;br/&gt;&amp;gt; hop_data will instead include a 32 byte scalar equal to the sum of all&lt;br/&gt;&amp;gt; tweaks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2) commitment_signed will have 162 byte adaptor ptlc_signatures rather&lt;br/&gt;&amp;gt; than valid (71/72 byte) ECDSA signatures on PTLC-success transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 3) The in-flight outputs on the commitment transaction itself become a&lt;br/&gt;&amp;gt; little simpler as we no longer need to explicitly check the payment&lt;br/&gt;&amp;gt; pre-image against a hash. Instead, delete all instances of &amp;#34;OP_HASH160&lt;br/&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; the same) and require no pre-image in the witness, only a valid signature.&lt;br/&gt;&amp;gt; The pre-image check is implicitly enforced by the &amp;lt;remoteptlc_sig&amp;gt; witness&lt;br/&gt;&amp;gt; since only an adaptor signature was provided by remote so that the payment&lt;br/&gt;&amp;gt; pre-image is required to create the valid signature (from which the&lt;br/&gt;&amp;gt; pre-image can be then deduced by comparing adaptor and valid signatures).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If I&amp;#39;ve missed any other changes that need to happen, do respond with them!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I hope that as a community we can work towards having a PTLC-based&lt;br/&gt;&amp;gt; Lightning Network that is safe and stable as soon as possible, and so I&lt;br/&gt;&amp;gt; encourage further thinking, development and expirementation with PTLCs now&lt;br/&gt;&amp;gt; so that when Taproot is finally at our disposal we can cleanly start moving&lt;br/&gt;&amp;gt; towards a more ideal Lightning :)&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; 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/20200422/9849bd91/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200422/9849bd91/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:52&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrpquwdqcl8w3ycz094l87209cunzykn03k4sg3umakhnfv9sm06czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vh8j5lh</id>
    
      <title type="html">📅 Original date posted:2020-04-22 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrpquwdqcl8w3ycz094l87209cunzykn03k4sg3umakhnfv9sm06czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vh8j5lh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqh0nq3sar8xn0mlzlp5zturz4rktwasxmrk4tguq5nm6kpq4kugs9lsw6l&#39;&gt;nevent1q…sw6l&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-22&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt; This seems like a somewhat unnecessary drive-by insult of a project you&lt;br/&gt;&amp;gt; don&amp;#39;t contribute to, but feel free to start with a concrete suggestion&lt;br/&gt;&amp;gt; here :).&lt;br/&gt;&lt;br/&gt;This wasn&amp;#39;t intended as an insult at all. I&amp;#39;m simply saying if there&amp;#39;s&lt;br/&gt;concern about worst case eviction/replacement, optimizations likely exist.&lt;br/&gt;Other developers that are interested in more complex multi-transaction&lt;br/&gt;contracts have realized this as well, and there&amp;#39;re various open PRs that&lt;br/&gt;attempt to propose such optimizations [1].&lt;br/&gt;&lt;br/&gt;&amp;gt; Hmm, maybe the proposal wasn&amp;#39;t clear. The idea isn&amp;#39;t to add signatures to&lt;br/&gt;&amp;gt; braodcasted transactions, but instead to CPFP a maybe-broadcasted&lt;br/&gt;&amp;gt; transaction by sending a transaction which spends it and seeing if it is&lt;br/&gt;&amp;gt; accepted&lt;br/&gt;&lt;br/&gt;Sorry I still don&amp;#39;t follow. By &amp;#34;we clearly need to go the other direction -&lt;br/&gt;all HTLC output spends need to be pre-signed.&amp;#34;, you don&amp;#39;t mean that the HTLC&lt;br/&gt;spends of the non-broadcaster also need to be an off-chain 2-of-2 multi-sig&lt;br/&gt;covenant? If the other party isn&amp;#39;t restricted w.r.t _how_ they can spend the&lt;br/&gt;output (non-rbf&amp;#39;d, ect), then I don&amp;#39;t see how that addresses anything.&lt;br/&gt;&lt;br/&gt;Also see my mail elsewhere in the thread that the other party is actually&lt;br/&gt;forced to spend their HTLC output using an RBF-replaceable transaction. With&lt;br/&gt;that, I think we&amp;#39;re all good here? In the end both sides have the ability to&lt;br/&gt;raise the fee rate of their spending transactions with the highest winning.&lt;br/&gt;As long as one of them confirms within the CLTV-delta, then everyone is&lt;br/&gt;made whole.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/18191&#34;&gt;https://github.com/bitcoin/bitcoin/pull/18191&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, Apr 22, 2020 at 9:50 AM Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; A few replies inline.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 4/22/20 12:13 AM, Olaoluwa Osuntokun wrote:&lt;br/&gt;&amp;gt; &amp;gt; Hi Matt,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; While this is somewhat unintuitive, there are any number of good&lt;br/&gt;&amp;gt; anti-DoS&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; reasons for this, eg:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; None of these really strikes me as &amp;#34;good&amp;#34; reasons for this limitation,&lt;br/&gt;&amp;gt; which&lt;br/&gt;&amp;gt; &amp;gt; is at the root of this issue, and will also plague any more complex&lt;br/&gt;&amp;gt; Bitcoin&lt;br/&gt;&amp;gt; &amp;gt; contracts which rely on nested trees of transaction to confirm (CTV,&lt;br/&gt;&amp;gt; Duplex,&lt;br/&gt;&amp;gt; &amp;gt; channel factories, etc). Regarding the various (seemingly arbitrary)&lt;br/&gt;&amp;gt; package&lt;br/&gt;&amp;gt; &amp;gt; limits it&amp;#39;s likely the case that any issues w.r.t computational&lt;br/&gt;&amp;gt; complexity&lt;br/&gt;&amp;gt; &amp;gt; that may arise when trying to calculate evictions can be ameliorated with&lt;br/&gt;&amp;gt; &amp;gt; better choice of internal data structures.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In the end, the simplest heuristic (accept the higher fee rate package)&lt;br/&gt;&amp;gt; side&lt;br/&gt;&amp;gt; &amp;gt; steps all these issues and is also the most economically rationale from a&lt;br/&gt;&amp;gt; &amp;gt; miner&amp;#39;s perspective. Why would one prefer a higher absolute fee package&lt;br/&gt;&amp;gt; &amp;gt; (which could be very large) over another package with a higher total _fee&lt;br/&gt;&amp;gt; &amp;gt; rate_?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This seems like a somewhat unnecessary drive-by insult of a project you&lt;br/&gt;&amp;gt; don&amp;#39;t contribute to, but feel free to start with&lt;br/&gt;&amp;gt; a concrete suggestion here :).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; You&amp;#39;ll note that B would be just fine if they had a way to safely&lt;br/&gt;&amp;gt; monitor the&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; global mempool, and while this seems like a prudent mitigation for&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; lightning implementations to deploy today, it is itself a quagmire of&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; complexity&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Is it really all that complex? Assuming we&amp;#39;re talking about just watching&lt;br/&gt;&amp;gt; &amp;gt; for a certain script template (the HTLC scipt) in the mempool to be able&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; &amp;gt; pull a pre-image as soon as possible. Early versions of lnd used the&lt;br/&gt;&amp;gt; mempool&lt;br/&gt;&amp;gt; &amp;gt; for commitment broadcast detection (which turned out to be a bad idea so&lt;br/&gt;&amp;gt; we&lt;br/&gt;&amp;gt; &amp;gt; removed it), but at a glance I don&amp;#39;t see why watching the mempool is so&lt;br/&gt;&amp;gt; &amp;gt; complex.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Because watching your own mempool is not guaranteed to work, and during&lt;br/&gt;&amp;gt; upgrade cycles that include changes to the&lt;br/&gt;&amp;gt; policy rules an attacker could exploit your upgraded/non-upgraded status&lt;br/&gt;&amp;gt; to perform the same attack.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Further, this is a really obnoxious assumption to hoist onto lightning&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; nodes - having an active full node with an in-sync mempool is a lot more&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; CPU, bandwidth, and complexity than most lightning users were expecting&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; face.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This would only be a requirement for Lightning nodes that seek to be a&lt;br/&gt;&amp;gt; part&lt;br/&gt;&amp;gt; &amp;gt; of the public routing network with a desire to _forward_ HTLCs. This&lt;br/&gt;&amp;gt; isn&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt; doesn&amp;#39;t affect laptops or mobile phones which likely mostly have private&lt;br/&gt;&amp;gt; &amp;gt; channels and don&amp;#39;t participate in HTLC forwarding. I think it&amp;#39;s pretty&lt;br/&gt;&amp;gt; &amp;gt; reasonable to expect a &amp;#34;proper&amp;#34; routing node on the network to be backed&lt;br/&gt;&amp;gt; by&lt;br/&gt;&amp;gt; &amp;gt; a full-node. The bandwidth concern is valid, but we&amp;#39;d need concrete&lt;br/&gt;&amp;gt; numbers&lt;br/&gt;&amp;gt; &amp;gt; that compare the bandwidth over head of mempool awareness (assuming the&lt;br/&gt;&amp;gt; &amp;gt; latest and greatest mempool syncing) compared with the overhead of the&lt;br/&gt;&amp;gt; &amp;gt; channel update gossip and gossip queries over head which LN nodes face&lt;br/&gt;&amp;gt; today&lt;br/&gt;&amp;gt; &amp;gt; as is to see how much worse off they really would be.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If mempool-watching were practical, maybe, though there are a number of&lt;br/&gt;&amp;gt; folks who are talking about designing&lt;br/&gt;&amp;gt; partially-offline local lightning hubs which would be rendered impractical.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As detailed a bit below, if nodes watch the mempool, then this class of&lt;br/&gt;&amp;gt; &amp;gt; attack assuming the anchor output format as described in the open&lt;br/&gt;&amp;gt; &amp;gt; lightning-rfc PR is mitigated. At a glance, watching the mempool seems&lt;br/&gt;&amp;gt; like&lt;br/&gt;&amp;gt; &amp;gt; a far less involved process compared to modifying the state machine as&lt;br/&gt;&amp;gt; its&lt;br/&gt;&amp;gt; &amp;gt; defined today. By watching the mempool and implementing the changes in&lt;br/&gt;&amp;gt; &amp;gt; #lightning-rfc/688, then this issue can be mitigated _today_. lnd 0.10&lt;br/&gt;&amp;gt; &amp;gt; doesn&amp;#39;t yet watch the mempool (but does include anchors [1]), but unless&lt;br/&gt;&amp;gt; I&amp;#39;m&lt;br/&gt;&amp;gt; &amp;gt; missing something it should be pretty straight forward to add which mor&lt;br/&gt;&amp;gt; or less&lt;br/&gt;&amp;gt; &amp;gt; resolves this issue all together.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; not fixing this issue seems to render the whole exercise somewhat&lt;br/&gt;&amp;gt; useless&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Depends on if one considers watching the mempool a fix. But even with&lt;br/&gt;&amp;gt; that a&lt;br/&gt;&amp;gt; &amp;gt; base version of anchors still resolves a number of issues including:&lt;br/&gt;&amp;gt; &amp;gt; eliminating the commitment fee guessing game, allowing users to pay less&lt;br/&gt;&amp;gt; on&lt;br/&gt;&amp;gt; &amp;gt; force close, being able to coalesce 2nd level HTLC transactions with the&lt;br/&gt;&amp;gt; &amp;gt; same CLTV expiry, and actually being able to reliably enforce multi-hop&lt;br/&gt;&amp;gt; HTLC&lt;br/&gt;&amp;gt; &amp;gt; resolution.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Instead of making the HTLC output spending more free-form with&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; SIGHASH_ANYONECAN_PAY|SIGHASH_SINGLE, we clearly need to go the other&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; direction - all HTLC output spends need to be pre-signed.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m not sure this is actually immediately workable (need to think about&lt;br/&gt;&amp;gt; it&lt;br/&gt;&amp;gt; &amp;gt; more). To see why, remember that the commit_sig message includes HTLC&lt;br/&gt;&amp;gt; &amp;gt; signatures for the _remote_ party&amp;#39;s commitment transaction, so they can&lt;br/&gt;&amp;gt; &amp;gt; spend the HTLCs if they broadcast their version of the commitment (force&lt;br/&gt;&amp;gt; &amp;gt; close). If we don&amp;#39;t somehow also _gain_ signatures (our new HTLC&lt;br/&gt;&amp;gt; signatures)&lt;br/&gt;&amp;gt; &amp;gt; allowing us to spend HTLCs on _their_ version of the commitment, then if&lt;br/&gt;&amp;gt; &amp;gt; they broadcast that commitment (without revoking), then we&amp;#39;re unable to&lt;br/&gt;&amp;gt; &amp;gt; redeem any of those HTLCs at all, possibly losing money.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hmm, maybe the proposal wasn&amp;#39;t clear. The idea isn&amp;#39;t to add signatures to&lt;br/&gt;&amp;gt; braodcasted transactions, but instead to CPFP&lt;br/&gt;&amp;gt; a maybe-broadcasted transaction by sending a transaction which spends it&lt;br/&gt;&amp;gt; and seeing if it is accepted. You only need to&lt;br/&gt;&amp;gt; know the transaction&amp;#39;s exact format (ie txid, which we do, since we sent a&lt;br/&gt;&amp;gt; signature for it long ago) to do this, you&lt;br/&gt;&amp;gt; don&amp;#39;t have to actually *have* the fully-signed transaction (and you don&amp;#39;t).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In an attempt to counteract this, we might say ok, the revoke message&lt;br/&gt;&amp;gt; also&lt;br/&gt;&amp;gt; &amp;gt; now includes HTLC signatures for their new commitment allowing us to&lt;br/&gt;&amp;gt; spend&lt;br/&gt;&amp;gt; &amp;gt; our HTLCs. This resolves things in a weaker security model, but doesn&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt; address the issue generally, as after they receive the commit_sig, they&lt;br/&gt;&amp;gt; can&lt;br/&gt;&amp;gt; &amp;gt; broadcast immediately, again leaving us without a way to redeem our&lt;br/&gt;&amp;gt; HTLCs.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;d need to think about it more, but it seems that following this path&lt;br/&gt;&amp;gt; would&lt;br/&gt;&amp;gt; &amp;gt; require an overhaul in the channel state machine to make presenting a new&lt;br/&gt;&amp;gt; &amp;gt; commitment actually take at least _two phases_ (at least a full round&lt;br/&gt;&amp;gt; trip).&lt;br/&gt;&amp;gt; &amp;gt; The first phase would tender the commitment, but render them unable to&lt;br/&gt;&amp;gt; &amp;gt; broadcast it. The second phase would then &amp;lt;insert something something&lt;br/&gt;&amp;gt; &amp;gt; scriptless scripts here&amp;gt; enter a new sub-protocol which upon conclusion,&lt;br/&gt;&amp;gt; &amp;gt; gives the commitment proposer valid HTLC signatures, and gives the&lt;br/&gt;&amp;gt; responder&lt;br/&gt;&amp;gt; &amp;gt; what they need to be able to broadcast their commitment and claim their&lt;br/&gt;&amp;gt; &amp;gt; HTCLs in an atomic manner.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; -- Laolu&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [1]: &lt;a href=&#34;https://github.com/lightningnetwork/lnd/pull/3821&#34;&gt;https://github.com/lightningnetwork/lnd/pull/3821&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/20200422/2392c438/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200422/2392c438/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8pkjt280ekfvam0g30nac85qqjxea0pxw999dxdcl3k0w7l004wqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vzeq98j</id>
    
      <title type="html">📅 Original date posted:2019-02-07 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8pkjt280ekfvam0g30nac85qqjxea0pxw999dxdcl3k0w7l004wqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vzeq98j" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsytnrkt29djpcc8ax0tzkctd5uh240wrup5htfh7lh6c2l29kjzpqwxcl08&#39;&gt;nevent1q…cl08&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-02-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi y&amp;#39;all,&lt;br/&gt;&lt;br/&gt;Recently we&amp;#39;ve started to do more design work related to the Sphinx packet&lt;br/&gt;(EOB format, rendezvous protocol). This prompted me to re-visit the original&lt;br/&gt;Sphinx paper to refresh my memory w.r.t some of the finer details of the&lt;br/&gt;protocol.  While I was re-reading the paper, I realized that we may be able&lt;br/&gt;to use use SURBs (single-use-reply-blocks) to implement a &amp;#34;payment ACK&amp;#34; for&lt;br/&gt;each sent HTLC.&lt;br/&gt;&lt;br/&gt;(it&amp;#39;s worth mentioning that switching to HORNET down the line would solve&lt;br/&gt;this problem as well since the receiver already gets a multi-use backwards&lt;br/&gt;route that they can use to send information back to the receiver)&lt;br/&gt;&lt;br/&gt;Right now HTLC routing is mainly a game of &amp;#34;send and hope it arrives&amp;#34;, as&lt;br/&gt;you have no clear indication of the _arrival_ of an HTLC at the destination.&lt;br/&gt;Instead, you only receive a protocol level message if the HTLC failed for&lt;br/&gt;w/e reason, or if it was successfully redeemed.  As part of BOLT 1.1, it was&lt;br/&gt;agreed upon that we should implement some sort of &amp;#34;payment ACK&amp;#34; feature. A&lt;br/&gt;payment ACK scheme is strongly desired as it:&lt;br/&gt;&lt;br/&gt;  * Allows the sender to actually know when a payment has reached the&lt;br/&gt;    receiver which is useful for many higher level protocols. Atm, the&lt;br/&gt;    sender is unable to distinguish an HTLC being &amp;#34;black holed&amp;#34; from one&lt;br/&gt;    that&amp;#39;s actually reached the sender, and they&amp;#39;re just holding on to it.&lt;br/&gt;  * AMP implementations would be aided by being able to receive feedback on&lt;br/&gt;    successfully routed splits. If we&amp;#39;re able to have the receiver ACK each&lt;br/&gt;    partial payment, then implementations can more aggressively split&lt;br/&gt;    payments as they&amp;#39;re able to gain assurance that the first 2 BTC of 5&lt;br/&gt;    total have actually reached the sender, and weren&amp;#39;t black holed.&lt;br/&gt;  * Enforcing and relying on ACKs may also thwart silly games receivers&lt;br/&gt;    might play, claiming that the HTLC &amp;#34;didn&amp;#39;t actually arrive&amp;#34;.&lt;br/&gt;&lt;br/&gt;Some also call this feature a &amp;#34;soft error&amp;#34; as a possible implementation&lt;br/&gt;might to re-use the existing onion error protocol we&amp;#39;ve deployed today.  For&lt;br/&gt;reference, in order to send back errors back long the route in a way that&lt;br/&gt;doesn&amp;#39;t reveal the sender of the HTLC to the receiver (or any of the&lt;br/&gt;intermediate nodes) we re-use the shared secret each hop has derived, and&lt;br/&gt;onion wrap a MAC&amp;#39;d error to the sender. Each hop can&amp;#39;t actually check that&lt;br/&gt;they&amp;#39;ve received a well formed error, but the sender is able to attribute an&lt;br/&gt;error to a node in the route based on which shared secret they&amp;#39;re able to&lt;br/&gt;check the MAC with.&lt;br/&gt;&lt;br/&gt;The original Sphinx packet format has a way for the receiver to send a&lt;br/&gt;message back to the sender. This was originally envisioned to allow the&lt;br/&gt;receiver to send a replay email/message back to the sender without knowing&lt;br/&gt;who they were, and also in a manner that was bit-wise indistinguishable from&lt;br/&gt;a regular forwarded packet. This is called a SURB or &amp;#34;single use reply&lt;br/&gt;block&amp;#34;. A SURB is composed of: a pre-crafted sphinx packet for the&lt;br/&gt;&amp;#34;backwards route&amp;#34; (which can be distinct from the forwards route), the first&lt;br/&gt;hop of the backwards route, and finally a symmetric key to use when&lt;br/&gt;encrypting the reply.&lt;br/&gt;&lt;br/&gt;When we more or less settled on using Sphinx, we started to remove things&lt;br/&gt;that we didn&amp;#39;t have a clear use for at the time. Two things that were&lt;br/&gt;removed were the original end-to-end payload, and also the SURB. Removing&lt;br/&gt;the payload made the packet size smaller, and it didn&amp;#39;t seem realistic to&lt;br/&gt;give _each_ hop a SURB to send reply back.&lt;br/&gt;&lt;br/&gt;In order to implement payment ACKs, we can have the sender craft a SURB (for&lt;br/&gt;the ACK), and mark the receipt of the SURB as the payment ACK itself.&lt;br/&gt;Creating and processing a SURB is identical to the regular HTLC packets we&lt;br/&gt;use today. As a result, the code impact to the code sphinx packet logic is&lt;br/&gt;minimal. We&amp;#39;d then also re-introduce the e2e payload so we can carry the&lt;br/&gt;SURB in the forward direction (HLTC add). The backwards packet would also&lt;br/&gt;have a payload of random bytes with the same size as a regular packet to&lt;br/&gt;make them look identical on the wire.&lt;br/&gt;&lt;br/&gt;This payload can further be put to use in order to implement streaming or&lt;br/&gt;subscription payments in a way. Since we must add a payload for in order to&lt;br/&gt;send/reply look the same, we can also piggy back some useful additional&lt;br/&gt;data. Each time a payment is sent, the receiver can use the extra payload to&lt;br/&gt;stack on details such as:&lt;br/&gt;  * A new invoice to pay for the metered service being paid for.&lt;br/&gt;  * An invoice along with a deadline for when this must be paid, lest the&lt;br/&gt;    subscription service expire.&lt;br/&gt;  * Details of lightning-native API&lt;br/&gt;  * etc, etc&lt;br/&gt;&lt;br/&gt;IMO, this approach is better than a potential client-server payment&lt;br/&gt;negotiation protocol as it doesn&amp;#39;t require any additional servers along side&lt;br/&gt;the node, also maintains sender anonymity, and doesn&amp;#39;t rely on any sort of&lt;br/&gt;PKI.&lt;br/&gt;&lt;br/&gt;&amp;gt;From the prospective of packet-analysis, errors today are identifiable due&lt;br/&gt;to the packet size (though we do pad them out to avoid being able to&lt;br/&gt;distinguish some errors from others on the wide). SURBs on the other hand,&lt;br/&gt;have the same profile as regular HTLC adds since they use the same Sphinx&lt;br/&gt;packet format.  Unlike the wrapped onion errors, intermediate nodes are also&lt;br/&gt;able to validate the integrity of the payment ACK as they&amp;#39;ll check the&lt;br/&gt;per-hop&lt;br/&gt;MAC as normal. Additionally, the replies naturally create cover traffic as&lt;br/&gt;they look like regular payments.&lt;br/&gt;&lt;br/&gt;One down side is that this would essentially double the size of HTLC&lt;br/&gt;messages on the network today, as they need to also carry SURB.  Most&lt;br/&gt;candidates for possible rendezvous schemes to deploy would also increase the&lt;br/&gt;packet size if up to 20 hops it be allowed in both directions.  We also&lt;br/&gt;(from my PoV), don&amp;#39;t really have a feel on how much of an issue the 1.2KB&lt;br/&gt;HTLC packet size is today in the network.&lt;br/&gt;&lt;br/&gt;By re-introducing SURBs, we have an opportunity to cleanly solve the payment&lt;br/&gt;ACK issue, re-use a component of our favorite thing in Lightning, enable&lt;br/&gt;protocol-level streaming/subscription payments and also make replies&lt;br/&gt;indistinguishable-ish from regular payments.&lt;br/&gt;&lt;br/&gt;Thoughts?&lt;br/&gt;&lt;br/&gt;-- Laolu&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/20190207/77cde3d7/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190207/77cde3d7/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:54:11&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst67ctm0hm095p7hpskp32w8lzyfgee33maz55w9fk0a0p2dd3xkgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vszvp75</id>
    
      <title type="html">📅 Original date posted:2018-11-06 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst67ctm0hm095p7hpskp32w8lzyfgee33maz55w9fk0a0p2dd3xkgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vszvp75" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvpjuyngnfmpulmal3u3mp5xu05v9upch35sunt85kxnkkwumkjxqnf6t8s&#39;&gt;nevent1q…6t8s&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Fabrice,&lt;br/&gt;&lt;br/&gt;I think HORNET would address this rather nicely!&lt;br/&gt;&lt;br/&gt;During the set up phase (which uses Sphinx), the sender is able to get a&lt;br/&gt;sense&lt;br/&gt;of if the route is actually &amp;#34;lively&amp;#34; or not, as the circuit can&amp;#39;t be&lt;br/&gt;finalized&lt;br/&gt;if all the nodes aren&amp;#39;t available. Additionally, during the set up phase,&lt;br/&gt;the&lt;br/&gt;sender can drop a unique payload to each node. In this scenario, it may be&lt;br/&gt;the&lt;br/&gt;amount range the node is looking to send over this circuit. The intermediate&lt;br/&gt;nodes then package up a &amp;#34;Forwarding Segment&amp;#34; (FS) which includes a symmetric&lt;br/&gt;key to use for their portion of the hop, and can also be extended to include&lt;br/&gt;fee information. If this set up phase is payment value aware, then each node&lt;br/&gt;can use a private &amp;#34;fee function&amp;#34; that may take into account the level of&lt;br/&gt;congestion in their channels, or other factors. This would differ from the&lt;br/&gt;current approach in that this fee schedule need not be communicated to the&lt;br/&gt;wider network, only those wishing to route across that link.&lt;br/&gt;&lt;br/&gt;Another cool thing that it would allow is the ability to receive a&lt;br/&gt;protocol-level payment ACK. This may be useful when implementing AMP, as it&lt;br/&gt;would allow the sender to know exactly how many satoshis have arrived at the&lt;br/&gt;other site, adjusting their payment sharding accordingly. Nodes on either&lt;br/&gt;side&lt;br/&gt;of the circuit can then also use the data forwarding phase to exchange&lt;br/&gt;payment&lt;br/&gt;hashes, perform cool zkcp set up protcols, etc, etc.&lt;br/&gt;&lt;br/&gt;The created circuits can actually be re-used across several distinct&lt;br/&gt;payments.&lt;br/&gt;In the paper, they use a TTL for each circuit, in our case, we can use a&lt;br/&gt;block&lt;br/&gt;height, after which all nodes should reject attempted data forwarding&lt;br/&gt;attempts.&lt;br/&gt;A notable change is that each node no longer needs to maintain per-circuit&lt;br/&gt;state as we do now with Sphinx. Instead, the packets that come across&lt;br/&gt;contain&lt;br/&gt;all the information required for forwarding (our current per-hop payload).&lt;br/&gt;As a&lt;br/&gt;result, we can eliminate the asymmetric crytpo from the critical forwarding&lt;br/&gt;path!&lt;br/&gt;&lt;br/&gt;Finally, this would let nodes easily rotate their onion keys to achieve&lt;br/&gt;forward&lt;br/&gt;secrecy during the data phase (but not the set up phase), as in the FS, they&lt;br/&gt;essentially key-wrap a symmetric key (using the derived shared secret for&lt;br/&gt;that&lt;br/&gt;hop) that should be used for that data forwarding phase.&lt;br/&gt;&lt;br/&gt;There&amp;#39;re a number of other cool things integration HORNET would allow,&lt;br/&gt;perhaps&lt;br/&gt;a distinct thread would be a more appropriate place to extol the many&lt;br/&gt;virtues&lt;br/&gt;of HORNET ;)&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;On Thu, Nov 1, 2018 at 3:05 PM Fabrice Drouin &amp;lt;fabrice.drouin at acinq.fr&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Context&lt;br/&gt;&amp;gt; ======&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sent payments that remain pending, i.e. payments which have not yet&lt;br/&gt;&amp;gt; been failed or fulfilled, are currently a major UX challenge for LN&lt;br/&gt;&amp;gt; and a common source of complaints from end-users.&lt;br/&gt;&amp;gt; Why payments are not fulfilled quickly is not always easy to&lt;br/&gt;&amp;gt; investigate, but we&amp;#39;ve seen problems caused by intermediate nodes&lt;br/&gt;&amp;gt; which were stuck waiting for a revocation, and recipients who could&lt;br/&gt;&amp;gt; take a very long time to reply with a payment preimage.&lt;br/&gt;&amp;gt; It is already possible to partially mitigate this by disconnecting&lt;br/&gt;&amp;gt; from a node that is taking too long to send a revocation (after 30&lt;br/&gt;&amp;gt; seconds for example) and reconnecting immediately to the same node.&lt;br/&gt;&amp;gt; This way pending downstream HTLCs can be forgotten and the&lt;br/&gt;&amp;gt; corresponding upstream HTLCs failed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Proposed changes&lt;br/&gt;&amp;gt; ===============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It should be possible to provide a faster &amp;#34;proceed/try another route&amp;#34;&lt;br/&gt;&amp;gt; answer to the sending node using probing with short timeout&lt;br/&gt;&amp;gt; requirements: before sending the actual payment it would first send a&lt;br/&gt;&amp;gt; &amp;#34;blank&amp;#34; probe request, along the same route. This request would be&lt;br/&gt;&amp;gt; similar to a payment request, with the same onion packet formatting&lt;br/&gt;&amp;gt; and processing, with the additional requirements that if the next node&lt;br/&gt;&amp;gt; in the route has not replied within the timeout period (typically a&lt;br/&gt;&amp;gt; few hundred milliseconds) then the current node will immediately send&lt;br/&gt;&amp;gt; back an error message.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There could be several options for the probe request:&lt;br/&gt;&amp;gt; - include the same amounts and fee constraints than the actual payment&lt;br/&gt;&amp;gt; request.&lt;br/&gt;&amp;gt; - include no amount information, in which case we&amp;#39;re just trying to&lt;br/&gt;&amp;gt; &amp;#34;ping&amp;#34; every node on the route.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Implementation&lt;br/&gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I would like to discuss the possibility of implementing this with a &amp;#34;0&lt;br/&gt;&amp;gt; satoshi&amp;#34; payment request that the receiving node would generate along&lt;br/&gt;&amp;gt; with the real one. The sender would first try to &amp;#34;pay&amp;#34; the &amp;#34;0 satoshi&amp;#34;&lt;br/&gt;&amp;gt; request using the route it computed with the actual payment&lt;br/&gt;&amp;gt; parameters. I think that it would not require many changes to the&lt;br/&gt;&amp;gt; existing protocol and implementations.&lt;br/&gt;&amp;gt; Not using the actual amount and fees means that the actual payment&lt;br/&gt;&amp;gt; could fail because of capacity issues but as long as this happens&lt;br/&gt;&amp;gt; quickly, and it should since we checked first that all nodes on the&lt;br/&gt;&amp;gt; route are alive and responsive, it still is much better than “stuck”&lt;br/&gt;&amp;gt; payments.&lt;br/&gt;&amp;gt; And it would not help if a node decides to misbehave, but would not&lt;br/&gt;&amp;gt; make things worse than they are now (?)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Fabrice&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/20181106/6aeb4330/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20181106/6aeb4330/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:52:17&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszgtstl9mwnhefddf0w7v3kc50f2zlwfwkdqcsfg6t4kjp7wy6d6qzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vp92axc</id>
    
      <title type="html">📅 Original date posted:2018-11-06 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszgtstl9mwnhefddf0w7v3kc50f2zlwfwkdqcsfg6t4kjp7wy6d6qzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vp92axc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8t7tju7ux229nyrxw6wdtrh0kw3p5xe7qz3u879rc6ms7p6fy3pcuanmkm&#39;&gt;nevent1q…nmkm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-11-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Rusty,&lt;br/&gt;&lt;br/&gt;I&amp;#39;m a big fan in general of most of this! Amongst many other things, it&amp;#39;ll:&lt;br/&gt;simplify the whole static channel backup &#43; recovery workflow, and avoid all&lt;br/&gt;the fee related headaches we&amp;#39;ve run into over the past few months.&lt;br/&gt;&lt;br/&gt;&amp;gt; - HTLC-timeout and HTLC-success txs sigs are&lt;br/&gt;&amp;gt; SIGHASH_ANYONECANPAY|SIGHASH_SINGLE, so you can Bring Your Own Fees.&lt;br/&gt;&lt;br/&gt;Would this mean that we no longer extend fees to the second-level&lt;br/&gt;transactions as well? If so, then a dusty HTLC would be determined solely by&lt;br/&gt;looking at the direct output, rather than the resulting output in the second&lt;br/&gt;layer.&lt;br/&gt;&lt;br/&gt;&amp;gt;  - `localpubkey`, `remotepubkey`, `local_htlcpubkey`, `remote_htlcpubkey`,&lt;br/&gt;&amp;gt; `local_delayedpubkey`, and `remote_delayedpubkey` derivation now uses a&lt;br/&gt;&amp;gt; two-stage unhardened BIP-32 derivation based on the commitment number.&lt;br/&gt;&lt;br/&gt;It seems enough to _only_ modify the derivation for local&#43;remote pubkey (so&lt;br/&gt;the direct &amp;#34;settle&amp;#34; keys). This constrains the change to only what&amp;#39;s&lt;br/&gt;necessary to simplify the backup&#43;recovery workflow with the current&lt;br/&gt;commitment design. By restricting the change to these two keys, we minimize&lt;br/&gt;the code impact to the existing implementations, and avoid unnecessary&lt;br/&gt;changes that don&amp;#39;t make strides towards the immediate goal.&lt;br/&gt;&lt;br/&gt;&amp;gt; - `to_remote` is now a P2WSH of:&lt;br/&gt;&amp;gt;        `to_self_delay` OP_CSV OP_DROP &amp;lt;remotepubkey&amp;gt; OP_CHECKSIG&lt;br/&gt;&lt;br/&gt;This seems at odds with the goal of &amp;#34;if the remote party force closes, then&lt;br/&gt;I get my funds back immediately without requiring knowledge of any secret&lt;br/&gt;data&amp;#34;. If it was just a plain p2wkh, then during a routine seed import and&lt;br/&gt;rescan (assuming ample look ahead as we know this is a &amp;#34;special&amp;#34; key), I&lt;br/&gt;would pick up outputs of channels that were force closed while I was down&lt;br/&gt;due to my dog eating my hard drive.&lt;br/&gt;&lt;br/&gt;Alternatively, since the range of CSV values can be known ahead of time, I&lt;br/&gt;can brute force a set of scripts to look for in the chain. However, this&lt;br/&gt;results in potentially a very large number of scripts (depending on how many&lt;br/&gt;channels one has, and bounds on the acceptable CSV) I need to scan for.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Fri, Oct 12, 2018 at 3:57 PM Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;         There have been a number of suggested changes to the commitment&lt;br/&gt;&amp;gt; transaction format:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Rather than trying to agree on what fees will be in the future, we&lt;br/&gt;&amp;gt;    should use an OP_TRUE-style output to allow CPFP (Roasbeef)&lt;br/&gt;&amp;gt; 2. The `remotepubkey` should be a BIP-32-style, to avoid the&lt;br/&gt;&amp;gt;    option_data_loss_protect &amp;#34;please tell me your current&lt;br/&gt;&amp;gt;    per_commitment_point&amp;#34; problem[1]&lt;br/&gt;&amp;gt; 3. The CLTV timeout should be symmetrical to avoid trying to game the&lt;br/&gt;&amp;gt;    peer into closing. (Connor IIRC?).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It makes sense to combine these into a single `commitment_style2`&lt;br/&gt;&amp;gt; feature, rather than having a testing matrix of all these disabled and&lt;br/&gt;&amp;gt; enabled.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; BOLT #2:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - If `commitment_style2` negotiated, update_fee is a protocol error.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This mainly changes BOLT #3:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - The feerate for commitment transactions is always 253 satoshi/Sipa.&lt;br/&gt;&amp;gt; - Commitment tx always has a P2WSH OP_TRUE output of 1000 satoshi.&lt;br/&gt;&amp;gt; - Fees, OP_TRUE are always paid by the initial funder, because it&amp;#39;s simple,&lt;br/&gt;&amp;gt;   unless they don&amp;#39;t have funds (eg. push_msat can do this, unless we&lt;br/&gt;&amp;gt; remove it?)&lt;br/&gt;&amp;gt; - HTLC-timeout and HTLC-success txs sigs are&lt;br/&gt;&amp;gt;   SIGHASH_ANYONECANPAY|SIGHASH_SINGLE, so you can Bring Your Own Fees.&lt;br/&gt;&amp;gt; - `localpubkey`, `remotepubkey`, `local_htlcpubkey`,&lt;br/&gt;&amp;gt;   `remote_htlcpubkey`, `local_delayedpubkey`, and `remote_delayedpubkey`&lt;br/&gt;&amp;gt;   derivation now uses a two-stage unhardened BIP-32 derivation based on&lt;br/&gt;&amp;gt;   the commitment number.  Two-stage because we can have 2^48 txs and&lt;br/&gt;&amp;gt;   BIP-32 only supports 2^31: the first 17 bits are used to derive the&lt;br/&gt;&amp;gt;   parent for the next 31 bits?&lt;br/&gt;&amp;gt; - `to_self_delay` for both sides is the maximum of either the&lt;br/&gt;&amp;gt;   `open_channel` or `accept_channel`.&lt;br/&gt;&amp;gt; - `to_remote` is now a P2WSH of:&lt;br/&gt;&amp;gt;         `to_self_delay` OP_CSV OP_DROP &amp;lt;remotepubkey&amp;gt; OP_CHECKSIG&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Rusty.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] I recently removed checking this field from c-lightning, as I&lt;br/&gt;&amp;gt;     couldn&amp;#39;t get it to reliably work under stress-test.  I may just have&lt;br/&gt;&amp;gt;     a bug, but we could just fix the spec instead, then we can get our&lt;br/&gt;&amp;gt;     funds back even if we never talk to the peer.&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/20181106/9aa80d96/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20181106/9aa80d96/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:52:11&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfhtmjmm97ad8vej9ph4caqxqu2kph9ml3kpg3c85rqnem3vyjcrszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vurgfsv</id>
    
      <title type="html">📅 Original date posted:2018-10-15 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfhtmjmm97ad8vej9ph4caqxqu2kph9ml3kpg3c85rqnem3vyjcrszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vurgfsv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq8mrl7lr3hsttvarqyy3fyl6l6d57fyxr6h4648680kuw2vt776gxjr98j&#39;&gt;nevent1q…r98j&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-15&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt; I would suggest more to consider the simpler method, despite its larger&lt;br/&gt;&amp;gt; onchain footprint (which is galling),&lt;br/&gt;&lt;br/&gt;The on-chain footprint is a shame, and also it gets worse if we start to&lt;br/&gt;allow multiple pending splices. Also the lack of a non-blocking splice in is&lt;br/&gt;a big draw back IMO.&lt;br/&gt;&lt;br/&gt;&amp;gt; but mostly because I do not see splicing as being as important as AMP or&lt;br/&gt;&amp;gt; watchtowers (and payment decorrelation seems to affect how AMP can be&lt;br/&gt;&amp;gt; implemented, so its priority also goes up).&lt;br/&gt;&lt;br/&gt;Most of what you mention here have _very_ different deployment timelines and&lt;br/&gt;synchronization requirements across clients. For example, splicing is a link&lt;br/&gt;level change and can start to be rolled out immediately. Decorrelation on&lt;br/&gt;the other hand, is a _network_ level change, and would take a considerable&lt;br/&gt;amount of time to reach widespread deployment as it essentially splits the&lt;br/&gt;rouble paths in the network until all/most are upgraded.&lt;br/&gt;&lt;br/&gt;If you think any of these items is a higher priority than splicing then you&lt;br/&gt;can simply start working on them! There&amp;#39;s no agency that prescribes what&lt;br/&gt;should and shouldn&amp;#39;t be pursued or developed, just your willingness to&lt;br/&gt;write some code.&lt;br/&gt;&lt;br/&gt;One thing that I think we should lift from the multiple funding output&lt;br/&gt;approach is the &amp;#34;pre seating of inputs&amp;#34;. This is cool as it would allow&lt;br/&gt;clients to generate addresses, that others could deposit to, and then have&lt;br/&gt;be spliced directly into the channel. Public derivation can be used, along&lt;br/&gt;with a script template to do it non-interactively, with the clients picking&lt;br/&gt;up these deposits, and initiating a splice in as needed.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Oct 11, 2018 at 11:14 PM 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 Rusty,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; It may be good to start brainstorming possible failure modes during&lt;br/&gt;&amp;gt; splice, and how to recover, and also to indicate the expected behavior in&lt;br/&gt;&amp;gt; the proposal, as I believe these will be the points where splicing must be&lt;br/&gt;&amp;gt; designed most precisely. What happens when a splice is ongoing and the&lt;br/&gt;&amp;gt; communication gets disconnected? What happens when some channel failure&lt;br/&gt;&amp;gt; occurs during splicing and we are forced to drop onchain? And so on.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Agreed, but we&amp;#39;re now debating two fairly different methods for&lt;br/&gt;&amp;gt; &amp;gt; splicing. Once we&amp;#39;ve decided on that, we can try to design the&lt;br/&gt;&amp;gt; &amp;gt; proposals themselves.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I would suggest more to consider the simpler method, despite its larger&lt;br/&gt;&amp;gt; onchain footprint (which is galling), but mostly because I do not see&lt;br/&gt;&amp;gt; splicing as being as important as AMP or watchtowers (and payment&lt;br/&gt;&amp;gt; decorrelation seems to affect how AMP can be implemented, so its priority&lt;br/&gt;&amp;gt; also goes up).  So I think getting *some* splicing design out would be&lt;br/&gt;&amp;gt; better even if imperfect.  Others may disagree on priority.&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; 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/20181015/dca18600/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20181015/dca18600/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:51:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxlwtuq286u6t7azcds3rwmuwh3ec90lhqyhggsldhfy44rsua2tqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vzl75g5</id>
    
      <title type="html">📅 Original date posted:2018-10-15 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxlwtuq286u6t7azcds3rwmuwh3ec90lhqyhggsldhfy44rsua2tqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vzl75g5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfhtmjmm97ad8vej9ph4caqxqu2kph9ml3kpg3c85rqnem3vyjcrs6030mx&#39;&gt;nevent1q…30mx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-10-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Rusty,&lt;br/&gt;&lt;br/&gt;Happy to get the splicing train rolling!&lt;br/&gt;&lt;br/&gt;&amp;gt; We&amp;#39;ve had increasing numbers of c-lightning users get upset they can&amp;#39;t&lt;br/&gt;&amp;gt; open multiple channels, so I guess we&amp;#39;re most motivated to allow splicing&lt;br/&gt;of&lt;br/&gt;&amp;gt; existing channels&lt;br/&gt;&lt;br/&gt;Splicing isn&amp;#39;t a substitute for allowing multiple channels. Multiple&lt;br/&gt;channels allow nodes to:&lt;br/&gt;&lt;br/&gt;  * create distinct channels with distinct acceptance policies.&lt;br/&gt;  * create a mix of public and non-advertised channels with a node.&lt;br/&gt;  * be able to send more than the (current) max HTLC amount&lt;br/&gt;    using various flavors of AMP.&lt;br/&gt;  * get past the (current) max channel size value&lt;br/&gt;  * allow a link to carry more HTLCs (due to the current super low max HTLC&lt;br/&gt;    values) given the additional HTLC pressure that&lt;br/&gt;    AMP may produce (alternative is a commitment fan out)&lt;br/&gt;&lt;br/&gt;Is there a fundamental reason that CL will never allow nodes to create&lt;br/&gt;multiple channels? It seems unnecessarily limiting.&lt;br/&gt;&lt;br/&gt;&amp;gt; Splice Negotiation:&lt;br/&gt;&lt;br/&gt;Any reason to now make the splicing_add_* messages allow one to add several&lt;br/&gt;inputs in a single message? Given &amp;#34;acceptable&amp;#34; constraints for how large the&lt;br/&gt;witness and pkScripts can be, we can easily enforce an upper limit on the&lt;br/&gt;number of inputs/outputs to add.&lt;br/&gt;&lt;br/&gt;I like that the intro messages have already been designed with the&lt;br/&gt;concurrent case in mind beyond a simpler propose/accept flow. However is&lt;br/&gt;there any reason why it doesn&amp;#39;t also allow either side to fully re-negotiate&lt;br/&gt;_all_ the funding details? Splicing is a good opportunity to garbage collect&lt;br/&gt;the prior revocation state, and also free up obsolete space in watch towers.&lt;br/&gt;Additionally, as the size of the channel is either expanding or contracting,&lt;br/&gt;both sides should be allowed to modify things like the CSV param, reserve,&lt;br/&gt;max accepted htlc&amp;#39;s, max htlc size, etc. Many of these parameters like the&lt;br/&gt;CSV value should scale with the size of the channel, not allowing these&lt;br/&gt;parameters to be re-negotiated could result in odd scenarios like still&lt;br/&gt;maintain a 1 week CSV when the channel size has dipped from 1 BTC to 100k&lt;br/&gt;satoshis.&lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type: 40 (`splice_add_input`) (`option_splice`)&lt;br/&gt;&lt;br/&gt;In order to add nested p2sh inputs, we&amp;#39;ll need to also expose the redeem&lt;br/&gt;script here, or add additional fields to allow sides to set a sig script as&lt;br/&gt;well as witness during the signing phase.&lt;br/&gt;&lt;br/&gt;&amp;gt; - scriptpubkey is empty, or of form &amp;#39;HASH160 &amp;lt;20-byte-script-hash&amp;gt; EQUAL&amp;#39;&lt;br/&gt;&lt;br/&gt;So no P2SH? :(&lt;br/&gt;&lt;br/&gt;&amp;gt;    * [`4`:`feerate_per_kw`]&lt;br/&gt;&lt;br/&gt;What fee rate is this? IMO we should do commitmentv2 before splicing as then&lt;br/&gt;we can more or less do away with the initiator distinction and have most&lt;br/&gt;fees be ad hoc.&lt;br/&gt;&lt;br/&gt;&amp;gt; Splice Signing&lt;br/&gt;&lt;br/&gt;It seems that we&amp;#39;re missing some fields here if we&amp;#39;re to allow the splicing&lt;br/&gt;of inputs to be done in a non-blocking manner. We&amp;#39;ll need to send two&lt;br/&gt;revocation points for the new commitment: one to allow it to be created, and&lt;br/&gt;another to allow updates to proceed right after the signing is completed. In&lt;br/&gt;this case we&amp;#39;ll also need to update both commitments in tandem until the&lt;br/&gt;splicing transaction has been sufficiently confirmed.&lt;br/&gt;&lt;br/&gt;Also, what about change addresses? Are they to be explicitly specified as&lt;br/&gt;splice outs?&lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type: 43 (`splice_commitment_signature`) (`option_splice`)&lt;br/&gt;&lt;br/&gt;It may be worth pointing out there that we&amp;#39;re able to transfer all existing&lt;br/&gt;HTLCs over to the new commitment as additional context.&lt;br/&gt;&lt;br/&gt;&amp;gt; 1. type: 45 (`splice_witness`) (`option_splice`)&lt;br/&gt;&lt;br/&gt;Should also allow either side to specify the sig script here if we&amp;#39;re to&lt;br/&gt;allow nested p2sh (which we should IMO!).&lt;br/&gt;&lt;br/&gt;&amp;gt;   * [`2`:`len`]&lt;br/&gt;&amp;gt;   * [`len`:`witnesses`]&lt;br/&gt;&lt;br/&gt;Is the extra length needed if all the witness elements themselves are length&lt;br/&gt;delimited?&lt;br/&gt;&lt;br/&gt;It isn&amp;#39;t clear in the current draft, but I take it that the splice_signature&lt;br/&gt;is for the old multi-sig?&lt;br/&gt;&lt;br/&gt;&amp;gt; so we append to the existing `channel_update` for the original channel,&lt;br/&gt;&amp;gt; using a new `message_flags` field:&lt;br/&gt;&lt;br/&gt;IMO, we need to hold off on optional fields for now, until we revisit the&lt;br/&gt;formatting in order to actually get it right. As is now, all the optional&lt;br/&gt;fields are basically serial mandatory soft forks. So clients must understand&lt;br/&gt;the prior in order to understand the following fields. Instead, we&lt;br/&gt;essentially need more of a map design.&lt;br/&gt;&lt;br/&gt;&amp;gt; The post-splice reserve is 1% of post-splice capcacity (rounded down).&lt;br/&gt;&lt;br/&gt;This should be re-negotiated at time of splice creation, rather than a new&lt;br/&gt;hard coded value in the protocol.&lt;br/&gt;&lt;br/&gt;&amp;gt; In addition, you can forget everything about the old channel (including&lt;br/&gt;&amp;gt; old HTLCs and revocation requirements).&lt;br/&gt;&lt;br/&gt;We still have the same shachain state however (if we don&amp;#39;t allow new state&lt;br/&gt;to be exchanged during the start of the splicing scenario), correct?&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Oct 9, 2018 at 8:46 PM Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi all!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;         We&amp;#39;ve had increasing numbers of c-lightning users get upset they&lt;br/&gt;&amp;gt; can&amp;#39;t open multiple channels, so I guess we&amp;#39;re most motivated to allow&lt;br/&gt;&amp;gt; splicing of existing channels.  Hence this rough proposal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For simplicity, I&amp;#39;ve chosen to only allow a single splice at a time.&lt;br/&gt;&amp;gt; It&amp;#39;s still complex :(&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Feedback welcome!&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Splice Negotiation:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 40 (`splice_add_input`) (`option_splice`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`8`: `satoshis`]&lt;br/&gt;&amp;gt;    * [`32`: `prevtxid`]&lt;br/&gt;&amp;gt;    * [`4`: `prevtxoutnum`]&lt;br/&gt;&amp;gt;    * [`2`: `scriptlen`]&lt;br/&gt;&amp;gt;    * [`scriptlen`: `scriptpubkey`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 41 (`splice_add_output`) (`option_splice`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`8`: `satoshis`]&lt;br/&gt;&amp;gt;    * [`2`: `scriptlen`]&lt;br/&gt;&amp;gt;    * [`scriptlen`: `outscript`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 42 (`splice_all_added`) (`option_splice`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`4`:`feerate_per_kw`]&lt;br/&gt;&amp;gt;    * [`4`:`minimum_depth`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Each side sends 0 or more `splice_add_input` and 0 or more&lt;br/&gt;&amp;gt; `splice_add_output` followed by `spice_all_added` to complete the splice&lt;br/&gt;&amp;gt; proposal.  This is done either to initiate a splice, or to respond to a&lt;br/&gt;&amp;gt; `splice_*` from the other party.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; `splice_add_input` is checked for the following:&lt;br/&gt;&amp;gt; - must not be during a current splice&lt;br/&gt;&amp;gt; - scriptpubkey is empty, or of form &amp;#39;HASH160 &amp;lt;20-byte-script-hash&amp;gt; EQUAL&amp;#39;&lt;br/&gt;&amp;gt; - `satoshis` doesn&amp;#39;t wrap on addition.&lt;br/&gt;&amp;gt; - MAY check that it matches outpoint specified (sig will simply be&lt;br/&gt;&amp;gt;   invalid if so), and that outpoint is segwit.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; `splice_add_output` is checked for the following:&lt;br/&gt;&amp;gt; - must not be during a current splice&lt;br/&gt;&amp;gt; - `satoshis` is less than or equal to amount owing to proposer, minus&lt;br/&gt;&amp;gt;   current reserve, and greater than or equal to `dust_limit_satoshis` we&lt;br/&gt;&amp;gt;   sent in our open_channel/accept_channel ,sg.&lt;br/&gt;&amp;gt; - script is one of the approved forms as it is for `shutdown`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; FIXME: Do we disallow splice-out if they specified&lt;br/&gt;&amp;gt;        option_upfront_shutdown_script?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; `splice_all_added` is checked for the following:&lt;br/&gt;&amp;gt; - average of `feerate_per_kw` by both sides (round down) is sufficient.&lt;br/&gt;&amp;gt; - average of `feerate_per_kw` by both sides not grossly excessive, if we&amp;#39;re&lt;br/&gt;&amp;gt;   paying some of the fees (see below!)&lt;br/&gt;&amp;gt; - both sides can afford the fees from their post-splice funds (see&lt;br/&gt;&amp;gt;   Verification Changes below)&lt;br/&gt;&amp;gt; - maximum of the two `minimum_depth` is not grossly excessive.&lt;br/&gt;&amp;gt; - There is at least one splice_add_input or splice_add_output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Splice negotiation, like closing negotiation, does not have persistent&lt;br/&gt;&amp;gt; state.  Reconnecting forgets previous negotiation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Splice Signing&lt;br/&gt;&amp;gt; --------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Once `splice_all_added` is both sent and received, we need to create and&lt;br/&gt;&amp;gt; sign both the splice tx itself, and the first commitment transaction&lt;br/&gt;&amp;gt; which spends it (but not in that order!).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. One input spends the current funding tx output.&lt;br/&gt;&amp;gt; 2. There is one additional input for each splice_add_input.&lt;br/&gt;&amp;gt; 3. One output creates the new funding tx.&lt;br/&gt;&amp;gt; 4. There is one additional output for each splice_add_output.&lt;br/&gt;&amp;gt; 5. The entire transaction is sorted into BIP69 order.&lt;br/&gt;&amp;gt; 6. The feerate is the sum of the two `feerate_per_kw` divided by 2,&lt;br/&gt;&amp;gt;    rounded down.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 43 (`splice_commitment_signature`) (`option_splice`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`64`:`commitment_signature`]&lt;br/&gt;&amp;gt;    * [`2`:`num_htlcs`]&lt;br/&gt;&amp;gt;    * [`num_htlcs*64`:`htlc_signature`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 44 (`splice_signature`) (`option_splice`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`64`:`splice_signature`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 45 (`splice_witness`) (`option_splice`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`2`: `num_witness_elements`&lt;br/&gt;&amp;gt;    * [`2`:`len`]&lt;br/&gt;&amp;gt;    * [`len`:`witnesses`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; `witnesses` itself is serialized as `num_witness_elements` of:&lt;br/&gt;&amp;gt; * `2`:`len`&lt;br/&gt;&amp;gt; * `len`: `witness_element`&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Each side sends `splice_commitment_signature` and waits to receive and&lt;br/&gt;&amp;gt; verify the other side&amp;#39;s `splice_commitment_signature` before sending&lt;br/&gt;&amp;gt; `splice_signature` and `splice_witness` for each `splice_add_input` it&lt;br/&gt;&amp;gt; proposed, in BIP69 input order.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Once a node has sent `splice_commitment_signature` it should remember&lt;br/&gt;&amp;gt; the splice proposal across reconnects.  Once it has both sent&lt;br/&gt;&amp;gt; `splice_signature`, the splice is locked in.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Splice Announcement&lt;br/&gt;&amp;gt; -------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We have to tell the network about the new channel, otherwise there will&lt;br/&gt;&amp;gt; be a distruption when it sees the old funding transaction spent.  This&lt;br/&gt;&amp;gt; is inevitable for older nodes who won&amp;#39;t understand splicing anyway.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We can&amp;#39;t send out a `channel_announcement` or `channel_update` for the&lt;br/&gt;&amp;gt; new channel until after the new funding transaction has 6 confirmations,&lt;br/&gt;&amp;gt; so we append to the existing `channel_update` for the original channel,&lt;br/&gt;&amp;gt; using a new `message_flags` field:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; | Bit Position  | Name                      | Field&lt;br/&gt;&amp;gt;     |&lt;br/&gt;&amp;gt; | ------------- | ------------------------- |&lt;br/&gt;&amp;gt; -------------------------------- |&lt;br/&gt;&amp;gt; | 0             | `option_channel_htlc_max` | `htlc_maximum_msat`&lt;br/&gt;&amp;gt;     |&lt;br/&gt;&amp;gt; | 1             | `option_channel_moving`   | `moving_txid&lt;br/&gt;&amp;gt;      |&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The `channel_update` gains the following field:&lt;br/&gt;&amp;gt;     * [`32`: moving_txid`] (option_channel_moving)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If a current `channel_update` for a closing channel contains&lt;br/&gt;&amp;gt; `option_channel_moving` a node SHOULD ignore the channel close for at&lt;br/&gt;&amp;gt; least 100 blocks iff spent by `moving_txid`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A node SHOULD immediately forward a `channel_update` it sees containing&lt;br/&gt;&amp;gt; `option_channel_moving` if neither previous `channel_update` for the&lt;br/&gt;&amp;gt; channel contains `option_channel_moving`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Each side of the splice can send these unilaterally, and SHOULD allow a&lt;br/&gt;&amp;gt; few minutes for propagation (remember, average propagation from old&lt;br/&gt;&amp;gt; nodes is still 30 seconds) prior to broadcast of the splice transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Message Changes During Splicing&lt;br/&gt;&amp;gt; -------------------------------&lt;br/&gt;&amp;gt; Once you&amp;#39;ve sent `splice_commitment_signature` each commitment&lt;br/&gt;&amp;gt; transaction is duplicated: one spends the old funding transaction, one&lt;br/&gt;&amp;gt; spends the splice transaction:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 39 (`closing_signed`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`8`:`fee_satoshis`]&lt;br/&gt;&amp;gt;    * [`64`:`signature`]&lt;br/&gt;&amp;gt;    * [`64`:`splice_signature`] (`option_splice`)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 132 (`commitment_signed`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`64`:`signature`]&lt;br/&gt;&amp;gt;    * [`2`:`num_htlcs`]&lt;br/&gt;&amp;gt;    * [`num_htlcs*64`:`htlc_signature`]&lt;br/&gt;&amp;gt;    * [`num_htlcs*64`:`htlc_splice_signature`] (`option_splice`)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If a reconnection occurs between between sending and receiving&lt;br/&gt;&amp;gt; `splice_commitment_signature`) the peer&amp;#39;s status is uncertain (similarly&lt;br/&gt;&amp;gt; for closing).  This we have a new field in `channel_reestablish` to flag&lt;br/&gt;&amp;gt; that we consider ourselves to be splicing:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 136 (`channel_reestablish`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;    * [`8`:`next_local_commitment_number`]&lt;br/&gt;&amp;gt;    * [`8`:`next_remote_revocation_number`]&lt;br/&gt;&amp;gt;    * [`32`:`your_last_per_commitment_secret`] (`option_data_loss_protect`)&lt;br/&gt;&amp;gt;    * [`33`:`my_current_per_commitment_point`] (`option_data_loss_protect`)&lt;br/&gt;&amp;gt;    * [`32`:`splice_txid`] (`option_splice`)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The splice_txid field indicates that this side considers itself to be&lt;br/&gt;&amp;gt; splicing.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The sender:&lt;br/&gt;&amp;gt; - if it has sent `splice_commitment_signature` and not sent the&lt;br/&gt;&amp;gt; corresponding&lt;br/&gt;&amp;gt;   `splice_closed`, MUST set `splice_txid` to the txid of the splice tx.&lt;br/&gt;&amp;gt;    - Otherwise MUST NOT.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The recipient:&lt;br/&gt;&amp;gt; - if it has sent `splice_commitment_signature` and not sent the&lt;br/&gt;&amp;gt; corresponding&lt;br/&gt;&amp;gt;   `splice_closed`:&lt;br/&gt;&amp;gt;   - if `splice_txid` does not exist or does not match the current splice:&lt;br/&gt;&amp;gt;     - SHOULD fail the channel&lt;br/&gt;&amp;gt;   - otherwise:&lt;br/&gt;&amp;gt;     - MUST retransmit `splice_signature`&lt;br/&gt;&amp;gt; - otherwise:&lt;br/&gt;&amp;gt;   - if `splice_txid` field exists and is not all zeroes:&lt;br/&gt;&amp;gt;     - MUST send `splice_closed`&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Validation Changes During Splicing&lt;br/&gt;&amp;gt; ----------------------------------&lt;br/&gt;&amp;gt; We track &amp;#34;post-splice&amp;#34; values as well as current values during&lt;br/&gt;&amp;gt; splicing.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The post-splice reserve is 1% of post-splice capcacity (rounded down).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The fees for the splicing transaction itself are divided into parts by&lt;br/&gt;&amp;gt; the number of `splice_add_input` plus `splice_add_output`, rounded up.&lt;br/&gt;&amp;gt; Each side pays as many parts as it proposed `splice_add_input` plus&lt;br/&gt;&amp;gt; `splice_add_output`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (So if Alice proposes two and Bob proposes one, and the total fee is 1000&lt;br/&gt;&amp;gt; satoshi, each part is 334 satoshi: Alice pays 668 and Bob pays 334.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Each side&amp;#39;s post-splice funds are debited their `splice_add_output`&lt;br/&gt;&amp;gt; amounts, and credited their `splice_add_input` amounts, a debited the&lt;br/&gt;&amp;gt; splice tx fees.  If any debiting occurs, the funds must be above the&lt;br/&gt;&amp;gt; post-splice reserve (ie. you can have below reserve, but you can&amp;#39;t spend&lt;br/&gt;&amp;gt; if you&amp;#39;re below reserve).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; All update_add_htlc must be valid for the *both* the current and&lt;br/&gt;&amp;gt; post-splice balances.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Completing Splicing&lt;br/&gt;&amp;gt; -------------------&lt;br/&gt;&amp;gt; Once you&amp;#39;ve seen both side&amp;#39;s `minimum_depth` confirmations of the splice&lt;br/&gt;&amp;gt; transaction (ie. the maximum of the two `minimum_depth` values), you can&lt;br/&gt;&amp;gt; complete the splice by sending:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. type: 46 (`splice_closed`) (`option_splice`)&lt;br/&gt;&amp;gt; 2. data:&lt;br/&gt;&amp;gt;    * [`32`:`channel_id`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Once you&amp;#39;ve sent and received `splice_closed` you can send&lt;br/&gt;&amp;gt; `announcement_signatures` for the new channel as per normal rules (ie. 6&lt;br/&gt;&amp;gt; confirmations, `announce_channel` bit set).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In addition, you can forget everything about the old channel (including&lt;br/&gt;&amp;gt; old HTLCs and revocation requirements).&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/20181015/493ab074/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20181015/493ab074/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:51:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs29fjc6gqre758hqwt3p44f4qvafstdz3uxh3ncggvaas5fptjpkszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vp9y4v8</id>
    
      <title type="html">📅 Original date posted:2018-05-08 📝 Original message: FWIW, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs29fjc6gqre758hqwt3p44f4qvafstdz3uxh3ncggvaas5fptjpkszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vp9y4v8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrrk4ky8ack59rcr76qce4ssmaxtjnw0kglmj48yvp9d8kr84nypgpa4e3h&#39;&gt;nevent1q…4e3h&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-08&lt;br/&gt;📝 Original message:&lt;br/&gt;FWIW, Conner pointed out that the initial ZK Proof for the correctness of&lt;br/&gt;the&lt;br/&gt;Paillier params (even w/ usage of bulletproofs) has multiple rounds of&lt;br/&gt;interaction,&lt;br/&gt;iirc up to 5&#43; (with additional pipelining) rounds of interaction.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;On Mon, May 7, 2018 at 5:14 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Actually, just thought about this a bit more and I think it&amp;#39;s possible to&lt;br/&gt;&amp;gt; deploy this in unison with (or after) any sort of SS based on schnorr&lt;br/&gt;&amp;gt; becomes&lt;br/&gt;&amp;gt; possible in Bitcoin. My observation is that since both techniques are&lt;br/&gt;&amp;gt; based on&lt;br/&gt;&amp;gt; the same underlying technique (revealing a secret value in a signature) and&lt;br/&gt;&amp;gt; they center around leveraging the onion payload to drop off a payment point&lt;br/&gt;&amp;gt; (G*a, or G*a_1*a_2*a_3, etc), then the disclosure within the _links_ can be&lt;br/&gt;&amp;gt; heterogeneous, as the same secret is still revealed in an end-to-end&lt;br/&gt;&amp;gt; matter.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As an illustration, consider: A &amp;lt;-&amp;gt; B &amp;lt;-&amp;gt; C. The A &amp;lt;-&amp;gt; B link could use&lt;br/&gt;&amp;gt; the 2pc&lt;br/&gt;&amp;gt; pailier technique, while the B &amp;lt;-&amp;gt; C link could use the OG SS technique&lt;br/&gt;&amp;gt; based&lt;br/&gt;&amp;gt; on schnorr. If i&amp;#39;m correct, then this would mean that we can deploy both&lt;br/&gt;&amp;gt; techniques, without worrying about fragmenting the network due to the&lt;br/&gt;&amp;gt; existence&lt;br/&gt;&amp;gt; of two similar but incompatible e2e payment routing schemes!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Mon, May 7, 2018 at 4:57 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi Pedro,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Very cool stuff! When I originally discovered the Lindell&amp;#39;s technique, my&lt;br/&gt;&amp;gt;&amp;gt; immediate thought was the we could phase this in as a way to&lt;br/&gt;&amp;gt;&amp;gt; _immediately_ (no&lt;br/&gt;&amp;gt;&amp;gt; additional Script upgrades required), replace the regular 2-of-2&lt;br/&gt;&amp;gt;&amp;gt; mulit-sig with&lt;br/&gt;&amp;gt;&amp;gt; a single p2wkh. The immediate advantages of this would: be lower fees for&lt;br/&gt;&amp;gt;&amp;gt; opening/closing channels (as the public key script, and witness are&lt;br/&gt;&amp;gt;&amp;gt; smaller),&lt;br/&gt;&amp;gt;&amp;gt; openings and cooperative close transactions would blend in with the&lt;br/&gt;&amp;gt;&amp;gt; anonymity&lt;br/&gt;&amp;gt;&amp;gt; set of regular p2wkh transactions, and finally the htlc timeout&#43;success&lt;br/&gt;&amp;gt;&amp;gt; transactions can be made smaller as we can remove the multi-sig. The&lt;br/&gt;&amp;gt;&amp;gt; second&lt;br/&gt;&amp;gt;&amp;gt; benefit is nerfed a bit if the channel are advertised, but non-advertised&lt;br/&gt;&amp;gt;&amp;gt; channels would be able to take advantage of this &amp;#34;stealth&amp;#34; feature.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The upside of the original application I hand in mind is that it wouldn&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt; require any end-to-end changes, as it would only be a link level change&lt;br/&gt;&amp;gt;&amp;gt; (diff&lt;br/&gt;&amp;gt;&amp;gt; output for the funding transaction). If we wanted to allow these styles of&lt;br/&gt;&amp;gt;&amp;gt; channels to be used outside of non-advertised channels, then we would&lt;br/&gt;&amp;gt;&amp;gt; need to&lt;br/&gt;&amp;gt;&amp;gt; update the way channels are verified in the gossip layer.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Applying this to the realm of allowing us to use randomized payment&lt;br/&gt;&amp;gt;&amp;gt; identifiers&lt;br/&gt;&amp;gt;&amp;gt; across the route is obviously much, much doper. So then the question&lt;br/&gt;&amp;gt;&amp;gt; would be&lt;br/&gt;&amp;gt;&amp;gt; what the process of integrating the scheme into the existing protocol&lt;br/&gt;&amp;gt;&amp;gt; would&lt;br/&gt;&amp;gt;&amp;gt; look like. The primary thing we&amp;#39;d need to account for is the additional&lt;br/&gt;&amp;gt;&amp;gt; cryptographic overhead this scheme would add if integrated. Re-reviewing&lt;br/&gt;&amp;gt;&amp;gt; the&lt;br/&gt;&amp;gt;&amp;gt; paper, there&amp;#39;s an initial setup and verification phase (which was omitted&lt;br/&gt;&amp;gt;&amp;gt; from&lt;br/&gt;&amp;gt;&amp;gt; y&amp;#39;alls note for brevity) where both parties need to complete before the&lt;br/&gt;&amp;gt;&amp;gt; actually signing process can take place. Ideally, we can piggy-back this&lt;br/&gt;&amp;gt;&amp;gt; setup&lt;br/&gt;&amp;gt;&amp;gt; on top of the existing accept_channel/open_channel dance both sides need&lt;br/&gt;&amp;gt;&amp;gt; to go&lt;br/&gt;&amp;gt;&amp;gt; through in order to advance the channel negotiation process today.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Conner actually started to implement this when we first discovered the&lt;br/&gt;&amp;gt;&amp;gt; scheme,&lt;br/&gt;&amp;gt;&amp;gt; so we have a pretty good feel w.r.t the implementation of the initial set&lt;br/&gt;&amp;gt;&amp;gt; of&lt;br/&gt;&amp;gt;&amp;gt; proofs. The three proofs required for the set up phase are:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;   1. A proof that that the Paillier public key is well formed. In the&lt;br/&gt;&amp;gt;&amp;gt; paper&lt;br/&gt;&amp;gt;&amp;gt;   they only execute this step for the party that wishes to _obtain_ the&lt;br/&gt;&amp;gt;&amp;gt;   signature. In our case, since we&amp;#39;ll need to sign for HTLCs in both&lt;br/&gt;&amp;gt;&amp;gt;   directions, but parties will need to execute this step.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;   2. A dlog proof for the signing keys themselves. We already do this&lt;br/&gt;&amp;gt;&amp;gt; more or&lt;br/&gt;&amp;gt;&amp;gt;   less, as if the remote party isn&amp;#39;t able to sign with their target key,&lt;br/&gt;&amp;gt;&amp;gt; then&lt;br/&gt;&amp;gt;&amp;gt;   we won&amp;#39;t be able to update the channel, or even create a valid&lt;br/&gt;&amp;gt;&amp;gt; commitment in&lt;br/&gt;&amp;gt;&amp;gt;   the first place.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;   3. A proof that value encrypted (the Paillier ciphertext) is actually&lt;br/&gt;&amp;gt;&amp;gt; the&lt;br/&gt;&amp;gt;&amp;gt;   dlog of the public key to be used for signing. (as an aside this is the&lt;br/&gt;&amp;gt;&amp;gt; part&lt;br/&gt;&amp;gt;&amp;gt;   of the protocol that made me do a double take when first reading it:&lt;br/&gt;&amp;gt;&amp;gt; using one&lt;br/&gt;&amp;gt;&amp;gt;   cryptosystem to encrypt the private key of another cryptosystem in&lt;br/&gt;&amp;gt;&amp;gt; order to&lt;br/&gt;&amp;gt;&amp;gt;   construct a 2pc to allow signing in the latter cryptosystem! soo&lt;br/&gt;&amp;gt;&amp;gt; clever!)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; First, we&amp;#39;ll examine the initial proof. This only needs to be done once&lt;br/&gt;&amp;gt;&amp;gt; by both&lt;br/&gt;&amp;gt;&amp;gt; parties AFAICT. As a result, we may be able to piggyback this onto the&lt;br/&gt;&amp;gt;&amp;gt; initial&lt;br/&gt;&amp;gt;&amp;gt; channel funding steps. Reviewing the paper cited on the Lindell paper&lt;br/&gt;&amp;gt;&amp;gt; [1], it&lt;br/&gt;&amp;gt;&amp;gt; appears this would take 1 RTT, so this shouldn&amp;#39;t result in any additional&lt;br/&gt;&amp;gt;&amp;gt; round&lt;br/&gt;&amp;gt;&amp;gt; trips during the funding process. We should be able to use a Paillier&lt;br/&gt;&amp;gt;&amp;gt; modulos&lt;br/&gt;&amp;gt;&amp;gt; of 2048 bits, so nothing too crazy. This would just result in a slightly&lt;br/&gt;&amp;gt;&amp;gt; bigger&lt;br/&gt;&amp;gt;&amp;gt; opening message.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Skipping the second proofs as it&amp;#39;s pretty standard.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The third proof as described (Section 6 of the Lindell paper) is&lt;br/&gt;&amp;gt;&amp;gt; interactive.&lt;br/&gt;&amp;gt;&amp;gt; It also contains a ZK range proof as a sub-protocol which as described in&lt;br/&gt;&amp;gt;&amp;gt; Appendix A is also interactive. However, it was pointed out to us by Omer&lt;br/&gt;&amp;gt;&amp;gt; Shlomovits on the lnd slack, that we can actually replace their custom&lt;br/&gt;&amp;gt;&amp;gt; range&lt;br/&gt;&amp;gt;&amp;gt; proofs with Bulletproofs. This would make this section non-interactive,&lt;br/&gt;&amp;gt;&amp;gt; allowing the proof itself to take 1.5 RTT AFAICT. Additionally, this&lt;br/&gt;&amp;gt;&amp;gt; would only&lt;br/&gt;&amp;gt;&amp;gt; need to be done once at the start, as AFIACT, we can re-use the&lt;br/&gt;&amp;gt;&amp;gt; encryption of&lt;br/&gt;&amp;gt;&amp;gt; the secp256k1 private key of both parties.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The current channel opening process requires 2 RTT, so it seems that we&amp;#39;d&lt;br/&gt;&amp;gt;&amp;gt; be&lt;br/&gt;&amp;gt;&amp;gt; able to easily piggy back all the opening proofs on top of the existing&lt;br/&gt;&amp;gt;&amp;gt; funding&lt;br/&gt;&amp;gt;&amp;gt; protocol. The main cost would be the increased size of these opening&lt;br/&gt;&amp;gt;&amp;gt; messages,&lt;br/&gt;&amp;gt;&amp;gt; and also the additional computational cost of operations within the&lt;br/&gt;&amp;gt;&amp;gt; Paillier&lt;br/&gt;&amp;gt;&amp;gt; modulus and the new range proof.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The additional components that would need to be modified are the process&lt;br/&gt;&amp;gt;&amp;gt; of&lt;br/&gt;&amp;gt;&amp;gt; adding&#43;settling an HTLC, and also the onion payload that drops off the&lt;br/&gt;&amp;gt;&amp;gt; point&lt;br/&gt;&amp;gt;&amp;gt; whose dlog is r_1*alpha. Within the current protocol, adding and settling&lt;br/&gt;&amp;gt;&amp;gt; an&lt;br/&gt;&amp;gt;&amp;gt; HTLC are more or less non-interactive, we have a single message for each,&lt;br/&gt;&amp;gt;&amp;gt; which&lt;br/&gt;&amp;gt;&amp;gt; is then staged to be committed in new commitments for both parties. With&lt;br/&gt;&amp;gt;&amp;gt; this&lt;br/&gt;&amp;gt;&amp;gt; new scheme (if I follow it correctly), adding an HTLC now requires N RTT:&lt;br/&gt;&amp;gt;&amp;gt;   1. Alice sends A = G*alpha to Bob. Here alpha is the payment secret.&lt;br/&gt;&amp;gt;&amp;gt;   2. Bob sends R_3 = (G*alpha)*r_2 (along w/ a proof of knowledge of r_2&lt;br/&gt;&amp;gt;&amp;gt; and&lt;br/&gt;&amp;gt;&amp;gt;   relation to A)&lt;br/&gt;&amp;gt;&amp;gt;   3. Alice sends R_3&amp;#39; = (G*alpha)*r_3 (along with a similar proof as&lt;br/&gt;&amp;gt;&amp;gt; above) 4.&lt;br/&gt;&amp;gt;&amp;gt;   Bob then computes c3 (the encrypted partial sig which when completed&lt;br/&gt;&amp;gt;&amp;gt; will&lt;br/&gt;&amp;gt;&amp;gt;   reveal a) to Alice.&lt;br/&gt;&amp;gt;&amp;gt;   5. Alice decrypts c3 to get the plaintext partial sig (s&amp;#39;), then&lt;br/&gt;&amp;gt;&amp;gt; finalizes&lt;br/&gt;&amp;gt;&amp;gt;   the set up by sending s&amp;#39;&amp;#39; to Bob.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This process takes 2.5 RTT, and would require re-working the state machine&lt;br/&gt;&amp;gt;&amp;gt; slightly to only actually commit an HTLC after step 5 has been&lt;br/&gt;&amp;gt;&amp;gt; completed.  When&lt;br/&gt;&amp;gt;&amp;gt; Bob obtains a from the next party in the path, we Alice can then then&lt;br/&gt;&amp;gt;&amp;gt; over the&lt;br/&gt;&amp;gt;&amp;gt; signature, from which Alice can extract alpha. So adding HTLCs is now a&lt;br/&gt;&amp;gt;&amp;gt; bit&lt;br/&gt;&amp;gt;&amp;gt; more interactive, but settling them is the same a before.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Finally, the onion payload would need to be re-interpreted in order to&lt;br/&gt;&amp;gt;&amp;gt; encode&lt;br/&gt;&amp;gt;&amp;gt; G*alpha which takes 33 bytes. We can shave this down to 32 by selecting&lt;br/&gt;&amp;gt;&amp;gt; the x&lt;br/&gt;&amp;gt;&amp;gt; coordinate (at the sender) to always be either even or odd. Currently, we&lt;br/&gt;&amp;gt;&amp;gt; have&lt;br/&gt;&amp;gt;&amp;gt; 12 unused bytes in the onion payload. The HMAC is currently 32 bytes. One&lt;br/&gt;&amp;gt;&amp;gt; path&lt;br/&gt;&amp;gt;&amp;gt; would be to allocate a portion of HMAC space to encoding this point. A&lt;br/&gt;&amp;gt;&amp;gt; 16-byte&lt;br/&gt;&amp;gt;&amp;gt; HMAC would probably have been enough in the beginning, so we can drop&lt;br/&gt;&amp;gt;&amp;gt; down to&lt;br/&gt;&amp;gt;&amp;gt; that. However, that still leaves 4 bytes somewhere that has to give...one&lt;br/&gt;&amp;gt;&amp;gt; could&lt;br/&gt;&amp;gt;&amp;gt; either obtain these extra bytes from the CLTV and Amount fields, or just&lt;br/&gt;&amp;gt;&amp;gt; have&lt;br/&gt;&amp;gt;&amp;gt; each hop consume an extra payload. The latter path would mean that the new&lt;br/&gt;&amp;gt;&amp;gt; upper hop limit is actually 10.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; However, given that we would need need a new global feature bit in order&lt;br/&gt;&amp;gt;&amp;gt; to&lt;br/&gt;&amp;gt;&amp;gt; roll this out, it may make sense to re-work the onion format all together&lt;br/&gt;&amp;gt;&amp;gt; which&lt;br/&gt;&amp;gt;&amp;gt; would mean that we wouldn&amp;#39;t need to hack the old format a bit to&lt;br/&gt;&amp;gt;&amp;gt; accommodate&lt;br/&gt;&amp;gt;&amp;gt; this additional data. One aspect of introducing a new end-to-end contract&lt;br/&gt;&amp;gt;&amp;gt; type&lt;br/&gt;&amp;gt;&amp;gt; which I hadn&amp;#39;t considered before is that each new type effectively&lt;br/&gt;&amp;gt;&amp;gt; partitions&lt;br/&gt;&amp;gt;&amp;gt; the network. This is due to the fact that these HTLCs will now only be&lt;br/&gt;&amp;gt;&amp;gt; able to&lt;br/&gt;&amp;gt;&amp;gt; be carried along paths that understand this new feature. As a result,&lt;br/&gt;&amp;gt;&amp;gt; plausible&lt;br/&gt;&amp;gt;&amp;gt; path diversity takes as we can no longer utilize all channels on the&lt;br/&gt;&amp;gt;&amp;gt; network&lt;br/&gt;&amp;gt;&amp;gt; for routing. This would suggest that introducing new end to end contract&lt;br/&gt;&amp;gt;&amp;gt; types&lt;br/&gt;&amp;gt;&amp;gt; (if one wishes to use them widely across arbitrary channels and not for&lt;br/&gt;&amp;gt;&amp;gt; specific contract protocols) may be a strong point of synchronization&lt;br/&gt;&amp;gt;&amp;gt; w.r.t&lt;br/&gt;&amp;gt;&amp;gt; updates across the network. As a result, we may need to be a bit more&lt;br/&gt;&amp;gt;&amp;gt; discerning w.r.t new candidates for e2e contracts given the coordination&lt;br/&gt;&amp;gt;&amp;gt; costs.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; So the takeaways are:&lt;br/&gt;&amp;gt;&amp;gt;   * we can probably piggy back the extra proofs onto the channel opening&lt;br/&gt;&amp;gt;&amp;gt;     process&lt;br/&gt;&amp;gt;&amp;gt;       * one of the subproofs can use bulletproofs to make the proof&lt;br/&gt;&amp;gt;&amp;gt; shorter and&lt;br/&gt;&amp;gt;&amp;gt;         also non-interactive&lt;br/&gt;&amp;gt;&amp;gt;   * adding an HTLC would take 2.5 RTT&amp;#39;s, but settling is just as quick as&lt;br/&gt;&amp;gt;&amp;gt;     before&lt;br/&gt;&amp;gt;&amp;gt;   * the onion payload would either need to be hacked, or extended to&lt;br/&gt;&amp;gt;&amp;gt; support&lt;br/&gt;&amp;gt;&amp;gt;     packaging the point.&lt;br/&gt;&amp;gt;&amp;gt;   * the utility of the scheme won&amp;#39;t shine until all/most of the network&lt;br/&gt;&amp;gt;&amp;gt; uses it&lt;br/&gt;&amp;gt;&amp;gt;   * we could start w/ just the introduction of the OG 2PC scheme as a&lt;br/&gt;&amp;gt;&amp;gt; multi-sig&lt;br/&gt;&amp;gt;&amp;gt;     replacement&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; [1]: &lt;a href=&#34;https://eprint.iacr.org/2011/494.pdf&#34;&gt;https://eprint.iacr.org/2011/494.pdf&lt;/a&gt; (section 3.3)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Fri, Apr 27, 2018 at 11:42 AM Pedro Moreno Sanchez &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt; pmorenos at purdue.edu&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Hello guys,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; as some of you already know, I am working on some cryptographic&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; constructions that might be of interest and useful for the Lightning&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Network.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Recently, I have come up with a scriptless version of the adaptor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; signatures and the contract required in the Lighting Network using only&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 2-party ECDSA signatures. The main advantage is that, instead of waiting&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; for Schnorr signatures to be deployed in Bitcoin so that Poelstra&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; scriptless scripts can be used, I believe that this ECDSA-version of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; scriptless scripts can be directly applied today.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Details are in the attached PDF. I am looking forward to hearing your&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; comments and suggestions.&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; Pedro.&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; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&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;&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/lightning-dev/attachments/20180508/23f2dfc3/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180508/23f2dfc3/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:50:39&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0q4mz32ya25afqlkmev59mj238fwvv8ak7peh4qd0dw0vxehx05czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v84ndkl</id>
    
      <title type="html">📅 Original date posted:2018-05-07 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0q4mz32ya25afqlkmev59mj238fwvv8ak7peh4qd0dw0vxehx05czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v84ndkl" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2zs9v58hxxv8t4s8xuudewndd2q2jy7wfuzauqx638rr0cpkyrdgm79c0k&#39;&gt;nevent1q…9c0k&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Pedro,&lt;br/&gt;&lt;br/&gt;Very cool stuff! When I originally discovered the Lindell&amp;#39;s technique, my&lt;br/&gt;immediate thought was the we could phase this in as a way to _immediately_&lt;br/&gt;(no&lt;br/&gt;additional Script upgrades required), replace the regular 2-of-2 mulit-sig&lt;br/&gt;with&lt;br/&gt;a single p2wkh. The immediate advantages of this would: be lower fees for&lt;br/&gt;opening/closing channels (as the public key script, and witness are&lt;br/&gt;smaller),&lt;br/&gt;openings and cooperative close transactions would blend in with the&lt;br/&gt;anonymity&lt;br/&gt;set of regular p2wkh transactions, and finally the htlc timeout&#43;success&lt;br/&gt;transactions can be made smaller as we can remove the multi-sig. The second&lt;br/&gt;benefit is nerfed a bit if the channel are advertised, but non-advertised&lt;br/&gt;channels would be able to take advantage of this &amp;#34;stealth&amp;#34; feature.&lt;br/&gt;&lt;br/&gt;The upside of the original application I hand in mind is that it wouldn&amp;#39;t&lt;br/&gt;require any end-to-end changes, as it would only be a link level change&lt;br/&gt;(diff&lt;br/&gt;output for the funding transaction). If we wanted to allow these styles of&lt;br/&gt;channels to be used outside of non-advertised channels, then we would need&lt;br/&gt;to&lt;br/&gt;update the way channels are verified in the gossip layer.&lt;br/&gt;&lt;br/&gt;Applying this to the realm of allowing us to use randomized payment&lt;br/&gt;identifiers&lt;br/&gt;across the route is obviously much, much doper. So then the question would&lt;br/&gt;be&lt;br/&gt;what the process of integrating the scheme into the existing protocol would&lt;br/&gt;look like. The primary thing we&amp;#39;d need to account for is the additional&lt;br/&gt;cryptographic overhead this scheme would add if integrated. Re-reviewing the&lt;br/&gt;paper, there&amp;#39;s an initial setup and verification phase (which was omitted&lt;br/&gt;from&lt;br/&gt;y&amp;#39;alls note for brevity) where both parties need to complete before the&lt;br/&gt;actually signing process can take place. Ideally, we can piggy-back this&lt;br/&gt;setup&lt;br/&gt;on top of the existing accept_channel/open_channel dance both sides need to&lt;br/&gt;go&lt;br/&gt;through in order to advance the channel negotiation process today.&lt;br/&gt;&lt;br/&gt;Conner actually started to implement this when we first discovered the&lt;br/&gt;scheme,&lt;br/&gt;so we have a pretty good feel w.r.t the implementation of the initial set of&lt;br/&gt;proofs. The three proofs required for the set up phase are:&lt;br/&gt;&lt;br/&gt;  1. A proof that that the Paillier public key is well formed. In the paper&lt;br/&gt;  they only execute this step for the party that wishes to _obtain_ the&lt;br/&gt;  signature. In our case, since we&amp;#39;ll need to sign for HTLCs in both&lt;br/&gt;  directions, but parties will need to execute this step.&lt;br/&gt;&lt;br/&gt;  2. A dlog proof for the signing keys themselves. We already do this more&lt;br/&gt;or&lt;br/&gt;  less, as if the remote party isn&amp;#39;t able to sign with their target key,&lt;br/&gt;then&lt;br/&gt;  we won&amp;#39;t be able to update the channel, or even create a valid commitment&lt;br/&gt;in&lt;br/&gt;  the first place.&lt;br/&gt;&lt;br/&gt;  3. A proof that value encrypted (the Paillier ciphertext) is actually the&lt;br/&gt;  dlog of the public key to be used for signing. (as an aside this is the&lt;br/&gt;part&lt;br/&gt;  of the protocol that made me do a double take when first reading it:&lt;br/&gt;using one&lt;br/&gt;  cryptosystem to encrypt the private key of another cryptosystem in order&lt;br/&gt;to&lt;br/&gt;  construct a 2pc to allow signing in the latter cryptosystem! soo clever!)&lt;br/&gt;&lt;br/&gt;First, we&amp;#39;ll examine the initial proof. This only needs to be done once by&lt;br/&gt;both&lt;br/&gt;parties AFAICT. As a result, we may be able to piggyback this onto the&lt;br/&gt;initial&lt;br/&gt;channel funding steps. Reviewing the paper cited on the Lindell paper [1],&lt;br/&gt;it&lt;br/&gt;appears this would take 1 RTT, so this shouldn&amp;#39;t result in any additional&lt;br/&gt;round&lt;br/&gt;trips during the funding process. We should be able to use a Paillier&lt;br/&gt;modulos&lt;br/&gt;of 2048 bits, so nothing too crazy. This would just result in a slightly&lt;br/&gt;bigger&lt;br/&gt;opening message.&lt;br/&gt;&lt;br/&gt;Skipping the second proofs as it&amp;#39;s pretty standard.&lt;br/&gt;&lt;br/&gt;The third proof as described (Section 6 of the Lindell paper) is&lt;br/&gt;interactive.&lt;br/&gt;It also contains a ZK range proof as a sub-protocol which as described in&lt;br/&gt;Appendix A is also interactive. However, it was pointed out to us by Omer&lt;br/&gt;Shlomovits on the lnd slack, that we can actually replace their custom range&lt;br/&gt;proofs with Bulletproofs. This would make this section non-interactive,&lt;br/&gt;allowing the proof itself to take 1.5 RTT AFAICT. Additionally, this would&lt;br/&gt;only&lt;br/&gt;need to be done once at the start, as AFIACT, we can re-use the encryption&lt;br/&gt;of&lt;br/&gt;the secp256k1 private key of both parties.&lt;br/&gt;&lt;br/&gt;The current channel opening process requires 2 RTT, so it seems that we&amp;#39;d be&lt;br/&gt;able to easily piggy back all the opening proofs on top of the existing&lt;br/&gt;funding&lt;br/&gt;protocol. The main cost would be the increased size of these opening&lt;br/&gt;messages,&lt;br/&gt;and also the additional computational cost of operations within the Paillier&lt;br/&gt;modulus and the new range proof.&lt;br/&gt;&lt;br/&gt;The additional components that would need to be modified are the process of&lt;br/&gt;adding&#43;settling an HTLC, and also the onion payload that drops off the point&lt;br/&gt;whose dlog is r_1*alpha. Within the current protocol, adding and settling an&lt;br/&gt;HTLC are more or less non-interactive, we have a single message for each,&lt;br/&gt;which&lt;br/&gt;is then staged to be committed in new commitments for both parties. With&lt;br/&gt;this&lt;br/&gt;new scheme (if I follow it correctly), adding an HTLC now requires N RTT:&lt;br/&gt;  1. Alice sends A = G*alpha to Bob. Here alpha is the payment secret.&lt;br/&gt;  2. Bob sends R_3 = (G*alpha)*r_2 (along w/ a proof of knowledge of r_2 and&lt;br/&gt;  relation to A)&lt;br/&gt;  3. Alice sends R_3&amp;#39; = (G*alpha)*r_3 (along with a similar proof as above)&lt;br/&gt;4.&lt;br/&gt;  Bob then computes c3 (the encrypted partial sig which when completed will&lt;br/&gt;  reveal a) to Alice.&lt;br/&gt;  5. Alice decrypts c3 to get the plaintext partial sig (s&amp;#39;), then finalizes&lt;br/&gt;  the set up by sending s&amp;#39;&amp;#39; to Bob.&lt;br/&gt;&lt;br/&gt;This process takes 2.5 RTT, and would require re-working the state machine&lt;br/&gt;slightly to only actually commit an HTLC after step 5 has been completed.&lt;br/&gt;When&lt;br/&gt;Bob obtains a from the next party in the path, we Alice can then then over&lt;br/&gt;the&lt;br/&gt;signature, from which Alice can extract alpha. So adding HTLCs is now a bit&lt;br/&gt;more interactive, but settling them is the same a before.&lt;br/&gt;&lt;br/&gt;Finally, the onion payload would need to be re-interpreted in order to&lt;br/&gt;encode&lt;br/&gt;G*alpha which takes 33 bytes. We can shave this down to 32 by selecting the&lt;br/&gt;x&lt;br/&gt;coordinate (at the sender) to always be either even or odd. Currently, we&lt;br/&gt;have&lt;br/&gt;12 unused bytes in the onion payload. The HMAC is currently 32 bytes. One&lt;br/&gt;path&lt;br/&gt;would be to allocate a portion of HMAC space to encoding this point. A&lt;br/&gt;16-byte&lt;br/&gt;HMAC would probably have been enough in the beginning, so we can drop down&lt;br/&gt;to&lt;br/&gt;that. However, that still leaves 4 bytes somewhere that has to give...one&lt;br/&gt;could&lt;br/&gt;either obtain these extra bytes from the CLTV and Amount fields, or just&lt;br/&gt;have&lt;br/&gt;each hop consume an extra payload. The latter path would mean that the new&lt;br/&gt;upper hop limit is actually 10.&lt;br/&gt;&lt;br/&gt;However, given that we would need need a new global feature bit in order to&lt;br/&gt;roll this out, it may make sense to re-work the onion format all together&lt;br/&gt;which&lt;br/&gt;would mean that we wouldn&amp;#39;t need to hack the old format a bit to accommodate&lt;br/&gt;this additional data. One aspect of introducing a new end-to-end contract&lt;br/&gt;type&lt;br/&gt;which I hadn&amp;#39;t considered before is that each new type effectively&lt;br/&gt;partitions&lt;br/&gt;the network. This is due to the fact that these HTLCs will now only be able&lt;br/&gt;to&lt;br/&gt;be carried along paths that understand this new feature. As a result,&lt;br/&gt;plausible&lt;br/&gt;path diversity takes as we can no longer utilize all channels on the network&lt;br/&gt;for routing. This would suggest that introducing new end to end contract&lt;br/&gt;types&lt;br/&gt;(if one wishes to use them widely across arbitrary channels and not for&lt;br/&gt;specific contract protocols) may be a strong point of synchronization w.r.t&lt;br/&gt;updates across the network. As a result, we may need to be a bit more&lt;br/&gt;discerning w.r.t new candidates for e2e contracts given the coordination&lt;br/&gt;costs.&lt;br/&gt;&lt;br/&gt;So the takeaways are:&lt;br/&gt;  * we can probably piggy back the extra proofs onto the channel opening&lt;br/&gt;    process&lt;br/&gt;      * one of the subproofs can use bulletproofs to make the proof shorter&lt;br/&gt;and&lt;br/&gt;        also non-interactive&lt;br/&gt;  * adding an HTLC would take 2.5 RTT&amp;#39;s, but settling is just as quick as&lt;br/&gt;    before&lt;br/&gt;  * the onion payload would either need to be hacked, or extended to support&lt;br/&gt;    packaging the point.&lt;br/&gt;  * the utility of the scheme won&amp;#39;t shine until all/most of the network&lt;br/&gt;uses it&lt;br/&gt;  * we could start w/ just the introduction of the OG 2PC scheme as a&lt;br/&gt;multi-sig&lt;br/&gt;    replacement&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://eprint.iacr.org/2011/494.pdf&#34;&gt;https://eprint.iacr.org/2011/494.pdf&lt;/a&gt; (section 3.3)&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Fri, Apr 27, 2018 at 11:42 AM Pedro Moreno Sanchez &amp;lt;pmorenos at purdue.edu&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hello guys,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; as some of you already know, I am working on some cryptographic&lt;br/&gt;&amp;gt; constructions that might be of interest and useful for the Lightning&lt;br/&gt;&amp;gt; Network.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Recently, I have come up with a scriptless version of the adaptor&lt;br/&gt;&amp;gt; signatures and the contract required in the Lighting Network using only&lt;br/&gt;&amp;gt; 2-party ECDSA signatures. The main advantage is that, instead of waiting&lt;br/&gt;&amp;gt; for Schnorr signatures to be deployed in Bitcoin so that Poelstra&amp;#39;s&lt;br/&gt;&amp;gt; scriptless scripts can be used, I believe that this ECDSA-version of the&lt;br/&gt;&amp;gt; scriptless scripts can be directly applied today.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Details are in the attached PDF. I am looking forward to hearing your&lt;br/&gt;&amp;gt; comments and suggestions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Pedro.&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/20180507/32b51086/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180507/32b51086/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:50:38&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrrk4ky8ack59rcr76qce4ssmaxtjnw0kglmj48yvp9d8kr84nypgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v52dgac</id>
    
      <title type="html">📅 Original date posted:2018-05-07 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrrk4ky8ack59rcr76qce4ssmaxtjnw0kglmj48yvp9d8kr84nypgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v52dgac" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0q4mz32ya25afqlkmev59mj238fwvv8ak7peh4qd0dw0vxehx05cy02qh2&#39;&gt;nevent1q…2qh2&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Actually, just thought about this a bit more and I think it&amp;#39;s possible to&lt;br/&gt;deploy this in unison with (or after) any sort of SS based on schnorr&lt;br/&gt;becomes&lt;br/&gt;possible in Bitcoin. My observation is that since both techniques are based&lt;br/&gt;on&lt;br/&gt;the same underlying technique (revealing a secret value in a signature) and&lt;br/&gt;they center around leveraging the onion payload to drop off a payment point&lt;br/&gt;(G*a, or G*a_1*a_2*a_3, etc), then the disclosure within the _links_ can be&lt;br/&gt;heterogeneous, as the same secret is still revealed in an end-to-end matter.&lt;br/&gt;&lt;br/&gt;As an illustration, consider: A &amp;lt;-&amp;gt; B &amp;lt;-&amp;gt; C. The A &amp;lt;-&amp;gt; B link could use the&lt;br/&gt;2pc&lt;br/&gt;pailier technique, while the B &amp;lt;-&amp;gt; C link could use the OG SS technique&lt;br/&gt;based&lt;br/&gt;on schnorr. If i&amp;#39;m correct, then this would mean that we can deploy both&lt;br/&gt;techniques, without worrying about fragmenting the network due to the&lt;br/&gt;existence&lt;br/&gt;of two similar but incompatible e2e payment routing schemes!&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Mon, May 7, 2018 at 4:57 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Pedro,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Very cool stuff! When I originally discovered the Lindell&amp;#39;s technique, my&lt;br/&gt;&amp;gt; immediate thought was the we could phase this in as a way to _immediately_&lt;br/&gt;&amp;gt; (no&lt;br/&gt;&amp;gt; additional Script upgrades required), replace the regular 2-of-2 mulit-sig&lt;br/&gt;&amp;gt; with&lt;br/&gt;&amp;gt; a single p2wkh. The immediate advantages of this would: be lower fees for&lt;br/&gt;&amp;gt; opening/closing channels (as the public key script, and witness are&lt;br/&gt;&amp;gt; smaller),&lt;br/&gt;&amp;gt; openings and cooperative close transactions would blend in with the&lt;br/&gt;&amp;gt; anonymity&lt;br/&gt;&amp;gt; set of regular p2wkh transactions, and finally the htlc timeout&#43;success&lt;br/&gt;&amp;gt; transactions can be made smaller as we can remove the multi-sig. The second&lt;br/&gt;&amp;gt; benefit is nerfed a bit if the channel are advertised, but non-advertised&lt;br/&gt;&amp;gt; channels would be able to take advantage of this &amp;#34;stealth&amp;#34; feature.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The upside of the original application I hand in mind is that it wouldn&amp;#39;t&lt;br/&gt;&amp;gt; require any end-to-end changes, as it would only be a link level change&lt;br/&gt;&amp;gt; (diff&lt;br/&gt;&amp;gt; output for the funding transaction). If we wanted to allow these styles of&lt;br/&gt;&amp;gt; channels to be used outside of non-advertised channels, then we would need&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; update the way channels are verified in the gossip layer.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Applying this to the realm of allowing us to use randomized payment&lt;br/&gt;&amp;gt; identifiers&lt;br/&gt;&amp;gt; across the route is obviously much, much doper. So then the question would&lt;br/&gt;&amp;gt; be&lt;br/&gt;&amp;gt; what the process of integrating the scheme into the existing protocol would&lt;br/&gt;&amp;gt; look like. The primary thing we&amp;#39;d need to account for is the additional&lt;br/&gt;&amp;gt; cryptographic overhead this scheme would add if integrated. Re-reviewing&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; paper, there&amp;#39;s an initial setup and verification phase (which was omitted&lt;br/&gt;&amp;gt; from&lt;br/&gt;&amp;gt; y&amp;#39;alls note for brevity) where both parties need to complete before the&lt;br/&gt;&amp;gt; actually signing process can take place. Ideally, we can piggy-back this&lt;br/&gt;&amp;gt; setup&lt;br/&gt;&amp;gt; on top of the existing accept_channel/open_channel dance both sides need&lt;br/&gt;&amp;gt; to go&lt;br/&gt;&amp;gt; through in order to advance the channel negotiation process today.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Conner actually started to implement this when we first discovered the&lt;br/&gt;&amp;gt; scheme,&lt;br/&gt;&amp;gt; so we have a pretty good feel w.r.t the implementation of the initial set&lt;br/&gt;&amp;gt; of&lt;br/&gt;&amp;gt; proofs. The three proofs required for the set up phase are:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   1. A proof that that the Paillier public key is well formed. In the paper&lt;br/&gt;&amp;gt;   they only execute this step for the party that wishes to _obtain_ the&lt;br/&gt;&amp;gt;   signature. In our case, since we&amp;#39;ll need to sign for HTLCs in both&lt;br/&gt;&amp;gt;   directions, but parties will need to execute this step.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   2. A dlog proof for the signing keys themselves. We already do this more&lt;br/&gt;&amp;gt; or&lt;br/&gt;&amp;gt;   less, as if the remote party isn&amp;#39;t able to sign with their target key,&lt;br/&gt;&amp;gt; then&lt;br/&gt;&amp;gt;   we won&amp;#39;t be able to update the channel, or even create a valid&lt;br/&gt;&amp;gt; commitment in&lt;br/&gt;&amp;gt;   the first place.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   3. A proof that value encrypted (the Paillier ciphertext) is actually the&lt;br/&gt;&amp;gt;   dlog of the public key to be used for signing. (as an aside this is the&lt;br/&gt;&amp;gt; part&lt;br/&gt;&amp;gt;   of the protocol that made me do a double take when first reading it:&lt;br/&gt;&amp;gt; using one&lt;br/&gt;&amp;gt;   cryptosystem to encrypt the private key of another cryptosystem in order&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt;   construct a 2pc to allow signing in the latter cryptosystem! soo clever!)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; First, we&amp;#39;ll examine the initial proof. This only needs to be done once by&lt;br/&gt;&amp;gt; both&lt;br/&gt;&amp;gt; parties AFAICT. As a result, we may be able to piggyback this onto the&lt;br/&gt;&amp;gt; initial&lt;br/&gt;&amp;gt; channel funding steps. Reviewing the paper cited on the Lindell paper [1],&lt;br/&gt;&amp;gt; it&lt;br/&gt;&amp;gt; appears this would take 1 RTT, so this shouldn&amp;#39;t result in any additional&lt;br/&gt;&amp;gt; round&lt;br/&gt;&amp;gt; trips during the funding process. We should be able to use a Paillier&lt;br/&gt;&amp;gt; modulos&lt;br/&gt;&amp;gt; of 2048 bits, so nothing too crazy. This would just result in a slightly&lt;br/&gt;&amp;gt; bigger&lt;br/&gt;&amp;gt; opening message.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Skipping the second proofs as it&amp;#39;s pretty standard.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The third proof as described (Section 6 of the Lindell paper) is&lt;br/&gt;&amp;gt; interactive.&lt;br/&gt;&amp;gt; It also contains a ZK range proof as a sub-protocol which as described in&lt;br/&gt;&amp;gt; Appendix A is also interactive. However, it was pointed out to us by Omer&lt;br/&gt;&amp;gt; Shlomovits on the lnd slack, that we can actually replace their custom&lt;br/&gt;&amp;gt; range&lt;br/&gt;&amp;gt; proofs with Bulletproofs. This would make this section non-interactive,&lt;br/&gt;&amp;gt; allowing the proof itself to take 1.5 RTT AFAICT. Additionally, this would&lt;br/&gt;&amp;gt; only&lt;br/&gt;&amp;gt; need to be done once at the start, as AFIACT, we can re-use the encryption&lt;br/&gt;&amp;gt; of&lt;br/&gt;&amp;gt; the secp256k1 private key of both parties.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The current channel opening process requires 2 RTT, so it seems that we&amp;#39;d&lt;br/&gt;&amp;gt; be&lt;br/&gt;&amp;gt; able to easily piggy back all the opening proofs on top of the existing&lt;br/&gt;&amp;gt; funding&lt;br/&gt;&amp;gt; protocol. The main cost would be the increased size of these opening&lt;br/&gt;&amp;gt; messages,&lt;br/&gt;&amp;gt; and also the additional computational cost of operations within the&lt;br/&gt;&amp;gt; Paillier&lt;br/&gt;&amp;gt; modulus and the new range proof.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The additional components that would need to be modified are the process of&lt;br/&gt;&amp;gt; adding&#43;settling an HTLC, and also the onion payload that drops off the&lt;br/&gt;&amp;gt; point&lt;br/&gt;&amp;gt; whose dlog is r_1*alpha. Within the current protocol, adding and settling&lt;br/&gt;&amp;gt; an&lt;br/&gt;&amp;gt; HTLC are more or less non-interactive, we have a single message for each,&lt;br/&gt;&amp;gt; which&lt;br/&gt;&amp;gt; is then staged to be committed in new commitments for both parties. With&lt;br/&gt;&amp;gt; this&lt;br/&gt;&amp;gt; new scheme (if I follow it correctly), adding an HTLC now requires N RTT:&lt;br/&gt;&amp;gt;   1. Alice sends A = G*alpha to Bob. Here alpha is the payment secret.&lt;br/&gt;&amp;gt;   2. Bob sends R_3 = (G*alpha)*r_2 (along w/ a proof of knowledge of r_2&lt;br/&gt;&amp;gt; and&lt;br/&gt;&amp;gt;   relation to A)&lt;br/&gt;&amp;gt;   3. Alice sends R_3&amp;#39; = (G*alpha)*r_3 (along with a similar proof as&lt;br/&gt;&amp;gt; above) 4.&lt;br/&gt;&amp;gt;   Bob then computes c3 (the encrypted partial sig which when completed will&lt;br/&gt;&amp;gt;   reveal a) to Alice.&lt;br/&gt;&amp;gt;   5. Alice decrypts c3 to get the plaintext partial sig (s&amp;#39;), then&lt;br/&gt;&amp;gt; finalizes&lt;br/&gt;&amp;gt;   the set up by sending s&amp;#39;&amp;#39; to Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This process takes 2.5 RTT, and would require re-working the state machine&lt;br/&gt;&amp;gt; slightly to only actually commit an HTLC after step 5 has been completed.&lt;br/&gt;&amp;gt; When&lt;br/&gt;&amp;gt; Bob obtains a from the next party in the path, we Alice can then then over&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; signature, from which Alice can extract alpha. So adding HTLCs is now a bit&lt;br/&gt;&amp;gt; more interactive, but settling them is the same a before.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Finally, the onion payload would need to be re-interpreted in order to&lt;br/&gt;&amp;gt; encode&lt;br/&gt;&amp;gt; G*alpha which takes 33 bytes. We can shave this down to 32 by selecting&lt;br/&gt;&amp;gt; the x&lt;br/&gt;&amp;gt; coordinate (at the sender) to always be either even or odd. Currently, we&lt;br/&gt;&amp;gt; have&lt;br/&gt;&amp;gt; 12 unused bytes in the onion payload. The HMAC is currently 32 bytes. One&lt;br/&gt;&amp;gt; path&lt;br/&gt;&amp;gt; would be to allocate a portion of HMAC space to encoding this point. A&lt;br/&gt;&amp;gt; 16-byte&lt;br/&gt;&amp;gt; HMAC would probably have been enough in the beginning, so we can drop down&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; that. However, that still leaves 4 bytes somewhere that has to give...one&lt;br/&gt;&amp;gt; could&lt;br/&gt;&amp;gt; either obtain these extra bytes from the CLTV and Amount fields, or just&lt;br/&gt;&amp;gt; have&lt;br/&gt;&amp;gt; each hop consume an extra payload. The latter path would mean that the new&lt;br/&gt;&amp;gt; upper hop limit is actually 10.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, given that we would need need a new global feature bit in order to&lt;br/&gt;&amp;gt; roll this out, it may make sense to re-work the onion format all together&lt;br/&gt;&amp;gt; which&lt;br/&gt;&amp;gt; would mean that we wouldn&amp;#39;t need to hack the old format a bit to&lt;br/&gt;&amp;gt; accommodate&lt;br/&gt;&amp;gt; this additional data. One aspect of introducing a new end-to-end contract&lt;br/&gt;&amp;gt; type&lt;br/&gt;&amp;gt; which I hadn&amp;#39;t considered before is that each new type effectively&lt;br/&gt;&amp;gt; partitions&lt;br/&gt;&amp;gt; the network. This is due to the fact that these HTLCs will now only be&lt;br/&gt;&amp;gt; able to&lt;br/&gt;&amp;gt; be carried along paths that understand this new feature. As a result,&lt;br/&gt;&amp;gt; plausible&lt;br/&gt;&amp;gt; path diversity takes as we can no longer utilize all channels on the&lt;br/&gt;&amp;gt; network&lt;br/&gt;&amp;gt; for routing. This would suggest that introducing new end to end contract&lt;br/&gt;&amp;gt; types&lt;br/&gt;&amp;gt; (if one wishes to use them widely across arbitrary channels and not for&lt;br/&gt;&amp;gt; specific contract protocols) may be a strong point of synchronization w.r.t&lt;br/&gt;&amp;gt; updates across the network. As a result, we may need to be a bit more&lt;br/&gt;&amp;gt; discerning w.r.t new candidates for e2e contracts given the coordination&lt;br/&gt;&amp;gt; costs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So the takeaways are:&lt;br/&gt;&amp;gt;   * we can probably piggy back the extra proofs onto the channel opening&lt;br/&gt;&amp;gt;     process&lt;br/&gt;&amp;gt;       * one of the subproofs can use bulletproofs to make the proof&lt;br/&gt;&amp;gt; shorter and&lt;br/&gt;&amp;gt;         also non-interactive&lt;br/&gt;&amp;gt;   * adding an HTLC would take 2.5 RTT&amp;#39;s, but settling is just as quick as&lt;br/&gt;&amp;gt;     before&lt;br/&gt;&amp;gt;   * the onion payload would either need to be hacked, or extended to&lt;br/&gt;&amp;gt; support&lt;br/&gt;&amp;gt;     packaging the point.&lt;br/&gt;&amp;gt;   * the utility of the scheme won&amp;#39;t shine until all/most of the network&lt;br/&gt;&amp;gt; uses it&lt;br/&gt;&amp;gt;   * we could start w/ just the introduction of the OG 2PC scheme as a&lt;br/&gt;&amp;gt; multi-sig&lt;br/&gt;&amp;gt;     replacement&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]: &lt;a href=&#34;https://eprint.iacr.org/2011/494.pdf&#34;&gt;https://eprint.iacr.org/2011/494.pdf&lt;/a&gt; (section 3.3)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Fri, Apr 27, 2018 at 11:42 AM Pedro Moreno Sanchez &amp;lt;pmorenos at purdue.edu&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hello guys,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; as some of you already know, I am working on some cryptographic&lt;br/&gt;&amp;gt;&amp;gt; constructions that might be of interest and useful for the Lightning&lt;br/&gt;&amp;gt;&amp;gt; Network.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Recently, I have come up with a scriptless version of the adaptor&lt;br/&gt;&amp;gt;&amp;gt; signatures and the contract required in the Lighting Network using only&lt;br/&gt;&amp;gt;&amp;gt; 2-party ECDSA signatures. The main advantage is that, instead of waiting&lt;br/&gt;&amp;gt;&amp;gt; for Schnorr signatures to be deployed in Bitcoin so that Poelstra&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; scriptless scripts can be used, I believe that this ECDSA-version of the&lt;br/&gt;&amp;gt;&amp;gt; scriptless scripts can be directly applied today.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Details are in the attached PDF. I am looking forward to hearing your&lt;br/&gt;&amp;gt;&amp;gt; comments and suggestions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&amp;gt; Pedro.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&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;&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/20180508/04e449be/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180508/04e449be/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:50:38&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxv8625qkp90jffppqaysyqj3lw793p32rzpg8rapga05urx8k4fczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vy9ufqu</id>
    
      <title type="html">📅 Original date posted:2018-02-06 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxv8625qkp90jffppqaysyqj3lw793p32rzpg8rapga05urx8k4fczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vy9ufqu" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrcwtjfcuc3nlxplj0f5gvqzjkzfl6xalpjf7vh0aavjjc3rhc5cc6xvf3a&#39;&gt;nevent1q…vf3a&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-02-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;&amp;gt; This is excellent work!&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;&lt;br/&gt;&amp;gt; I think, a `globalfeatures` odd bit could be used for this.  As it is&lt;br/&gt;&amp;gt; end-ot-end, `localfeatures` is not appropriate.&lt;br/&gt;&lt;br/&gt;Yep, it would need to be a global feature bit. In the case that we&amp;#39;re&lt;br/&gt;sending to a destination which isn&amp;#39;t publicly advertised, then perhaps an&lt;br/&gt;extension to BOLT-11 could be made to signal receiver support.&lt;br/&gt;&lt;br/&gt;&amp;gt; I believe, currently, fees have not this super-linear component&lt;br/&gt;&lt;br/&gt;Yep they don&amp;#39;t. Arguably, we should also have a component that scales&lt;br/&gt;according to the proposed CLTV value of the outgoing HTLC. At Scaling&lt;br/&gt;Bitcoin Stanford, Aviv Zohar gave a talked titled &amp;#34;How to Charge Lightning&amp;#34;&lt;br/&gt;where the authors analyzed the possible evolution of fees on the network&lt;br/&gt;(and also suggested adding this super-linear component to extend the&lt;br/&gt;lifetime of channels).  However, the talk itself focused on a very simple&lt;br/&gt;&amp;#34;mega super duper hub&amp;#34; topology. Towards the end he alluded to a forthcoming&lt;br/&gt;paper that had more comprehensive analysis of more complex topologies. I&lt;br/&gt;look forward to the publication of their finalized work.&lt;br/&gt;&lt;br/&gt;&amp;gt; Indeed, the existence of per-hop fees (`fee_base_msat`) means, splitting&lt;br/&gt;&amp;gt; the payment over multiple flows will be, very likely, more expensive,&lt;br/&gt;&amp;gt; compared to using a single flow.&lt;br/&gt;&lt;br/&gt;Well it&amp;#39;s still to be seen how the fee structure on mainnet emerges once the&lt;br/&gt;network is still fully bootstrapped. AFAIK, most running on mainnet atm are&lt;br/&gt;using the default fee schedules for their respective implementations. For&lt;br/&gt;example, the default fee_base_msat for lnd is 1000 msat (1 satoshi).&lt;br/&gt;&lt;br/&gt;&amp;gt; I believe the `realm` byte is intended for this.&lt;br/&gt;&lt;br/&gt;The realm byte is meant to signal &amp;#34;forward this to the dogecoin channel&amp;#34;.&lt;br/&gt;ATM, we just default to 0 as &amp;#34;Bitcoin&amp;#34;. However, the byte itself only really&lt;br/&gt;need significance between the sender and the intermediate node. So there&lt;br/&gt;isn&amp;#39;t necessarily pressure to have a globally synchronized set of realm&lt;br/&gt;bytes.&lt;br/&gt;&lt;br/&gt;&amp;gt; Thus, you can route over nodes that are unaware of AMP, and only provide&lt;br/&gt;&amp;gt; an AMP realm byte to the destination node, who, is able to reconstruct&lt;br/&gt;this&lt;br/&gt;&amp;gt; your AMP data as per your algorithm.&lt;br/&gt;&lt;br/&gt;Yes, the intermediate nodes don&amp;#39;t need to be aware of the end-to-end&lt;br/&gt;protocol. For the final hop, there are actually 53 free bytes (before one&lt;br/&gt;needs to signal the existence of EOBs):&lt;br/&gt;&lt;br/&gt;  * 1 byte realm&lt;br/&gt;  * 8 bytes next addr (all zeroes to signal final dest)&lt;br/&gt;  * 32 bytes hmac (also all zeroes for the final dest)&lt;br/&gt;  * 12 bytes padding&lt;br/&gt;&lt;br/&gt;So any combo of these bytes can be used to signal more advanced protocols to&lt;br/&gt;the final destination.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;A correction from the prior email description:&lt;br/&gt;&lt;br/&gt;&amp;gt; We can further modify our usage of the per-hop payloads to send&lt;br/&gt;&amp;gt; (H(BP), s_i) to consume most of the EOB sent from sender to receiver.&lt;br/&gt;&lt;br/&gt;This should actually be (H(s_0 || s_1 || ...), s_i). So we still allow them&lt;br/&gt;to check this finger print to see if they have all the final shares, but&lt;br/&gt;don&amp;#39;t allow them to preemptively pull all the payments.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Mon, Feb 5, 2018 at 11:12 PM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Laolu,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is excellent work!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Some minor comments...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (Atomic Multi-path Payments). It can be experimented with on Lightning&lt;br/&gt;&amp;gt; *today* with the addition of a new feature bit to gate this new&lt;br/&gt;&amp;gt; feature. The beauty of the scheme is that it requires no fundamental&lt;br/&gt;&amp;gt; changes&lt;br/&gt;&amp;gt; to the protocol as is now, as the negotiation is strictly *end-to-end*&lt;br/&gt;&amp;gt; between sender and receiver.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think, a `globalfeatures` odd bit could be used for this.  As it is&lt;br/&gt;&amp;gt; end-ot-end, `localfeatures` is not appropriate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - Potential fee savings for larger payments, contingent on there being a&lt;br/&gt;&amp;gt;     super-linear component to routed fees. It&amp;#39;s possible that with&lt;br/&gt;&amp;gt;     modifications to the fee schedule, it&amp;#39;s actually *cheaper* to send&lt;br/&gt;&amp;gt;     payments over multiple flows rather than one giant flow.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe, currently, fees have not this super-linear component.  Indeed,&lt;br/&gt;&amp;gt; the existence of per-hop fees (`fee_base_msat`) means, splitting the&lt;br/&gt;&amp;gt; payment over multiple flows will be, very likely, more expensive, compared&lt;br/&gt;&amp;gt; to using a single flow.  Tiny roundoffs in computing the proportional fees&lt;br/&gt;&amp;gt; (`fee_proportional_millionths`) may make smaller flows give a slight fee&lt;br/&gt;&amp;gt; advantage, but I think the multiplication of per-hop fees will dominate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - Using smaller payments increases the set of possible paths a partial&lt;br/&gt;&amp;gt;     payment could have taken, which reduces the effectiveness of static&lt;br/&gt;&amp;gt;     analysis techniques involving channel capacities and the plaintext&lt;br/&gt;&amp;gt;     values being forwarded.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Strongly agree!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to include the three tuple within the per-hop payload for the&lt;br/&gt;&amp;gt; final&lt;br/&gt;&amp;gt; destination, we repurpose the _first_ byte of the un-used padding bytes in&lt;br/&gt;&amp;gt; the payload to signal version 0x01 of the AMP protocol (note this is a PoC&lt;br/&gt;&amp;gt; outline, we would need to standardize signalling of these 12 bytes to&lt;br/&gt;&amp;gt; support other protocols).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe the `realm` byte is intended for this.  Intermediate nodes do&lt;br/&gt;&amp;gt; not need to understand realm bytes that are understood by other nodes in&lt;br/&gt;&amp;gt; the route, including the realm bytes understood by the final destination,&lt;br/&gt;&amp;gt; as intermediate nodes cannot, indeed, read the hop data of other nodes.&lt;br/&gt;&amp;gt; Thus, you can route over nodes that are unaware of AMP, and only provide an&lt;br/&gt;&amp;gt; AMP realm byte to the destination node, who, is able to reconstruct this&lt;br/&gt;&amp;gt; your AMP data as per your algorithm.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Indeed, the `realm` byte controls the interpretation of the rest of the&lt;br/&gt;&amp;gt; 65-byte packet.  If you define, instead, a separate `realm` that is&lt;br/&gt;&amp;gt; understood by the destination node, you can redefine the entire 64 bytes of&lt;br/&gt;&amp;gt; the final hop data as you wish.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If we support AMP only at final payees, we can completely redefine the 64&lt;br/&gt;&amp;gt; bytes in the final hop data for the new AMP `realm`, and not consume the&lt;br/&gt;&amp;gt; next hop (which would reduce route length by 1).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (If we want to support multiple routes converging to an intermediate node,&lt;br/&gt;&amp;gt; then continue routing to a different final node after routes have merged&lt;br/&gt;&amp;gt; (i.e. A-&amp;gt;B-&amp;gt;C-&amp;gt;D, and A-&amp;gt;E-&amp;gt;C-&amp;gt;D, with the payment being merged by C, who&lt;br/&gt;&amp;gt; forwards the combination to D), then we need to follow the current hop data&lt;br/&gt;&amp;gt; format, but I think supporting AMP at final payees is actually enough...&lt;br/&gt;&amp;gt; AMP at intermediate nodes might not be used often enough by senders for it&lt;br/&gt;&amp;gt; to matter, as taking advantage of that seems more complex than just asking&lt;br/&gt;&amp;gt; your routing algo to provide you multiple routes to a destination, which&lt;br/&gt;&amp;gt; you are probably already doing)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ----&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Overall, good work I think.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180207/3e9cf18e/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180207/3e9cf18e/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:48:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgx7lq0ygysxpu2vlcxs73s027n75vdhlz46t8hs7wsrtwxqmmy6qzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vw27hny</id>
    
      <title type="html">📅 Original date posted:2018-02-06 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgx7lq0ygysxpu2vlcxs73s027n75vdhlz46t8hs7wsrtwxqmmy6qzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vw27hny" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9r0yjklaf5lvupxah8s3k9jsf5um6ysd80f5vm92s8s2gzd5kn6c3vpg75&#39;&gt;nevent1q…pg75&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-02-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Y&amp;#39;all,&lt;br/&gt;&lt;br/&gt;A common question I&amp;#39;ve seen concerning Lightning is: &amp;#34;I have five $2&lt;br/&gt;channels, is it possible for me to *atomically* send $6 to fulfill a&lt;br/&gt;payment?&amp;#34;. The answer to this question is &amp;#34;yes&amp;#34;, provided that the receiver&lt;br/&gt;waits to pull all HTLC&amp;#39;s until the sum matches their invoice. Typically, one&lt;br/&gt;assumes that the receiver will supply a payment hash, and the sender will&lt;br/&gt;re-use the payment hash for all streams. This has the downside of payment&lt;br/&gt;hash re-use across *multiple* payments (which can already easily be&lt;br/&gt;correlated), and also has a failure mode where if the sender fails to&lt;br/&gt;actually satisfy all the payment flows, then the receiver can still just&lt;br/&gt;pull the monies (and possibly not disperse a service, or w/e).&lt;br/&gt;&lt;br/&gt;Conner Fromknecht and I have come up with a way to achieve this over&lt;br/&gt;Lightning while (1) not re-using any payment hashes across all payment&lt;br/&gt;flows, and (2) adding a *strong* guarantee that the receiver won&amp;#39;t be paid&lt;br/&gt;until *all* partial payment flows are extended. We call this scheme AMP&lt;br/&gt;(Atomic Multi-path Payments). It can be experimented with on Lightning&lt;br/&gt;*today* with the addition of a new feature bit to gate this new&lt;br/&gt;feature. The beauty of the scheme is that it requires no fundamental changes&lt;br/&gt;to the protocol as is now, as the negotiation is strictly *end-to-end*&lt;br/&gt;between sender and receiver.&lt;br/&gt;&lt;br/&gt;TL;DR: we repurpose some unused space in the onion per-hop payload of the&lt;br/&gt;onion blob to signal our protocol (and deliver some protocol-specific data),&lt;br/&gt;then use additive secret sharing to ensure that the receiver can&amp;#39;t pull the&lt;br/&gt;payment until they have enough shares to reconstruct the original pre-image.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Protocol Goals&lt;br/&gt;==============&lt;br/&gt;1. Atomicity: The logical transaction should either succeed or fail in&lt;br/&gt;entirety. Naturally, this implies that the receiver should not be unable to&lt;br/&gt;settle *any* of the partial payments, until all of them have arrived.&lt;br/&gt;&lt;br/&gt;2. Avoid Payment Hash Reuse: The payment preimages validated by the&lt;br/&gt;consensus layer should be distinct for each partial payment.  Primarily,&lt;br/&gt;this helps avoid correlation of the partial payments, and ensures that&lt;br/&gt;malicious intermediaries straddling partial payments cannot steal funds.&lt;br/&gt;&lt;br/&gt;3. Order Invariance: The protocol should be forgiving to the order in which&lt;br/&gt;partial payments arrive at the destination, adding robustness in the face of&lt;br/&gt;delays or routing failures.&lt;br/&gt;&lt;br/&gt;4. Non-interactive Setup: It should be possible for the sender to perform an&lt;br/&gt;AMP without directly coordinating with the receiving node. Predominantly,&lt;br/&gt;this means that the *sender* is able to determine the number of partial&lt;br/&gt;payments to use for a particular AMP, which makes sense since they will be&lt;br/&gt;the one fronting the fees for the cost of this parameter. Plus, we can&lt;br/&gt;always turn a non-interactive protocol into an interactive one for the&lt;br/&gt;purposes of invoicing.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Protocol Benefits&lt;br/&gt;=================&lt;br/&gt;&lt;br/&gt;Sending pay payments predominantly over an AMP-like protocol has several&lt;br/&gt;clear benefits:&lt;br/&gt;&lt;br/&gt;  - Eliminates the constraint that a single path from sender to receiver&lt;br/&gt;    with sufficient directional capacity. This reduces the pressure to have&lt;br/&gt;    larger channels in order to support larger payment flows. As a result,&lt;br/&gt;    the payment graph be very diffused, without sacrificing payment&lt;br/&gt;    utility&lt;br/&gt;&lt;br/&gt;  - Reduces strain from larger payments on individual paths, and allows the&lt;br/&gt;    liquidity imbalances to be more diffuse. We expect this to have a&lt;br/&gt;    non-negligible impact on channel longevity. This is due to the fact that&lt;br/&gt;    with usage of AMP, payment flows are typically *smaller* meaning that&lt;br/&gt;    each payment will unbalance a channel to a lesser degree that&lt;br/&gt;    with one giant flow.&lt;br/&gt;&lt;br/&gt;  - Potential fee savings for larger payments, contingent on there being a&lt;br/&gt;    super-linear component to routed fees. It&amp;#39;s possible that with&lt;br/&gt;    modifications to the fee schedule, it&amp;#39;s actually *cheaper* to send&lt;br/&gt;    payments over multiple flows rather than one giant flow.&lt;br/&gt;&lt;br/&gt;  - Allows for logical payments larger than the current maximum value of an&lt;br/&gt;    individual payment. Atm we have a (temporarily) limit on the max payment&lt;br/&gt;    size. With AMP, this can be side stepped as each flow can be up the max&lt;br/&gt;    size, with the sum of all flows exceeding the max.&lt;br/&gt;&lt;br/&gt;  - Given sufficient path diversity, AMPs may improve the privacy of LN&lt;br/&gt;    Intermediaries are now unaware to how much of the total payment they are&lt;br/&gt;    forwarding, or even if they are forwarding a partial payment at all.&lt;br/&gt;&lt;br/&gt;  - Using smaller payments increases the set of possible paths a partial&lt;br/&gt;    payment could have taken, which reduces the effectiveness of static&lt;br/&gt;    analysis techniques involving channel capacities and the plaintext&lt;br/&gt;    values being forwarded.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Protocol Overview&lt;br/&gt;==================&lt;br/&gt;This design can be seen as a generalization of the single, non-interactive&lt;br/&gt;payment scheme, that uses decoding of extra onion blobs (EOBs?) to encode&lt;br/&gt;extra data for the receiver. In that design, the extra data includes a&lt;br/&gt;payment preimage that the receiver can use to settle back the payment. EOBs&lt;br/&gt;and some method of parsing them are really the only requirement for this&lt;br/&gt;protocol to work. Thus, only the sender and receiver need to implement this&lt;br/&gt;feature in order for it to function, which can be announced using a feature&lt;br/&gt;bit.&lt;br/&gt;&lt;br/&gt;First, let&amp;#39;s review the current format of the per-hop payload for each node&lt;br/&gt;described in BOLT-0004.&lt;br/&gt;&lt;br/&gt;┌───────────────┬───────────────────┬────────────────┬───────────────────────┬─────────────────┬─────────────────┐&lt;br/&gt;│Realm (1 byte) │Next Addr (8 bytes)│Amount (8 bytes)│Outgoing CLTV (4&lt;br/&gt;bytes)│Unused (12 bytes)│ HMAC (32 bytes) │&lt;br/&gt;└───────────────┴───────────────────┴────────────────┴───────────────────────┴─────────────────┴─────────────────┘&lt;br/&gt;■────────────────────────────────────────────────────────────────────────────────────────────────────────────────■&lt;br/&gt;                                              ┌─────────────────┐&lt;br/&gt;                                              │65 Bytes Per Hop │&lt;br/&gt;                                              └─────────────────┘&lt;br/&gt;&lt;br/&gt;Currently, *each* node gets a 65-byte payload. We use this payload to give&lt;br/&gt;each node instructions on *how* to forward a payment. We tell each node: the&lt;br/&gt;realm (or chain to forward on), then next node to forward to, the amount to&lt;br/&gt;forward (this is where fees are extracted by forwarding out less than in),&lt;br/&gt;the outgoing CLTV (allows verification that the prior node didn&amp;#39;t modify any&lt;br/&gt;values), and finally an HMAC over the entire thing.&lt;br/&gt;&lt;br/&gt;Two important points:&lt;br/&gt;  1. We have 12 bytes for each hop that are currently unpurposed and can be&lt;br/&gt;  used by application protocols to signal new interpretation of bytes and&lt;br/&gt;  also deliver additional encrypted&#43;authenticated data to *each* hop.&lt;br/&gt;&lt;br/&gt;  2. The protocol currently has a hard limit of 20-hops. With this feature&lt;br/&gt;  we ensure that the packet stays fixed sized during processing in order to&lt;br/&gt;  avoid leaking positional information. Typically most payments won&amp;#39;t use&lt;br/&gt;  all 20 hops, as a result, we can use the remaining hops to stuff in *even&lt;br/&gt;  more* data.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Protocol Description&lt;br/&gt;====================&lt;br/&gt;The solution we propose is Atomic Multi-path Payments (AMPs). At a high&lt;br/&gt;level, this leverages EOBs to deliver additive shares of a base preimage,&lt;br/&gt;from which the payment preimages of partial payments can be derived. The&lt;br/&gt;receiver can only construct this value after having received all of the&lt;br/&gt;partial payments, satisfying the atomicity constraint.&lt;br/&gt;&lt;br/&gt;The basic protocol:&lt;br/&gt;&lt;br/&gt;Primitives&lt;br/&gt;==========&lt;br/&gt;Let H be a CRH function.&lt;br/&gt;Let || denote concatenation.&lt;br/&gt;Let ^ denote xor.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Sender Requirements&lt;br/&gt;===================&lt;br/&gt;The parameters to the sending procedure are a random identifier ID, the&lt;br/&gt;number of partial payments n, and the total payment value V. Assume the&lt;br/&gt;sender has some way of dividing V such that V = v_1 &#43; … &#43; v_n.&lt;br/&gt;&lt;br/&gt;To begin, the sender builds the base preimage BP, from which n partial&lt;br/&gt;preimages will be derived. Next, the sender samples n additive shares s_1,&lt;br/&gt;…, s_n, and takes the sum to compute BP = s_1 ^ … ^ s_n.&lt;br/&gt;&lt;br/&gt;With the base preimage created, the sender now moves on to constructing the&lt;br/&gt;n partial payments. For each i in [1,n], the sender deterministically&lt;br/&gt;computes the partial preimage r_i = H(BP ||  i), by concatenating the&lt;br/&gt;sequence number i to the base preimage and hashing the result. Afterwards,&lt;br/&gt;it applies H to determine the payment hash to use in the i’th partial&lt;br/&gt;payment as h_i = H(r_i). Note that that with this preimage derivation&lt;br/&gt;scheme, once the payments are pulled each pre-image is distinct and&lt;br/&gt;indistinguishable from any other.&lt;br/&gt;&lt;br/&gt;With all of the pieces in place, the sender initiates the i’th payment by&lt;br/&gt;constructing a route to the destination with value v_i and payment hash h_i.&lt;br/&gt;The tuple (ID, n, s_i) is included in the EOB to be opened by the receiver.&lt;br/&gt;&lt;br/&gt;In order to include the three tuple within the per-hop payload for the final&lt;br/&gt;destination, we repurpose the _first_ byte of the un-used padding bytes in&lt;br/&gt;the payload to signal version 0x01 of the AMP protocol (note this is a PoC&lt;br/&gt;outline, we would need to standardize signalling of these 12 bytes to&lt;br/&gt;support other protocols). Typically this byte isn&amp;#39;t set, so the existence of&lt;br/&gt;this means that we&amp;#39;re (1) using AMP, and (2) the receiver should consume the&lt;br/&gt;_next_ hop as well. So if the payment length is actually 5, the sender tacks&lt;br/&gt;on an additional dummy 6th hop, encrypted with the _same_ shared secret for&lt;br/&gt;that hop to deliver the e2e encrypted data.&lt;br/&gt;&lt;br/&gt;Note, the sender can retry partial payments just as they would normal&lt;br/&gt;payments, since they are order invariant, and would be indistinguishable&lt;br/&gt;from regular payments to intermediaries in the network.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Receiver Requirements&lt;br/&gt;=====================&lt;br/&gt;&lt;br/&gt;Upon the arrival of each partial payment, the receiver will iteratively&lt;br/&gt;reconstruct BP, and do some bookkeeping to figure out when to settle the&lt;br/&gt;partial payments. During this reconstruction process, the receiver does not&lt;br/&gt;need to be aware of the order in which the payments were sent, and in fact&lt;br/&gt;nothing about the incoming partial payments reveals this information to the&lt;br/&gt;receiver, though this can be learned after reconstructing BP.&lt;br/&gt;&lt;br/&gt;Each EOB is decoded to retrieve (ID, n, s_i), where i is the unique but&lt;br/&gt;unknown index of the incoming partial payment. The receiver has access to&lt;br/&gt;persistent key-value store DB that maps ID to (n, c*, BP*), where c*&lt;br/&gt;represents the number of partial payments received, BP* is the sum of the&lt;br/&gt;received additive shares, and the superscript * denotes that the value is&lt;br/&gt;being updated iteratively. c* and BP* both have initial values of 0.&lt;br/&gt;&lt;br/&gt;In the basic protocol, the receiver cache’s the first n it sees, and&lt;br/&gt;verifies that all incoming partial payments have the same n. The receiver&lt;br/&gt;should reject all partial payments if any EOB deviates.  Next, the we update&lt;br/&gt;our persistent store with DB[ID] = (n, c* &#43; 1, BP* ^ s_i), advancing the&lt;br/&gt;reconstruction by one step.&lt;br/&gt;&lt;br/&gt;If c* &#43; 1 &amp;lt; n, there are still more packets in flight, so we sit tight.&lt;br/&gt;Otherwise, the receiver assumes all partial payments have arrived, and can&lt;br/&gt;being settling them back. Using the base preimage BP = BP* ^ s_i from our&lt;br/&gt;final iteration, the receiver can re-derive all n partial preimages and&lt;br/&gt;payment hashes, using r_i = H(BP || i) and h_i = H(r_i) simply through&lt;br/&gt;knowledge of n and BP.&lt;br/&gt;&lt;br/&gt;Finally, the receiver settles back any outstanding payments that include&lt;br/&gt;payment hash h_i using the partial preimage r_i. Each r_i will appear random&lt;br/&gt;due to the nature of H, as will it’s corresponding h_i. Thus, each partial&lt;br/&gt;payment should appear uncorrelated, and does not reveal that it is part of&lt;br/&gt;an AMP nor the number of partial payments used.&lt;br/&gt;&lt;br/&gt;Non-interactive to Interactive AMPs&lt;br/&gt;===================================&lt;br/&gt;&lt;br/&gt;Sender simply receives an ID and amount from the receiver in an invoice&lt;br/&gt;before initiating the protocol. The receiver should only consider the&lt;br/&gt;invoice settled if the total amount received in partial payments containing&lt;br/&gt;ID matches or exceeds the amount specified in the invoice. With this&lt;br/&gt;variant, the receiver is able to map all partial payments to a pre-generated&lt;br/&gt;invoice statement.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Additive Shares vs Threshold-Shares&lt;br/&gt;===================================&lt;br/&gt;&lt;br/&gt;The biggest reason to use additive shares seems to be atomicity. Threshold&lt;br/&gt;shares open the door to some partial payments being settled, even if others&lt;br/&gt;are left in flight. Haven’t yet come up with a good reason for using&lt;br/&gt;threshold schemes, but there seem to be plenty against it.&lt;br/&gt;&lt;br/&gt;Reconstruction of additive shares can be done iteratively, and is win for&lt;br/&gt;the storage and computation requirements on the receiving end. If the sender&lt;br/&gt;decides to use fewer than n partial payments, the remaining shares could be&lt;br/&gt;included in the EOB of the final partial payment to allow the sender to&lt;br/&gt;reconstruct sooner. Sender could also optimistically do partial&lt;br/&gt;reconstruction on this last aggregate value.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Adaptive AMPs&lt;br/&gt;=============&lt;br/&gt;&lt;br/&gt;The sender may not always be aware of how many partial payments they wish to&lt;br/&gt;send at the time of the first partial payment, at which point the simplified&lt;br/&gt;protocol would require n to be chosen. To accommodate, the above scheme can&lt;br/&gt;be adapted to handle a dynamically chosen n by iteratively constructing the&lt;br/&gt;shared secrets as follows.&lt;br/&gt;&lt;br/&gt;Starting with a base preimage BP, the key trick is that the sender remember&lt;br/&gt;the difference between the base preimage and the sum of all partial&lt;br/&gt;preimages used so far. The relation is described using the following&lt;br/&gt;equations:&lt;br/&gt;&lt;br/&gt;    X_0 = 0&lt;br/&gt;    X_i = X_{i-1} ^ s_i&lt;br/&gt;    X_n = BP ^ X_{n-1}&lt;br/&gt;&lt;br/&gt;where if n=1, X_1 = BP, implying that this is in fact a generalization of&lt;br/&gt;the single, non-interactive payment scheme mentioned above. For i=1, ...,&lt;br/&gt;n-1, the sender sends s_i in the EOB, and  X_n for the n-th share.&lt;br/&gt;&lt;br/&gt;Iteratively reconstructing s_1 ^ …. ^ s_{n-1} ^ X_n = BP, allows the&lt;br/&gt;receiver to compute all relevant r_i = H(BP || i) and h_i = H(r_i). Lastly,&lt;br/&gt;the final number of partial payments n could be signaled in the final EOB,&lt;br/&gt;which would also serve as a sentinel value for signaling completion. In&lt;br/&gt;response to DOS vectors stemming from unknown values of n, implementations&lt;br/&gt;could consider advertising a maximum value for n, or adopting some sort of&lt;br/&gt;framing pattern for conveying that more partial payments are on the way.&lt;br/&gt;&lt;br/&gt;We can further modify our usage of the per-hop payloads to send (H(BP),&lt;br/&gt;s_i) to&lt;br/&gt;consume most of the EOB sent from sender to receiver. In this scenario, we&amp;#39;d&lt;br/&gt;repurpose the 11-bytes *after* our signalling byte in the unused byte&lt;br/&gt;section&lt;br/&gt;to store the payment ID (which should be unique for each payment). In the&lt;br/&gt;case&lt;br/&gt;of a non-interactive payment, this will be unused. While for interactive&lt;br/&gt;payments, this will be the ID within the invoice. To deliver this slimmer&lt;br/&gt;2-tuple, we&amp;#39;ll use 32-bytes for the hash of the BP, and 32-bytes for the&lt;br/&gt;partial pre-image share, leaving an un-used byte in the payload.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Cross-Chain AMPs&lt;br/&gt;================&lt;br/&gt;&lt;br/&gt;AMPs can be used to pay a receiver in multiple currencies atomically...which&lt;br/&gt;is pretty cool :D&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Open Research Questions&lt;br/&gt;=======================&lt;br/&gt;&lt;br/&gt;The above is a protocol sketch to achieve atomic multi-path payments over&lt;br/&gt;Lightning. The details concerning onion blob usage serves as a template that&lt;br/&gt;future protocols can draw upon in order to deliver additional data to *any*&lt;br/&gt;hop in the route. However, there are still a few open questions before&lt;br/&gt;something like this can be feasibly deployed.&lt;br/&gt;&lt;br/&gt;1. How does the sender decide how many chunked payments to send, and the&lt;br/&gt;size of each payment?&lt;br/&gt;&lt;br/&gt;  - Upon a closer examination, this seems to overlap with the task of&lt;br/&gt;    congestion control within TCP. The sender may be able to utilize&lt;br/&gt;    inspired heuristics to gauge: (1) how large the initial payment should&lt;br/&gt;be&lt;br/&gt;    and (2) how many subsequent payments may be required. Note that if the&lt;br/&gt;    first payment succeeds, then the exchange is over in a signal round.&lt;br/&gt;&lt;br/&gt;2. How can AMP and HORNET be composed?&lt;br/&gt;&lt;br/&gt;  - If we eventually integrate HORNET, then a distinct communications&lt;br/&gt;    sessions can be established to allow the sender&#43;receiver to exchange&lt;br/&gt;    up-to-date partial payment information. This may allow the sender to&lt;br/&gt;more&lt;br/&gt;    accurately size each partial payment.&lt;br/&gt;&lt;br/&gt;3. Can the sender&amp;#39;s initial strategy be governed by an instance of the&lt;br/&gt;Push-relabel max flow algo?&lt;br/&gt;&lt;br/&gt;4. How does this mesh with the current max HTLC limit on a commitment?&lt;br/&gt;&lt;br/&gt;   - ATM, we have a max limit on the number of active HTLC&amp;#39;s on a particular&lt;br/&gt;     commitment transaction. We do this, as otherwise it&amp;#39;s possible that the&lt;br/&gt;     transaction is too large, and exceeds standardness w.r.t transaction&lt;br/&gt;     size. In a world where most payments use an AMP-like protocol, then&lt;br/&gt;     overall ant any given instance there will be several pending HTLC&amp;#39;s on&lt;br/&gt;     commitments network wise.&lt;br/&gt;&lt;br/&gt;     This may incentivize nodes to open more channels in order to support&lt;br/&gt;     the increased commitment space utilization.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Conclusion&lt;br/&gt;==========&lt;br/&gt;&lt;br/&gt;We&amp;#39;ve presented a design outline of how to integrate atomic multi-path&lt;br/&gt;payments (AMP) into Lightning. The existence of such a construct allows a&lt;br/&gt;sender to atomically split a payment flow amongst several individual payment&lt;br/&gt;flows. As a result, larger channels aren&amp;#39;t as important as it&amp;#39;s possible to&lt;br/&gt;utilize one total outbound payment bandwidth to send several channels.&lt;br/&gt;Additionally, in order to support the increased load, internal routing nodes&lt;br/&gt;are incensed have more active channels. The existence of AMP-like payments&lt;br/&gt;may also increase the longevity of channels as there&amp;#39;ll be smaller, more&lt;br/&gt;numerous payment flows, making it unlikely that a single payment comes&lt;br/&gt;across unbalances a channel entirely. We&amp;#39;ve also showed how one can utilize&lt;br/&gt;the current onion packet format to deliver additional data from a sender to&lt;br/&gt;receiver, that&amp;#39;s still e2e authenticated.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;-- Conner &amp;amp;&amp;amp; Laolu&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/20180206/8c4a40c4/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180206/8c4a40c4/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:48:57&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxl2ush83l8f6f2e95en90jcs9ufvt5zl7wazzzdzrh5qz22uwcqczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vmcr5fc</id>
    
      <title type="html">📅 Original date posted:2018-02-06 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxl2ush83l8f6f2e95en90jcs9ufvt5zl7wazzzdzrh5qz22uwcqczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vmcr5fc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspxskq0vmp7r65l753d3xe0spv2ewmwxu5ha0zum8kmc5x5y0yfgsky25g5&#39;&gt;nevent1q…25g5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-02-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Y&amp;#39;all,&lt;br/&gt;&lt;br/&gt;Definitely agree that we need a stop-gap solution to fix the naive table&lt;br/&gt;dump on initial connect. I&amp;#39;ve been sketching out some fancier stuff, but we&lt;br/&gt;would need time to properly tune the fanciness, and I&amp;#39;m inclined to get out&lt;br/&gt;a stop-gap solution asap.  On testnet, the zombie churn is pretty bad atm.&lt;br/&gt;It results in uneasily wasted bandwidth as the churn is now almost constant.&lt;br/&gt;There still exist some very old testnet nodes our there it seems. Beyond the&lt;br/&gt;zombie churn, with the size of the testnet graph, we&amp;#39;re forced to send tens&lt;br/&gt;of thousands of messages (even if we&amp;#39;re already fully synced) upon initial&lt;br/&gt;connect, so very wasteful over all.&lt;br/&gt;&lt;br/&gt;So I think the primary distinction between y&amp;#39;alls proposals is that&lt;br/&gt;cdecker&amp;#39;s proposal focuses on eventually synchronizing all the set of&lt;br/&gt;_updates_, while Fabrice&amp;#39;s proposal cares *only* about the newly created&lt;br/&gt;channels. It only cares about new channels as the rationale is that if once&lt;br/&gt;tries to route over a channel with a state channel update for it, then&lt;br/&gt;you&amp;#39;ll get an error with the latest update encapsulated.&lt;br/&gt;&lt;br/&gt;Christian wrote:&lt;br/&gt;&amp;gt; I propose adding a new feature bit (6, i.e., bitmask 0x40) indicating that&lt;br/&gt;&amp;gt; the `init` message is extended with a u32 `gossip_timestamp`, interpreted&lt;br/&gt;as&lt;br/&gt;&amp;gt; a UNIX timestamp.&lt;br/&gt;&lt;br/&gt;As the `init` message solely contains two variably sized byte slices, I&lt;br/&gt;don&amp;#39;t think we can actually safely extend it in this manner. Instead, a new&lt;br/&gt;message is required, where the semantics of the feature bit _require_ the&lt;br/&gt;other side to send it directly after receiving the `init` message from the&lt;br/&gt;other side.&lt;br/&gt;&lt;br/&gt;Aside from that, overall I like the simplicity of the protocol: it&lt;br/&gt;eliminates both the zombie churn, and the intensive initial connection graph&lt;br/&gt;dump without any extra messaging overhead (for reconciliation, etc).&lt;br/&gt;&lt;br/&gt;Fabrice wrote:&lt;br/&gt;&amp;gt; Just to be clear, you propose to use the timestamp of the most recent&lt;br/&gt;&amp;gt; channel updates to filter the associated channel announcements ?&lt;br/&gt;&lt;br/&gt;I think he&amp;#39;s actually proposing just a general update horizon in which&lt;br/&gt;vertexes&#43;edges with a lower time stamp just shouldn&amp;#39;t be set at all. In the&lt;br/&gt;case of an old zombie channel which was resurrected, it would eventually be&lt;br/&gt;re-propagated as the node on either end of the channel should broadcast a&lt;br/&gt;fresh update along with the original chan ann.&lt;br/&gt;&lt;br/&gt;&amp;gt; When a node that supports channel announcement filters receives&lt;br/&gt;&amp;gt; a`channel_announcement_filters` message, it uses it to filter channel&lt;br/&gt;&amp;gt; announcements (and, implicitly ,channel updates) before sending them&lt;br/&gt;&lt;br/&gt;This seems to assume that both nodes have a strongly synchronized view of&lt;br/&gt;the network. Otherwise, they&amp;#39;ll fall back to sending everything that went on&lt;br/&gt;during the entire epoch regularly. It also doesn&amp;#39;t address the zombie churn&lt;br/&gt;issue as they may eventually send you very old channels you&amp;#39;ll have to deal&lt;br/&gt;with (or discard).&lt;br/&gt;&lt;br/&gt;&amp;gt; The use case we have in mind is mobile nodes, or more generally nodes&lt;br/&gt;&amp;gt; which are often offline and need to resync very often.&lt;br/&gt;&lt;br/&gt;How far back would this go? Weeks, months, years?&lt;br/&gt;&lt;br/&gt;FWIW this approach optimizes for just learning of new channels instead of&lt;br/&gt;learning of the freshest state you haven&amp;#39;t yet seen.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Mon, Feb 5, 2018 at 7:08 AM Fabrice Drouin &amp;lt;fabrice.drouin at acinq.fr&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 5 February 2018 at 14:02, Christian Decker&lt;br/&gt;&amp;gt; &amp;lt;decker.christian at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; Hi everyone&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The feature bit is even, meaning that it is required from the peer,&lt;br/&gt;&amp;gt; &amp;gt; since we extend the `init` message itself, and a peer that does not&lt;br/&gt;&amp;gt; &amp;gt; support this feature would be unable to parse any future extensions to&lt;br/&gt;&amp;gt; &amp;gt; the `init` message. Alternatively we could create a new&lt;br/&gt;&amp;gt; &amp;gt; `set_gossip_timestamp` message that is only sent if both endpoints&lt;br/&gt;&amp;gt; &amp;gt; support this proposal, but that could result in duplicate messages being&lt;br/&gt;&amp;gt; &amp;gt; delivered between the `init` and the `set_gossip_timestamp` message and&lt;br/&gt;&amp;gt; &amp;gt; it&amp;#39;d require additional messages.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We chose the other aproach and propose to use an optional feature&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The reason I&amp;#39;m using timestamp and not the blockheight in the short&lt;br/&gt;&amp;gt; &amp;gt; channel ID is that we already use the timestamp for pruning. In the&lt;br/&gt;&amp;gt; &amp;gt; blockheight based timestamp we might ignore channels that were created,&lt;br/&gt;&amp;gt; &amp;gt; then not announced or forgotten, and then later came back and are now&lt;br/&gt;&amp;gt; &amp;gt; stable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Just to be clear, you propose to use the timestamp of the most recent&lt;br/&gt;&amp;gt; channel updates to filter&lt;br/&gt;&amp;gt; the associated channel announcements ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I hope this rather simple proposal is sufficient to fix the short-term&lt;br/&gt;&amp;gt; &amp;gt; issues we are facing with the initial sync, while we wait for a real&lt;br/&gt;&amp;gt; &amp;gt; sync protocol. It is definitely not meant to allow perfect&lt;br/&gt;&amp;gt; &amp;gt; synchronization of the topology between peers, but then again I don&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt; believe that is strictly necessary to make the routing successful.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Please let me know what you think, and I&amp;#39;d love to discuss Pierre&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; proposal as well.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Cheers,&lt;br/&gt;&amp;gt; &amp;gt; Christian&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Our idea is to group channel announcements by &amp;#34;buckets&amp;#34;, create a&lt;br/&gt;&amp;gt; filter for each bucket, exchange and use them to filter out channel&lt;br/&gt;&amp;gt; announcements.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We would add a new `use_channel_announcement_filters` optional feature&lt;br/&gt;&amp;gt; bit (7 for example), and a new `channel_announcement_filters` message.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When a node that supports channel announcement filters receives an&lt;br/&gt;&amp;gt; `init` message with the `use_channel_announcement_filters` bit set, it&lt;br/&gt;&amp;gt; sends back its channel filters.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When a node that supports channel announcement filters receives&lt;br/&gt;&amp;gt; a`channel_announcement_filters` message, it uses it to filter channel&lt;br/&gt;&amp;gt; announcements (and, implicitly ,channel updates) before sending them.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The filters we have in mind are simple:&lt;br/&gt;&amp;gt; - Sort announcements by short channel id&lt;br/&gt;&amp;gt; - Compute a marker height, which is `144 * ((now - 7 * 144) / 144)`&lt;br/&gt;&amp;gt; (we round to multiples of 144 to make sync easier)&lt;br/&gt;&amp;gt; - Group channel announcements that were created before this marker by&lt;br/&gt;&amp;gt; groups of 144 blocks&lt;br/&gt;&amp;gt; - Group channel announcements that were created after this marker by&lt;br/&gt;&amp;gt; groups of 1 block&lt;br/&gt;&amp;gt; - For each group, sort and concatenate all channel announcements short&lt;br/&gt;&amp;gt; channel ids and hash the result (we could use sha256, or the first 16&lt;br/&gt;&amp;gt; bytes of the sha256 hash)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The new `channel_announcement_filters` would then be a list of&lt;br/&gt;&amp;gt; (height, hash) pairs ordered by increasing heights.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This implies that implementation can easily sort announcements by&lt;br/&gt;&amp;gt; short channel id, which should not be very difficult.&lt;br/&gt;&amp;gt; An additional step could be to send all short channel ids for all&lt;br/&gt;&amp;gt; groups for which the group hash did not match. Alternatively we could&lt;br/&gt;&amp;gt; use smarter filters&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The use case we have in mind is mobile nodes, or more generally nodes&lt;br/&gt;&amp;gt; which are often offline and need to resync very often.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Fabrice&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/20180207/2ea76f0a/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180207/2ea76f0a/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:48:50&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9n7vrjdtktke0slh6tz6wxwrj0tt69mk9p2vrtzradgwfe2ttlfgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vcme62c</id>
    
      <title type="html">📅 Original date posted:2022-04-28 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9n7vrjdtktke0slh6tz6wxwrj0tt69mk9p2vrtzradgwfe2ttlfgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vcme62c" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs00e28tj73yhaa3u4ta4x0hs7jxjtfdjtahdngqw0f0qtlqwmfkhgk3els5&#39;&gt;nevent1q…els5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-28&lt;br/&gt;📝 Original message:Stating the taproot interaction more plainly: the taproot tweak is defined&lt;br/&gt;as a function of the internal key itself h_tapTeak(internalKey || rootHash),&lt;br/&gt;which means that the full tweak can&amp;#39;t be known ahead of time. Instead, one&lt;br/&gt;must aggregate the keys to obtain the internal key _then_ apply the tweaks&lt;br/&gt;as normal.&lt;br/&gt;&lt;br/&gt;-- Laolu&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/20220427/1e777215/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220427/1e777215/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:07:00&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs00e28tj73yhaa3u4ta4x0hs7jxjtfdjtahdngqw0f0qtlqwmfkhgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vlpnc9r</id>
    
      <title type="html">📅 Original date posted:2022-04-27 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs00e28tj73yhaa3u4ta4x0hs7jxjtfdjtahdngqw0f0qtlqwmfkhgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vlpnc9r" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp34e4yshkccj2enestgjqpwdzu8k9mvsyeh8ck4fvvcpag5ytkcgpeq6nw&#39;&gt;nevent1q…q6nw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-27&lt;br/&gt;📝 Original message:Hi Jonas,&lt;br/&gt;&lt;br/&gt;Great work on this BIP! Props to you and the other co-authors for putting&lt;br/&gt;together such an excellent technical specification. I&amp;#39;m sure I&amp;#39;m not the&lt;br/&gt;only developer stoked to see the much anticipated musig2 BIP published!&lt;br/&gt;&lt;br/&gt;I made a PR earlier today to add some JSON test vectors [1], which&amp;#39;ll make&lt;br/&gt;it easier for other implementations to integrate the existing vectors and&lt;br/&gt;more easily update implementations to account for any updates to the&lt;br/&gt;vectors.&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve been following the BIP for a few months now, and have been updating my&lt;br/&gt;implementation for `btcsuite/btcd` (mostly) in lock step. Admittedly, I miss&lt;br/&gt;the earlier iterations of the BIP that were a bit simpler, but also commend&lt;br/&gt;y&amp;#39;all&amp;#39;s approach re specifying more performant (removal of that O(n^2)&lt;br/&gt;loop), safe (the added aux input to nonce generation), and generalized&lt;br/&gt;(support for both normal and x-only tweaks) algorithms.&lt;br/&gt;&lt;br/&gt;We&amp;#39;ve also been integrating my implementation into lnd [2] as well in order&lt;br/&gt;to get more familiar with my proposed API, as well as hands-on experience&lt;br/&gt;crafting real transactions that use musig2 in the wild. There may, or may&lt;br/&gt;not be a few musig2 spends in the main chain today created using our PR ;).&lt;br/&gt;We hope to cut a release next month (lnd v0.15.0) that includes an&lt;br/&gt;experimental API intended to give developers safe access to musig2 signing&lt;br/&gt;and key aggregation. I&amp;#39;ve also concurrently started working on a proposal&lt;br/&gt;for a new taproot native (taprooty level 1, so step 1 here [6]) LN channel&lt;br/&gt;type that natively uses musig2 where applicable.&lt;br/&gt;&lt;br/&gt;While exercising all the different signing combinations on regtest, we&lt;br/&gt;realized that in order to support signing for a key that uses BIP 86&lt;br/&gt;derivation (so commit to an empty root, and only the serialized internal) or&lt;br/&gt;an external key that commits to a tapscript root, an implementation must&lt;br/&gt;make the _pre tweaked_ combined key available to the caller. Without this&lt;br/&gt;key a valid control block proof (in the script path spend case) can&amp;#39;t be&lt;br/&gt;constructed. Similarly, for the BIP 86 case, the pre-tweak combined key&lt;br/&gt;needs to be used to apply the top-level taproot tweak.&lt;br/&gt;&lt;br/&gt;As is the BIP doesn&amp;#39;t touch on this case, which is something any&lt;br/&gt;implementation will need to account for if they wish to support the two&lt;br/&gt;signing modes I mentioned above. In practice, what we do now is compute the&lt;br/&gt;aggregated key, stash that away, _then_ compute the tweaked key, making both&lt;br/&gt;available to the caller [3]. We also add a special case for BIP 86 [5],&lt;br/&gt;since in that case no real tweak needs to be specified, instead an&lt;br/&gt;implementation should compute the BIP 340 tagged hash (tap tweak) of the&lt;br/&gt;pre-tweaked aggregated key and use that as the main tweak.&lt;br/&gt;&lt;br/&gt;In both of these cases, we use a special taproot specific options to make&lt;br/&gt;the operations explicit [4] from the caller&amp;#39;s PoV. This _does_ mean that an&lt;br/&gt;implementation needs to know how to compute the BIP 341 taproot tweak fwiw.&lt;br/&gt;So ideally any changes to the BIP in this direction can just link out to BIP&lt;br/&gt;341 in place.&lt;br/&gt;&lt;br/&gt;Finally, can you elaborate a bit on this fragment of the BIP that describes&lt;br/&gt;a &amp;#34;short cut&amp;#34; when a specific signers is meant to send their nonces last:&lt;br/&gt;&lt;br/&gt;&amp;gt; Second, if there is a unique signer who is supposed to send the pubnonce&lt;br/&gt;&amp;gt; last, it is possible to modify nonce generation for this single signer to&lt;br/&gt;&amp;gt; not require high-quality randomness&lt;br/&gt;&lt;br/&gt;My reading here is that if there&amp;#39;s a signer that will always send their&lt;br/&gt;nonce last (possibly the responder to an LN funding attempt or a server for&lt;br/&gt;a non-custodial service like Loop), then they don&amp;#39;t actually need to&lt;br/&gt;generate real randomness, and can just fully specify all the new optional&lt;br/&gt;arguments? If so then this may end up really simplifying the implementation&lt;br/&gt;of certain protocols since that last party doesn&amp;#39;t (?) need to worry about&lt;br/&gt;their nonces as long as all the other (?) parties are using strong&lt;br/&gt;randomness?&lt;br/&gt;&lt;br/&gt; -- Laolu&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://github.com/jonasnick/bips/pull/10&#34;&gt;https://github.com/jonasnick/bips/pull/10&lt;/a&gt;&lt;br/&gt;[2]: &lt;a href=&#34;https://github.com/lightningnetwork/lnd/pull/6361&#34;&gt;https://github.com/lightningnetwork/lnd/pull/6361&lt;/a&gt;&lt;br/&gt;[3]:&lt;br/&gt;&lt;a href=&#34;https://github.com/Roasbeef/btcd/blob/afbf14a3a061b961c7fe0d21dcbbc6c941a33027/btcec/schnorr/musig2/keys.go#L320-L331&#34;&gt;https://github.com/Roasbeef/btcd/blob/afbf14a3a061b961c7fe0d21dcbbc6c941a33027/btcec/schnorr/musig2/keys.go#L320-L331&lt;/a&gt;&lt;br/&gt;[4]:&lt;br/&gt;&lt;a href=&#34;https://github.com/Roasbeef/btcd/blob/afbf14a3a061b961c7fe0d21dcbbc6c941a33027/btcec/schnorr/musig2/keys.go#L211-L248&#34;&gt;https://github.com/Roasbeef/btcd/blob/afbf14a3a061b961c7fe0d21dcbbc6c941a33027/btcec/schnorr/musig2/keys.go#L211-L248&lt;/a&gt;&lt;br/&gt;[5]:&lt;br/&gt;&lt;a href=&#34;https://github.com/Roasbeef/btcd/blob/afbf14a3a061b961c7fe0d21dcbbc6c941a33027/btcec/schnorr/musig2/keys.go#L406-L414&#34;&gt;https://github.com/Roasbeef/btcd/blob/afbf14a3a061b961c7fe0d21dcbbc6c941a33027/btcec/schnorr/musig2/keys.go#L406-L414&lt;/a&gt;&lt;br/&gt;[6]:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-November/003336.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-November/003336.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Tue, Apr 5, 2022 at 4:04 PM Jonas Nick 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; Tim Ruffing, Elliott Jin, and I are working on a MuSig2 BIP that we would&lt;br/&gt;&amp;gt; like&lt;br/&gt;&amp;gt; to propose to the community for discussion. The BIP is compatible with&lt;br/&gt;&amp;gt; BIP340&lt;br/&gt;&amp;gt; public keys and signatures. It supports tweaking, which allows deriving&lt;br/&gt;&amp;gt; BIP32&lt;br/&gt;&amp;gt; child keys from aggregate keys and creating BIP341 Taproot outputs with&lt;br/&gt;&amp;gt; key and&lt;br/&gt;&amp;gt; script paths. You can find the BIP draft at:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/jonasnick/bips/blob/musig2/bip-musig2.mediawiki&#34;&gt;https://github.com/jonasnick/bips/blob/musig2/bip-musig2.mediawiki&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The draft is in a state where it should be possible to write an&lt;br/&gt;&amp;gt; implementation&lt;br/&gt;&amp;gt; based on the BIP that passes the basic test vectors (as, e.g.,&lt;br/&gt;&amp;gt; demonstrated by&lt;br/&gt;&amp;gt; [0]). The draft BIP also contains a reference implementation in python.&lt;br/&gt;&amp;gt; Please&lt;br/&gt;&amp;gt; be aware that this is only a draft and that it may still be necessary to&lt;br/&gt;&amp;gt; make&lt;br/&gt;&amp;gt; small tweaks to the algorithms and test vectors.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [0] &lt;a href=&#34;https://github.com/btcsuite/btcd/pull/1820&#34;&gt;https://github.com/btcsuite/btcd/pull/1820&lt;/a&gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220427/d56d7660/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220427/d56d7660/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:06:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9wmv3mh536zlwxsm4dg3hfnh9yzdam632mwe6enqazdl0kq5jrvgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vpwauqg</id>
    
      <title type="html">📅 Original date posted:2022-04-05 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9wmv3mh536zlwxsm4dg3hfnh9yzdam632mwe6enqazdl0kq5jrvgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vpwauqg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs85cyxcpvzuhdeffkhmnxwcl0ffwenn78seqwc0f3zkwajpcxta8qj0pmd0&#39;&gt;nevent1q…pmd0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-05&lt;br/&gt;📝 Original message:Hi y&amp;#39;all,&lt;br/&gt;&lt;br/&gt;I&amp;#39;m excited to publicly publish a new protocol I&amp;#39;ve been working on over the&lt;br/&gt;past few months: Taro. Taro is a Taproot Asset Representation Overlay which&lt;br/&gt;allows the issuance of normal and also collectible assets on the main&lt;br/&gt;Bitcoin&lt;br/&gt;chain. Taro uses the Taproot script tree to commit extra asset structured&lt;br/&gt;meta&lt;br/&gt;data based on a hybrid merkle tree I call a Merkle Sum Sparse Merkle Tree or&lt;br/&gt;MS-SMT. An MS-SMT combined the properties of a merkle sum tree, with a&lt;br/&gt;sparse&lt;br/&gt;merkle tree, enabling things like easily verifiable asset supply proofs and&lt;br/&gt;also efficient proofs of non existence (eg: you prove to me you&amp;#39;re no longer&lt;br/&gt;committing to the 1-of-1 holographic beefzard card during our swap). Taro&lt;br/&gt;asset&lt;br/&gt;transfers are then embedded in a virtual/overlay transaction graph which&lt;br/&gt;uses a&lt;br/&gt;chain of asset witnesses to provably track the transfer of assets across&lt;br/&gt;taproot outputs. Taro also has a scripting system, which allows for&lt;br/&gt;programmatic unlocking/transfer of assets. In the first version, the&lt;br/&gt;scripting&lt;br/&gt;system is actually a recursive instance of the Bitcoin Script Taproot VM,&lt;br/&gt;meaning anything that can be expressed in the latest version of Script can&lt;br/&gt;be&lt;br/&gt;expressed in the Taro scripting system. Future versions of the scripting&lt;br/&gt;system&lt;br/&gt;can introduce new functionality on the Taro layer, like covenants or other&lt;br/&gt;updates.&lt;br/&gt;&lt;br/&gt;The Taro design also supports integration with the Lightning Network&lt;br/&gt;(BOLTs) as&lt;br/&gt;the scripting system can be used to emulate the existing HTLC structure,&lt;br/&gt;which&lt;br/&gt;allows for multi-hop transfers of Taro assets. Rather than modify the&lt;br/&gt;internal&lt;br/&gt;network, the protocol proposes to instead only recognize &amp;#34;assets at the&lt;br/&gt;edges&amp;#34;,&lt;br/&gt;which means that only the sender&#43;receiver actually need to know about and&lt;br/&gt;validate the assets. This deployment route means that we don&amp;#39;t need to&lt;br/&gt;build up&lt;br/&gt;an entirely new network and liquidity for each asset. Instead, all asset&lt;br/&gt;transfers will utilize the Bitcoin backbone of the Lightning Network, which&lt;br/&gt;means that the internal routers just see Bitcoin transfers as normal, and&lt;br/&gt;don&amp;#39;t&lt;br/&gt;even know about assets at the edges. As a result, increased demand for&lt;br/&gt;transfers of these assets as the edges (say like a USD stablecoin), which in&lt;br/&gt;will turn generate increased demand of LN capacity, result in more&lt;br/&gt;transfers, and&lt;br/&gt;also more routing revenue for the Bitcoin backbone nodes.&lt;br/&gt;&lt;br/&gt;The set of BIPs are a multi-part suite, with the following breakdown:&lt;br/&gt; * The main Taro protocol:&lt;br/&gt;&lt;a href=&#34;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro.mediawiki&#34;&gt;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro.mediawiki&lt;/a&gt;&lt;br/&gt; * The MS-SMT structure:&lt;br/&gt;&lt;a href=&#34;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-ms-smt.mediawiki&#34;&gt;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-ms-smt.mediawiki&lt;/a&gt;&lt;br/&gt; * The Taro VM:&lt;br/&gt;&lt;a href=&#34;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-vm.mediawiki&#34;&gt;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-vm.mediawiki&lt;/a&gt;&lt;br/&gt; * The Taro address format:&lt;br/&gt;&lt;a href=&#34;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-addr.mediawiki&#34;&gt;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-addr.mediawiki&lt;/a&gt;&lt;br/&gt; * The Taro Universe concept:&lt;br/&gt;&lt;a href=&#34;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-universe.mediawiki&#34;&gt;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-universe.mediawiki&lt;/a&gt;&lt;br/&gt; * The Taro flat file proof format:&lt;br/&gt;&lt;a href=&#34;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-proof-file.mediawiki&#34;&gt;https://github.com/Roasbeef/bips/blob/bip-taro/bip-taro-proof-file.mediawiki&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Rather than post them all in line (as the text wouldn&amp;#39;t fit in the allowed&lt;br/&gt;size&lt;br/&gt;limit), all the BIPs can be found above.&lt;br/&gt;&lt;br/&gt;-- Laolu&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/20220405/930b239c/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220405/930b239c/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:06:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszkmx4223dwc7hfd7xpeq4ldghuz46kfu8jsz97mnk0ra7p4kp98czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vx5klvf</id>
    
      <title type="html">📅 Original date posted:2018-06-12 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszkmx4223dwc7hfd7xpeq4ldghuz46kfu8jsz97mnk0ra7p4kp98czyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vx5klvf" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsx9raw54943f559p2v0xe7899qg6mhsjhlkdr9wp53yncxhypl5xc8s7wq7&#39;&gt;nevent1q…7wq7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-12&lt;br/&gt;📝 Original message:&amp;gt; An example of that cost is you arguing against specifying and supporting&lt;br/&gt;the&lt;br/&gt;&amp;gt; design that is closer to one that would be softforked, which increases the&lt;br/&gt;&amp;gt; time until we can make these filters secure because it&lt;br/&gt;&amp;gt; slows convergence on the design of what would get committed&lt;br/&gt;&lt;br/&gt;Agreed, since the commitment is just flat out better, and also also less&lt;br/&gt;code to validate compared to the cross p2p validation, the filter should be&lt;br/&gt;as close to the committed version. This way, wallet and other apps don&amp;#39;t&lt;br/&gt;need to modify their logic in X months when the commitment is rolled out.&lt;br/&gt;&lt;br/&gt;&amp;gt; Great point, but it should probably exclude coinbase OP_RETURN output.&lt;br/&gt;&amp;gt; This would exclude the current BIP141 style commitment and likely any&lt;br/&gt;&amp;gt; other.&lt;br/&gt;&lt;br/&gt;Definitely. I chatted offline with sipa recently, and he suggested this as&lt;br/&gt;well. Upside is that the filters will get even smaller, and also the first&lt;br/&gt;filter type becomes even more of a &amp;#34;barebones&amp;#34; wallet filter. If folks&lt;br/&gt;reaally want to also search OP_RETURN in the filter (as no widely deployed&lt;br/&gt;applications I know of really use it), then an additional filter type can be&lt;br/&gt;added in the future. It would need to be special cased to filter out the&lt;br/&gt;commitment itself.&lt;br/&gt;&lt;br/&gt;Alright, color me convinced! I&amp;#39;ll further edit my open BIP 158 PR to:&lt;br/&gt;&lt;br/&gt;  * exclude all OP_RETURN&lt;br/&gt;  * switch to prev scripts instead of outpoints&lt;br/&gt;  * update the test vectors to include the prev scripts from blocks in&lt;br/&gt;    addition to the block itself&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Sat, Jun 9, 2018 at 8:45 AM Gregory Maxwell &amp;lt;greg at xiph.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; So what&amp;#39;s the cost in using&lt;br/&gt;&amp;gt; &amp;gt; the current filter (as it lets the client verify the filter if they want&lt;br/&gt;&amp;gt; to,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; An example of that cost is you arguing against specifying and&lt;br/&gt;&amp;gt; supporting the design that is closer to one that would be softforked,&lt;br/&gt;&amp;gt; which increases the time until we can make these filters secure&lt;br/&gt;&amp;gt; because it slows convergence on the design of what would get&lt;br/&gt;&amp;gt; committed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; I don&amp;#39;t agree at all, and I can&amp;#39;t see why you say so.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Sure it doesn&amp;#39;t _have_ to, but from my PoV as &amp;#34;adding more commitments&amp;#34;&lt;br/&gt;&amp;gt; is&lt;br/&gt;&amp;gt; &amp;gt; on the top of every developers wish list for additions to Bitcoin, it&lt;br/&gt;&amp;gt; would&lt;br/&gt;&amp;gt; &amp;gt; make sense to coordinate on an &amp;#34;ultimate&amp;#34; extensible commitment once,&lt;br/&gt;&amp;gt; rather&lt;br/&gt;&amp;gt; &amp;gt; than special case a bunch of distinct commitments. I can see arguments&lt;br/&gt;&amp;gt; for&lt;br/&gt;&amp;gt; &amp;gt; either really.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We have an extensible commitment style via BIP141 already. I don&amp;#39;t see&lt;br/&gt;&amp;gt; why this in particular demands a new one.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;   1. The current filter format (even moving to prevouts) cannot be&lt;br/&gt;&amp;gt; committed&lt;br/&gt;&amp;gt; &amp;gt;      in this fashion as it indexes each of the coinbase output scripts.&lt;br/&gt;&amp;gt; This&lt;br/&gt;&amp;gt; &amp;gt;      creates a circular dependency: the commitment is modified by the&lt;br/&gt;&amp;gt; &amp;gt;      filter,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Great point, but it should probably exclude coinbase OP_RETURN output.&lt;br/&gt;&amp;gt; This would exclude the current BIP141 style commitment and likely any&lt;br/&gt;&amp;gt; other.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Should I start a new thread on excluding all OP_RETURN outputs from&lt;br/&gt;&amp;gt; BIP-158 filters for all transactions? -- they can&amp;#39;t be spent, so&lt;br/&gt;&amp;gt; including them just pollutes the filters.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;   2. Since the coinbase transaction is the first in a block, it has the&lt;br/&gt;&amp;gt; &amp;gt;      longest merkle proof path. As a result, it may be several hundred&lt;br/&gt;&amp;gt; bytes&lt;br/&gt;&amp;gt; &amp;gt;      (and grows with future capacity increases) to present a proof to the&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If 384 bytes is a concern, isn&amp;#39;t 3840 bytes (the filter size&lt;br/&gt;&amp;gt; difference is in this ballpark) _much_ more of a concern?  Path to the&lt;br/&gt;&amp;gt; coinbase transaction increases only logarithmically so further&lt;br/&gt;&amp;gt; capacity increases are unlikely to matter much, but the filter size&lt;br/&gt;&amp;gt; increases linearly and so it should be much more of a concern.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In regards to the second item above, what do you think of the old Tier&lt;br/&gt;&amp;gt; Nolan&lt;br/&gt;&amp;gt; &amp;gt; proposal [1] to create a &amp;#34;constant&amp;#34; sized proof for future commitments by&lt;br/&gt;&amp;gt; &amp;gt; constraining the size of the block and placing the commitments within the&lt;br/&gt;&amp;gt; &amp;gt; last few transactions in the block?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think it&amp;#39;s a fairly ugly hack. esp since it requires that mining&lt;br/&gt;&amp;gt; template code be able to stuff the block if they just don&amp;#39;t know&lt;br/&gt;&amp;gt; enough actual transactions-- which means having a pool of spendable&lt;br/&gt;&amp;gt; outputs in order to mine, managing private keys, etc... it also&lt;br/&gt;&amp;gt; requires downstream software not tinker with the transaction count&lt;br/&gt;&amp;gt; (which I wish it didn&amp;#39;t but as of today it does). A factor of two&lt;br/&gt;&amp;gt; difference in capacity-- if you constrain to get the smallest possible&lt;br/&gt;&amp;gt; proof-- is pretty stark, optimal txn selection with this cardinality&lt;br/&gt;&amp;gt; constraint would be pretty weird. etc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the community considers tree depth for proofs like that to be such&lt;br/&gt;&amp;gt; a concern to take on technical debt for that structure, we should&lt;br/&gt;&amp;gt; probably be thinking about more drastic (incompatible) changes... but&lt;br/&gt;&amp;gt; I don&amp;#39;t think it&amp;#39;s actually that interesting.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I don&amp;#39;t think its fair to compare those that wish to implement this&lt;br/&gt;&amp;gt; proposal&lt;br/&gt;&amp;gt; &amp;gt; (and actually do the validation) to the legacy SPV software that to my&lt;br/&gt;&amp;gt; &amp;gt; knowledge is all but abandoned. The project I work on that seeks to&lt;br/&gt;&amp;gt; deploy&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes, maybe it isn&amp;#39;t.  But then that just means we don&amp;#39;t have good&lt;br/&gt;&amp;gt; information.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When a lot of people were choosing electrum over SPV wallets when&lt;br/&gt;&amp;gt; those SPV wallets weren&amp;#39;t abandoned, sync time was frequently cited as&lt;br/&gt;&amp;gt; an actual reason. BIP158 makes that worse, not better.   So while I&amp;#39;m&lt;br/&gt;&amp;gt; hopeful, I&amp;#39;m also somewhat sceptical.  Certainly things that reduce&lt;br/&gt;&amp;gt; the size of the 158 filters make them seem more likely to be a success&lt;br/&gt;&amp;gt; to me.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; too difficult to implement &amp;#34;full&amp;#34; validation, as they&amp;#39;re bitcoin&lt;br/&gt;&amp;gt; developers&lt;br/&gt;&amp;gt; &amp;gt; with quite a bit of experience.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ::shrugs:: Above you&amp;#39;re also arguing against fetching down to the&lt;br/&gt;&amp;gt; coinbase transaction to save a couple hundred bytes a block, which&lt;br/&gt;&amp;gt; makes it impossible to validate a half dozen other things (including&lt;br/&gt;&amp;gt; as mentioned in the other threads depth fidelity of returned proofs).&lt;br/&gt;&amp;gt; There are a lot of reasons why things don&amp;#39;t get implemented other than&lt;br/&gt;&amp;gt; experience! :)&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/20180612/d1dbb394/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180612/d1dbb394/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg77hcp2sqfx5hff0mq8numhms0ttcn4sa8xjvusq5ny9msqxn8jczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vvylrgv</id>
    
      <title type="html">📅 Original date posted:2018-06-12 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg77hcp2sqfx5hff0mq8numhms0ttcn4sa8xjvusq5ny9msqxn8jczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vvylrgv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr5tzpnh9l58gmn958d6k4p4avfgkguwpflqy9q9r2z7pgkn6jv9gtgpu5a&#39;&gt;nevent1q…pu5a&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-12&lt;br/&gt;📝 Original message:&amp;gt; Doesn&amp;#39;t the current BIP157 protocol have each filter commit to the filter&lt;br/&gt;&amp;gt; for the previous block?&lt;br/&gt;&lt;br/&gt;Yep!&lt;br/&gt;&lt;br/&gt;&amp;gt; If that&amp;#39;s the case, shouldn&amp;#39;t validating the commitment at the tip of the&lt;br/&gt;&amp;gt; chain (or buried back whatever number of blocks that the SPV client&lt;br/&gt;trusts)&lt;br/&gt;&amp;gt; obliviate the need to validate the commitments for any preceeding blocks&lt;br/&gt;in&lt;br/&gt;&amp;gt; the SPV trust model?&lt;br/&gt;&lt;br/&gt;Yeah, just that there&amp;#39;ll be a gap between the p2p version, and when it&amp;#39;s&lt;br/&gt;ultimately committed.&lt;br/&gt;&lt;br/&gt;&amp;gt; It seems like you&amp;#39;re claiming better security here without providing any&lt;br/&gt;&amp;gt; evidence for it.&lt;br/&gt;&lt;br/&gt;What I mean is that one allows you to fully verify the filter, while the&lt;br/&gt;other allows you to only validate a portion of the filter and requires other&lt;br/&gt;added heuristics.&lt;br/&gt;&lt;br/&gt;&amp;gt; In the case of prevout&#43;output filters, when a client receives&lt;br/&gt;advertisements&lt;br/&gt;&amp;gt; for different filters from different peers, it:&lt;br/&gt;&lt;br/&gt;Alternatively, they can decompress the filter and at least verify that&lt;br/&gt;proper _output scripts_ have been included. Maybe this is &amp;#34;good enough&amp;#34;&lt;br/&gt;until its committed. If a command is added to fetch all the prev outs along&lt;br/&gt;w/ a block (which would let you do another things like verify fees), then&lt;br/&gt;they&amp;#39;d be able to fully validate the filter as well.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Sat, Jun 9, 2018 at 3:35 AM David A. Harding &amp;lt;dave at dtrt.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Fri, Jun 08, 2018 at 04:35:29PM -0700, Olaoluwa Osuntokun via&lt;br/&gt;&amp;gt; bitcoin-dev wrote:&lt;br/&gt;&amp;gt; &amp;gt;   2. Since the coinbase transaction is the first in a block, it has the&lt;br/&gt;&amp;gt; &amp;gt;      longest merkle proof path. As a result, it may be several hundred&lt;br/&gt;&amp;gt; bytes&lt;br/&gt;&amp;gt; &amp;gt;      (and grows with future capacity increases) to present a proof to the&lt;br/&gt;&amp;gt; &amp;gt;      client.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not sure why commitment proof size is a significant issue.  Doesn&amp;#39;t&lt;br/&gt;&amp;gt; the current BIP157 protocol have each filter commit to the filter for&lt;br/&gt;&amp;gt; the previous block?  If that&amp;#39;s the case, shouldn&amp;#39;t validating the&lt;br/&gt;&amp;gt; commitment at the tip of the chain (or buried back whatever number of&lt;br/&gt;&amp;gt; blocks that the SPV client trusts) obliviate the need to validate the&lt;br/&gt;&amp;gt; commitments for any preceeding blocks in the SPV trust model?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Depending on the composition of blocks, this may outweigh the gains&lt;br/&gt;&amp;gt; &amp;gt; had from taking advantage of the additional compression the prev outs&lt;br/&gt;&amp;gt; &amp;gt; allow.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think those are unrelated points.  The gain from using a more&lt;br/&gt;&amp;gt; efficient filter is saved bytes.  The gain from using block commitments&lt;br/&gt;&amp;gt; is SPV-level security---that attacks have a definite cost in terms of&lt;br/&gt;&amp;gt; generating proof of work instead of the variable cost of network&lt;br/&gt;&amp;gt; compromise (which is effectively free in many situations).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Comparing the extra bytes used by block commitments to the reduced bytes&lt;br/&gt;&amp;gt; saved by prevout&#43;output filters is like comparing the extra bytes used&lt;br/&gt;&amp;gt; to download all blocks for full validation to the reduced bytes saved by&lt;br/&gt;&amp;gt; only checking headers and merkle inclusion proofs in simplified&lt;br/&gt;&amp;gt; validation.  Yes, one uses more bytes than the other, but they&amp;#39;re&lt;br/&gt;&amp;gt; completely different security models and so there&amp;#39;s no normative way for&lt;br/&gt;&amp;gt; one to &amp;#34;outweigh the gains&amp;#34; from the other.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; So should we optimize for the ability to validate in a particular&lt;br/&gt;&amp;gt; &amp;gt; model (better security), or lower bandwidth in this case?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It seems like you&amp;#39;re claiming better security here without providing any&lt;br/&gt;&amp;gt; evidence for it.  The security model is &amp;#34;at least one of my peers is&lt;br/&gt;&amp;gt; honest.&amp;#34;  In the case of outpoint&#43;output filters, when a client receives&lt;br/&gt;&amp;gt; advertisements for different filters from different peers, it:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     1. Downloads the corresponding block&lt;br/&gt;&amp;gt;     2. Locally generates the filter for that block&lt;br/&gt;&amp;gt;     3. Kicks any peers that advertised a different filter than what it&lt;br/&gt;&amp;gt;        generated locally&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This ensures that as long as the client has at least one honest peer, it&lt;br/&gt;&amp;gt; will see every transaction affecting its wallet.  In the case of&lt;br/&gt;&amp;gt; prevout&#43;output filters, when a client receives advertisements for&lt;br/&gt;&amp;gt; different filters from different peers, it:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     1. Downloads the corresponding block and checks it for wallet&lt;br/&gt;&amp;gt;        transactions as if there had been a filter match&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This also ensures that as long as the client has at least one honest&lt;br/&gt;&amp;gt; peer, it will see every transaction affecting its wallet.  This is&lt;br/&gt;&amp;gt; equivilant security.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the second case, it&amp;#39;s possible for the client to eventually&lt;br/&gt;&amp;gt; probabalistically determine which peer(s) are dishonest and kick them.&lt;br/&gt;&amp;gt; The most space efficient of these protocols may disclose some bits of&lt;br/&gt;&amp;gt; evidence for what output scripts the client is looking for, but a&lt;br/&gt;&amp;gt; slightly less space-efficient protocol simply uses randomly-selected&lt;br/&gt;&amp;gt; outputs saved from previous blocks to make the probabalistic&lt;br/&gt;&amp;gt; determination (rather than the client&amp;#39;s own outputs) and so I think&lt;br/&gt;&amp;gt; should be quite private.  Neither protocol seems significantly more&lt;br/&gt;&amp;gt; complicated than keeping an associative array recording the number of&lt;br/&gt;&amp;gt; false positive matches for each peer&amp;#39;s filters.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -Dave&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/20180612/295d1a52/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180612/295d1a52/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqpx2y32qtsmjqeyn4dkrmnjmskv45hwxcn80qn4x4mm8learnqzszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vggakrd</id>
    
      <title type="html">📅 Original date posted:2018-06-08 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqpx2y32qtsmjqeyn4dkrmnjmskv45hwxcn80qn4x4mm8learnqzszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vggakrd" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswr0h54kskzde85c3tqh59vzpm2f5tsre9rh6z8fawstkj6r5jmkqpqatdr&#39;&gt;nevent1q…atdr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-08&lt;br/&gt;📝 Original message:&amp;gt; That in argument against adopting the inferior version, as that will&lt;br/&gt;&amp;gt; contribute more momentum to doing it in a way that doesn&amp;#39;t make sense long&lt;br/&gt;&amp;gt; term.&lt;br/&gt;&lt;br/&gt;That was moreso an attempt at a disclosure, rather than may argument. But&lt;br/&gt;also as noted further up in the thread, both approaches have a trade off:&lt;br/&gt;one is better for light clients in a p2p &amp;#34;one honest peer mode&amp;#34;, while the&lt;br/&gt;other is more compact, but is less verifiable for the light clients. They&amp;#39;re&lt;br/&gt;&amp;#34;inferior&amp;#34; in different ways.&lt;br/&gt;&lt;br/&gt;My argument goes more like: moving to prev scripts means clients cannot&lt;br/&gt;verify in full unless a block message is added to include the prev outs.&lt;br/&gt;This is a downgrade assuming a &amp;#34;one honest peer&amp;#34; model for the p2p&lt;br/&gt;interactions. A commitment removes this drawback, but ofc requires a soft&lt;br/&gt;fork. Soft forks take a &amp;#34;long&amp;#34; time to deploy. So what&amp;#39;s the cost in using&lt;br/&gt;the current filter (as it lets the client verify the filter if they want to,&lt;br/&gt;or in an attempted &amp;#34;bamboozlement&amp;#34; scenario) in the short term (as we don&amp;#39;t&lt;br/&gt;yet have a proposal for committing the filters) which would allow us to&lt;br/&gt;experiment more with the technique on mainnet before making the step up to&lt;br/&gt;committing the filter. Also, depending on the way the commitment is done,&lt;br/&gt;the filters themselves would need to be modified.&lt;br/&gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t agree at all, and I can&amp;#39;t see why you say so.&lt;br/&gt;&lt;br/&gt;Sure it doesn&amp;#39;t _have_ to, but from my PoV as &amp;#34;adding more commitments&amp;#34; is&lt;br/&gt;on the top of every developers wish list for additions to Bitcoin, it would&lt;br/&gt;make sense to coordinate on an &amp;#34;ultimate&amp;#34; extensible commitment once, rather&lt;br/&gt;than special case a bunch of distinct commitments. I can see arguments for&lt;br/&gt;either really.&lt;br/&gt;&lt;br/&gt;&amp;gt; This is inherent in how e.g. the segwit commitment is encoded, the initial&lt;br/&gt;&amp;gt; bytes are an identifying cookies. Different commitments would have&lt;br/&gt;different&lt;br/&gt;&amp;gt; cookies.&lt;br/&gt;&lt;br/&gt;Indeed, if the filter were to be committed, using an output on the coinbase&lt;br/&gt;would be a likely candidate. However, I see two issues with this:&lt;br/&gt;&lt;br/&gt;  1. The current filter format (even moving to prevouts) cannot be committed&lt;br/&gt;     in this fashion as it indexes each of the coinbase output scripts. This&lt;br/&gt;     creates a circular dependency: the commitment is modified by the&lt;br/&gt;     filter, which is modified by the commitment (the filter atm indexes the&lt;br/&gt;     commitment). So we&amp;#39;d need to add a special case to skip outputs with a&lt;br/&gt;     particular witness magic. However, we don&amp;#39;t know what that witness&lt;br/&gt;     magic looks like (as there&amp;#39;s no proposal). As a result, the type&lt;br/&gt;     filters that can be served over the p2p network may be distinct from&lt;br/&gt;     the type of filters that are to be committed, as the commitment may&lt;br/&gt;     have an impact on the filter itself.&lt;br/&gt;&lt;br/&gt;  2. Since the coinbase transaction is the first in a block, it has the&lt;br/&gt;     longest merkle proof path. As a result, it may be several hundred bytes&lt;br/&gt;     (and grows with future capacity increases) to present a proof to the&lt;br/&gt;     client. Depending on the composition of blocks, this may outweigh the&lt;br/&gt;     gains had from taking advantage of the additional compression the prev&lt;br/&gt;     outs allow.&lt;br/&gt;&lt;br/&gt;In regards to the second item above, what do you think of the old Tier Nolan&lt;br/&gt;proposal [1] to create a &amp;#34;constant&amp;#34; sized proof for future commitments by&lt;br/&gt;constraining the size of the block and placing the commitments within the&lt;br/&gt;last few transactions in the block?&lt;br/&gt;&lt;br/&gt;&amp;gt; but with an added advantage of permitting expirementation ahead of the&lt;br/&gt;&amp;gt; commitment.&lt;br/&gt;&lt;br/&gt;Indeed! To my knowledge, lnd is the only software deployed that even has&lt;br/&gt;code to experiment with the filtering proposal in general. Also, as I&lt;br/&gt;pointed out above, we may require an additional modification in order to be&lt;br/&gt;able to commit the filter. The nature of that modification may depend on how&lt;br/&gt;the filter is to be committed. As a result, why hinder experimentation today&lt;br/&gt;(since it might need to be changed anyway, and as you point out the filter&lt;br/&gt;being committed can even be swapped) by delaying until we know what the&lt;br/&gt;commitment will look like?&lt;br/&gt;&lt;br/&gt;&amp;gt; You can still scan blocks directly when peers disagree on the filter&lt;br/&gt;&amp;gt; content, regardless of how the filter is constructed&lt;br/&gt;&lt;br/&gt;But the difference is that one options lets you fully construct the filter&lt;br/&gt;from a block, while the other requires additional data.&lt;br/&gt;&lt;br/&gt;&amp;gt; but it makes the attack ineffective and using outpoints considerably&lt;br/&gt;increases&lt;br/&gt;&amp;gt; bandwidth for everyone without an attack&lt;br/&gt;&lt;br/&gt;So should we optimize for the ability to validate in a particular model&lt;br/&gt;(better&lt;br/&gt;security), or lower bandwidth in this case? It may also be the case that the&lt;br/&gt;overhead of receiving proofs of the commitment outweigh the savings&lt;br/&gt;depending&lt;br/&gt;on block composition (ofc entire block that re-uses the same address is&lt;br/&gt;super&lt;br/&gt;small).&lt;br/&gt;&lt;br/&gt;&amp;gt; It seems to me this point is being overplayed, especially considering the&lt;br/&gt;&amp;gt; current state of non-existing validation in SPV software (if SPV software&lt;br/&gt;&amp;gt; doesn&amp;#39;t validate anything else they could be validating, why would they&lt;br/&gt;&amp;gt; implement a considerable amount of logic for this?).&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think its fair to compare those that wish to implement this proposal&lt;br/&gt;(and actually do the validation) to the legacy SPV software that to my&lt;br/&gt;knowledge is all but abandoned. The project I work on that seeks to deploy&lt;br/&gt;this proposal (already has, but mainnet support is behind a flag as I&lt;br/&gt;anticipated further modifications) indeed has implemented the &amp;#34;considerable&amp;#34;&lt;br/&gt;amount of logic to check for discrepancies and ban peers trying to bamboozle&lt;br/&gt;the light clients. I&amp;#39;m confident that the other projects seeking to&lt;br/&gt;implement&lt;br/&gt;this (rust-bitcoin-spv, NBitcoin, bcoin, maybe missing a few too) won&amp;#39;t&lt;br/&gt;find it&lt;br/&gt;too difficult to implement &amp;#34;full&amp;#34; validation, as they&amp;#39;re bitcoin developers&lt;br/&gt;with quite a bit of experience.&lt;br/&gt;&lt;br/&gt;I think we&amp;#39;ve all learned from the past defects of past light clients, and&lt;br/&gt;don&amp;#39;t seek to repeat history by purposefully implementing as little&lt;br/&gt;validation&lt;br/&gt;as possible. With these new projects by new authors, I think we have an&lt;br/&gt;opprotunity to implement light clients &amp;#34;correctly&amp;#34; this time around.&lt;br/&gt;&lt;br/&gt;[1]:&lt;br/&gt;&lt;a href=&#34;https://github.com/TierNolan/bips/blob/00a8d3e1ac066ce3728658c6c40240e1c2ab859e/bip-aux-header.mediawiki&#34;&gt;https://github.com/TierNolan/bips/blob/00a8d3e1ac066ce3728658c6c40240e1c2ab859e/bip-aux-header.mediawiki&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Fri, Jun 8, 2018 at 9:14 AM Gregory Maxwell &amp;lt;greg at xiph.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Fri, Jun 8, 2018 at 5:03 AM, Olaoluwa Osuntokun 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; As someone who&amp;#39;s written and reviews code integrating the proposal all&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; &amp;gt; way up the stack (from node to wallet, to application), IMO, there&amp;#39;s no&lt;br/&gt;&amp;gt; &amp;gt; immediate cost to deferring the inclusion/creation of a filter that&lt;br/&gt;&amp;gt; includes&lt;br/&gt;&amp;gt; &amp;gt; prev scripts (b) instead of the outpoint as the &amp;#34;regular&amp;#34; filter does&lt;br/&gt;&amp;gt; now.&lt;br/&gt;&amp;gt; &amp;gt; Switching to prev script in the _short term_ would be costly for the set&lt;br/&gt;&amp;gt; of&lt;br/&gt;&amp;gt; &amp;gt; applications already deployed (or deployed in a minimal or flag flip&lt;br/&gt;&amp;gt; gated&lt;br/&gt;&amp;gt; &amp;gt; fashion) as the move from prev script to outpoint is a cascading one that&lt;br/&gt;&amp;gt; &amp;gt; impacts wallet operation, rescans, HD seed imports, etc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It seems to me that you&amp;#39;re making the argument against your own case&lt;br/&gt;&amp;gt; here: I&amp;#39;m reading this as a &amp;#34;it&amp;#39;s hard to switch so it should be done&lt;br/&gt;&amp;gt; the inferior way&amp;#34;.  That in argument against adopting the inferior&lt;br/&gt;&amp;gt; version, as that will contribute more momentum to doing it in a way&lt;br/&gt;&amp;gt; that doesn&amp;#39;t make sense long term.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Such a proposal would need to be generalized enough to allow several&lt;br/&gt;&amp;gt; components to be committed,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t agree at all, and I can&amp;#39;t see why you say so.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; likely have versioning,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is inherent in how e.g. the segwit commitment is encoded, the&lt;br/&gt;&amp;gt; initial bytes are an identifying cookies. Different commitments would&lt;br/&gt;&amp;gt; have different cookies.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; and also provide the necessary extensibility to allow additional items&lt;br/&gt;&amp;gt; to be committed in the future&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What was previously proposed is that the commitment be required to be&lt;br/&gt;&amp;gt; consistent if present but not be required to be present.  This would&lt;br/&gt;&amp;gt; allow changing whats used by simply abandoning the old one.  Sparsity&lt;br/&gt;&amp;gt; in an optional commitment can be addressed when there is less than&lt;br/&gt;&amp;gt; 100% participation by having each block that includes a commitment&lt;br/&gt;&amp;gt; commit to the missing filters ones from their immediate ancestors.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Additional optionality can be provided by the other well known&lt;br/&gt;&amp;gt; mechanisms,  e.g. have the soft fork expire at a block 5 years out&lt;br/&gt;&amp;gt; past deployment, and continue to soft-fork it in for a longer term so&lt;br/&gt;&amp;gt; long as its in use (or eventually without expiration if its clear that&lt;br/&gt;&amp;gt; it&amp;#39;s not going away).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; wallets which wish to primarily use the filters for rescan purposes can&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt; just construct them locally for this particular use case independent of&lt;br/&gt;&amp;gt; &amp;gt; what&amp;#39;s currently deployed on the p2p network.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Absolutely, but given the failure of BIP37 on the network-- and the&lt;br/&gt;&amp;gt; apparent strong preference of end users for alternatives that don&amp;#39;t&lt;br/&gt;&amp;gt; scan (e.g. electrum and web wallets)-- supporting making this&lt;br/&gt;&amp;gt; available via P2P was already only interesting to many as a nearly&lt;br/&gt;&amp;gt; free side effect of having filters for local scanning.  If it&amp;#39;s a&lt;br/&gt;&amp;gt; different filter, it&amp;#39;s no longer attractive.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It seems to me that some people have forgotten that this whole idea&lt;br/&gt;&amp;gt; was originally proposed to be a committed data-- but with an added&lt;br/&gt;&amp;gt; advantage of permitting expirementation ahead of the commitment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Maintaining the outpoint also allows us to rely on a &amp;#34;single honest&lt;br/&gt;&amp;gt; peer&amp;#34;security model in the short term.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You can still scan blocks directly when peers disagree on the filter&lt;br/&gt;&amp;gt; content, regardless of how the filter is constructed-- yes, it uses&lt;br/&gt;&amp;gt; more bandwidth if you&amp;#39;re attacked, but it makes the attack ineffective&lt;br/&gt;&amp;gt; and using outpoints considerably increases bandwidth for everyone&lt;br/&gt;&amp;gt; without an attack.  These ineffective (except for increasing&lt;br/&gt;&amp;gt; bandwidth) attacks would have to be common to offset the savings. It&lt;br/&gt;&amp;gt; seems to me this point is being overplayed, especially considering the&lt;br/&gt;&amp;gt; current state of non-existing validation in SPV software (if SPV&lt;br/&gt;&amp;gt; software doesn&amp;#39;t validate anything else they could be validating, why&lt;br/&gt;&amp;gt; would they implement a considerable amount of logic for this?).&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/20180608/347a6539/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180608/347a6539/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:41&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9uv0gzyxyha4dgt4a5pcq5jr74rl6gzma6y4w2f0u3s9r948q24gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vurlgqk</id>
    
      <title type="html">📅 Original date posted:2018-05-31 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9uv0gzyxyha4dgt4a5pcq5jr74rl6gzma6y4w2f0u3s9r948q24gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vurlgqk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9rg2xl35mzkfc3tmk7ndudq9x64h5qdt6hy3askhtfucz9988fesecd3mv&#39;&gt;nevent1q…d3mv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-31&lt;br/&gt;📝 Original message:Hi y&amp;#39;all,&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve made a PR to the BIP repo to modify BIP 158 based on this thread, and&lt;br/&gt;other recent threads giving feedback on the current version of the BIP:&lt;br/&gt;&lt;br/&gt;  * &lt;a href=&#34;https://github.com/bitcoin/bips/pull/687&#34;&gt;https://github.com/bitcoin/bips/pull/687&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve also updated the test vectors based on the current parameters (and&lt;br/&gt;filter format), and also the code used to generate the test vectors. Due to&lt;br/&gt;the change in parametrization, the test vectors now target (P=19 M=784931),&lt;br/&gt;and there&amp;#39;re no longer any cases related to extended filters.&lt;br/&gt;&lt;br/&gt;One notable thing that I left off is the proposed change to use the previous&lt;br/&gt;output script rather than the outpoint. Modifying the filters in this&lt;br/&gt;fashion would be a downgrade in the security model for light clients, as it&lt;br/&gt;would allow full nodes to lie by omission, just as they can with BIP 37. As&lt;br/&gt;is now, if nodes present conflicting information, then the light client can&lt;br/&gt;download the target block, fully reconstruct the filter itself, then ban any&lt;br/&gt;nodes which advertised the incorrect filter. The inclusion of the filter&lt;br/&gt;header checkpoints make it rather straight forward for light clients to&lt;br/&gt;bisect the state to find the conflicting advertisement, and it&amp;#39;s strongly&lt;br/&gt;recommended that they do so.&lt;br/&gt;&lt;br/&gt;To get a feel for the level of impact these changes would have on existing&lt;br/&gt;applications that depend on the txid being included in the filter, I&amp;#39;ve&lt;br/&gt;implemented these changes across btcutil, btcd, btcwallet, and lnd (which&lt;br/&gt;previously relied on the txid for confirmation notifications). For lnd at&lt;br/&gt;least, the code impact was rather minimal, as we use the pkScript for&lt;br/&gt;matching a block, but then still scan the block manually to find the precise&lt;br/&gt;transaction (by txid) that we were interested in (if it&amp;#39;s there).&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Mon, May 28, 2018 at 9:01 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; The additional benefit of the input script/outpoint filter is to watch&lt;br/&gt;&amp;gt; for&lt;br/&gt;&amp;gt; &amp;gt; unexpected spends (coins getting stolen or spent from another wallet) or&lt;br/&gt;&amp;gt; &amp;gt; transactions without a unique change or output address. I think this is a&lt;br/&gt;&amp;gt; &amp;gt; reasonable implementation, and it would be nice to be able to download&lt;br/&gt;&amp;gt; that&lt;br/&gt;&amp;gt; &amp;gt; filter without any input elements.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As someone who&amp;#39;s implemented a complete integration of the filtering&lt;br/&gt;&amp;gt; technique into an existing wallet, and a higher application I disagree.&lt;br/&gt;&amp;gt; There&amp;#39;s not much gain to be had in splitting up the filters: it&amp;#39;ll result&lt;br/&gt;&amp;gt; in&lt;br/&gt;&amp;gt; additional round trips (to fetch these distinct filter) during normal&lt;br/&gt;&amp;gt; operation, complicate routine seed rescanning logic, and also is&lt;br/&gt;&amp;gt; detrimental&lt;br/&gt;&amp;gt; to privacy if one is fetching blocks from the same peer as they&amp;#39;ve&lt;br/&gt;&amp;gt; downloaded the filters from.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, I&amp;#39;m now convinced that the savings had by including the prev&lt;br/&gt;&amp;gt; output&lt;br/&gt;&amp;gt; script (addr re-use and outputs spent in the same block as they&amp;#39;re created)&lt;br/&gt;&amp;gt; outweigh the additional booking keeping required in an implementation (when&lt;br/&gt;&amp;gt; extracting the precise tx that matched) compared to using regular outpoint&lt;br/&gt;&amp;gt; as we do currently. Combined with the recently proposed re-parametrization&lt;br/&gt;&amp;gt; of the gcs parameters[1], the filter size should shrink by quite a bit!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m very happy with the review the BIPs has been receiving as of late. It&lt;br/&gt;&amp;gt; would&amp;#39;ve been nice to have this 1&#43; year ago when the draft was initially&lt;br/&gt;&amp;gt; proposed, but better late that never!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Based on this thread, [1], and discussions on various IRC channels, I plan&lt;br/&gt;&amp;gt; to make the following modifications to the BIP:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   1. use P=2^19 and M=784931 as gcs parameters, and also bind these to the&lt;br/&gt;&amp;gt;      filter instance, so future filter types may use distinct parameters&lt;br/&gt;&amp;gt;   2. use the prev output script rather than the prev input script in the&lt;br/&gt;&amp;gt;      regular filter&lt;br/&gt;&amp;gt;   3. remove the txid from the regular filter(as with some extra&lt;br/&gt;&amp;gt; book-keeping&lt;br/&gt;&amp;gt;      the output script is enough)&lt;br/&gt;&amp;gt;   4. do away with the extended filter all together, as our original use&lt;br/&gt;&amp;gt; case&lt;br/&gt;&amp;gt;      for it has been nerfed as the filter size grew too large when doing&lt;br/&gt;&amp;gt;      recursive parsing. instead we watch for the outpoint being spent and&lt;br/&gt;&amp;gt;      extract the pre-image from it if it matches now&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The resulting changes should slash the size of the filters, yet still&lt;br/&gt;&amp;gt; ensure&lt;br/&gt;&amp;gt; that they&amp;#39;re useful enough for our target use case.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-May/016029.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-May/016029.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Laolu&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/20180531/5499982f/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180531/5499982f/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsza5pkt7mcd4609ndqv2c6k9xn452rgcj6juvqfjwrr7hrks8phmszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vtfhuc8</id>
    
      <title type="html">📅 Original date posted:2018-06-01 📝 Original message:&amp;gt; A ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsza5pkt7mcd4609ndqv2c6k9xn452rgcj6juvqfjwrr7hrks8phmszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vtfhuc8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8469hnq3f2l5yu575lkv7vu8wgnvewlstx0ha0euepg8whmamxsq9p5pur&#39;&gt;nevent1q…5pur&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-06-01&lt;br/&gt;📝 Original message:&amp;gt; A typical network attacker (e.g.  someone on your lan or wifi segmet, or&lt;br/&gt;&amp;gt; someone who has compromised or operates an upstream router) can be all of&lt;br/&gt;&amp;gt; your peers.&lt;br/&gt;&lt;br/&gt;This is true, but it cannot make us accept any invalid filters unless the&lt;br/&gt;attacker is also creating invalid blocks w/ valid PoW.&lt;br/&gt;&lt;br/&gt;&amp;gt; The original propsal for using these kinds of maps was that their digests&lt;br/&gt;&amp;gt; could eventually be commited and then checked against the commitment,&lt;br/&gt;&amp;gt; matching the same general security model used otherwise in SPV.&lt;br/&gt;&lt;br/&gt;Indeed, but no such proposal for committing the filters has emerged yet.&lt;br/&gt;Slinging filters with new p2p messages requires much less coordination that&lt;br/&gt;adding a new committed structure to Bitcoin. One could imagine that if&lt;br/&gt;consensus exists to add new committed structures, then there may also be&lt;br/&gt;initiatives to start to commit sig-ops, block weight, utxo&amp;#39;s etc. As a&lt;br/&gt;result one could imagine a much longer deployment cycle compared to a pure&lt;br/&gt;p2p roll out in the near term, and many applications are looking for a&lt;br/&gt;viable alternative to BIP 37.&lt;br/&gt;&lt;br/&gt;&amp;gt; Unfortunately, using the scripts instead of the outpoints takes us further&lt;br/&gt;&amp;gt; away from a design that is optimized for committing (or, for that matter,&lt;br/&gt;&amp;gt; use purely locally by a wallet)...&lt;br/&gt;&lt;br/&gt;I agree that using the prev input scripts would indeed be optimal from a&lt;br/&gt;size perspective when the filters are to be committed. The current proposal&lt;br/&gt;makes way for future filter types and it&amp;#39;s likely the case that only the&lt;br/&gt;most optimal filters should be committed (while other more niche filters&lt;br/&gt;perhaps, remain only on the p2p level).&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Thu, May 31, 2018 at 9:14 PM Gregory Maxwell &amp;lt;gmaxwell at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Fri, Jun 1, 2018 at 2:52 AM, Olaoluwa Osuntokun 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; One notable thing that I left off is the proposed change to use the&lt;br/&gt;&amp;gt; previous&lt;br/&gt;&amp;gt; &amp;gt; output script rather than the outpoint. Modifying the filters in this&lt;br/&gt;&amp;gt; &amp;gt; fashion would be a downgrade in the security model for light clients, as&lt;br/&gt;&amp;gt; it&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Only if you make a very strong assumption about the integrity of the&lt;br/&gt;&amp;gt; nodes the client is talkign to. A typical network attacker (e.g.&lt;br/&gt;&amp;gt; someone on your lan or wifi segmet, or someone who has compromised or&lt;br/&gt;&amp;gt; operates an upstream router) can be all of your peers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The original propsal for using these kinds of maps was that their&lt;br/&gt;&amp;gt; digests could eventually be commited and then checked against the&lt;br/&gt;&amp;gt; commitment, matching the same general security model used otherwise in&lt;br/&gt;&amp;gt; SPV.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Unfortunately, using the scripts instead of the outpoints takes us&lt;br/&gt;&amp;gt; further away from a design that is optimized for committing (or, for&lt;br/&gt;&amp;gt; that matter, use purely locally by a wallet)...&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/20180601/12faacf0/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180601/12faacf0/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxj7pasw8c3crprz68pczctmxmqmydr2swxd4zse8ua9sek4luupczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vp08dvm</id>
    
      <title type="html">📅 Original date posted:2018-05-18 📝 Original message:Matt ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxj7pasw8c3crprz68pczctmxmqmydr2swxd4zse8ua9sek4luupczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vp08dvm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfg9v2kkz36h0stj035zrc24p6pcqru4y0h43p0h6n4np6nhf0qdcfdjsnc&#39;&gt;nevent1q…jsnc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-18&lt;br/&gt;📝 Original message:Matt wrote:&lt;br/&gt;&amp;gt; I believe (1) could be skipped entirely - there is almost no reason why&lt;br/&gt;&amp;gt; you&amp;#39;d not be able to filter for, eg, the set of output scripts in a&lt;br/&gt;&amp;gt; transaction you know about&lt;br/&gt;&lt;br/&gt;Depending on the use-case, the txid is more precise than searching for the&lt;br/&gt;output script as it doesn&amp;#39;t need to deal with duplicated output scripts. To&lt;br/&gt;my knowledge, lnd is the only major project that currently utilizes BIP&lt;br/&gt;157&#43;158. At this point, we use the txid in the regular filter for&lt;br/&gt;confirmations (channel confirmed, sweep tx confirmed, cltv confirmed, etc).&lt;br/&gt;Switching to use output scripts instead wouldn&amp;#39;t be _too_ invasive w.r.t&lt;br/&gt;changes required in the codebase, only the need to deal with output script&lt;br/&gt;duplication could be annoying.&lt;br/&gt;&lt;br/&gt;&amp;gt; (2) and (3) may want to be split out - many wallets may wish to just find&lt;br/&gt;&amp;gt; transactions paying to them, as transactions spending from their outputs&lt;br/&gt;&amp;gt; should generally be things they&amp;#39;ve created.&lt;br/&gt;&lt;br/&gt;FWIW, in the &amp;#34;rescan after importing by seed phrase&amp;#34; both are needed in&lt;br/&gt;order to ensure the wallet ends up with the proper output set after the&lt;br/&gt;scan. In lnd we actively use both (2) to detect deposits to the internal&lt;br/&gt;wallet, and (3) to be notified when our channel outputs are spent on-chain&lt;br/&gt;(and also generally when any of our special scripts are spent).&lt;br/&gt;&lt;br/&gt;&amp;gt; In general, I&amp;#39;m concerned about the size of the filters making existing&lt;br/&gt;SPV&lt;br/&gt;&amp;gt; clients less willing to adopt BIP 158 instead of the existing bloom filter&lt;br/&gt;&amp;gt; garbage and would like to see a further exploration of ways to split out&lt;br/&gt;&amp;gt; filters to make them less bandwidth intensive.&lt;br/&gt;&lt;br/&gt;Agreed that the current filter size may prevent adoption amongst wallets.&lt;br/&gt;However, the other factor that will likely prevent adoption amongst current&lt;br/&gt;BIP-37 mobile wallets is the lack of support for notifying _unconfirmed_&lt;br/&gt;transactions. When we drafted up the protocol last year and asked around,&lt;br/&gt;this was one of the major points of contention amongst existing mobile&lt;br/&gt;wallets that utilize BIP 37.&lt;br/&gt;&lt;br/&gt;On the other hand, the two &amp;#34;popular&amp;#34; BIP 37 wallets I&amp;#39;m aware of&lt;br/&gt;(Breadwallet, and Andreas Schildbach&amp;#39;s Bitcoin Wallet) have lagged massively&lt;br/&gt;behind the existing set of wallet related protocol upgrades. For example,&lt;br/&gt;neither of them have released versions of their applications that take&lt;br/&gt;advantage of segwit in any manner. Breadwallet has more or less &amp;#34;pivoted&amp;#34;&lt;br/&gt;(they did an ICO and have a token) and instead is prioritizing things like&lt;br/&gt;adding random ICO tokens over catching up with the latest protocol updates.&lt;br/&gt;Based on this behavior, even if the filter sizes were even _more_ bandwidth&lt;br/&gt;efficient that BIP 37, I don&amp;#39;t think they&amp;#39;d adopt the protocol.&lt;br/&gt;&lt;br/&gt;&amp;gt; Some further ideas we should probably play with before finalizing moving&lt;br/&gt;&amp;gt; forward is providing filters for certain script templates, eg being able&lt;br/&gt;to&lt;br/&gt;&amp;gt; only get outputs that are segwit version X or other similar ideas.&lt;br/&gt;&lt;br/&gt;Why should this block active deployment of BIP 157&#43;158 as is now? As&lt;br/&gt;defined, the protocol already allows future updates to add additional filter&lt;br/&gt;types. Before the filters are committed, each filter type requires a new&lt;br/&gt;filter header. We could move to a single filter header that commits to the&lt;br/&gt;hashes of _all_ filters, but that would mean that a node couldn&amp;#39;t serve the&lt;br/&gt;headers unless they had all currently defined features, defeating the&lt;br/&gt;optionality offered.&lt;br/&gt;&lt;br/&gt;Additionally, more filters entails more disk utilization for nodes serving&lt;br/&gt;these filters. Nodes have the option to instead create the filters at &amp;#34;query&lt;br/&gt;time&amp;#34;, but then this counters the benefit of simply slinging the filters&lt;br/&gt;from disk (or a memory map or w/e). IMO, it&amp;#39;s a desirable feature that&lt;br/&gt;serving light clients no longer requires active CPU&#43;I/O and instead just&lt;br/&gt;passive I/O (nodes could even write the filters to disk in protocol msg&lt;br/&gt;format).&lt;br/&gt;&lt;br/&gt;To get a feel for the current filter sizes, a txid-only filter size, and a&lt;br/&gt;regular filter w/o txid&amp;#39;s, I ran some stats on the last 10k blocks:&lt;br/&gt;&lt;br/&gt;regular size:    217107653  bytes&lt;br/&gt;regular avg:     21710.7653 bytes&lt;br/&gt;regular median:  22332      bytes&lt;br/&gt;regular max:     61901      bytes&lt;br/&gt;&lt;br/&gt;txid-only size:    34518463  bytes&lt;br/&gt;txid-only avg:     3451.8463 bytes&lt;br/&gt;txid-only median:  3258      bytes&lt;br/&gt;txid-only max:     10193     bytes&lt;br/&gt;&lt;br/&gt;reg-no-txid size:    182663961  bytes&lt;br/&gt;reg-no-txid avg:     18266.3961 bytes&lt;br/&gt;reg-no-txid median:  19198      bytes&lt;br/&gt;reg-no-txid max:     60172      bytes&lt;br/&gt;&lt;br/&gt;So the median regular filter size over the past 10k blocks is 20KB. If we&lt;br/&gt;extract the txid from the regular filter and add a txid-only filter, the&lt;br/&gt;median size of that is 3.2KB. Finally, the median size of a modified regular&lt;br/&gt;filter (no txid) is 19KB.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Thu, May 17, 2018 at 8:33 AM Matt Corallo 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; BIP 158 currently includes the following in the &amp;#34;basic&amp;#34; filter: 1)&lt;br/&gt;&amp;gt; txids, 2) output scripts, 3) input prevouts.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe (1) could be skipped entirely - there is almost no reason why&lt;br/&gt;&amp;gt; you&amp;#39;d not be able to filter for, eg, the set of output scripts in a&lt;br/&gt;&amp;gt; transaction you know about and (2) and (3) may want to be split out -&lt;br/&gt;&amp;gt; many wallets may wish to just find transactions paying to them, as&lt;br/&gt;&amp;gt; transactions spending from their outputs should generally be things&lt;br/&gt;&amp;gt; they&amp;#39;ve created.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In general, I&amp;#39;m concerned about the size of the filters making existing&lt;br/&gt;&amp;gt; SPV clients less willing to adopt BIP 158 instead of the existing bloom&lt;br/&gt;&amp;gt; filter garbage and would like to see a further exploration of ways to&lt;br/&gt;&amp;gt; split out filters to make them less bandwidth intensive. Some further&lt;br/&gt;&amp;gt; ideas we should probably play with before finalizing moving forward is&lt;br/&gt;&amp;gt; providing filters for certain script templates, eg being able to only&lt;br/&gt;&amp;gt; get outputs that are segwit version X or other similar ideas.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Matt&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/20180518/58337833/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180518/58337833/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:20&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstakgkfndwmsfaka8ec8g39lhzfl7yns56leuxxznehsqdzuj7ffqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vqw4s5h</id>
    
      <title type="html">📅 Original date posted:2018-05-21 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstakgkfndwmsfaka8ec8g39lhzfl7yns56leuxxznehsqdzuj7ffqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vqw4s5h" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw3q2etrzg0r270g5ks4yt7937pywtxwut9vmeh55l93mdcc8r7lgpn2egf&#39;&gt;nevent1q…2egf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-21&lt;br/&gt;📝 Original message:Hi Y&amp;#39;all,&lt;br/&gt;&lt;br/&gt;The script finished a few days ago with the following results:&lt;br/&gt;&lt;br/&gt;reg-filter-prev-script total size:  161236078  bytes&lt;br/&gt;reg-filter-prev-script avg:         16123.6078 bytes&lt;br/&gt;reg-filter-prev-script median:      16584      bytes&lt;br/&gt;reg-filter-prev-script max:         59480      bytes&lt;br/&gt;&lt;br/&gt;Compared to the original median size of the same block range, but with the&lt;br/&gt;current filter (has both txid, prev outpoint, output scripts), we see a&lt;br/&gt;roughly 34% reduction in filter size (current median is 22258 bytes).&lt;br/&gt;Compared to the suggested modified filter (no txid, prev outpoint, output&lt;br/&gt;scripts), we see a 15% reduction in size (median of that was 19198 bytes).&lt;br/&gt;This shows that script re-use is still pretty prevalent in the chain as of&lt;br/&gt;recent.&lt;br/&gt;&lt;br/&gt;One thing that occurred to me, is that on the application level, switching&lt;br/&gt;to the input prev output script can make things a bit awkward. Observe that&lt;br/&gt;when looking for matches in the filter, upon a match, one would need access&lt;br/&gt;to an additional (outpoint -&amp;gt; script) map in order to locate _which_&lt;br/&gt;particular transaction matched w/o access to an up-to-date UTOX set. In&lt;br/&gt;contrast, as is atm, one can locate the matching transaction with no&lt;br/&gt;additional information (as we&amp;#39;re matching on the outpoint).&lt;br/&gt;&lt;br/&gt;At this point, if we feel filter sizes need to drop further, then we may&lt;br/&gt;need to consider raising the false positive rate.&lt;br/&gt;&lt;br/&gt;Does anyone have any estimates or direct measures w.r.t how much bandwidth&lt;br/&gt;current BIP 37 light clients consume? It would be nice to have a direct&lt;br/&gt;comparison. We&amp;#39;d need to consider the size of their base bloom filter, the&lt;br/&gt;accumulated bandwidth as a result of repeated filterload commands (to adjust&lt;br/&gt;the fp rate), and also the overhead of receiving the merkle branch and&lt;br/&gt;transactions in distinct messages (both due to matches and false positives).&lt;br/&gt;&lt;br/&gt;Finally, I&amp;#39;d be open to removing the current &amp;#34;extended&amp;#34; filter from the BIP&lt;br/&gt;as is all together for now. If a compelling use case for being able to&lt;br/&gt;filter the sigScript/witness arises, then we can examine re-adding it with a&lt;br/&gt;distinct service bit. After all it would be harder to phase out the filter&lt;br/&gt;once wider deployment was already reached. Similarly, if the 16% savings&lt;br/&gt;achieved by removing the txid is attractive, then we can create an&lt;br/&gt;additional&lt;br/&gt;filter just for the txids to allow those applications which need the&lt;br/&gt;information to seek out that extra filter.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Fri, May 18, 2018 at 8:06 PM Pieter Wuille &amp;lt;pieter.wuille at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; On Fri, May 18, 2018, 19:57 Olaoluwa Osuntokun 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; Greg wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; What about also making input prevouts filter based on the scriptpubkey&lt;br/&gt;&amp;gt;&amp;gt; being&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; _spent_?  Layering wise in the processing it&amp;#39;s a bit ugly, but if you&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; validated the block you have the data needed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; AFAICT, this would mean that in order for a new node to catch up the&lt;br/&gt;&amp;gt;&amp;gt; filter&lt;br/&gt;&amp;gt;&amp;gt; index (index all historical blocks), they&amp;#39;d either need to: build up a&lt;br/&gt;&amp;gt;&amp;gt; utxo-set in memory during indexing, or would require a txindex in order to&lt;br/&gt;&amp;gt;&amp;gt; look up the prev out&amp;#39;s script. The first option increases the memory load&lt;br/&gt;&amp;gt;&amp;gt; during indexing, and the second requires nodes to have a transaction index&lt;br/&gt;&amp;gt;&amp;gt; (and would also add considerable I/O load). When proceeding from tip, this&lt;br/&gt;&amp;gt;&amp;gt; doesn&amp;#39;t add any additional load assuming that your synchronously index the&lt;br/&gt;&amp;gt;&amp;gt; block as you validate it, otherwise the utxo set will already have been&lt;br/&gt;&amp;gt;&amp;gt; updated (the spent scripts removed).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I was wondering about that too, but it turns out that isn&amp;#39;t necessary. At&lt;br/&gt;&amp;gt; least in Bitcoin Core, all the data needed for such a filter is in the&lt;br/&gt;&amp;gt; block &#43; undo files (the latter contain the scriptPubKeys of the outputs&lt;br/&gt;&amp;gt; being spent).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I have a script running to compare the filter sizes assuming the regular&lt;br/&gt;&amp;gt;&amp;gt; filter switches to include the prev out&amp;#39;s script rather than the prev&lt;br/&gt;&amp;gt;&amp;gt; outpoint itself. The script hasn&amp;#39;t yet finished (due to the increased I/O&lt;br/&gt;&amp;gt;&amp;gt; load to look up the scripts when indexing), but I&amp;#39;ll report back once it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; finished.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That&amp;#39;s very helpful, thank you.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Pieter&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180521/feb53119/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180521/feb53119/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:19&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstm0dlqnff4af92ju0mq2yuh4p07zf5aqc0w9hj4tdnqq9cdgmnaczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vjdhvyw</id>
    
      <title type="html">📅 Original date posted:2018-05-19 📝 Original ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstm0dlqnff4af92ju0mq2yuh4p07zf5aqc0w9hj4tdnqq9cdgmnaczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vjdhvyw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs00pspemyq058atqa2c65j8gmqrugljqvclemyqk79nmgkedwkcds76e5ld&#39;&gt;nevent1q…e5ld&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-19&lt;br/&gt;📝 Original message:Riccardo wrote:&lt;br/&gt;&amp;gt; The BIP recall some go code for how the parameter has been selected which&lt;br/&gt;&amp;gt; I can hardly understand and run&lt;br/&gt;&lt;br/&gt;The code you&amp;#39;re linking to is for generating test vectors (to allow&lt;br/&gt;implementations to check the correctness of their gcs filters. The name of&lt;br/&gt;the file is &amp;#39;gentestvectors.go&amp;#39;. It produces CSV files which contain test&lt;br/&gt;vectors of various testnet blocks and at various false positive rates.&lt;br/&gt;&lt;br/&gt;&amp;gt; it&amp;#39;s totally my fault but if possible I would really like more details on&lt;br/&gt;&amp;gt; the process, like charts and explanations&lt;br/&gt;&lt;br/&gt;When we published the BIP draft last year (wow, time flies!), we put up code&lt;br/&gt;(as well as an interactive website) showing the process we used to arrive at&lt;br/&gt;the current false positive rate. The aim was to minimize the bandwidth&lt;br/&gt;required to download each filter plus the expected bandwidth from&lt;br/&gt;downloading &amp;#34;large-ish&amp;#34; full segwit blocks. The code simulated a few wallet&lt;br/&gt;types (in terms of number of addrs, etc) focusing on a &amp;#34;mid-sized&amp;#34; wallet.&lt;br/&gt;One could also model the selection as a Bernoulli process where we attempt&lt;br/&gt;to compute the probability that after k queries (let&amp;#39;s say you have k&lt;br/&gt;addresses) we have k &amp;#34;successes&amp;#34;. A success would mean the queries item&lt;br/&gt;wasn&amp;#39;t found in the filter, while a failure is a filter match (false&lt;br/&gt;positive or not). A failure in the process requires fetching the entire&lt;br/&gt;block.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;On Fri, May 18, 2018 at 5:35 AM Riccardo Casatta 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; Another parameter which heavily affects filter size is the false positive&lt;br/&gt;&amp;gt; rate which is empirically set&lt;br/&gt;&amp;gt; &amp;lt;&lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki#construction&amp;gt&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki#construction&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; to 2^-20&lt;br/&gt;&amp;gt; The BIP recall some go code&lt;br/&gt;&amp;gt; &amp;lt;&lt;a href=&#34;https://github.com/Roasbeef/bips/blob/83b83c78e189be898573e0bfe936dd0c9b99ecb9/gcs_light_client/gentestvectors.go&amp;gt&#34;&gt;https://github.com/Roasbeef/bips/blob/83b83c78e189be898573e0bfe936dd0c9b99ecb9/gcs_light_client/gentestvectors.go&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; for how the parameter has been selected which I can hardly understand and&lt;br/&gt;&amp;gt; run, it&amp;#39;s totally my fault but if possible I would really like more details&lt;br/&gt;&amp;gt; on the process, like charts and explanations (for example, which is the&lt;br/&gt;&amp;gt; number of elements to search for which the filter has been optimized for?)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Instinctively I feel 2^-20 is super low and choosing a lot higher alpha&lt;br/&gt;&amp;gt; will shrink the total filter size by gigabytes at the cost of having to&lt;br/&gt;&amp;gt; wastefully download just some megabytes of blocks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2018-05-17 18:36 GMT&#43;02:00 Gregory Maxwell via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt;:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Thu, May 17, 2018 at 3:25 PM, Matt Corallo via bitcoin-dev&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I believe (1) could be skipped entirely - there is almost no reason why&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; you&amp;#39;d not be able to filter for, eg, the set of output scripts in a&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; transaction you know about&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think this is convincing for the txids themselves.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; What about also making input prevouts filter based on the scriptpubkey&lt;br/&gt;&amp;gt;&amp;gt; being _spent_?  Layering wise in the processing it&amp;#39;s a bit ugly, but&lt;br/&gt;&amp;gt;&amp;gt; if you validated the block you have the data needed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This would eliminate the multiple data type mixing entirely.&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;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Riccardo Casatta - @RCasatta &amp;lt;&lt;a href=&#34;https://twitter.com/RCasatta&amp;gt&#34;&gt;https://twitter.com/RCasatta&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180518/b40519c4/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180518/b40519c4/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8l0u3fyjn0rx0uvuex6dpgj45sfkdytg5qhvlw4g9x00lyz7eehczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v36zk5a</id>
    
      <title type="html">📅 Original date posted:2018-05-29 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8l0u3fyjn0rx0uvuex6dpgj45sfkdytg5qhvlw4g9x00lyz7eehczyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v36zk5a" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2cgf0u0vl9eykjn4pghwehrp7ldl78px5pyatzdyvj09cxwhe20sw4c06w&#39;&gt;nevent1q…c06w&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-29&lt;br/&gt;📝 Original message:&amp;gt; The additional benefit of the input script/outpoint filter is to watch for&lt;br/&gt;&amp;gt; unexpected spends (coins getting stolen or spent from another wallet) or&lt;br/&gt;&amp;gt; transactions without a unique change or output address. I think this is a&lt;br/&gt;&amp;gt; reasonable implementation, and it would be nice to be able to download&lt;br/&gt;that&lt;br/&gt;&amp;gt; filter without any input elements.&lt;br/&gt;&lt;br/&gt;As someone who&amp;#39;s implemented a complete integration of the filtering&lt;br/&gt;technique into an existing wallet, and a higher application I disagree.&lt;br/&gt;There&amp;#39;s not much gain to be had in splitting up the filters: it&amp;#39;ll result in&lt;br/&gt;additional round trips (to fetch these distinct filter) during normal&lt;br/&gt;operation, complicate routine seed rescanning logic, and also is detrimental&lt;br/&gt;to privacy if one is fetching blocks from the same peer as they&amp;#39;ve&lt;br/&gt;downloaded the filters from.&lt;br/&gt;&lt;br/&gt;However, I&amp;#39;m now convinced that the savings had by including the prev output&lt;br/&gt;script (addr re-use and outputs spent in the same block as they&amp;#39;re created)&lt;br/&gt;outweigh the additional booking keeping required in an implementation (when&lt;br/&gt;extracting the precise tx that matched) compared to using regular outpoint&lt;br/&gt;as we do currently. Combined with the recently proposed re-parametrization&lt;br/&gt;of the gcs parameters[1], the filter size should shrink by quite a bit!&lt;br/&gt;&lt;br/&gt;I&amp;#39;m very happy with the review the BIPs has been receiving as of late. It&lt;br/&gt;would&amp;#39;ve been nice to have this 1&#43; year ago when the draft was initially&lt;br/&gt;proposed, but better late that never!&lt;br/&gt;&lt;br/&gt;Based on this thread, [1], and discussions on various IRC channels, I plan&lt;br/&gt;to make the following modifications to the BIP:&lt;br/&gt;&lt;br/&gt;  1. use P=2^19 and M=784931 as gcs parameters, and also bind these to the&lt;br/&gt;     filter instance, so future filter types may use distinct parameters&lt;br/&gt;  2. use the prev output script rather than the prev input script in the&lt;br/&gt;     regular filter&lt;br/&gt;  3. remove the txid from the regular filter(as with some extra book-keeping&lt;br/&gt;     the output script is enough)&lt;br/&gt;  4. do away with the extended filter all together, as our original use case&lt;br/&gt;     for it has been nerfed as the filter size grew too large when doing&lt;br/&gt;     recursive parsing. instead we watch for the outpoint being spent and&lt;br/&gt;     extract the pre-image from it if it matches now&lt;br/&gt;&lt;br/&gt;The resulting changes should slash the size of the filters, yet still ensure&lt;br/&gt;that they&amp;#39;re useful enough for our target use case.&lt;br/&gt;&lt;br/&gt;[1]:&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-May/016029.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-May/016029.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;-- Laolu&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/20180528/8326d73b/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180528/8326d73b/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:17&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsddhd0dkf27zhnangn5j6h9w6eurje5g9dzqjwaygxxdquvuas8fgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vqm0htv</id>
    
      <title type="html">📅 Original date posted:2018-05-21 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsddhd0dkf27zhnangn5j6h9w6eurje5g9dzqjwaygxxdquvuas8fgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vqm0htv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0tumxlqejncxzmyg0vsvvhku7jykwyxttaxp853pcmss92qswrds0fkha5&#39;&gt;nevent1q…kha5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-21&lt;br/&gt;📝 Original message:&amp;gt; What if instead of trying to decide up front which subset of elements will&lt;br/&gt;&amp;gt; be most useful to include in the filters, and the size tradeoff, we let&lt;br/&gt;the&lt;br/&gt;&amp;gt; full-node decide which subsets of elements it serves filters for?&lt;br/&gt;&lt;br/&gt;This is already the case. The current &amp;#34;track&amp;#34; is to add new service bits&lt;br/&gt;(while we&amp;#39;re in the uncommitted phase) to introduce new fitler types. Light&lt;br/&gt;clients can then filter out nodes before even connecting to them.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;On Mon, May 21, 2018 at 1:35 AM Johan Torås Halseth &amp;lt;johanth at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Most light wallets will want to download the minimum amount of data&lt;br/&gt;&amp;gt; required to operate, which means they would ideally download the smallest&lt;br/&gt;&amp;gt; possible filters containing the subset of elements they need.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What if instead of trying to decide up front which subset of elements will&lt;br/&gt;&amp;gt; be most useful to include in the filters, and the size tradeoff, we let the&lt;br/&gt;&amp;gt; full-node decide which subsets of elements it serves filters for?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For instance, a full node would advertise that it could serve filters for&lt;br/&gt;&amp;gt; the subsets 110 (txid&#43;script&#43;outpoint), 100 (txid only), 011 (script&#43;outpoint)&lt;br/&gt;&amp;gt; etc. A light client could then choose to download the minimal filter type&lt;br/&gt;&amp;gt; covering its needs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The obvious benefit of this would be minimal bandwidth usage for the light&lt;br/&gt;&amp;gt; client, but there are also some less obvious ones. We wouldn’t have to&lt;br/&gt;&amp;gt; decide up front what each filter type should contain, only the possible&lt;br/&gt;&amp;gt; elements a filter can contain (more can be added later without breaking&lt;br/&gt;&amp;gt; existing clients). This, I think, would let the most served filter types&lt;br/&gt;&amp;gt; grow organically, with full-node implementations coming with sane defaults&lt;br/&gt;&amp;gt; for served filter types (maybe even all possible types as long as the&lt;br/&gt;&amp;gt; number of elements is small), letting their operator add/remove types at&lt;br/&gt;&amp;gt; will.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The main disadvantage of this as I see it, is that there’s an exponential&lt;br/&gt;&amp;gt; blowup in the number of possible filter types in the number of element&lt;br/&gt;&amp;gt; types. However, this would let us start out small with only the elements we&lt;br/&gt;&amp;gt; need, and in the worst case the node operators just choose to serve the&lt;br/&gt;&amp;gt; subsets corresponding to what now is called “regular” &#43; “extended” filters&lt;br/&gt;&amp;gt; anyway, requiring no more resources.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This would also give us some data on what is the most widely used filter&lt;br/&gt;&amp;gt; types, which could be useful in making the decision on what should be part&lt;br/&gt;&amp;gt; of filters to eventually commit to in blocks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Johan&lt;br/&gt;&amp;gt; On Sat, May 19, 2018 at 5:12, Olaoluwa Osuntokun 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; On Thu, May 17, 2018 at 2:44 PM Jim Posen via bitcoin-dev &amp;lt;bitcoin-&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Monitoring inputs by scriptPubkey vs input-txid also has a massive&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; advantage for parallel filtering: You can usually known your pubkeys&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; well in advance, but if you have to change what you&amp;#39;re watching block&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; N&#43;1 for based on the txids that paid you in N you can&amp;#39;t filter them&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; in parallel.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Yes, I&amp;#39;ll grant that this is a benefit of your suggestion.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yeah parallel filtering would be pretty nice. We&amp;#39;ve implemented a serial&lt;br/&gt;&amp;gt; filtering for btcwallet [1] for the use-case of rescanning after a seed&lt;br/&gt;&amp;gt; phrase import. Parallel filtering would help here, but also we don&amp;#39;t yet&lt;br/&gt;&amp;gt; take advantage of batch querying for the filters themselves. This would&lt;br/&gt;&amp;gt; speed up the scanning by quite a bit.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I really like the filtering model though, it really simplifies the code,&lt;br/&gt;&amp;gt; and we can leverage identical logic for btcd (which has RPCs to fetch the&lt;br/&gt;&amp;gt; filters) as well.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/Roasbeef/btcwallet/blob/master/chain/neutrino.go#L180&#34;&gt;https://github.com/Roasbeef/btcwallet/blob/master/chain/neutrino.go#L180&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________ bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&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/20180521/92b184b8/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180521/92b184b8/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:12:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq5z7v373affn72leddcw6utu2eusk588cu4aec5z7pjdy6jwj73gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v68gc3j</id>
    
      <title type="html">📅 Original date posted:2018-05-09 📝 Original message:&amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq5z7v373affn72leddcw6utu2eusk588cu4aec5z7pjdy6jwj73gzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v68gc3j" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswampuyz3t7m7y6nuenkc60my4yf9zchfa85defseq2tu5sqx9gdq6y3gkm&#39;&gt;nevent1q…3gkm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-09&lt;br/&gt;📝 Original message:&amp;gt; Instead, would you consider to use ANYONECANPAY to sign the tx, so it is&lt;br/&gt;&amp;gt; possible add more inputs for fees? The total tx size is bigger than the&lt;br/&gt;&amp;gt; OP_TRUE approach, but you don’t need to ask for any protocol change.&lt;br/&gt;&lt;br/&gt;If one has a &amp;#34;root&amp;#34; commitment with other nested descendent&lt;br/&gt;multi-transaction contracts, then changing the txid of the root commitment&lt;br/&gt;will invalidated all the nested multi tx contracts. In our specific case, we&lt;br/&gt;have pre-signed 2-stage HTLC transaction which rely on a stable txid. As a&lt;br/&gt;result, we can&amp;#39;t use the ANYONECANPAY approach atm.&lt;br/&gt;&lt;br/&gt;&amp;gt; In long-term, I think the right way is to have a more flexible SIGHASH&lt;br/&gt;&amp;gt; system to allow people to add more inputs and outputs easily.&lt;br/&gt;&lt;br/&gt;Agreed, see the recent proposal to introduce SIGHASH_NOINPUT as a new&lt;br/&gt;sighash type. IMO it presents an opportunity to introduce more flexible fine&lt;br/&gt;grained sighash inclusion control.&lt;br/&gt;&lt;br/&gt;-- Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, May 9, 2018 at 11:12 AM Johnson Lau 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; You should make a “0 fee tx with exactly one OP_TRUE output” standard, but&lt;br/&gt;&amp;gt; nothing else. This makes sure CPFP will always be needed, so the OP_TRUE&lt;br/&gt;&amp;gt; output won’t pollute the UTXO set&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Instead, would you consider to use ANYONECANPAY to sign the tx, so it is&lt;br/&gt;&amp;gt; possible add more inputs for fees? The total tx size is bigger than the&lt;br/&gt;&amp;gt; OP_TRUE approach, but you don’t need to ask for any protocol change.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In long-term, I think the right way is to have a more flexible SIGHASH&lt;br/&gt;&amp;gt; system to allow people to add more inputs and outputs easily.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On 9 May 2018, at 7:57 AM, Rusty Russell 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; Hi all,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;        The largest problem we are having today with the lightning&lt;br/&gt;&amp;gt; &amp;gt; protocol is trying to predict future fees.  Eltoo solves this elegantly,&lt;br/&gt;&amp;gt; &amp;gt; but meanwhile we would like to include a 546 satoshi OP_TRUE output in&lt;br/&gt;&amp;gt; &amp;gt; commitment transactions so that we use minimal fees and then use CPFP&lt;br/&gt;&amp;gt; &amp;gt; (which can&amp;#39;t be done at the moment due to CSV delays on outputs).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Unfortunately, we&amp;#39;d have to P2SH it at the moment as a raw &amp;#39;OP_TRUE&amp;#39; is&lt;br/&gt;&amp;gt; &amp;gt; non-standard.  Are there any reasons not to suggest such a policy&lt;br/&gt;&amp;gt; &amp;gt; change?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks!&lt;br/&gt;&amp;gt; &amp;gt; Rusty.&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;&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/20180509/e98eb0d4/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180509/e98eb0d4/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:11:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspzezkwmkjpexp70hnra0k6yd823t9th2n80gpr89lpa94sg4x5lszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v304le8</id>
    
      <title type="html">📅 Original date posted:2018-05-08 📝 Original message:What ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspzezkwmkjpexp70hnra0k6yd823t9th2n80gpr89lpa94sg4x5lszyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328v304le8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0xxrupzvjfte6rc2ax9k9n8sdnjg002xnz660ytg8uxckr2vqu0stmpspe&#39;&gt;nevent1q…pspe&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2018-05-08&lt;br/&gt;📝 Original message:What are the downsides of just using p2wsh? This route can be rolled out&lt;br/&gt;immediately, while policy changes are pretty &amp;#34;fuzzy&amp;#34; and would require a&lt;br/&gt;near uniform rollout in order to ensure wide propagation of the commitment&lt;br/&gt;transactions.&lt;br/&gt;&lt;br/&gt;On Tue, May 8, 2018, 4:58 PM Rusty Russell 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 all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;         The largest problem we are having today with the lightning&lt;br/&gt;&amp;gt; protocol is trying to predict future fees.  Eltoo solves this elegantly,&lt;br/&gt;&amp;gt; but meanwhile we would like to include a 546 satoshi OP_TRUE output in&lt;br/&gt;&amp;gt; commitment transactions so that we use minimal fees and then use CPFP&lt;br/&gt;&amp;gt; (which can&amp;#39;t be done at the moment due to CSV delays on outputs).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Unfortunately, we&amp;#39;d have to P2SH it at the moment as a raw &amp;#39;OP_TRUE&amp;#39; is&lt;br/&gt;&amp;gt; non-standard.  Are there any reasons not to suggest such a policy&lt;br/&gt;&amp;gt; change?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks!&lt;br/&gt;&amp;gt; Rusty.&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/20180509/63e18795/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180509/63e18795/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:11:54&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsr93wp2enunqk0ygh5lyy6ngcrx4qt6jsltle4v9fpsqtxygglypgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vthtjmg</id>
    
      <title type="html">📅 Original date posted:2015-08-06 📝 Original message:Other ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsr93wp2enunqk0ygh5lyy6ngcrx4qt6jsltle4v9fpsqtxygglypgzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vthtjmg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp2pmr9qpmycrt24xhfec93fhfxw8csrc9y0gpej80hy0274n3shctf4fzr&#39;&gt;nevent1q…4fzr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-08-06&lt;br/&gt;📝 Original message:Other than the source code, the best documentation I&amp;#39;ve come across is a few&lt;br/&gt;lines on IRC explaining the high-level design of the protocol:&lt;br/&gt;&lt;a href=&#34;https://botbot.me/freenode/bitcoin-wizards/2015-07-10/?msg=44146764&amp;amp;page=2&#34;&gt;https://botbot.me/freenode/bitcoin-wizards/2015-07-10/?msg=44146764&amp;amp;page=2&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Aug 6, 2015 at 10:18 AM Sergio Demian Lerner 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; Is there any up to date documentation about TheBlueMatt relay network&lt;br/&gt;&amp;gt; including what kind of block compression it is currently doing? (apart from&lt;br/&gt;&amp;gt; the source code)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards, Sergio.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Aug 5, 2015 at 7:14 PM, Gregory Maxwell 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; On Wed, Aug 5, 2015 at 9:19 PM, Arnoud Kouwenhoven - Pukaki Corp&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;arnoud at pukaki.bz&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Thanks for this (direct) feedback. It would make sense that if blocks&lt;br/&gt;&amp;gt;&amp;gt; can be&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; submitted using ~5kb packets, that no further optimizations would be&lt;br/&gt;&amp;gt;&amp;gt; needed&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; at this point. I will look into the relay network transmission protocol&lt;br/&gt;&amp;gt;&amp;gt; to&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; understand how it works!&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I hear that you are saying that this network solves speed of&lt;br/&gt;&amp;gt;&amp;gt; transmission&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; and thereby (technical) block size issues. Presumably it would solve&lt;br/&gt;&amp;gt;&amp;gt; speed&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; of block validation too by prevalidating transactions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Correct. Bitcoin Core has cached validation for many years now... if&lt;br/&gt;&amp;gt;&amp;gt; not for that and other optimizations, things would be really broken&lt;br/&gt;&amp;gt;&amp;gt; right now. :)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Assuming this is all&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; true, and I have no reason to doubt that at this point, I do not&lt;br/&gt;&amp;gt;&amp;gt; understand&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; why there is any discussion at all about the (technical) impact of large&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; blocks, why there are large numbers of miners building on invalid blocks&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; (SPV mining, &lt;a href=&#34;https://bitcoin.org/en/alert/2015-07-04-spv-mining&#34;&gt;https://bitcoin.org/en/alert/2015-07-04-spv-mining&lt;/a&gt;), or&lt;br/&gt;&amp;gt;&amp;gt; why&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; there is any discussion about the speed of block validation (cpu&lt;br/&gt;&amp;gt;&amp;gt; processing&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; time to verify blocks and transactions in blocks being a limitation).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;m also mystified by a lot of the large block discussion, much of it&lt;br/&gt;&amp;gt;&amp;gt; is completely divorced from the technology as deployed; much less what&lt;br/&gt;&amp;gt;&amp;gt; we-- in industry-- know to be possible. I don&amp;#39;t blame you or anyone in&lt;br/&gt;&amp;gt;&amp;gt; particular on this; it&amp;#39;s a new area and we don&amp;#39;t yet know what we need&lt;br/&gt;&amp;gt;&amp;gt; to know to know what we need to know; or to the extent that we do it&lt;br/&gt;&amp;gt;&amp;gt; hasn&amp;#39;t had time to get effectively communicated.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The technical/security implications of larger blocks are related to&lt;br/&gt;&amp;gt;&amp;gt; other things than propagation time, if you assume people are using the&lt;br/&gt;&amp;gt;&amp;gt; available efficient relay protocol (or better).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; SPV mining is a bit of a misnomer (If I coined the term, I&amp;#39;m sorry).&lt;br/&gt;&amp;gt;&amp;gt; What these parties are actually doing is blinding mining on top of&lt;br/&gt;&amp;gt;&amp;gt; other pools&amp;#39; stratum work. You can think of it as sub-pooling with&lt;br/&gt;&amp;gt;&amp;gt; hopping onto whatever pool has the highest block (I&amp;#39;ll call it VFSSP&lt;br/&gt;&amp;gt;&amp;gt; in this post-- validation free stratum subpooling).  It&amp;#39;s very easy to&lt;br/&gt;&amp;gt;&amp;gt; implement, and there are other considerations.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; It was initially deployed at a time when a single pool in Europe has&lt;br/&gt;&amp;gt;&amp;gt; amassed more than half of the hashrate. This pool had propagation&lt;br/&gt;&amp;gt;&amp;gt; problems and a very high orphan rate, it may have (perhaps&lt;br/&gt;&amp;gt;&amp;gt; unintentionally) been performing a selfish mining attack; mining off&lt;br/&gt;&amp;gt;&amp;gt; their stratum work was an easy fix which massively cut down the orphan&lt;br/&gt;&amp;gt;&amp;gt; rates for anyone who did it.  This was before the relay network&lt;br/&gt;&amp;gt;&amp;gt; protocol existed (the fact that all the hashpower was consolidating on&lt;br/&gt;&amp;gt;&amp;gt; a single pool was a major motivation for creating it).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; VFSSP also cuts through a number of practical issues miners have had:&lt;br/&gt;&amp;gt;&amp;gt; Miners that run their own bitcoin nodes in far away colocation&lt;br/&gt;&amp;gt;&amp;gt; (&amp;gt;100ms) due to local bandwidth or connectivity issues (censored&lt;br/&gt;&amp;gt;&amp;gt; internet); relay network hubs not being anywhere near by due to&lt;br/&gt;&amp;gt;&amp;gt; strange internet routing (e.g. japan to china going via the US for ...&lt;br/&gt;&amp;gt;&amp;gt; reasons...); the CreateNewBlock() function being very slow and&lt;br/&gt;&amp;gt;&amp;gt; unoptimized, etc.   There are many other things like this-- and VFSSP&lt;br/&gt;&amp;gt;&amp;gt; avoids them causing delays even when you don&amp;#39;t understand them or know&lt;br/&gt;&amp;gt;&amp;gt; about them. So even when they&amp;#39;re easily fixed the VFSSP is a more&lt;br/&gt;&amp;gt;&amp;gt; general workaround.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Mining operations are also usually operated in a largely fire and&lt;br/&gt;&amp;gt;&amp;gt; forget manner. There is a long history in (esp pooled) mining where&lt;br/&gt;&amp;gt;&amp;gt; someone sets up an operation and then hardly maintains it after the&lt;br/&gt;&amp;gt;&amp;gt; fact... so some of the use of VFSSP appears to just be inertia-- we&lt;br/&gt;&amp;gt;&amp;gt; have better solutions now, but they they work to deploy and changing&lt;br/&gt;&amp;gt;&amp;gt; things involves risk (which is heightened by a lack of good&lt;br/&gt;&amp;gt;&amp;gt; monitoring-- participants learn they are too latent by observing&lt;br/&gt;&amp;gt;&amp;gt; orphaned blocks at a cost of 25 BTC each).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; One of the frustrating things about incentives in this space is that&lt;br/&gt;&amp;gt;&amp;gt; bad outcomes are possible even when they&amp;#39;re not necessary. E.g. if a&lt;br/&gt;&amp;gt;&amp;gt; miner can lower their orphan rate by deploying a new protocol (or&lt;br/&gt;&amp;gt;&amp;gt; simply fixing some faulty hardware in their infrastructure, like&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin nodes running on cheap VPSes with remote storage)  OR they can&lt;br/&gt;&amp;gt;&amp;gt; lower their orphan rate by pointing their hashpower at a free&lt;br/&gt;&amp;gt;&amp;gt; centeralized pool, they&amp;#39;re likely to do the latter because it takes&lt;br/&gt;&amp;gt;&amp;gt; less effort.&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; _______________________________________________&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/20150806/1a6f12be/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150806/1a6f12be/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T19:33:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsywja3egeq82xmp0z74c32s93u0dcw6geszyfgvqt0zquvsq6auxqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vdv5qy7</id>
    
      <title type="html">📅 Original date posted:2015-08-06 📝 Original message:Other ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsywja3egeq82xmp0z74c32s93u0dcw6geszyfgvqt0zquvsq6auxqzyqkl8lpxvpze2gdc2tyet48ur2fe8quf5hsg2emap6an8muje328vdv5qy7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw37rjxjsfyderevyg3tnc783dmq2zh5ym3uasqdhy3r9wwymq7gc9hjk8f&#39;&gt;nevent1q…jk8f&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2015-08-06&lt;br/&gt;📝 Original message:Other than the source code, the best documentation I&amp;#39;ve come across is a few&lt;br/&gt;lines on IRC explaining the high-level design of the protocol:&lt;br/&gt;&lt;a href=&#34;https://botbot.me/freenode/bitcoin-wizards/2015-07-10/?msg=44146764&amp;amp;page=2&#34;&gt;https://botbot.me/freenode/bitcoin-wizards/2015-07-10/?msg=44146764&amp;amp;page=2&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;On Thu, Aug 6, 2015 at 10:18 AM Sergio Demian Lerner 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; Is there any up to date documentation about TheBlueMatt relay network&lt;br/&gt;&amp;gt; including what kind of block compression it is currently doing? (apart from&lt;br/&gt;&amp;gt; the source code)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards, Sergio.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Aug 5, 2015 at 7:14 PM, Gregory Maxwell 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; On Wed, Aug 5, 2015 at 9:19 PM, Arnoud Kouwenhoven - Pukaki Corp&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;arnoud at pukaki.bz&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Thanks for this (direct) feedback. It would make sense that if blocks&lt;br/&gt;&amp;gt;&amp;gt; can be&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; submitted using ~5kb packets, that no further optimizations would be&lt;br/&gt;&amp;gt;&amp;gt; needed&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; at this point. I will look into the relay network transmission protocol&lt;br/&gt;&amp;gt;&amp;gt; to&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; understand how it works!&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I hear that you are saying that this network solves speed of&lt;br/&gt;&amp;gt;&amp;gt; transmission&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; and thereby (technical) block size issues. Presumably it would solve&lt;br/&gt;&amp;gt;&amp;gt; speed&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; of block validation too by prevalidating transactions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Correct. Bitcoin Core has cached validation for many years now... if&lt;br/&gt;&amp;gt;&amp;gt; not for that and other optimizations, things would be really broken&lt;br/&gt;&amp;gt;&amp;gt; right now. :)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Assuming this is all&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; true, and I have no reason to doubt that at this point, I do not&lt;br/&gt;&amp;gt;&amp;gt; understand&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; why there is any discussion at all about the (technical) impact of large&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; blocks, why there are large numbers of miners building on invalid blocks&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; (SPV mining, &lt;a href=&#34;https://bitcoin.org/en/alert/2015-07-04-spv-mining&#34;&gt;https://bitcoin.org/en/alert/2015-07-04-spv-mining&lt;/a&gt;), or&lt;br/&gt;&amp;gt;&amp;gt; why&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; there is any discussion about the speed of block validation (cpu&lt;br/&gt;&amp;gt;&amp;gt; processing&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; time to verify blocks and transactions in blocks being a limitation).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;m also mystified by a lot of the large block discussion, much of it&lt;br/&gt;&amp;gt;&amp;gt; is completely divorced from the technology as deployed; much less what&lt;br/&gt;&amp;gt;&amp;gt; we-- in industry-- know to be possible. I don&amp;#39;t blame you or anyone in&lt;br/&gt;&amp;gt;&amp;gt; particular on this; it&amp;#39;s a new area and we don&amp;#39;t yet know what we need&lt;br/&gt;&amp;gt;&amp;gt; to know to know what we need to know; or to the extent that we do it&lt;br/&gt;&amp;gt;&amp;gt; hasn&amp;#39;t had time to get effectively communicated.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The technical/security implications of larger blocks are related to&lt;br/&gt;&amp;gt;&amp;gt; other things than propagation time, if you assume people are using the&lt;br/&gt;&amp;gt;&amp;gt; available efficient relay protocol (or better).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; SPV mining is a bit of a misnomer (If I coined the term, I&amp;#39;m sorry).&lt;br/&gt;&amp;gt;&amp;gt; What these parties are actually doing is blinding mining on top of&lt;br/&gt;&amp;gt;&amp;gt; other pools&amp;#39; stratum work. You can think of it as sub-pooling with&lt;br/&gt;&amp;gt;&amp;gt; hopping onto whatever pool has the highest block (I&amp;#39;ll call it VFSSP&lt;br/&gt;&amp;gt;&amp;gt; in this post-- validation free stratum subpooling).  It&amp;#39;s very easy to&lt;br/&gt;&amp;gt;&amp;gt; implement, and there are other considerations.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; It was initially deployed at a time when a single pool in Europe has&lt;br/&gt;&amp;gt;&amp;gt; amassed more than half of the hashrate. This pool had propagation&lt;br/&gt;&amp;gt;&amp;gt; problems and a very high orphan rate, it may have (perhaps&lt;br/&gt;&amp;gt;&amp;gt; unintentionally) been performing a selfish mining attack; mining off&lt;br/&gt;&amp;gt;&amp;gt; their stratum work was an easy fix which massively cut down the orphan&lt;br/&gt;&amp;gt;&amp;gt; rates for anyone who did it.  This was before the relay network&lt;br/&gt;&amp;gt;&amp;gt; protocol existed (the fact that all the hashpower was consolidating on&lt;br/&gt;&amp;gt;&amp;gt; a single pool was a major motivation for creating it).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; VFSSP also cuts through a number of practical issues miners have had:&lt;br/&gt;&amp;gt;&amp;gt; Miners that run their own bitcoin nodes in far away colocation&lt;br/&gt;&amp;gt;&amp;gt; (&amp;gt;100ms) due to local bandwidth or connectivity issues (censored&lt;br/&gt;&amp;gt;&amp;gt; internet); relay network hubs not being anywhere near by due to&lt;br/&gt;&amp;gt;&amp;gt; strange internet routing (e.g. japan to china going via the US for ...&lt;br/&gt;&amp;gt;&amp;gt; reasons...); the CreateNewBlock() function being very slow and&lt;br/&gt;&amp;gt;&amp;gt; unoptimized, etc.   There are many other things like this-- and VFSSP&lt;br/&gt;&amp;gt;&amp;gt; avoids them causing delays even when you don&amp;#39;t understand them or know&lt;br/&gt;&amp;gt;&amp;gt; about them. So even when they&amp;#39;re easily fixed the VFSSP is a more&lt;br/&gt;&amp;gt;&amp;gt; general workaround.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Mining operations are also usually operated in a largely fire and&lt;br/&gt;&amp;gt;&amp;gt; forget manner. There is a long history in (esp pooled) mining where&lt;br/&gt;&amp;gt;&amp;gt; someone sets up an operation and then hardly maintains it after the&lt;br/&gt;&amp;gt;&amp;gt; fact... so some of the use of VFSSP appears to just be inertia-- we&lt;br/&gt;&amp;gt;&amp;gt; have better solutions now, but they they work to deploy and changing&lt;br/&gt;&amp;gt;&amp;gt; things involves risk (which is heightened by a lack of good&lt;br/&gt;&amp;gt;&amp;gt; monitoring-- participants learn they are too latent by observing&lt;br/&gt;&amp;gt;&amp;gt; orphaned blocks at a cost of 25 BTC each).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; One of the frustrating things about incentives in this space is that&lt;br/&gt;&amp;gt;&amp;gt; bad outcomes are possible even when they&amp;#39;re not necessary. E.g. if a&lt;br/&gt;&amp;gt;&amp;gt; miner can lower their orphan rate by deploying a new protocol (or&lt;br/&gt;&amp;gt;&amp;gt; simply fixing some faulty hardware in their infrastructure, like&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin nodes running on cheap VPSes with remote storage)  OR they can&lt;br/&gt;&amp;gt;&amp;gt; lower their orphan rate by pointing their hashpower at a free&lt;br/&gt;&amp;gt;&amp;gt; centeralized pool, they&amp;#39;re likely to do the latter because it takes&lt;br/&gt;&amp;gt;&amp;gt; less effort.&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; _______________________________________________&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/20150806/1a6f12be/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150806/1a6f12be/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T17:45:27&#43;02:00</updated>
  </entry>

</feed>