<?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/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s.rss" />
  <link href="https://nostr.ae/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s" />
  <id>https://nostr.ae/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqsda9shh0d606zgawqzwj9pm7a6gejrvnllfyl3hamhy4lk72chw0szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukrzhamd</id>
    
      <title type="html">📅 Original date posted:2023-09-08 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsda9shh0d606zgawqzwj9pm7a6gejrvnllfyl3hamhy4lk72chw0szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukrzhamd" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0d367q6uz9mycpnvd5rrcy945nkmh7vh9xz6spmsdgvavv5ptehqqgu46k&#39;&gt;nevent1q…u46k&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-08&lt;br/&gt;🗒️ Summary of this message: The discussion is about implementing security measures for RPC calls in a lightning node, either using Bolt 8 or managing runes inside a hardware security module (HSM). The configuration of access control on the lightning node side is also mentioned.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey Christian,&lt;br/&gt;&lt;br/&gt;You&amp;#39;re right, if we create runes inside the HSM then we end up with the&lt;br/&gt;same security model.&lt;br/&gt;It then boils down to whether we&amp;#39;d rather implement Bolt 8 or rune&lt;br/&gt;management inside an HSM!&lt;br/&gt;I&amp;#39;d prefer Bolt 8, as I think it has more universality (and is simpler),&lt;br/&gt;but it could be worth experimenting with both approaches.&lt;br/&gt;&lt;br/&gt;It will also be interesting to see how we actually configure rights (access&lt;br/&gt;control) on the lightning node side.&lt;br/&gt;That really deserves some implementation work to flesh out that kind of&lt;br/&gt;details.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le ven. 8 sept. 2023 à 16:51, Christian Decker &amp;lt;decker.christian at gmail.com&amp;gt;&lt;br/&gt;a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Very interesting proposal, though as Will points out we could implement&lt;br/&gt;&amp;gt; the same using runes: have the rune be managed by the hardware wallet, and&lt;br/&gt;&amp;gt; commit the rune used to authenticate the RPC call commit to the call&amp;#39;s&lt;br/&gt;&amp;gt; payload. That way a potentially compromised client cannot authenticate&lt;br/&gt;&amp;gt; arbitrary calls, since the hardware wallet is required to associate a rune&lt;br/&gt;&amp;gt; with it, giving it a chance for review.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is similar to how authentication of RPC calls works in greenlight,&lt;br/&gt;&amp;gt; where the node host is not trusted, and we need to pass the authenticated&lt;br/&gt;&amp;gt; commands forward to the signer for verification before processing any&lt;br/&gt;&amp;gt; signature request from the node. We chose to authenticate the payload&lt;br/&gt;&amp;gt; rather than the transport (which is what partonnere does) because it&lt;br/&gt;&amp;gt; removes the need for a direct connection, and adds flexibility to how we&lt;br/&gt;&amp;gt; can deliver the commands. Functionally they are very similar however.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Christian&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thu, Sep 7, 2023, 15:06 Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi William,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; What is wrong with runes/macaroons for validating and authenticating&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; commands?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Runes/macaroons don&amp;#39;t provide any protection if the machine you are&lt;br/&gt;&amp;gt;&amp;gt; issuing the RPCs from is compromised. The attacker can change the&lt;br/&gt;&amp;gt;&amp;gt; parameters of your RPC call and your lightning node will still gladly&lt;br/&gt;&amp;gt;&amp;gt; execute it.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; I can&amp;#39;t imagine validating every RPC request with a hardware&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; device and trusted display, unless you have some specific use case in&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; mind.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think that this is because you have the wrong idea of which RPCs&lt;br/&gt;&amp;gt;&amp;gt; this is supposed to protect. This is useful for the RPCs that actually&lt;br/&gt;&amp;gt;&amp;gt; involve paying something (channel open, channel close, pay invoice).&lt;br/&gt;&amp;gt;&amp;gt; This isn&amp;#39;t useful for &amp;#34;read&amp;#34; RPCs (listing channels).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Making an on-chain operation or paying an invoice is something that is&lt;br/&gt;&amp;gt;&amp;gt; infrequent enough for the vast majority of nodes that it makes sense&lt;br/&gt;&amp;gt;&amp;gt; to validate it manually. Also, this is fully configurable: you can&lt;br/&gt;&amp;gt;&amp;gt; choose which RPCs you want to protect that way and which RPCs you want&lt;br/&gt;&amp;gt;&amp;gt; to keep open.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Le mer. 6 sept. 2023 à 17:42, William Casarin &amp;lt;jb55 at jb55.com&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; On Wed, Sep 06, 2023 at 03:32:50AM &#43;0200, Bastien TEINTURIER wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;Hey Zman,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;I saw the announcement about the commando plugin, and it was actually&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;one of the reasons I wanted to write up what I had in mind, because&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;while commando also uses a lightning connection to send commands to a&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;lightning node, it was missing what in my opinion is the most important&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;part: having all of Bolt 8 handled by the HSM and validating commands&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;using a trusted display.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; What is wrong with runes/macaroons for validating and authenticating&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; commands? I can&amp;#39;t imagine validating every RPC request with a hardware&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; device and trusted display, unless you have some specific use case in&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; mind.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;         Will&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/20230909/3408f167/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230909/3408f167/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-09-12T10:59:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszk97l9qlcps4vpxhjjhvfe6xmg6ta3f3gg4hkdmvucpz7uryh5jszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukhg6nkz</id>
    
      <title type="html">📅 Original date posted:2023-09-07 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszk97l9qlcps4vpxhjjhvfe6xmg6ta3f3gg4hkdmvucpz7uryh5jszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukhg6nkz" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgc49elyra2aquds76lpkan4vfkpan2jg42a3z0npcc3uxtqu4d8gz3f0hc&#39;&gt;nevent1q…f0hc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-09-07&lt;br/&gt;🗒️ Summary of this message: Runes/macaroons don&amp;#39;t protect against compromised machines. Validating RPCs manually is useful for payment-related operations, not for &amp;#34;read&amp;#34; RPCs.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi William,&lt;br/&gt;&lt;br/&gt;&amp;gt; What is wrong with runes/macaroons for validating and authenticating&lt;br/&gt;&amp;gt; commands?&lt;br/&gt;&lt;br/&gt;Runes/macaroons don&amp;#39;t provide any protection if the machine you are&lt;br/&gt;issuing the RPCs from is compromised. The attacker can change the&lt;br/&gt;parameters of your RPC call and your lightning node will still gladly&lt;br/&gt;execute it.&lt;br/&gt;&lt;br/&gt;&amp;gt; I can&amp;#39;t imagine validating every RPC request with a hardware&lt;br/&gt;&amp;gt; device and trusted display, unless you have some specific use case in&lt;br/&gt;&amp;gt; mind.&lt;br/&gt;&lt;br/&gt;I think that this is because you have the wrong idea of which RPCs&lt;br/&gt;this is supposed to protect. This is useful for the RPCs that actually&lt;br/&gt;involve paying something (channel open, channel close, pay invoice).&lt;br/&gt;This isn&amp;#39;t useful for &amp;#34;read&amp;#34; RPCs (listing channels).&lt;br/&gt;&lt;br/&gt;Making an on-chain operation or paying an invoice is something that is&lt;br/&gt;infrequent enough for the vast majority of nodes that it makes sense&lt;br/&gt;to validate it manually. Also, this is fully configurable: you can&lt;br/&gt;choose which RPCs you want to protect that way and which RPCs you want&lt;br/&gt;to keep open.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mer. 6 sept. 2023 à 17:42, William Casarin &amp;lt;jb55 at jb55.com&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Sep 06, 2023 at 03:32:50AM &#43;0200, Bastien TEINTURIER wrote:&lt;br/&gt;&amp;gt; &amp;gt;Hey Zman,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;I saw the announcement about the commando plugin, and it was actually&lt;br/&gt;&amp;gt; &amp;gt;one of the reasons I wanted to write up what I had in mind, because&lt;br/&gt;&amp;gt; &amp;gt;while commando also uses a lightning connection to send commands to a&lt;br/&gt;&amp;gt; &amp;gt;lightning node, it was missing what in my opinion is the most important&lt;br/&gt;&amp;gt; &amp;gt;part: having all of Bolt 8 handled by the HSM and validating commands&lt;br/&gt;&amp;gt; &amp;gt;using a trusted display.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What is wrong with runes/macaroons for validating and authenticating&lt;br/&gt;&amp;gt; commands? I can&amp;#39;t imagine validating every RPC request with a hardware&lt;br/&gt;&amp;gt; device and trusted display, unless you have some specific use case in&lt;br/&gt;&amp;gt; mind.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;         Will&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/20230907/eaf3421b/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230907/eaf3421b/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-09-12T10:59:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8l83g8sf9m9d7k44z0pgrmp4n0w9jympdsgcf5w34wydwmtd7kygzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukdlvlgj</id>
    
      <title type="html">📅 Original date posted:2023-08-16 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8l83g8sf9m9d7k44z0pgrmp4n0w9jympdsgcf5w34wydwmtd7kygzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukdlvlgj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqd0h558f4g0ev7ud7zrt8s0narqf2wk02vmw906p0k8wgv2xz37q889gpc&#39;&gt;nevent1q…9gpc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-08-16&lt;br/&gt;🗒️ Summary of this message: The author argues that fraud proofs for Lightning channels are unnecessary and dangerous, suggesting that mobile wallets can check the state of returned backups to prevent cheating. They also mention a BOLT PR for backups.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Thomas,&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think those fraud proofs are necessary at all. They&amp;#39;re also&lt;br/&gt;dangerous, because they impose a hard penalty on LSPs for something&lt;br/&gt;that should be best effort (and could get desynchronized by connection&lt;br/&gt;issues, especially with flaky mobile connections).&lt;br/&gt;&lt;br/&gt;I agree with Peter Todd that since the mobile wallet can check the state&lt;br/&gt;of the returned backup at every connection request, this makes it highly&lt;br/&gt;unlikely that the LSP can cheat: that&amp;#39;s the approach we&amp;#39;ve taken for&lt;br/&gt;Phoenix.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m surprised that you don&amp;#39;t mention the BOLT PR we created for those&lt;br/&gt;backups in [1], I believe that is sufficient. It should probably be&lt;br/&gt;moved to a blip instead of a BOLT once we&amp;#39;ve implemented this version&lt;br/&gt;(the approach we use in Phoenix currently is slightly different), but&lt;br/&gt;apart from that it contains all the mechanisms necessary to achieve&lt;br/&gt;this today.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/lightning/bolts/pull/881&#34;&gt;https://github.com/lightning/bolts/pull/881&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Le mar. 15 août 2023 à 05:52, Thomas Voegtlin &amp;lt;thomasv at electrum.org&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hello list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here is an idea to make lightning channels resumable from wallet seed.&lt;br/&gt;&amp;gt; I have not implemented it yet, and there might be issues I am not&lt;br/&gt;&amp;gt; seeing. Thus, I would be grateful for feedback.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks to SomberNight and Peter Todd for reviewing earlier versions of&lt;br/&gt;&amp;gt; this proposal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thomas&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; Resumable channels using OP_CHECKSIGFROMSTACK&lt;br/&gt;&amp;gt; =============================================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to resume the activity of a Lightning channel, one needs a&lt;br/&gt;&amp;gt; backup that contains all the information about the current channel&lt;br/&gt;&amp;gt; state. The need to perform channel backups has plagued user&lt;br/&gt;&amp;gt; experience, with many implementations reverting to static backups,&lt;br/&gt;&amp;gt; which can be used to recover funds, but not to resume channel&lt;br/&gt;&amp;gt; operations.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Asking your channel counterparty to store your channel state has the&lt;br/&gt;&amp;gt; advantage to make backup operations atomic. However, there is no&lt;br/&gt;&amp;gt; guarantee that this is safe. Indeed, if the other party suspects that&lt;br/&gt;&amp;gt; you have lost your state (for example, because you have been offline&lt;br/&gt;&amp;gt; for a long time, or if they can see that you requested blockchain&lt;br/&gt;&amp;gt; information following a certain pattern), they can try to send you a&lt;br/&gt;&amp;gt; revoked state, and there is no way to punish them for doing that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here is a proposal for a new type of channel funding transaction,&lt;br/&gt;&amp;gt; where the redeem script has an additional spending path, that accepts&lt;br/&gt;&amp;gt; a fraud proof: a proof that the channel counterparty has lied about&lt;br/&gt;&amp;gt; the current state. This proposal requires two opcodes that are&lt;br/&gt;&amp;gt; currently not available in Bitcoin: OP_CAT and OP_CHECKSIGFROMSTACK.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Roles are asymmetric in this channel: Alice is a client, and Bob is a&lt;br/&gt;&amp;gt; server, who stores Alice&amp;#39;s state. Thus, this proposal is mostly suited&lt;br/&gt;&amp;gt; for private channels with Lightning service providers. During channel&lt;br/&gt;&amp;gt; reestablishment, Bob will send her latest state to Alice, using an&lt;br/&gt;&amp;gt; extra field in the channel_reestablish message. Since Alice cannot&lt;br/&gt;&amp;gt; punish Bob if she has lost her state, she must not let Bob learn&lt;br/&gt;&amp;gt; whether she still has her state. Thus, Alice will never send&lt;br/&gt;&amp;gt; channel_reestablish first.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This proposal assumes that Alice and Bob each have a clock, and that&lt;br/&gt;&amp;gt; these clocks do not drift too much relative to each other. The channel&lt;br/&gt;&amp;gt; may become unusable if clocks differ too much, as discussed below.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Simplified description&lt;br/&gt;&amp;gt; ----------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The *state* of the channel refers to everything Alice needs in order&lt;br/&gt;&amp;gt; to resume channel operations. With every new commitment, Alice sends&lt;br/&gt;&amp;gt; her current state, with her signature of that state:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - if Alice sends commitment_signed, the state and signature are&lt;br/&gt;&amp;gt;     included in that message.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - if Alice receives commitment_signed, the state and signature will&lt;br/&gt;&amp;gt;     be included in the next revoke_and_ack sent by Alice.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With every new commitment, Bob sends a signed tuple (ctn, timestamp),&lt;br/&gt;&amp;gt; where ctn is the current commitment number (for the moment, forget&lt;br/&gt;&amp;gt; about the distinction between local and remote ctns), and timestamp is&lt;br/&gt;&amp;gt; the current time for Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - if Bob sends commitment_signed, the signed tuple is included in&lt;br/&gt;&amp;gt;     that message.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - if Bob receives commitment_signed, the signed tuple will be&lt;br/&gt;&amp;gt;     included in the next revoke_and_ack sent by Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The private key used by Bob to sign the tuples is constant over the&lt;br/&gt;&amp;gt; lifetime of the channel, and it must not be reused in other&lt;br/&gt;&amp;gt; channels. The corresponding public key will be used in the fraud proof&lt;br/&gt;&amp;gt; spending path of the redeem script.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice verifies Bob&amp;#39;s signature. She also checks that the received&lt;br/&gt;&amp;gt; timestamps are reasonable (see below) and strictly monotonic.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With every channel_reestablish message, Bob will send two extra fields:&lt;br/&gt;&amp;gt;   - (ctn, timestamp, bob_signature)&lt;br/&gt;&amp;gt;   - (alice_state, alice_signature).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice verifies that the state she received was signed by her, and that&lt;br/&gt;&amp;gt; the (ctn, timestamp) tuple was signed by Bob. She also checks that the&lt;br/&gt;&amp;gt; timestamp is reasonable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Fraud Proofs&lt;br/&gt;&amp;gt; ------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let us assume that Bob tries to send a revoked state to Alice in&lt;br/&gt;&amp;gt; channel_reestablish. The channel_reestablish received by Alice&lt;br/&gt;&amp;gt; contains a signed tuple (ctn1, t1), with t1 current timestamp.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, another signed tuple (ctn2, t2) has been received in the&lt;br/&gt;&amp;gt; past, with ctn1 &amp;lt; ctn2 and t1 &amp;gt; t2.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If Alice has not lost her state, she will now hold two signed tuples&lt;br/&gt;&amp;gt; (ctn1, t1) and (ctn2, t2), that satisfy ctn1 &amp;lt; ctn2 and t1 &amp;gt; t2.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This constitutes a fraud proof. With OP_CAT and OP_CHECKSIGFROMSTACK,&lt;br/&gt;&amp;gt; we can build a script that verifies the fraud proof, and allows Alice&lt;br/&gt;&amp;gt; to unilaterally spend the channel funding output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here is an example of such a script:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; witness:&lt;br/&gt;&amp;gt; [&lt;br/&gt;&amp;gt;   alice_signature(transaction)&lt;br/&gt;&amp;gt;   bob_signature((ctn1,timestamp1))&lt;br/&gt;&amp;gt;   ctn1&lt;br/&gt;&amp;gt;   timestamp1&lt;br/&gt;&amp;gt;   bob_signature((ctn2,timestamp2))&lt;br/&gt;&amp;gt;   ctn2&lt;br/&gt;&amp;gt;   timestamp2&lt;br/&gt;&amp;gt; ]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; witness_script:&lt;br/&gt;&amp;gt;   OP_PICK 1&lt;br/&gt;&amp;gt;   OP_PICK 4&lt;br/&gt;&amp;gt;   OP_LESSTHAN                 # verify ctn1 &amp;lt; ctn2&lt;br/&gt;&amp;gt;   OP_VERIFY&lt;br/&gt;&amp;gt;   OP_PICK 0&lt;br/&gt;&amp;gt;   OP_PICK 3&lt;br/&gt;&amp;gt;   OP_GREATERTHANOREQUAL       # verify timestamp1 &amp;gt;= timestamp2&lt;br/&gt;&amp;gt;   OP_VERIFY&lt;br/&gt;&amp;gt;   # check signatures&lt;br/&gt;&amp;gt;   OP_CAT&lt;br/&gt;&amp;gt;   OP_PUSHDATA bob_pubkey      # we may use Bob&amp;#39;s funding_pubkey&lt;br/&gt;&amp;gt;   OP_CHECKSIGFROMSTACK&lt;br/&gt;&amp;gt;   OP_VERIFY&lt;br/&gt;&amp;gt;   OP_CAT&lt;br/&gt;&amp;gt;   OP_PUSHDATA bob_pubkey&lt;br/&gt;&amp;gt;   OP_CHECKSIGFROMSTACK&lt;br/&gt;&amp;gt;   OP_VERIFY&lt;br/&gt;&amp;gt;   OP_PUSHDATA alice_pubkey    # we may use Alice&amp;#39;s funding_pubkey&lt;br/&gt;&amp;gt;   OP_CHECKSIGVERIFY&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to keep things simple, a few details have been omitted in the&lt;br/&gt;&amp;gt; description:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - Bob actually needs to send both the local and the remote ctns in&lt;br/&gt;&amp;gt;     his signed tuples. A pair of tuples is a fraud proof if the order&lt;br/&gt;&amp;gt;     is violated for either local or remote ctns. Thus, the actual&lt;br/&gt;&amp;gt;     script will be more complex than what has been drafted above.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - Integers pushed on the Bitcoin stack are maximum 4 bytes (31 bits &#43;&lt;br/&gt;&amp;gt;     1 bit for the sign). Since commitment numbers are 48 bits long,&lt;br/&gt;&amp;gt;     they will need to be split into two integers. Timestamps might&lt;br/&gt;&amp;gt;     require a similar decomposition. This adds further complexity to&lt;br/&gt;&amp;gt;     the redeem script.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - Note that Bob must strictly increase his timestamp on each&lt;br/&gt;&amp;gt;     ctn. This puts a lower bound on the precision used for timestamps.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Reasonable Timestamps&lt;br/&gt;&amp;gt; ---------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since Alice and Bob do not have the same clock, Bob may legitimately&lt;br/&gt;&amp;gt; send a timestamp that is in Alice&amp;#39;s past or future. Every time Alice&lt;br/&gt;&amp;gt; receives a timestamp from Bob, she compares it to her current time.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - If Alice receives a timestamp that is in her future, instead of&lt;br/&gt;&amp;gt;     closing the channel, she may wait it out before she accepts to&lt;br/&gt;&amp;gt;     resume operations.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - If Alice receives a timestamp that is too far in her past, she&lt;br/&gt;&amp;gt;     should disconnect. Indeed, Bob may be sending an old state and&lt;br/&gt;&amp;gt;     replaying old timestamps, which is not punishable. In that case,&lt;br/&gt;&amp;gt;     Alice should not automatically force close the channel, because she&lt;br/&gt;&amp;gt;     can only do that if she has not lost her state; if force-closing&lt;br/&gt;&amp;gt;     was automatic, not force-closing would reveal to Bob that she&lt;br/&gt;&amp;gt;     has lost her state.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A delay needs to be tolerated by Alice, because Bob does not have the&lt;br/&gt;&amp;gt; same clock; that delay should be chosen so that it is always smaller&lt;br/&gt;&amp;gt; than the interval between two sessions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Saving Bandwidth&lt;br/&gt;&amp;gt; ----------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice&amp;#39;s channel state does not need to be sent with every commitment,&lt;br/&gt;&amp;gt; if it is made of information that is known by both parties. In that&lt;br/&gt;&amp;gt; case, it is sufficient for Alice to send her signature of the current&lt;br/&gt;&amp;gt; state. Both Alice and Bob must be able to serialize the state, so that&lt;br/&gt;&amp;gt; Alice can verify her own signature against a serialization of the&lt;br/&gt;&amp;gt; state created by Bob. The state only needs to be sent by Bob once, in&lt;br/&gt;&amp;gt; channel_reestablish.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For this to work, the channel state cannot include information that is&lt;br/&gt;&amp;gt; private to Alice. If the private keys used by Alice in the channel are&lt;br/&gt;&amp;gt; derived deterministically from her wallet seed, they do not need to be&lt;br/&gt;&amp;gt; part of the state. Alternatively, private keys may be included in an&lt;br/&gt;&amp;gt; encrypted blob that is included in the state. Since that encrypted&lt;br/&gt;&amp;gt; blob is constant, it only needs to be sent once by Alice, during the&lt;br/&gt;&amp;gt; channel opening negotiation. Bob will save it and add it to the state&lt;br/&gt;&amp;gt; sent in channel_reestablish.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In addition, the state must not include any payment_hash preimage&lt;br/&gt;&amp;gt; known by Alice; thus, Alice will have to fail incoming payments for&lt;br/&gt;&amp;gt; those preimages, if she has lost her state.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The channel state should include the compact storage of per-commitment&lt;br/&gt;&amp;gt; secrets sent by Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Concluding remarks&lt;br/&gt;&amp;gt; ------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - Obviously, this proposal assumes that Alice remembers with whom she&lt;br/&gt;&amp;gt;     has an open channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - Alice may restore her wallet from seed on a new device, while the&lt;br/&gt;&amp;gt;     initial wallet is still active. In that case, Alice must stop using&lt;br/&gt;&amp;gt;     the channels on her old device. Thus, Alice should disconnect if&lt;br/&gt;&amp;gt;     she has not lost her state and receives a state with a ctn that is&lt;br/&gt;&amp;gt;     in her future. This ensures that only one device uses the channels.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   - Without waiting for OP_CHECKSIGFROMSTACK to be available in&lt;br/&gt;&amp;gt;     Bitcoin, it would be possible for Bob to lockup funds on another&lt;br/&gt;&amp;gt;     blockchain such as Liquid. It is also possible to create fraud&lt;br/&gt;&amp;gt;     proofs that are not used in a redeem script, but that are tied to&lt;br/&gt;&amp;gt;     Bob&amp;#39;s public identity and reputation. In that case, Bob should sign&lt;br/&gt;&amp;gt;     with his node pubkey, and fraud proofs will need to include a short&lt;br/&gt;&amp;gt;     channel id.&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/20230816/558b9a6e/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230816/558b9a6e/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-08-21T11:48:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs95ljn9hzfa7kewz2ysle0z05suw6muzu54s7w2dh6dcv5tp7kzfqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk7v8vsc</id>
    
      <title type="html">📅 Original date posted:2023-05-05 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs95ljn9hzfa7kewz2ysle0z05suw6muzu54s7w2dh6dcv5tp7kzfqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk7v8vsc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs02j7xj6ck70mlvkl6zrrrksz8jwmr59adw9zsxzun5t0vwpmyy9cpym33t&#39;&gt;nevent1q…m33t&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-05&lt;br/&gt;🗒️ Summary of this message: The introduction of dual funded transactions in lightning has created challenges in protecting against liquidity griefing attacks from malicious peers. An elegant solution is to never lock utxos used in dual funded transactions, but this falls short when using 0-conf. Nodes offering 0-conf services expose themselves to liquidity griefing. Another related issue is that nodes that want to offer 0-conf channels must ensure that the utxos they use for 0-conf are isolated from the utxos they use for non 0-conf.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;One of the challenges created by the introduction of dual funded&lt;br/&gt;transactions [1] in lightning is how to protect against liquidity&lt;br/&gt;griefing attacks from malicious peers [2].&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s start by reviewing this liquidity griefing issue. The dual funding&lt;br/&gt;protocol starts by exchanging data about the utxos each peer adds to the&lt;br/&gt;shared transaction, then exchange signatures and broadcast the resulting&lt;br/&gt;transaction. If peers lock their utxos as soon as they&amp;#39;ve decided to add&lt;br/&gt;them to the shared transaction, the remote node may go silent. If that&lt;br/&gt;happens, the honest node has some liquidity that is locked and unusable.&lt;br/&gt;&lt;br/&gt;This cannot easily be fixed by simply unlocking utxos *after* detecting&lt;br/&gt;that the remote node is fishy, because the remote node would still have&lt;br/&gt;succeeded at locking your liquidity for a (small) duration, and could&lt;br/&gt;start other instances of that attack with different node_ids.&lt;br/&gt;&lt;br/&gt;An elegant solution to this issue is to never lock utxos used in dual&lt;br/&gt;funded transactions. If a remote node goes silent in the middle of an&lt;br/&gt;instance of the protocol, your utxos will automatically be re-used in&lt;br/&gt;another instance of the protocol. The only drawback with that approach&lt;br/&gt;is that when you have multiple concurrent instances of dual funding with&lt;br/&gt;honest peers, some of them may fail because they are double-spent by one&lt;br/&gt;of the concurrent instances. This is acceptable, since the protocol&lt;br/&gt;should complete fairly quickly when peers are honest, and at worst, it&lt;br/&gt;can simply be restarted when failure is detected.&lt;br/&gt;&lt;br/&gt;But that solution falls short when using 0-conf, because accidentally&lt;br/&gt;double-spending a 0-conf channel (because of concurrent instances) can&lt;br/&gt;result in loss of funds for one of the peers (if payments were made on&lt;br/&gt;that channel before detecting the double-spend). It seems like using&lt;br/&gt;0-conf forces us to lock utxos to avoid this issue, which means that&lt;br/&gt;nodes offering 0-conf services expose themselves to liquidity griefing.&lt;br/&gt;&lt;br/&gt;Another related issue is that nodes that want to offer 0-conf channels&lt;br/&gt;must ensure that the utxos they use for 0-conf are isolated from the&lt;br/&gt;utxos they use for non 0-conf, otherwise it is not possible to properly&lt;br/&gt;lock utxos, because of the following race scenario:&lt;br/&gt;&lt;br/&gt;- utxoA is selected for a non 0-conf funding attempt and not locked&lt;br/&gt;  (to protect against liquidity griefing)&lt;br/&gt;- utxoA is also selected for a 0-conf funding attempt (because it is&lt;br/&gt;  found unlocked in the wallet) and then locked&lt;br/&gt;- the funding transaction for the 0-conf channel is successfully&lt;br/&gt;  published first and that channel is instantly used for payments&lt;br/&gt;- the funding transaction for the non 0-conf channel is then published&lt;br/&gt;  and confirms, accidentally double-spending the 0-conf channel&lt;br/&gt;&lt;br/&gt;This can be fixed by using a &amp;#34;soft lock&amp;#34; when selecting utxos for a non&lt;br/&gt;0-conf funding attempt. 0-conf funding attempts must ignore soft locked&lt;br/&gt;utxos while non 0-conf funding attempts can (should) reuse soft locked&lt;br/&gt;utxos.&lt;br/&gt;&lt;br/&gt;In eclair, we are currently doing &amp;#34;opportunistic&amp;#34; 0-conf:&lt;br/&gt;&lt;br/&gt;- if we receive `channel_ready` immediately (which means that our peer&lt;br/&gt;  trusts us to use 0-conf)&lt;br/&gt;- and we&amp;#39;re the only contributor to the funding transaction (our peer&lt;br/&gt;  doesn&amp;#39;t have any input that they could use to double-spend)&lt;br/&gt;- and the transaction hasn&amp;#39;t been RBF-ed yet&lt;br/&gt;&lt;br/&gt;Then we immediately send `channel_ready` as well and start using that&lt;br/&gt;channel (because we know we won&amp;#39;t double spend ourselves). This is nice&lt;br/&gt;because it lets us use 0-conf in a way where only one side of the&lt;br/&gt;channel needs to trust the other side (instead of both sides trusting&lt;br/&gt;each other).&lt;br/&gt;&lt;br/&gt;Unfortunately, we cannot do that anymore when mixing 0-conf and non&lt;br/&gt;0-conf funding attempts, because the utxos may be soft locked,&lt;br/&gt;preventing us from &amp;#34;upgrading&amp;#34; to 0-conf.&lt;br/&gt;&lt;br/&gt;You have successfully reached the end of this quite technical post,&lt;br/&gt;congrats! My goal with this post is to gather ideas on how we could&lt;br/&gt;improve that situation and offer good enough protections against&lt;br/&gt;liquidity griefing for nodes offering 0-conf services. Please share&lt;br/&gt;your ideas! And yes, I know, 0-conf is a massive implementation pain&lt;br/&gt;point that we would all like to remove from our codebases, but hey,&lt;br/&gt;users like it ¯\_(ツ)_/¯&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/lightning/bolts/pull/851&#34;&gt;https://github.com/lightning/bolts/pull/851&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://github.com/lightning/bolts/pull/851#discussion_r997537630&#34;&gt;https://github.com/lightning/bolts/pull/851#discussion_r997537630&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230505/9638cc46/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230505/9638cc46/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:13:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvla387e23dgupvrz2zczmhcjvhfv5etjc7t7zv9el4h7j3f3rddszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukk727cp</id>
    
      <title type="html">📅 Original date posted:2023-04-06 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvla387e23dgupvrz2zczmhcjvhfv5etjc7t7zv9el4h7j3f3rddszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukk727cp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv8r5e433953yrnqgavc39lkgkuwcpp4y0vjl8y3hptra4d6jv5zqjyqm7t&#39;&gt;nevent1q…qm7t&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Dustin,&lt;br/&gt;&lt;br/&gt;I believe this is the scenario I described in [1]?&lt;br/&gt;&lt;br/&gt;I haven&amp;#39;t looked at the `announcement_signatures` case yet, but at least&lt;br/&gt;for the `commit_sig` case this should never be an issue. It only means&lt;br/&gt;that sometimes, after sending `splice_locked`, you will receive some&lt;br/&gt;`commit_sig` messages that are for commitments that you don&amp;#39;t care about&lt;br/&gt;anymore. You should be able to safely ignore those `commit_sig`. I have&lt;br/&gt;provided more details in the gist linked.&lt;br/&gt;&lt;br/&gt;Let me know if I&amp;#39;m missing something, but I believe this is simply an&lt;br/&gt;edge case that implementations need to correctly handle, not a protocol&lt;br/&gt;issue? Or maybe I&amp;#39;m not understanding the scenario correctly?&lt;br/&gt;&lt;br/&gt;By the way, I find your notation a bit hard to follow...I think that we&lt;br/&gt;really need to detail the exact message flow (like I did in the linked&lt;br/&gt;gist) to be able to explain protocol issues, otherwise there&amp;#39;s always&lt;br/&gt;a risk that people think about a slightly different message flow, which&lt;br/&gt;means we&amp;#39;ll just talk past each other...&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1]&lt;br/&gt;&lt;a href=&#34;https://gist.github.com/t-bast/1ac31f4e27734a10c5b9847d06db8d86#multiple-splices-with-racy-splice_locked&#34;&gt;https://gist.github.com/t-bast/1ac31f4e27734a10c5b9847d06db8d86#multiple-splices-with-racy-splice_locked&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Le jeu. 6 avr. 2023 à 02:40, Dustin Dettmer &amp;lt;dustin at koinkeep.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hey,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In testing the `splice_locked` workflow I discovered a race condition&lt;br/&gt;&amp;gt; which is critical we solve correctly. The core problem happens if any&lt;br/&gt;&amp;gt; channel activity occurs in the time after `splice_locked` is sent and&lt;br/&gt;&amp;gt; before `splice_locked` is received.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; `splice_locked` is defined as being locked once it is both sent and&lt;br/&gt;&amp;gt; received. It is fairly trivial to build a test case for this -- have a node&lt;br/&gt;&amp;gt; continually spamming payments while `splice_lock`ing is occurring and the&lt;br/&gt;&amp;gt; race condition will trigger relatively often.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The race condition effects two messages in particular: `commitment_signed`&lt;br/&gt;&amp;gt; and `announcement_signatures`. Below is an example of how it occurs with&lt;br/&gt;&amp;gt; commitment but the flow is essentially the same for announcement:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Legend:&lt;br/&gt;&amp;gt; Item -&amp;gt; means sent&lt;br/&gt;&amp;gt; Item &amp;lt;- means received&lt;br/&gt;&amp;gt; Chan X (implies a channel at block height X)&lt;br/&gt;&amp;gt; (Since these happen at different times)&lt;br/&gt;&amp;gt; Splice locked race condition example&lt;br/&gt;&amp;gt; Node A. Node B.&lt;br/&gt;&amp;gt; * Channel starts at block height 100&lt;br/&gt;&amp;gt; splice_locked -&amp;gt;&lt;br/&gt;&amp;gt; &amp;lt;- splice_locked&lt;br/&gt;&amp;gt; &amp;lt;- commitments_signed (Chan 100)&lt;br/&gt;&amp;gt; -&amp;gt; splice_locked&lt;br/&gt;&amp;gt; Node B now considers splice locked (Chan 106)&lt;br/&gt;&amp;gt; &amp;lt;- commitments_signed (Chan 106)&lt;br/&gt;&amp;gt; splice_locked &amp;lt;-&lt;br/&gt;&amp;gt; Node A now considers splice locked (Chan 106)&lt;br/&gt;&amp;gt; commitments_signed &amp;lt;- (Chan 100)&lt;br/&gt;&amp;gt; commitments_signed &amp;lt;- (Chan 106)&lt;br/&gt;&amp;gt; Node A considers the commitments_signed for Chan 100 invalid.&lt;br/&gt;&amp;gt; The commitments_signed for Chan 106 is, however, valid.&lt;br/&gt;&amp;gt; This example uses commitments_signed but remains a problem for any message&lt;br/&gt;&amp;gt; that depends on channel state.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The solution requires the temporary storing of two items:&lt;br/&gt;&amp;gt; * [scid] last_short_channel_id (the pre-splice short channel id)&lt;br/&gt;&amp;gt; * [bool] splice_await_commitment_succcess&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; After sending &amp;amp; receiving `splice_locked` (so called &amp;#39;mutual splice lock),&lt;br/&gt;&amp;gt; the last_short_channel_id should be set to the pre-splice short channel id&lt;br/&gt;&amp;gt; and splice_await_commitment_succcess should be flagged to true.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If an `announcement_signatures` is received with an scid matching&lt;br/&gt;&amp;gt; `last_short_channel_id` the message should be ignored and the channel&lt;br/&gt;&amp;gt; connection should not be aborted (as it normally would).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If a `commitment_signed` message is received with the&lt;br/&gt;&amp;gt; tlv splice_info-&amp;gt;splice_channel_id set to something other than the&lt;br/&gt;&amp;gt; successfully confirmed splice channel_id, the message should be ignored.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Once a revoke_and_ack is successfully sent OR received,&lt;br/&gt;&amp;gt; `last_short_channel_id` and `splice_await_commitment_succcess` should be&lt;br/&gt;&amp;gt; reset and normal validation of `announcement_signatures` and&lt;br/&gt;&amp;gt; `commitment_signed` should be resumed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This solves the race condition while preserving as strict a validation of&lt;br/&gt;&amp;gt; messages as possible and removes the need to add new fields to these&lt;br/&gt;&amp;gt; messages.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Dusty&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/20230406/058383a0/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20230406/058383a0/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:08:32&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspknu3d5ryml69q7r3q905jxqwjcpung8hzd6fdj6a3f8600336ugzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk52c3ah</id>
    
      <title type="html">📅 Original date posted:2022-10-24 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspknu3d5ryml69q7r3q905jxqwjcpung8hzd6fdj6a3f8600336ugzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk52c3ah" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrjz7t9aqrwmqg2ypc8fs83q32d0w7e07zd0t9lexsu05j6n7ngcgdl5h92&#39;&gt;nevent1q…5h92&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-24&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi John,&lt;br/&gt;&lt;br/&gt;&amp;gt; My understanding of the current Lightning protocol is that users specify&lt;br/&gt;a to_self_delay safety parameter which is typically about 2 weeks and that&lt;br/&gt;they pay for routing, but not for their partner&amp;#39;s cost-of-capital. Is that&lt;br/&gt;correct?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If it is, then when a dedicated user (DLU) partners with a casual user&lt;br/&gt;(CLU), the DLU can only move liquidity to another Lightning channel by&lt;br/&gt;either:&lt;br/&gt;&amp;gt; 1) getting the CLU to sign a cooperative close transaction that enables&lt;br/&gt;(or directly implements) the desired movement of funds, or&lt;br/&gt;&amp;gt; 2) putting a non-cooperative close transaction on-chain and waiting&lt;br/&gt;approximately 2 weeks (based on the to_self_delay parameter set by the CLU)&lt;br/&gt;before moving the liquidity.&lt;br/&gt;&lt;br/&gt;That&amp;#39;s correct, but that&amp;#39;s something we intend to change to let LSPs&lt;br/&gt;re-allocate their liquidity more frequently and more efficiently.&lt;br/&gt;&lt;br/&gt;We don&amp;#39;t have a fully specified proposal yet, but by leveraging a&lt;br/&gt;mechanism similar to splicing [1], mobile users would pre-sign a&lt;br/&gt;transaction that keeps the channel open, but lets the LSP get their&lt;br/&gt;balance (or part of it) out non-interactively. This would be used by&lt;br/&gt;LSPs if the user isn&amp;#39;t using their channel actively enough and the LSP&lt;br/&gt;is low on available liquidity for other, more active users.&lt;br/&gt;&lt;br/&gt;This transaction would need to be revokable and must be delayed, since&lt;br/&gt;we still need the user to be able to punish malicious LSPs, but ideally&lt;br/&gt;(from the LSP&amp;#39;s point of view) that delay should be at most 1 week, which&lt;br/&gt;forces users to regularly check the blockchain (which isn&amp;#39;t ideal).&lt;br/&gt;&lt;br/&gt;It really is a trade-off to be able to lower the fees LSPs make users&lt;br/&gt;pay for liquidity, because LSPs know they can move it cheaply when it&lt;br/&gt;becomes necessary. I can see a future where users chose their trade-off:&lt;br/&gt;pay more to be able to go offline for longer periods or pay less but&lt;br/&gt;check the blockchain regularly. The same LSP could offer both features,&lt;br/&gt;if they&amp;#39;re able to price them correctly (which isn&amp;#39;t trivial).&lt;br/&gt;&lt;br/&gt;&amp;gt; My intuition is that in the long run, the cost of bitcoin capital will be&lt;br/&gt;very low, as it is an inherently deflationary monetary unit (and thus its&lt;br/&gt;value should increase with time). If this is correct, the long term&lt;br/&gt;cost-of-capital charges should be very low.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not convinced by that...even though the value of capital increases&lt;br/&gt;with time, liquidity providers will compete to earn more return on their&lt;br/&gt;locked capital. If one liquidity provider is able to use their capital&lt;br/&gt;more efficiently than another, they will be able to offer lower prices&lt;br/&gt;to their customers to a point that isn&amp;#39;t economically viable for the&lt;br/&gt;other, less efficient liquidity provider?&lt;br/&gt;&lt;br/&gt;Since lightning doesn&amp;#39;t allow any form of fractional reserve, the total&lt;br/&gt;available capital needs to be split between all existing users of the&lt;br/&gt;system, which is very inconvenient when trying to onboard a high number&lt;br/&gt;of new users.&lt;br/&gt;&lt;br/&gt;This is very theoretical though, I have absolutely no idea how those&lt;br/&gt;dynamics will actually play out, but it will be interesting to watch it&lt;br/&gt;unfold.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/lightning/bolts/pull/863&#34;&gt;https://github.com/lightning/bolts/pull/863&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Le mer. 12 oct. 2022 à 02:11, jlspc &amp;lt;jlspc at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hey Bastien,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for your reply.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Responses are in-line below:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hey John,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks for sharing, this is very interesting.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; There is a good insight here that we can remove the intermediate&lt;br/&gt;&amp;gt; &amp;gt; HTLC-timeout transaction for outgoing payments because we are the&lt;br/&gt;&amp;gt; &amp;gt; origin of that payment (and thus don&amp;#39;t need to quickly claim the&lt;br/&gt;&amp;gt; &amp;gt; HTLC on-chain to then relay that failure to a matching incoming HTLC).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; More generally, you have perfectly identified that most of the&lt;br/&gt;&amp;gt; &amp;gt; complexity of today&amp;#39;s transactions come from the need to ensure that&lt;br/&gt;&amp;gt; &amp;gt; a failing/malicious downstream channel doesn&amp;#39;t negatively impact&lt;br/&gt;&amp;gt; &amp;gt; honest upstream channels when relaying payments, and that some of this&lt;br/&gt;&amp;gt; &amp;gt; complexity can be lifted when nodes don&amp;#39;t relay payments.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; However, my main criticism of your proposal is that liquidity isn&amp;#39;t free.&lt;br/&gt;&amp;gt; &amp;gt; While your improvements are great from the CLU&amp;#39;s point of view, I&amp;#39;m not&lt;br/&gt;&amp;gt; &amp;gt; sure they&amp;#39;re acceptable for the DLU. The main (probably only) job of an&lt;br/&gt;&amp;gt; &amp;gt; LSP (DLU in your terminology) is to efficiently allocate their liquidity.&lt;br/&gt;&amp;gt; &amp;gt; In order to do so, they must be able to quickly move liquidity from where&lt;br/&gt;&amp;gt; &amp;gt; it&amp;#39;s unused to where it may be better used. That means closely watching&lt;br/&gt;&amp;gt; &amp;gt; the demand for block space and doing on-chain transactions when fees are&lt;br/&gt;&amp;gt; &amp;gt; low (to open/close channels, splice funds in/out [1], make peer swaps [2],&lt;br/&gt;&amp;gt; &amp;gt; etc). With your proposal, DLUs won&amp;#39;t be able to quickly move liquidity&lt;br/&gt;&amp;gt; &amp;gt; around, so the only way to make up for this is to charge the CLU for the&lt;br/&gt;&amp;gt; &amp;gt; loss of expected revenue. I&amp;#39;m afraid that the amount DLUs would need to&lt;br/&gt;&amp;gt; &amp;gt; charge CLUs will be prohibitively expensive for most CLUs.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m curious to get your feedback on that point.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I really appreciate your insight here. I&amp;#39;m just an interested observer who doesn&amp;#39;t have experience with creating and deploying Lightning nodes, so I&amp;#39;m sure you have a better understanding of the current costs and trade-offs than I do.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; My understanding of the current Lightning protocol is that users specify a to_self_delay safety parameter which is typically about 2 weeks and that they pay for routing, but not for their partner&amp;#39;s cost-of-capital. Is that correct?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If it is, then when a dedicated user (DLU) partners with a casual user (CLU), the DLU can only move liquidity to another Lightning channel by either:&lt;br/&gt;&amp;gt; 1) getting the CLU to sign a cooperative close transaction that enables (or directly implements) the desired movement of funds, or&lt;br/&gt;&amp;gt; 2) putting a non-cooperative close transaction on-chain and waiting approximately 2 weeks (based on the to_self_delay parameter set by the CLU) before moving the liquidity.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In contrast, with the Watchtower-Free (WF) protocol, the DLU could only move liquidity to another Lightning channel by either:&lt;br/&gt;&amp;gt; 1) getting the CLU to sign a cooperative close transaction that enables (or directly implements), the desired movement of funds, or&lt;br/&gt;&amp;gt; 2) putting a non-cooperative close transaction on-chain and waiting approximately 1-3 months (based on the I_L parameter set by the CLU) before moving the liquidity.&lt;br/&gt;&amp;gt; In case 1), it would make sense for the DLU to refund the remaining portion of CLU&amp;#39;s cost-of-capital pre-payment to the CLU, as that capital is now being made available to the DLU. This was not proposed in the paper, but it should probably be added.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With this change (namely refunding the remainder of the cost-of-capital pre-payment), it seems like the only disadvantage of the WF protocol to the DLU is the larger delay (1-3 months vs. 2 weeks). Do you feel increasing the delay from 2 weeks to 1 month is prohibitive?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; My intuition is that in the long run, the cost of bitcoin capital will be very low, as it is an inherently deflationary monetary unit (and thus its value should increase with time). If this is correct, the long term cost-of-capital charges should be very low.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What are your thoughts on this?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt; John&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks again for sharing, and for the inherited IDs [3] proposal as well!&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Bastien&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [1] &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/lightning/bolts/pull/863&amp;#34;&amp;gt;https://github.com/lightning/bolts/pull/863&amp;lt;/a&amp;gt&#34;&gt;https://github.com/lightning/bolts/pull/863&amp;#34;&amp;gt;https://github.com/lightning/bolts/pull/863&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; &amp;gt; [2] &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://www.peerswap.dev/&amp;#34;&amp;gt;https://www.peerswap.dev/&amp;lt;/a&amp;gt&#34;&gt;https://www.peerswap.dev/&amp;#34;&amp;gt;https://www.peerswap.dev/&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt; &amp;gt; [3] &amp;lt;a href=&amp;#34;&lt;a href=&#34;https://github.com/JohnLaw2/btc-iids&amp;#34;&amp;gt;https://github.com/JohnLaw2/btc-iids&amp;lt;/a&amp;gt&#34;&gt;https://github.com/JohnLaw2/btc-iids&amp;#34;&amp;gt;https://github.com/JohnLaw2/btc-iids&amp;lt;/a&amp;gt&lt;/a&gt;;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sent with Proton Mail &amp;lt;&lt;a href=&#34;https://proton.me/&amp;gt&#34;&gt;https://proton.me/&amp;gt&lt;/a&gt;; secure email.&lt;br/&gt;&amp;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/lightning-dev/attachments/20221024/c1713a2e/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20221024/c1713a2e/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:07:01&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspazvcp0tdxuut2k9s8vs3hmtmckuy8sf03xyd4ert8g7z4nxwftszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukzsrrk6</id>
    
      <title type="html">📅 Original date posted:2022-10-10 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspazvcp0tdxuut2k9s8vs3hmtmckuy8sf03xyd4ert8g7z4nxwftszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukzsrrk6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsql64ctzkjnnz5cmmcxy3e9g9uwfxatzqjpkj025xhztju3j3t7rsvjp74p&#39;&gt;nevent1q…p74p&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-10&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey John,&lt;br/&gt;&lt;br/&gt;Thanks for sharing, this is very interesting.&lt;br/&gt;&lt;br/&gt;There is a good insight here that we can remove the intermediate&lt;br/&gt;HTLC-timeout transaction for outgoing payments because we are the&lt;br/&gt;origin of that payment (and thus don&amp;#39;t need to quickly claim the&lt;br/&gt;HTLC on-chain to then relay that failure to a matching incoming HTLC).&lt;br/&gt;&lt;br/&gt;More generally, you have perfectly identified that most of the&lt;br/&gt;complexity of today&amp;#39;s transactions come from the need to ensure that&lt;br/&gt;a failing/malicious downstream channel doesn&amp;#39;t negatively impact&lt;br/&gt;honest upstream channels when relaying payments, and that some of this&lt;br/&gt;complexity can be lifted when nodes don&amp;#39;t relay payments.&lt;br/&gt;&lt;br/&gt;However, my main criticism of your proposal is that liquidity isn&amp;#39;t free.&lt;br/&gt;While your improvements are great from the CLU&amp;#39;s point of view, I&amp;#39;m not&lt;br/&gt;sure they&amp;#39;re acceptable for the DLU. The main (probably only) job of an&lt;br/&gt;LSP (DLU in your terminology) is to efficiently allocate their liquidity.&lt;br/&gt;In order to do so, they must be able to quickly move liquidity from where&lt;br/&gt;it&amp;#39;s unused to where it may be better used. That means closely watching&lt;br/&gt;the demand for block space and doing on-chain transactions when fees are&lt;br/&gt;low (to open/close channels, splice funds in/out [1], make peer swaps [2],&lt;br/&gt;etc). With your proposal, DLUs won&amp;#39;t be able to quickly move liquidity&lt;br/&gt;around, so the only way to make up for this is to charge the CLU for the&lt;br/&gt;loss of expected revenue. I&amp;#39;m afraid that the amount DLUs would need to&lt;br/&gt;charge CLUs will be prohibitively expensive for most CLUs.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m curious to get your feedback on that point.&lt;br/&gt;&lt;br/&gt;Thanks again for sharing, and for the inherited IDs [3] proposal as well!&lt;br/&gt;&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/lightning/bolts/pull/863&#34;&gt;https://github.com/lightning/bolts/pull/863&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://www.peerswap.dev/&#34;&gt;https://www.peerswap.dev/&lt;/a&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://github.com/JohnLaw2/btc-iids&#34;&gt;https://github.com/JohnLaw2/btc-iids&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Le lun. 3 oct. 2022 à 18:55, jlspc via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is the first in a series of posts on ideas to improve the usability&lt;br/&gt;&amp;gt; and scalability of the Lightning Network. This post presents a new channel&lt;br/&gt;&amp;gt; protocol that allows casual users to send and receive Lightning payments&lt;br/&gt;&amp;gt; without having to meet onerous availability requirements or use a&lt;br/&gt;&amp;gt; watchtower service. This new Watchtower-Free (WF) protocol can also be&lt;br/&gt;&amp;gt; used to simplify the reception of Lightning payments for casual users. No&lt;br/&gt;&amp;gt; change to the underlying Bitcoin protocol is required.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A paper with a more complete description of the protocol, including&lt;br/&gt;&amp;gt; figures, is available [5].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Properties&lt;br/&gt;&amp;gt; ==========&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The user-visible properties of the WF protocol can be expressed using&lt;br/&gt;&amp;gt; two parameters:&lt;br/&gt;&amp;gt; * I_S: a short time interval (e.g., 10 minutes) for communicating with&lt;br/&gt;&amp;gt;   peers, checking the blockchain, and submitting transactions to the&lt;br/&gt;&amp;gt;   blockchain, and&lt;br/&gt;&amp;gt; * I_L: a long time interval (e.g., 1-3 months).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The casual user must be online for up to:&lt;br/&gt;&amp;gt; * I_S every I_L (e.g., 10 minutes every 1-3 months) to safeguard the funds&lt;br/&gt;&amp;gt;   in their Lightning channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With the WF protocol, the latency for payments is unchanged from the&lt;br/&gt;&amp;gt; current protocol, but the latency for getting a payment receipt from an&lt;br/&gt;&amp;gt; uncooperative channel partner is increased. In addition, the casual user&lt;br/&gt;&amp;gt; may have to pay their channel partner for the partner&amp;#39;s cost of capital&lt;br/&gt;&amp;gt; (which depends on I_L). If the casual user and their channel partner&lt;br/&gt;&amp;gt; follow the protocol, the channel can remain off-chain arbitrarily long.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; First Attempt: Use The Current Lightning Protocol&lt;br/&gt;&amp;gt; =================================================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to motivate the new protocol, first consider what would happen if&lt;br/&gt;&amp;gt; a casual user attempted to achieve the above properties with the current&lt;br/&gt;&amp;gt; Lightning channel protocol. The casual user would set their&lt;br/&gt;&amp;gt; &amp;#34;to_self_delay&amp;#34; (which controls how quickly their channel partner can&lt;br/&gt;&amp;gt; receive funds from a transaction they put on-chain) and&lt;br/&gt;&amp;gt; &amp;#34;cltv_expiry_delta&amp;#34; (which controls the staggering of timeouts between&lt;br/&gt;&amp;gt; successive hops) parameters to values approaching I_L (because the casual&lt;br/&gt;&amp;gt; user could be unavailable for nearly that long). This would create three&lt;br/&gt;&amp;gt; problems:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Problem 1: The casual user&amp;#39;s proposed channel partner would likely&lt;br/&gt;&amp;gt;   reject the creation of the channel due to the excessive &amp;#34;to_self_delay&amp;#34;&lt;br/&gt;&amp;gt;   value.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Problem 2: If a channel were created with these parameters, Lightning&lt;br/&gt;&amp;gt;   payments would not be routed through it due to the excessive&lt;br/&gt;&amp;gt;   &amp;#34;cltv_expiry_delta&amp;#34; value.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Problem 3: If a channel were created with these parameters and if the&lt;br/&gt;&amp;gt;   casual user sent a payment on that channel, their partner could have to&lt;br/&gt;&amp;gt;   go on-chain in order to pull the payment from the casual user. In&lt;br/&gt;&amp;gt;   particular, the casual user could be offline for nearly I_L (e.g., 1-3&lt;br/&gt;&amp;gt;   months) when their partner receives the receipt, thus forcing their&lt;br/&gt;&amp;gt;   partner to go on-chain to receive payment before the expiry of the&lt;br/&gt;&amp;gt;   associated HTLC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The WF Protocol&lt;br/&gt;&amp;gt; ===============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The WF protocol solves these problems by modifying the Lightning protocol&lt;br/&gt;&amp;gt; as follows:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Problem 1 is solved by having the casual user pre-pay their channel&lt;br/&gt;&amp;gt;   partner for the cost of the partner&amp;#39;s capital that&amp;#39;s tied up in the&lt;br/&gt;&amp;gt;   channel due to the very large &amp;#34;to_self_delay&amp;#34; value. This pre-payment is&lt;br/&gt;&amp;gt;   included in the initial channel state and is updated at least once every&lt;br/&gt;&amp;gt;   I_L to reflect the additional cost of capital due to the partner not yet&lt;br/&gt;&amp;gt;   going on-chain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Problem 2 is solved by allowing casual users to designate themselves as&lt;br/&gt;&amp;gt;   Casual-Lightning-Users (CLUs), while the remaining users are&lt;br/&gt;&amp;gt;   Dedicated-Lightning-Users (DLUs). CLUs can only partner with DLUs to&lt;br/&gt;&amp;gt;   open channels, such channels must be unannounced, and CLUs must not&lt;br/&gt;&amp;gt;   route (as opposed to send or receive) payments. These constraints fit&lt;br/&gt;&amp;gt;   naturally with the desires of casual users who want to send and receive&lt;br/&gt;&amp;gt;   their Lightning payments, but not route payments for others. Support for&lt;br/&gt;&amp;gt;   CLUs is analogous to support for SPV (Simplified-Payment-Verification)&lt;br/&gt;&amp;gt;   nodes in Bitcoin.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Problem 3 is solved by modifying both users&amp;#39; Commitment transactions in&lt;br/&gt;&amp;gt;   the channel that sends the payment so the CLU can be offline for nearly&lt;br/&gt;&amp;gt;   I_L without forcing their DLU partner to go on-chain. A simple approach&lt;br/&gt;&amp;gt;   would be to delay the expiry of the HTLC for each payment in the sending&lt;br/&gt;&amp;gt;   channel by I_L. This approach works, but it has the downside of delaying&lt;br/&gt;&amp;gt;   (by I_L) the CLU&amp;#39;s ability to force production of a payment receipt. A&lt;br/&gt;&amp;gt;   better approach is to add a relative delay before the CLU can time out&lt;br/&gt;&amp;gt;   the HTLC output of a Commitment transaction, thus enabling the DLU to&lt;br/&gt;&amp;gt;   safely stay off-chain even after the expiry of the HTLC. That&amp;#39;s the&lt;br/&gt;&amp;gt;   approach taken here.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let Alice be a CLU who shares a channel with DLU Bob. Bob sets his channel&lt;br/&gt;&amp;gt; parameters as he would in the current Lightning protocol, while Alice sets&lt;br/&gt;&amp;gt; her &amp;#34;to_self_delay&amp;#34; parameter (controlling Bob&amp;#39;s payments to himself) to&lt;br/&gt;&amp;gt; I_L greater than it would be in the current Lightning protocol. Consider&lt;br/&gt;&amp;gt; the case where Alice sends a Lightning payment on the channel she shares&lt;br/&gt;&amp;gt; with Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let:&lt;br/&gt;&amp;gt;   - eAB denote the expiry for this payment in the channel shared by Alice&lt;br/&gt;&amp;gt;     and Bob,&lt;br/&gt;&amp;gt;   - tsdA denote the &amp;#34;to_self_delay&amp;#34; parameter set by Alice, and&lt;br/&gt;&amp;gt;   - tsdB denote the &amp;#34;to_self_delay&amp;#34; parameter set by Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Three changes are made relative to the current Lightning protocol:&lt;br/&gt;&amp;gt;   - a relative delay of tsdB is enforced before Alice can spend the HTLC&lt;br/&gt;&amp;gt;     output for this payment in either Commitment transaction,&lt;br/&gt;&amp;gt;   - after eAB, only Alice&amp;#39;s (rather than both parties&amp;#39;) signature is&lt;br/&gt;&amp;gt;     required to spend the HTLC output in Alice&amp;#39;s Commitment transaction,&lt;br/&gt;&amp;gt;     and that output doesn&amp;#39;t need to be spent using an HTLC-timeout&lt;br/&gt;&amp;gt;     transaction that can be revoked (because the relative delay added&lt;br/&gt;&amp;gt;     above guarantees Bob can prevent Alice from spending the HTLC output&lt;br/&gt;&amp;gt;     in a revoked Commitment transaction that she puts on-chain), and&lt;br/&gt;&amp;gt;   - both parties update the channel state off-chain at least once every&lt;br/&gt;&amp;gt;     I_L to reflect Bob&amp;#39;s cost of capital, as described above.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The resulting protocol, with a single payment from Alice outstanding, is&lt;br/&gt;&amp;gt; shown below:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &#43;-&#43; AB      &#43;----&#43; A&lt;br/&gt;&amp;gt; |F|----&#43;---&amp;gt;| CC |---&amp;gt;&lt;br/&gt;&amp;gt; &#43;-&#43;    |    |    |&lt;br/&gt;&amp;gt;        .    |    | B&lt;br/&gt;&amp;gt;        .    |    |---&amp;gt;&lt;br/&gt;&amp;gt;        .    &#43;----&#43;&lt;br/&gt;&amp;gt;        |&lt;br/&gt;&amp;gt;        |&lt;br/&gt;&amp;gt;        |              revkeyBi&lt;br/&gt;&amp;gt;        |            &#43;----------&amp;gt;&lt;br/&gt;&amp;gt;        |            |&lt;br/&gt;&amp;gt;        |    &#43;----&#43;  | tsdB &amp;amp; A&lt;br/&gt;&amp;gt;        &#43;---&amp;gt;|C_Ai|--&#43;----------&amp;gt;&lt;br/&gt;&amp;gt;        |    |    |&lt;br/&gt;&amp;gt;        |    |    |    B&lt;br/&gt;&amp;gt;        |    |    |-------------&amp;gt;&lt;br/&gt;&amp;gt;        |    |    |&lt;br/&gt;&amp;gt;        |    |    |    revkeyBi&lt;br/&gt;&amp;gt;        |    |    |  &#43;----------&amp;gt;&lt;br/&gt;&amp;gt;        |    |    |  |&lt;br/&gt;&amp;gt;        |    |    |  | tsdB &amp;amp; (eAB) &amp;amp; A&lt;br/&gt;&amp;gt;        |    |    |--&#43;-------------------&amp;gt;&lt;br/&gt;&amp;gt;        |    &#43;----&#43;  |&lt;br/&gt;&amp;gt;        |            | Preimage(X) &amp;amp; B&lt;br/&gt;&amp;gt;        |            &#43;-------------------&amp;gt;&lt;br/&gt;&amp;gt;        |&lt;br/&gt;&amp;gt;        |&lt;br/&gt;&amp;gt;        |&lt;br/&gt;&amp;gt;        |              revkeyAi&lt;br/&gt;&amp;gt;        |            &#43;----------&amp;gt;&lt;br/&gt;&amp;gt;        |            |&lt;br/&gt;&amp;gt;        |    &#43;----&#43;  | tsdA &amp;amp; B&lt;br/&gt;&amp;gt;        &#43;---&amp;gt;|C_Bi|--&#43;----------&amp;gt;&lt;br/&gt;&amp;gt;        |    |    |&lt;br/&gt;&amp;gt;        |    |    |    A&lt;br/&gt;&amp;gt;        |    |    |-------------&amp;gt;&lt;br/&gt;&amp;gt;        |    |    |&lt;br/&gt;&amp;gt;        |    |    |    revkeyAi&lt;br/&gt;&amp;gt;        |    |    |  &#43;----------&amp;gt;&lt;br/&gt;&amp;gt;        .    |    |  |&lt;br/&gt;&amp;gt;        .    |    |  | tsdB &amp;amp; (eAB) &amp;amp; A              revkeyAi&lt;br/&gt;&amp;gt;        .    |    |--&#43;-------------------&amp;gt;         &#43;----------&amp;gt;&lt;br/&gt;&amp;gt;        |    &#43;----&#43;  |                             |&lt;br/&gt;&amp;gt;        |            | Preimage(X) &amp;amp; AB   &#43;-----&#43;  | tsdA &amp;amp; B&lt;br/&gt;&amp;gt;        V            &#43;-------------------&amp;gt;|Hs_Bi|--&#43;----------&amp;gt;&lt;br/&gt;&amp;gt;                                          &#43;-----&#43;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; where:&lt;br/&gt;&amp;gt; F is the Funding transaction,&lt;br/&gt;&amp;gt; CC is the Cooperative Close transaction,&lt;br/&gt;&amp;gt; C_Ai is Alice&amp;#39;s Commitment transaction for state i,&lt;br/&gt;&amp;gt; C_Bi is Bob&amp;#39;s Commitment transaction for state i, and&lt;br/&gt;&amp;gt; Hs_Bi is Bob&amp;#39;s HTLC-success transaction for state i.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The F transaction is on-chain, while the remaining transactions are&lt;br/&gt;&amp;gt; off-chain during normal protocol operation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Requirements for output cases are as follows:&lt;br/&gt;&amp;gt; A: Alice&amp;#39;s signature,&lt;br/&gt;&amp;gt; B: Bob&amp;#39;s signature,&lt;br/&gt;&amp;gt; AB: Alice&amp;#39;s and Bob&amp;#39;s signatures,&lt;br/&gt;&amp;gt; revkeyAi: a signature using a revocation key that Alice can use to revoke&lt;br/&gt;&amp;gt;           Bob&amp;#39;s state i transaction,&lt;br/&gt;&amp;gt; revkeyBi: a signature using a revocation key that Bob can use to revoke&lt;br/&gt;&amp;gt;           Alice&amp;#39;s state i transaction,&lt;br/&gt;&amp;gt; tsdA: a relative delay equal to Alice&amp;#39;s to_self_delay parameter,&lt;br/&gt;&amp;gt; tsdB: a relative delay equal to Bob&amp;#39;s to_self_delay parameter,&lt;br/&gt;&amp;gt; (eAB): an absolute timelock equal to the expiry of the outstanding HTLC&lt;br/&gt;&amp;gt;        offered by Alice, and&lt;br/&gt;&amp;gt; Preimage(X): the hash preimage of X.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Once Bob knows Preimage(X), he sends Preimage(X) to Alice and attempts to&lt;br/&gt;&amp;gt; update both parties&amp;#39; Commitment transactions to show payment of the HTLC.&lt;br/&gt;&amp;gt; If he has spent I_L time unsuccessfully trying to update those Commitment&lt;br/&gt;&amp;gt; transactions, he can submit his Commitment and HTLC-success transactions&lt;br/&gt;&amp;gt; to the blockchain. If at any point he sees Alice&amp;#39;s Commitment transaction&lt;br/&gt;&amp;gt; on-chain, he stops trying to update the Commitment transactions off-chain&lt;br/&gt;&amp;gt; and he puts his transaction that reveals Preimage(X) and spends the HTLC&lt;br/&gt;&amp;gt; output in her Commitment transaction on-chain as soon as possible.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice implements the WF channel protocol as she would the current&lt;br/&gt;&amp;gt; Lightning channel protocol, except:&lt;br/&gt;&amp;gt;  - she can choose to be intentionally unavailable, provided she is&lt;br/&gt;&amp;gt;    available (or at least not intentionally unavailable) for at least I_S&lt;br/&gt;&amp;gt;    every I_L (to update her pre-payment for Bob&amp;#39;s cost of capital and to&lt;br/&gt;&amp;gt;    revoke any old transactions put on-chain by Bob), and&lt;br/&gt;&amp;gt;  - she does not put her Commitment transaction on-chain until she has&lt;br/&gt;&amp;gt;    been available (or at least not intentionally unavailable) for at least&lt;br/&gt;&amp;gt;    a grace period of G following the expiry of her offered HTLC (where G&lt;br/&gt;&amp;gt;    is the same grace period as is used in the current Lightning protocol&lt;br/&gt;&amp;gt;    and G &amp;lt;= I_S).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Correctness&lt;br/&gt;&amp;gt; ===========&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When Alice sends a payment on the channel she shares with Bob, the WF&lt;br/&gt;&amp;gt; protocol matches the Lightning protocol except the parties stay off-chain&lt;br/&gt;&amp;gt; longer with the WF protocol (to accommodate Alice&amp;#39;s intentional&lt;br/&gt;&amp;gt; unavailability). Staying off-chain longer is safe for Alice, as she&lt;br/&gt;&amp;gt; originated the payment and thus does not have to time out the HTLC at any&lt;br/&gt;&amp;gt; specific time in order receive payment in an earlier hop. Staying&lt;br/&gt;&amp;gt; off-chain longer is also safe for Bob, because whenever Alice&amp;#39;s (or Bob&amp;#39;s)&lt;br/&gt;&amp;gt; Commitment transaction is put on-chain, the tsdB relative delay before&lt;br/&gt;&amp;gt; Alice can time out the HTLC output is long enough to allow Bob to put his&lt;br/&gt;&amp;gt; transaction on-chain that takes payment for the HTLC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Finally, the WF protocol requires that Alice and Bob stay off-chain long&lt;br/&gt;&amp;gt; enough to guarantee that Alice will be available (or at least not&lt;br/&gt;&amp;gt; intentionally unavailable) for at least G, which is sufficient for both&lt;br/&gt;&amp;gt; parties to update the channel state off-chain. As a result, if both&lt;br/&gt;&amp;gt; parties follow the protocol, the channel will remain off-chain despite&lt;br/&gt;&amp;gt; Alice&amp;#39;s intentional unavailability.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A more detailed proof of correctness is given in the paper [5].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One-Shot Receives&lt;br/&gt;&amp;gt; =================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While eliminating watchtowers is helpful for casual users, the protocol&lt;br/&gt;&amp;gt; for receiving Lightning payments could still be awkward for such users.&lt;br/&gt;&amp;gt; With the current Lightning protocol, when a user receives a payment and&lt;br/&gt;&amp;gt; their channel partner is unresponsive, the user must submit their&lt;br/&gt;&amp;gt; Commitment and HTLC-success transactions to the blockchain. However, if&lt;br/&gt;&amp;gt; their partner&amp;#39;s conflicting Commitment transaction wins the race and is&lt;br/&gt;&amp;gt; included in the blockchain, the user then has to submit a different&lt;br/&gt;&amp;gt; transaction that reveals the HTLC&amp;#39;s secret and spends the HTLC output in&lt;br/&gt;&amp;gt; their partner&amp;#39;s Commitment transaction. The requirement to wait and check&lt;br/&gt;&amp;gt; the blockchain for the winning Commitment transaction (which might not be&lt;br/&gt;&amp;gt; determined until multiple blocks have been added to the blockchain) is&lt;br/&gt;&amp;gt; awkward for a casual user. It would be far preferable if the casual user&lt;br/&gt;&amp;gt; could always receive a payment by performing a sequence of off-chain&lt;br/&gt;&amp;gt; message exchanges and at most one submission to the blockchain. A protocol&lt;br/&gt;&amp;gt; that has this property will be said to support &amp;#34;one-shot receives&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The WF protocol can be made to support one-short receives (and to simplify&lt;br/&gt;&amp;gt; the process of getting a receipt) for CLU Alice by making the following&lt;br/&gt;&amp;gt; change whenever a new Commitment transaction for DLU Bob is signed by&lt;br/&gt;&amp;gt; Alice:&lt;br/&gt;&amp;gt;  - if Bob has one or more outstanding HTLCs offered to Alice, the&lt;br/&gt;&amp;gt;    nLocktime field of Bob&amp;#39;s Commitment transaction is set to the expiry of&lt;br/&gt;&amp;gt;    the earliest such HTLC,&lt;br/&gt;&amp;gt;  - otherwise, the nLocktime field of Bob&amp;#39;s Commitment transaction is set&lt;br/&gt;&amp;gt;    to I_L in the future (relative to when Bob&amp;#39;s Commitment transaction is&lt;br/&gt;&amp;gt;    signed by Alice).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Before examining how this change supports one-shot receives, it&amp;#39;s&lt;br/&gt;&amp;gt; important to resolve a technical issue. In the current Lightning protocol,&lt;br/&gt;&amp;gt; the nLocktime field in the Commitment transaction provides 24 bits of the&lt;br/&gt;&amp;gt; channel&amp;#39;s state number in order to allow efficient revocation of old&lt;br/&gt;&amp;gt; on-chain Commitments (with the remaining 24 bits being provided by the&lt;br/&gt;&amp;gt; nSequence field of the Commitment transaction&amp;#39;s sole input). Because we&amp;#39;re&lt;br/&gt;&amp;gt; now using the nLocktime field to enforce an absolute timelock, those 24&lt;br/&gt;&amp;gt; bits of state number can no longer be encoded in the nLocktime field.&lt;br/&gt;&amp;gt; There are two solutions to this problem:&lt;br/&gt;&amp;gt;  - add a second input to Bob&amp;#39;s Commitment transaction that spends a UTXO&lt;br/&gt;&amp;gt;    owned by Bob (the value of which is arbitrary and is refunded to Bob in&lt;br/&gt;&amp;gt;    the Commitment transaction) and use the nSequence field of that input&lt;br/&gt;&amp;gt;    to encode 24 bits of state number, or&lt;br/&gt;&amp;gt;  - support only 24-bit state numbers, as 16 million channel states are&lt;br/&gt;&amp;gt;    likely sufficient for most casual users.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In addition, the following constraints are added in order to guarantee&lt;br/&gt;&amp;gt; one-shot receives:&lt;br/&gt;&amp;gt; 1. Whenever a new HTLC is offered to Alice, its expiry is set to exactly&lt;br/&gt;&amp;gt;    her min_final_cltv_expiry parameter in the future. This constraint&lt;br/&gt;&amp;gt;    guarantees that new HTLCs have expiries that are monotonically&lt;br/&gt;&amp;gt;    nondecreasing.&lt;br/&gt;&amp;gt; 2. Whenever Alice gives Bob a secret for an HTLC, that HTLC has the&lt;br/&gt;&amp;gt;    earliest expiry of all the HTLCs in Alice&amp;#39;s current Commitment&lt;br/&gt;&amp;gt;    transaction.&lt;br/&gt;&amp;gt; 3. Whenever a new channel state i&#43;1 is created, Alice&amp;#39;s partial signature&lt;br/&gt;&amp;gt;    for Bob&amp;#39;s Commitment transaction for state i&#43;1 is given to Bob, and the&lt;br/&gt;&amp;gt;    revocation key for Bob&amp;#39;s Commitment transaction for state i is given to&lt;br/&gt;&amp;gt;    Alice, before Bob&amp;#39;s partial signature for Alice&amp;#39;s Commitment&lt;br/&gt;&amp;gt;    transaction for state i&#43;1 is given to Alice.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Given these constraints and the setting of the nLocktime field in Bob&amp;#39;s&lt;br/&gt;&amp;gt; Commitment transaction, Alice can always put her Commitment transaction&lt;br/&gt;&amp;gt; on-chain before Bob can put a conflicting current Commitment transaction&lt;br/&gt;&amp;gt; on-chain, thus providing one-shot receives. The details are provided in&lt;br/&gt;&amp;gt; the paper [5].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Finally, it&amp;#39;s important to verify that the delay of Bob&amp;#39;s Commitment&lt;br/&gt;&amp;gt; transaction (caused by the setting of its nLocktime field) does not create&lt;br/&gt;&amp;gt; any problems for Bob. First, for HTLCs offered to Alice (that is, payments&lt;br/&gt;&amp;gt; received by Alice), the current Lightning protocol requires that Bob wait&lt;br/&gt;&amp;gt; until after the expiry of his offered HTLC before he goes on-chain with&lt;br/&gt;&amp;gt; his Commitment and HTLC-timeout transactions. Therefore, the nLocktime&lt;br/&gt;&amp;gt; field has no impact on Bob&amp;#39;s actions regarding HTLCs offered to Alice.&lt;br/&gt;&amp;gt; Second, for HTLCs offered by Alice (that is, payments sent by Alice), the&lt;br/&gt;&amp;gt; WF protocol does not force Bob to put his Commitment and associated&lt;br/&gt;&amp;gt; HTLC-success transactions on-chain before any specific time in order&lt;br/&gt;&amp;gt; guarantee the success of any HTLCs. As a result, Bob&amp;#39;s ability to force&lt;br/&gt;&amp;gt; payment for HTLCs offered by Alice is unaffected by the nLocktime field in&lt;br/&gt;&amp;gt; his Commitment transactions. Note that the Lightning protocol does&lt;br/&gt;&amp;gt; require Bob to put his Commitment and associated HTLC-success transactions&lt;br/&gt;&amp;gt; on-chain by a specific time, which is why the changes described here&lt;br/&gt;&amp;gt; cannot be made to the Lightning protocol to support one-shot receives.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Getting A Payment Receipt&lt;br/&gt;&amp;gt; =========================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Consider again the case where casual user Alice has offered an HTLC to&lt;br/&gt;&amp;gt; Bob. At any time after the expiry of the HTLC, if Alice needs to get a&lt;br/&gt;&amp;gt; payment receipt and Bob is uncooperative, Alice can put her Commitment&lt;br/&gt;&amp;gt; transaction on-chain and then attempt to spend the HTLC output of her&lt;br/&gt;&amp;gt; Commitment transaction tsdB later. As was shown above, she is guaranteed&lt;br/&gt;&amp;gt; to win the race in putting her Commitment transaction on-chain due to the&lt;br/&gt;&amp;gt; nLocktime field in Bob&amp;#39;s Commitment transaction. Therefore, she will&lt;br/&gt;&amp;gt; either get her receipt before she is able to spend the HTLC output or she&lt;br/&gt;&amp;gt; will not have to make her payment (because she succeeded in spending the&lt;br/&gt;&amp;gt; HTLC output). This procedure for getting a payment receipt isn&amp;#39;t one-shot&lt;br/&gt;&amp;gt; and may be awkward for casual users. Fortunately, it&amp;#39;s only required when&lt;br/&gt;&amp;gt; there&amp;#39;s both a payment dispute (or other need to get a receipt quickly)&lt;br/&gt;&amp;gt; and an uncooperative channel partner.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Asynchronous Payments&lt;br/&gt;&amp;gt; =====================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The WF protocol gives significant flexibility to when CLUs have to be&lt;br/&gt;&amp;gt; online, but it still requires that the sender and receiver are both online&lt;br/&gt;&amp;gt; simultaneously. This requirement can be eliminated by keeping the relative&lt;br/&gt;&amp;gt; delay but removing the absolute delay in Alice&amp;#39;s transaction that times&lt;br/&gt;&amp;gt; out an HTLC for a payment that she initiates. The details are given in the&lt;br/&gt;&amp;gt; paper [5].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Related Work&lt;br/&gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The protocol presented here is based extensively on previously-published&lt;br/&gt;&amp;gt; work, namely the Poon-Dryja Lightning channel protocol [1] and the BOLT&lt;br/&gt;&amp;gt; specifications [2]. The asynchronous payments protocol is based on&lt;br/&gt;&amp;gt; Corallo&amp;#39;s proposal for sending tips to an offline receiver [3], but&lt;br/&gt;&amp;gt; differs by using only a relative delay in the sender&amp;#39;s HTLC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The idea of eliminating watchtowers for a casual user by delaying their&lt;br/&gt;&amp;gt; partner&amp;#39;s ability to put transactions on-chain was described by Law [4],&lt;br/&gt;&amp;gt; but the interaction of that delay with HTLCs was not analyzed and that&lt;br/&gt;&amp;gt; paper assumed modifications to the underlying Bitcoin protocol.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Conclusions&lt;br/&gt;&amp;gt; ===========&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This post presents the idea of dividing users into Casual-Lightning-Users&lt;br/&gt;&amp;gt; (CLUs) that only send and receive payments, and Dedicated-Lightning-Users&lt;br/&gt;&amp;gt; (DLUs) that can also route payments. It gives a new protocol that allows&lt;br/&gt;&amp;gt; casual users to send and receive Lightning payments in a trust-free manner&lt;br/&gt;&amp;gt; without requiring a watchtower service. It also allows CLUs to receive&lt;br/&gt;&amp;gt; payments in a one-shot manner (that is, without having to wait for blocks&lt;br/&gt;&amp;gt; to be added to the blockchain). No changes to the Bitcoin protocol are&lt;br/&gt;&amp;gt; required.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The new protocol does have some disadvantages, such as increasing the cost&lt;br/&gt;&amp;gt; of capital for DLUs that partner with CLUs and increasing the latency for&lt;br/&gt;&amp;gt; CLUs to get payment receipts from uncooperative partners. Hopefully, the&lt;br/&gt;&amp;gt; elimination of watchtowers for casual users, and their ability to do&lt;br/&gt;&amp;gt; one-shot receives, will more than make up for these drawbacks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not an expert in the area, so I might have missed something.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Corrections and comments are greatly appreciated.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; John&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; References&lt;br/&gt;&amp;gt; ==========&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] Poon and Dryja, The Bitcoin Lightning Network, available at&lt;br/&gt;&amp;gt;     &lt;a href=&#34;https://lightning.network/lightning-network-paper.pdf&#34;&gt;https://lightning.network/lightning-network-paper.pdf&lt;/a&gt;.&lt;br/&gt;&amp;gt; [2] BOLT specifications, available at&lt;br/&gt;&amp;gt;     &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc&#34;&gt;https://github.com/lightningnetwork/lightning-rfc&lt;/a&gt;.&lt;br/&gt;&amp;gt; [3] Corallo, A Mobile Lightning User Goes to Pay a Mobile Lightning&lt;br/&gt;&amp;gt;     User..., available at&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;.&lt;br/&gt;&amp;gt; [4] Law, Section 3.6 of Scaling Bitcoin With Inherited IDs, available at&lt;br/&gt;&amp;gt;     &lt;a href=&#34;https://github.com/JohnLaw2/btc-iids&#34;&gt;https://github.com/JohnLaw2/btc-iids&lt;/a&gt;.&lt;br/&gt;&amp;gt; [5] Law, Watchtower-Free Lightning Channels For Casual Users, available at&lt;br/&gt;&amp;gt;     &lt;a href=&#34;https://github.com/JohnLaw2/ln-watchtower-free&#34;&gt;https://github.com/JohnLaw2/ln-watchtower-free&lt;/a&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; Sent with Proton Mail secure email.&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;-------------- 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/20221010/f0698834/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20221010/f0698834/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:06:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstjnjvn0uchuaknzdq9djr2ht4mp00xjzds0q6m49n4s7pvcmgxzgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuklv5925</id>
    
      <title type="html">📅 Original date posted:2022-07-01 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstjnjvn0uchuaknzdq9djr2ht4mp00xjzds0q6m49n4s7pvcmgxzgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuklv5925" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspfjmhylv8l8xvd8ttvkaakdjhwhl498vgttaunu2unf30u7cn6mq7cr50t&#39;&gt;nevent1q…r50t&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Joost,&lt;br/&gt;&lt;br/&gt;&amp;gt; isn&amp;#39;t it the case that it is always possible to DoS your peer by just&lt;br/&gt;rejecting any forward that comes in from them?&lt;br/&gt;&lt;br/&gt;Yes, this is a good point. But there is a difference though. If you do that&lt;br/&gt;with inbound fees, the &amp;#34;malicious&amp;#34; peer is able to prevent _everyone_ from&lt;br/&gt;even trying to route through you (because it&amp;#39;s advertised).&lt;br/&gt;&lt;br/&gt;Whereas if they selectively fail HTLCs you forward to them, only the payer&lt;br/&gt;for&lt;br/&gt;that HTLC knows about it, and they can attribute the failure to the&lt;br/&gt;malicious&lt;br/&gt;node, not to you.&lt;br/&gt;&lt;br/&gt;Of course, that malicious node could also withhold the HTLC or return a&lt;br/&gt;malformed error, but unfortunately we cannot easily protect against this.&lt;br/&gt;My point is that this is bad behavior, and we shouldn&amp;#39;t be giving more&lt;br/&gt;tools for nodes to misbehave, and inbound fees are a very powerful tool&lt;br/&gt;to help misbehaving nodes.&lt;br/&gt;&lt;br/&gt;&amp;gt; Or indirectly affecting them negatively by setting high fees on all&lt;br/&gt;outbound channels?&lt;br/&gt;&lt;br/&gt;This case is completely different, because the &amp;#34;malicious&amp;#34; node can&amp;#39;t&lt;br/&gt;selectively&lt;br/&gt;advertise that, it will affect traffic coming from all of their peers so&lt;br/&gt;they&lt;br/&gt;would really be shooting themselves in the foot if they did that.&lt;br/&gt;&lt;br/&gt;&amp;gt; My thinking is that if I accept an incoming htlc, my local balance&lt;br/&gt;increases&lt;br/&gt;&amp;gt; on that incoming channel. My money gets locked up in a channel that may or&lt;br/&gt;&amp;gt; may not be interesting to me. Wouldn&amp;#39;t it be fair to be compensated for&lt;br/&gt;that?&lt;br/&gt;&lt;br/&gt;If that channel isn&amp;#39;t interesting to you, then by all means you should fail&lt;br/&gt;that HTLC or close the channel? Or you shouldn&amp;#39;t have accepted it in the&lt;br/&gt;first place?&lt;br/&gt;&lt;br/&gt;I understand the will to optimize revenue here, but I fear this concrete&lt;br/&gt;proposal leads to many kinds of unhealthy incentives. I agree that there is&lt;br/&gt;a&lt;br/&gt;risk in accepting channels from unknown nodes, but I think it should be&lt;br/&gt;addressed differently: you could for example make the opener pay a fee when&lt;br/&gt;they open a channel to you to compensate that risk (some kind of reversed&lt;br/&gt;liquidity ads).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le ven. 1 juil. 2022 à 14:17, Thomas HUET &amp;lt;thomas.huet at acinq.fr&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Joost,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It was discussed in this issue:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightning/bolts/issues/835&#34;&gt;https://github.com/lightning/bolts/issues/835&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On the network, the traffic is not balanced. Some nodes tend to receive&lt;br/&gt;&amp;gt; more than they send, merchants for instance. For the lightning network to&lt;br/&gt;&amp;gt; be reliable, we need to incentivise people to open channels to such nodes,&lt;br/&gt;&amp;gt; or else there won&amp;#39;t be enough liquidity available and payments will fail.&lt;br/&gt;&amp;gt; The current fee structure provides this incentive: You pay some onchain&lt;br/&gt;&amp;gt; fees and lock some funds and in exchange you will earn routing fees. My&lt;br/&gt;&amp;gt; concern is that your proposed change would break that incentive and make&lt;br/&gt;&amp;gt; the network less reliable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thomas&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le ven. 1 juil. 2022 à 14:02, Joost Jager &amp;lt;joost.jager at gmail.com&amp;gt; a&lt;br/&gt;&amp;gt; écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hi Bastien,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I vaguely remembered that the idea of inbound fees had been discussed&lt;br/&gt;&amp;gt;&amp;gt; before. Before writing my post, I scanned through old ML posts and bolts&lt;br/&gt;&amp;gt;&amp;gt; issues but couldn&amp;#39;t find the discussion. Maybe it was part of a different&lt;br/&gt;&amp;gt;&amp;gt; but related email or a bolts pr?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; With regards to your objections, isn&amp;#39;t it the case that it is always&lt;br/&gt;&amp;gt;&amp;gt; possible to DoS your peer by just rejecting any forward that comes in from&lt;br/&gt;&amp;gt;&amp;gt; them? Or indirectly affecting them negatively by setting high fees on all&lt;br/&gt;&amp;gt;&amp;gt; outbound channels? To me it seems that there is nothing to lose by adding&lt;br/&gt;&amp;gt;&amp;gt; inbound fees.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; My thinking is that if I accept an incoming htlc, my local balance&lt;br/&gt;&amp;gt;&amp;gt; increases on that incoming channel. My money gets locked up in a channel&lt;br/&gt;&amp;gt;&amp;gt; that may or may not be interesting to me. Wouldn&amp;#39;t it be fair to be&lt;br/&gt;&amp;gt;&amp;gt; compensated for that?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Any thoughts from routing node operators would be welcome too (or links&lt;br/&gt;&amp;gt;&amp;gt; to previous threads).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Joost&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Fri, Jul 1, 2022 at 1:19 PM Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Hi Joost,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; As I&amp;#39;ve already stated every time this has been previously discussed, I&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; believe&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; this doesn&amp;#39;t make any sense. The funds that are on the other side of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; channel belong to your peer, not you, so they&amp;#39;re free to use it however&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; they&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; want. If you&amp;#39;re not happy with the way your peer is managing their fees,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; then&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; don&amp;#39;t open channels to them and let the network decide whether you&amp;#39;re&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; right or&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; not.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Moreover, you shouldn&amp;#39;t care at all. If all the funds are on your peer&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; side,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; this isn&amp;#39;t your problem, you used up all the money that was yours. As&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; long as&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the channel is open, this is free inbound liquidity for you, so you&amp;#39;re&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; even&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; benefiting from this.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; If Alice could set fees for Bob&amp;#39;s side of the channel, Alice could&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; arbitrarily&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; DoS Bob&amp;#39;s payments by setting a high fee. This is just one example of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the many&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; ways this idea completely breaks the routing incentives.&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; Bastien&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Le ven. 1 juil. 2022 à 13:10, Joost Jager &amp;lt;joost.jager at gmail.com&amp;gt; a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; écrit :&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Path-finding algorithms that are currently in use generally don’t&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; support negative fees. But in this case, the sum of inbound and outbound&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; fees is still positive and therefore not a problem. If routing nodes set&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; their policies accidentally or intentionally so that the sum of fees turns&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; out negative, senders can just round up to zero and find a path as normal.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Correction to this:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The sum of inbound and outbound are not the fees set by one single&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; routing node. When path-finding considers a candidate hop, this adds the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; outbound fee of the &amp;#34;from&amp;#34; node and the inbound fee of the &amp;#34;to&amp;#34; node.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Because those nodes don&amp;#39;t necessarily coordinate fees, it may happen more&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; often that the fee goes negative. Rounding up to zero is still a quick fix&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and better than ignoring inbound fees completely.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&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/20220701/c3c96202/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220701/c3c96202/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:06:32&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2upxkle2lweju8cjm7w7dc47hz7q87q7tl0gqarmdwxfs3d5agtczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk4gxq2v</id>
    
      <title type="html">📅 Original date posted:2022-07-01 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2upxkle2lweju8cjm7w7dc47hz7q87q7tl0gqarmdwxfs3d5agtczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk4gxq2v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst2y5s3dewtukhqsuks2u9uvr24ayhmtguw4p0y2k6xmqcvraep8cf58cwy&#39;&gt;nevent1q…8cwy&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-07-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Joost,&lt;br/&gt;&lt;br/&gt;As I&amp;#39;ve already stated every time this has been previously discussed, I&lt;br/&gt;believe&lt;br/&gt;this doesn&amp;#39;t make any sense. The funds that are on the other side of the&lt;br/&gt;channel belong to your peer, not you, so they&amp;#39;re free to use it however they&lt;br/&gt;want. If you&amp;#39;re not happy with the way your peer is managing their fees,&lt;br/&gt;then&lt;br/&gt;don&amp;#39;t open channels to them and let the network decide whether you&amp;#39;re right&lt;br/&gt;or&lt;br/&gt;not.&lt;br/&gt;&lt;br/&gt;Moreover, you shouldn&amp;#39;t care at all. If all the funds are on your peer&amp;#39;s&lt;br/&gt;side,&lt;br/&gt;this isn&amp;#39;t your problem, you used up all the money that was yours. As long&lt;br/&gt;as&lt;br/&gt;the channel is open, this is free inbound liquidity for you, so you&amp;#39;re even&lt;br/&gt;benefiting from this.&lt;br/&gt;&lt;br/&gt;If Alice could set fees for Bob&amp;#39;s side of the channel, Alice could&lt;br/&gt;arbitrarily&lt;br/&gt;DoS Bob&amp;#39;s payments by setting a high fee. This is just one example of the&lt;br/&gt;many&lt;br/&gt;ways this idea completely breaks the routing incentives.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le ven. 1 juil. 2022 à 13:10, Joost Jager &amp;lt;joost.jager at gmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Path-finding algorithms that are currently in use generally don’t support&lt;br/&gt;&amp;gt;&amp;gt; negative fees. But in this case, the sum of inbound and outbound fees is&lt;br/&gt;&amp;gt;&amp;gt; still positive and therefore not a problem. If routing nodes set their&lt;br/&gt;&amp;gt;&amp;gt; policies accidentally or intentionally so that the sum of fees turns out&lt;br/&gt;&amp;gt;&amp;gt; negative, senders can just round up to zero and find a path as normal.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Correction to this:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The sum of inbound and outbound are not the fees set by one single routing&lt;br/&gt;&amp;gt; node. When path-finding considers a candidate hop, this adds the outbound&lt;br/&gt;&amp;gt; fee of the &amp;#34;from&amp;#34; node and the inbound fee of the &amp;#34;to&amp;#34; node. Because those&lt;br/&gt;&amp;gt; nodes don&amp;#39;t necessarily coordinate fees, it may happen more often that the&lt;br/&gt;&amp;gt; fee goes negative. Rounding up to zero is still a quick fix and better than&lt;br/&gt;&amp;gt; ignoring inbound fees completely.&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/20220701/6b0313dc/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220701/6b0313dc/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:06:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxlj48mhg87f7uhgrk993j2v804fat7k4xypwsyhj2vp0scf8dq3gzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukm45ay3</id>
    
      <title type="html">📅 Original date posted:2022-06-15 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxlj48mhg87f7uhgrk993j2v804fat7k4xypwsyhj2vp0scf8dq3gzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukm45ay3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdr3hfp8gfwk2ua2xl2mvawf3lcyycl37avgewg32n6hzj0c6du6g6af0nm&#39;&gt;nevent1q…f0nm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-06-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey Zman and list,&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think waxwing&amp;#39;s proposal will help us for private gossip.&lt;br/&gt;The rate-limiting it provides doesn&amp;#39;t seem to be enough in our case.&lt;br/&gt;The proposal rate-limits token issuance to once every N blocks where&lt;br/&gt;N is the age of the utxo to which we prove ownership of. Once the token&lt;br/&gt;is issued and verified, the attacker can spend that utxo, and after N&lt;br/&gt;blocks he&amp;#39;s able to get a new token with this new utxo.&lt;br/&gt;&lt;br/&gt;That is a good enough rate-limit for some scenarios, but in our case&lt;br/&gt;it means that every N blocks people are able to double the capacity&lt;br/&gt;they advertise without actually having more funds.&lt;br/&gt;&lt;br/&gt;We can probably borrow ideas from this proposal, but OTOH I don&amp;#39;t&lt;br/&gt;see how to apply it to lightning gossip, what we want isn&amp;#39;t really rate&lt;br/&gt;limiting, we want a stronger link between advertised capacity and&lt;br/&gt;real on-chain capacity.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mer. 15 juin 2022 à 00:01, ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ## Lightning Gossip&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; # Gossip V2: Now Or Later?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;lt;snip&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A proposal for the &amp;#34;re-design the entire thing&amp;#34; was floated in the past&lt;br/&gt;&amp;gt; by&lt;br/&gt;&amp;gt; &amp;gt; Rusty [6]. It does away with the strict coupling of channels to channel&lt;br/&gt;&amp;gt; &amp;gt; announcements, and instead moves them to the _node_ level. Each node&lt;br/&gt;&amp;gt; would&lt;br/&gt;&amp;gt; &amp;gt; then advertise the set of &amp;#34;outputs&amp;#34; they have control of, which would&lt;br/&gt;&amp;gt; then&lt;br/&gt;&amp;gt; &amp;gt; be mapped to the total capacity of a node, without requiring that these&lt;br/&gt;&amp;gt; &amp;gt; outputs self identify themselves on-chain as Lightning Channels. This&lt;br/&gt;&amp;gt; also&lt;br/&gt;&amp;gt; &amp;gt; opens up the door to different, potentially more privacy preserving&lt;br/&gt;&amp;gt; &amp;gt; proofs-of-channel-ownership (something something zkp).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; waxwing recently posted something interesting over in bitcoin-dev, which&lt;br/&gt;&amp;gt; seems to match the proof-of-channel-ownereship.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://gist.github.com/AdamISZ/51349418be08be22aa2b4b469e3be92f&#34;&gt;https://gist.github.com/AdamISZ/51349418be08be22aa2b4b469e3be92f&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I confess to not understanding the mathy bits but it seems to me, naively,&lt;br/&gt;&amp;gt; that the feature set waxwing points out match well with the issues we want&lt;br/&gt;&amp;gt; to have:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * We want to rate-limit gossip somehow.&lt;br/&gt;&amp;gt; * We want to keep the mapping of UTXOs to channels private.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It requires a global network that cuts across all uses of the same&lt;br/&gt;&amp;gt; mechanism (similar to defiads, but more private --- basically this means&lt;br/&gt;&amp;gt; that it cannot be just Lightning which uses this mechanism, at least to&lt;br/&gt;&amp;gt; acquire tokens-to-broadcast-my-channels) to prevent a UTXO from being&lt;br/&gt;&amp;gt; reused across services, a property I believe is vital to the expected&lt;br/&gt;&amp;gt; spam-resistance.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; # Friend-of-a-friend Balance Sharing &amp;amp; Probing&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A presentation was given on friend-of-a-friend balance sharing [16]. The&lt;br/&gt;&amp;gt; &amp;gt; high level idea is that if we share _some_ information within a local&lt;br/&gt;&amp;gt; &amp;gt; radius, then this gives the sender more information to choose a path&lt;br/&gt;&amp;gt; that&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; potentially more reliable. The tradeoff here ofc is that nodes will be&lt;br/&gt;&amp;gt; &amp;gt; giving away more information that can potentially be used to ascertain&lt;br/&gt;&amp;gt; &amp;gt; payment flows. In an attempt to minimize the amount of information&lt;br/&gt;&amp;gt; shared,&lt;br/&gt;&amp;gt; &amp;gt; the presenter proposed that just 2 bits of information be shared. Some&lt;br/&gt;&amp;gt; &amp;gt; initial simulations showed that sharing local information actually&lt;br/&gt;&amp;gt; performed&lt;br/&gt;&amp;gt; &amp;gt; better than sharing global information (?). Some were puzzled w.r.t how&lt;br/&gt;&amp;gt; &amp;gt; that&amp;#39;s possible, but assuming the slides&#43;methods are published others can&lt;br/&gt;&amp;gt; &amp;gt; dig further into the model/parameter used to signal the inclusion.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Arguably, information like this is already available via probing, so one&lt;br/&gt;&amp;gt; &amp;gt; line of thinking is something like: &amp;#34;why not just share _some_ of it&amp;#34;&lt;br/&gt;&amp;gt; that&lt;br/&gt;&amp;gt; &amp;gt; may actually lead to less internal failures? This is related to a sort of&lt;br/&gt;&amp;gt; &amp;gt; tension between probing as a tool to increase payment reliability and&lt;br/&gt;&amp;gt; also&lt;br/&gt;&amp;gt; &amp;gt; as a tool to degrade privacy in the network. On the other hand, others&lt;br/&gt;&amp;gt; &amp;gt; argued that probing provides natural cover traffic, since they actually&lt;br/&gt;&amp;gt; &amp;gt; _are_ payments, though they may not be intended to succeed.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On the topic of channel probing, a sort of makeshift protocol was&lt;br/&gt;&amp;gt; devised to&lt;br/&gt;&amp;gt; &amp;gt; make it harder in practice, sacrificing too much on the axis of payment&lt;br/&gt;&amp;gt; &amp;gt; reliability. At a high level it proposes that:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * nodes more diligently set both their max_htlc amount, as well as the&lt;br/&gt;&amp;gt; &amp;gt; max_htlc_value_in_flight amount&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * a 50ms (or select other value) timer should be used when sending out&lt;br/&gt;&amp;gt; &amp;gt; commitment signatures, independent of HTLC arrival&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * nodes leverage the max_htlc value to set a false ceiling on the max in&lt;br/&gt;&amp;gt; &amp;gt; flight parameter&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * for each HTLC sent/forwarded, select 2 other channels at random and&lt;br/&gt;&amp;gt; &amp;gt; reduce the &amp;#34;fake&amp;#34; in-flight ceiling for a period of time&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Some more details still need to be worked out, but some felt that this&lt;br/&gt;&amp;gt; would&lt;br/&gt;&amp;gt; &amp;gt; kick start more research into this area, and also make balance mapping&lt;br/&gt;&amp;gt; &amp;gt; _slightly_ more difficult. From afar, it may be the case that achieving&lt;br/&gt;&amp;gt; &amp;gt; balance privacy while also achieving acceptable levels of payment&lt;br/&gt;&amp;gt; &amp;gt; reliability might be at odds with each other.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A point that was brought up is that nodes can lie about their capacity,&lt;br/&gt;&amp;gt; and there would be no way to counteract this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Even given the above, it would be trivial for a lying node to randomly lie&lt;br/&gt;&amp;gt; about their `max_htlc` to still be noticed by nodes who try to filter out&lt;br/&gt;&amp;gt; nodes who do not update their `max_htlc`s.&lt;br/&gt;&amp;gt; (maximal lying is to always say 50% of your capacity is in `max_htlc`,&lt;br/&gt;&amp;gt; your node can lie by setting `max_htlc` from 35%-&amp;gt;65%, you can coordinate&lt;br/&gt;&amp;gt; this with another lying peer node too by use of an odd message number to&lt;br/&gt;&amp;gt; set up the lying protocol so both of you can lie about the channel capacity&lt;br/&gt;&amp;gt; consistently)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think your best bet is really to utilize feerates, as lying with those&lt;br/&gt;&amp;gt; is expected to lead to economic loss.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;lt;snip&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; # Node Fee Optimization &amp;amp; Fee Rate Cards&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Over the past few years, a common thread we&amp;#39;ve seen across successful&lt;br/&gt;&amp;gt; &amp;gt; routing nodes is dynamic fee setting as a way to encourage/discourage&lt;br/&gt;&amp;gt; &amp;gt; traffic. A routing nodes can utilize the set of fees of a channel to&lt;br/&gt;&amp;gt; either&lt;br/&gt;&amp;gt; &amp;gt; make it too expensive for other nodes to route through (it&amp;#39;s already&lt;br/&gt;&amp;gt; &amp;gt; depleted don&amp;#39;t try unless you&amp;#39;ll give be 10 mil sats, which no one&lt;br/&gt;&amp;gt; would) or&lt;br/&gt;&amp;gt; &amp;gt; very cheap, which&amp;#39;ll incentivize flows in the other direction. If all&lt;br/&gt;&amp;gt; nodes&lt;br/&gt;&amp;gt; &amp;gt; are constantly sending out updates of this nature, then it can generate a&lt;br/&gt;&amp;gt; &amp;gt; lot of traffic, and also sort of leak more balance information overtime&lt;br/&gt;&amp;gt; &amp;gt; (which some nodes are already doing: using fees/max_htlc to communicate&lt;br/&gt;&amp;gt; &amp;gt; available balances).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; One attendee proposed allowing nodes to express a sort of fee gradient&lt;br/&gt;&amp;gt; via a&lt;br/&gt;&amp;gt; &amp;gt; static curve/bucket/function, instead of dynamically communicating what&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; &amp;gt; latest state of the fee&#43;liquidity distribution looks like. A possible&lt;br/&gt;&amp;gt; &amp;gt; manifestation could be a series of buckets, each of which with varying&lt;br/&gt;&amp;gt; fee&lt;br/&gt;&amp;gt; &amp;gt; rates. If your payment consumes 50% of channel balance, then you pay this&lt;br/&gt;&amp;gt; &amp;gt; rate, otherwise if it&amp;#39;s 5% you pay this rate, etc, etc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think this is not what was actually proposed?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As I understood it, the percent range is not how much the payment consumes&lt;br/&gt;&amp;gt; of the channel balance but instead the percent range is the&lt;br/&gt;&amp;gt; probability-of-success given a uniform distribution of channel balance.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For instance if the current channel balance is currently 67%, then the&lt;br/&gt;&amp;gt; forwarding node will succeed all payments that pay a fee from the 33% fee&lt;br/&gt;&amp;gt; card or higher, otherwise fail the payment with &amp;#34;not enough fees&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The intent is that payers will treat 100% - fee_card_percent as the&lt;br/&gt;&amp;gt; probability-of-failure of that channel, and can select which fee card&lt;br/&gt;&amp;gt; maximizes both its probability-of-failure and max-fee in some kind of&lt;br/&gt;&amp;gt; reasonable exchange rate.&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/20220615/56c7bcf8/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220615/56c7bcf8/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:06:14&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvl895w3jp8rfhwmffhptlgj6x3hvdatsxjpu9flx07ry8d804mcqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukqa6q3u</id>
    
      <title type="html">📅 Original date posted:2021-12-15 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvl895w3jp8rfhwmffhptlgj6x3hvdatsxjpu9flx07ry8d804mcqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukqa6q3u" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8r8u6lvxxu024lsh3pex087er70s9t6r8c3j9dttxmsk84843w3s62wrws&#39;&gt;nevent1q…wrws&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning,&lt;br/&gt;&lt;br/&gt;Thanks for looking into this!&lt;br/&gt;&lt;br/&gt;I believe there is another limitation that you&amp;#39;re not mentioning: it&amp;#39;s&lt;br/&gt;easy for a malicious node to blame an honest node. I&amp;#39;m afraid this is a&lt;br/&gt;serious limitation of the proposal.&lt;br/&gt;&lt;br/&gt;If we have a payment: A -&amp;gt; B -&amp;gt; C -&amp;gt; D and C is malicious.&lt;br/&gt;C can forward the payment to D, and even wait for D to correctly settle it&lt;br/&gt;(with `update_fulfill_htlc` or `update_fail_htlc`), but then withhold that&lt;br/&gt;message instead of forwarding it to B. Then C blames D, everyone agrees that&lt;br/&gt;D is bad node that must be avoided. Later, C unblocks the `update_*_htlc`&lt;br/&gt;and everyone thinks that D hodled the HTLC for a long time, which is bad.&lt;br/&gt;&lt;br/&gt;Apart from this, I think the blame proof isn&amp;#39;t that easy to build.&lt;br/&gt;It cannot simply use `commitment_signed`, because HTLCs are relayed only&lt;br/&gt;once the previous commitment has been revoked (through `revoke_and_ack`).&lt;br/&gt;So the proof should contain data from `commitment_signed` and a proof that&lt;br/&gt;the previous commitment was revoked (and that it was indeed the previous&lt;br/&gt;commitment) which is likely very hard to do securely without disclosing&lt;br/&gt;too much about your channel.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mer. 15 déc. 2021 à 02:08, lightning developer via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I have just published a proposal to address (but unfortunately not solve)&lt;br/&gt;&amp;gt; the old issue of HTLC spam via onions:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightning-developer/lightning-network-documents/blob/main/A%20blame%20ascribing%20protocol%20to%20mitigate%20HTLC%20spam.md&#34;&gt;https://github.com/lightning-developer/lightning-network-documents/blob/main/A%20blame%20ascribing%20protocol%20to%20mitigate%20HTLC%20spam.md&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The proposal picks up the early idea by Rusty, AJ and others to ascribe&lt;br/&gt;&amp;gt; blame to a malicious actor but hopefully in a cheaper way than providing&lt;br/&gt;&amp;gt; proof of a channel close by making use of a new lightning message&lt;br/&gt;&amp;gt; `blame_channel` in combination with the proposed onion messages. I guess&lt;br/&gt;&amp;gt; similar ideas and follow ups are already community knowledge (for example&lt;br/&gt;&amp;gt; the local reputation tracking by Jim Posen at:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-May/001232.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-May/001232.html&lt;/a&gt;)&lt;br/&gt;&amp;gt; However I had the feeling that the current write up might provide some&lt;br/&gt;&amp;gt; additional value to the community.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The proposal also ensures that blame can be ascribed quickly by requiring&lt;br/&gt;&amp;gt; a reply from the downstream onion that is proportional to the `cltv delta`&lt;br/&gt;&amp;gt; at the hop. In this way a sending node will quickly know that a (and more&lt;br/&gt;&amp;gt; importantly which) downstream channel is not working properly.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I will be delighted to read your feedback, thoughts and criticism. For&lt;br/&gt;&amp;gt; your convenience and archiving I also copied the raw markdown file of the&lt;br/&gt;&amp;gt; proposal to the end of this Mail.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sincerely Lighting Developer&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --------- Begin Proposal ----------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # A blame ascribing protocol towards ensuring time limitation of stuck&lt;br/&gt;&amp;gt; HTLCs in flight.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I was reviewing the [HOLD fee proposal by Joost](&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightning/bolts/pull/843&#34;&gt;https://github.com/lightning/bolts/pull/843&lt;/a&gt;) and the [excellent summary&lt;br/&gt;&amp;gt; of known mitigation techniques by t-bast](&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/t-bast/lightning-docs/blob/master/spam-prevention.md&#34;&gt;https://github.com/t-bast/lightning-docs/blob/master/spam-prevention.md&lt;/a&gt;)&lt;br/&gt;&amp;gt; when I revisited the very [first idea to mitigate HTLC spam via onions](&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2015-August/000135.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2015-August/000135.html&lt;/a&gt;)&lt;br/&gt;&amp;gt; that was discussed back in 2015 by Rusty, AJ and a few others. At that time&lt;br/&gt;&amp;gt; the idea was to ascribe blame to a malicious actor by triggering a force&lt;br/&gt;&amp;gt; close and proofing ones own honesty by providing the force close&lt;br/&gt;&amp;gt; transaction. I think there is a lot of merit to the idea of ascribing blame&lt;br/&gt;&amp;gt; and I think it might be possible with the help of [onion messages](&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightning/bolts/pull/759&#34;&gt;https://github.com/lightning/bolts/pull/759&lt;/a&gt;) without the necessity to&lt;br/&gt;&amp;gt; trigger full force closes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As I am not entirely sure if this suggestion is a reasonable improvement&lt;br/&gt;&amp;gt; (it certainly does not resolve all the issues we have) I did not spec out&lt;br/&gt;&amp;gt; the details and message formats and fields but only described the high&lt;br/&gt;&amp;gt; level idea. I hope this is sufficient to discuss the principles and get the&lt;br/&gt;&amp;gt; feedback from you if you consider this to be of use and if you think we&lt;br/&gt;&amp;gt; should work on the details.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Idea / Obervation:&lt;br/&gt;&amp;gt; =============&lt;br/&gt;&amp;gt; The key idea is to set a fixed time in seconds (the `reply_interval`)&lt;br/&gt;&amp;gt; after successfully negotiating an HTLC until when a node requires a&lt;br/&gt;&amp;gt; resultion or reply from its peer to which it previously has forwarded a&lt;br/&gt;&amp;gt; downstream onion. If the HTLC is not resolved and no reply was sent the&lt;br/&gt;&amp;gt; downstream peer is considered to be acting maliciously.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The amount in seconds can be proportional to the `cltv_delta` of that hop.&lt;br/&gt;&amp;gt; To me the arbitrary choice of translating 10 blocks of `cltv_delta` to `1`&lt;br/&gt;&amp;gt; second of expected reply time seems reasonable for now but could be chosen&lt;br/&gt;&amp;gt; differently as long as the entire network (or at least every node included&lt;br/&gt;&amp;gt; to the payment attempt) agrees upon the same conversion rate from&lt;br/&gt;&amp;gt; `cltv_delta` to expected response time from downstream nodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are three cases for the reply:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The Good reply case (HTLC resolution):&lt;br/&gt;&amp;gt; ==============================&lt;br/&gt;&amp;gt; The good case is if the payment will succesfully settle or fail within the&lt;br/&gt;&amp;gt; `reply_interval`. Thus the reply comes in the form of either an&lt;br/&gt;&amp;gt; `update_fulfill_htlc` or an `update_fail_htlc`. In any case the HTLC will&lt;br/&gt;&amp;gt; be removed quickly and the reply can propagate back to the upstream peers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The bad reply case:&lt;br/&gt;&amp;gt; ===============&lt;br/&gt;&amp;gt; If a node `N` is not able to send one of those two `update_` messages&lt;br/&gt;&amp;gt; because the HTLC was not resolved from the downstream channels it MUST send&lt;br/&gt;&amp;gt; back a new message called `blame_channel`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The `blame_channel` includes a proof that `N` has previously successfully&lt;br/&gt;&amp;gt; set up the HTLC with the next peer. This may for example be done by&lt;br/&gt;&amp;gt; including the `commitment_signed` message that the node has received from&lt;br/&gt;&amp;gt; the next peer as this commits to this (and potentially other) HTLCs.&lt;br/&gt;&amp;gt; (Alternatively one could extract the relevant `htlc_signature` or adopt&lt;br/&gt;&amp;gt; `commitment_signed` to include a signature to the `payment_hash` that can&lt;br/&gt;&amp;gt; be verified with the node&amp;#39;s pubkey)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The propagated bad reply case:&lt;br/&gt;&amp;gt; ========================&lt;br/&gt;&amp;gt; A node might have received an `blame_channel` message from a downstream&lt;br/&gt;&amp;gt; channel and can propagate this back. To disallow spoofing, nodes might&lt;br/&gt;&amp;gt; always have to extend the message with their own signature. (I have not&lt;br/&gt;&amp;gt; thought about this extensively yet). This will make the downstream path of&lt;br/&gt;&amp;gt; the payment transparent to every node on the upstream path (until the slow&lt;br/&gt;&amp;gt; /misbehaving node). Nodes SHOULD propagate the `blame_channel` back in a&lt;br/&gt;&amp;gt; timely manner unless they want to be blamed for the delay themselves.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Extensions:&lt;br/&gt;&amp;gt; =========&lt;br/&gt;&amp;gt; Of course a malicious node `M` might after receiving an `update_add_htlc`&lt;br/&gt;&amp;gt; from a node `N` interrupt the channel state machine at various moments&lt;br/&gt;&amp;gt; before the state successfully moved forward. This would prevent the honest&lt;br/&gt;&amp;gt; node `N` to ascribe blame to the malicious node `M` as it cannot include&lt;br/&gt;&amp;gt; proof that it forwarded the HTLC successfully. Thus instead of including&lt;br/&gt;&amp;gt; the proof of successfully having set up the HTLC the node `N` ascribing&lt;br/&gt;&amp;gt; blame to `M` might include to the `blame_channel` the last messages it sent&lt;br/&gt;&amp;gt; to the downstream peer that have not been acknowledged to be able to proof&lt;br/&gt;&amp;gt; that it tried to move the state machine forward and set up the HTLC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A node on an upstream channel could verify that `N` was indeed honest and&lt;br/&gt;&amp;gt; has also delivered these messages to `M` by sending these messages via a&lt;br/&gt;&amp;gt; different path as an onion message to `M`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now if `M` was indeed dishonest `M` would not respond to the onion message&lt;br/&gt;&amp;gt; indicating to the upstream node that `N` was honestly ascribing blame to&lt;br/&gt;&amp;gt; `M`. Otherwise `M` could try to move the state forward and proof this to&lt;br/&gt;&amp;gt; the upstream node in the onion reply indicating that it was actually `N`&lt;br/&gt;&amp;gt; who tried to act malicious. In any case if there was a disagreement the&lt;br/&gt;&amp;gt; upstream nodes would in any case learn that there is a problem on the&lt;br/&gt;&amp;gt; channel between `N` and `M`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Limitations:&lt;br/&gt;&amp;gt; =========&lt;br/&gt;&amp;gt; There are two limitations that I am currently aware of:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Being able to ascribe blame does not directly prevent spam via HTLCs&lt;br/&gt;&amp;gt; 2. With MPP the short `reply_interval` might be an issue as the honest&lt;br/&gt;&amp;gt; recipient of a partial payment might just not have received enough parts of&lt;br/&gt;&amp;gt; the entire payment and just can&amp;#39;t fulfill the payment yet. In this case the&lt;br/&gt;&amp;gt; blame is being ascribed to the recipient and nodes would learn the&lt;br/&gt;&amp;gt; recipient. I hope we could resolve such issues by selecting a higher grace&lt;br/&gt;&amp;gt; period until we ascribe blame. For example if all the times above are are&lt;br/&gt;&amp;gt; added to the 60 seconds of timeout that recipients of MPP payments&lt;br/&gt;&amp;gt; currently have this would not trigger if the sender just needs more time to&lt;br/&gt;&amp;gt; send partial payments.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Advantages:&lt;br/&gt;&amp;gt; ==========&lt;br/&gt;&amp;gt; 1. Through the mechanism to ascribe blame several nodes will learn about&lt;br/&gt;&amp;gt; an malicious or slow actor on the network and can take other preventive&lt;br/&gt;&amp;gt; measures especially if they also have direct channels with that peer&lt;br/&gt;&amp;gt; 2. Once we have PTLCs and a protocol for stuckless payments an honest&lt;br/&gt;&amp;gt; sender of the payment may quickly discard this stuck HTLC (PTLC) and try&lt;br/&gt;&amp;gt; another path without including the malicious node.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Conclusion:&lt;br/&gt;&amp;gt; =========&lt;br/&gt;&amp;gt; I am not sure if the suggestions in this proposal are as secure as we need&lt;br/&gt;&amp;gt; them to be but I wasn&amp;#39;t able to detect any obvious flaws which is why I&lt;br/&gt;&amp;gt; would like to kindly ask you to review and criticize them. What I propose&lt;br/&gt;&amp;gt; is not the full solution to nodes abusing the possibilities of onion&lt;br/&gt;&amp;gt; routing and HTLCs spam but I believe it is a step in the right direction&lt;br/&gt;&amp;gt; towards mitigation by presenting a collection of a few observations which&lt;br/&gt;&amp;gt; are hopefully useful to bring us a step closer towards guaranteeing fast&lt;br/&gt;&amp;gt; settlement of payments.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sent with ProtonMail &amp;lt;&lt;a href=&#34;https://protonmail.com/&amp;gt&#34;&gt;https://protonmail.com/&amp;gt&lt;/a&gt;; Secure Email.&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/20211215/67451838/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211215/67451838/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:47&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrw9ahwactfvqea4a0rzu9ah2edyaqnnmxs0e9j4mlsv862m84uhqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukg4e3wp</id>
    
      <title type="html">📅 Original date posted:2021-12-22 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrw9ahwactfvqea4a0rzu9ah2edyaqnnmxs0e9j4mlsv862m84uhqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukg4e3wp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv5caew5m3am36fsrn885kunl6hdyysz0kfsuqgtuj72car66pf6ce2al56&#39;&gt;nevent1q…al56&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-22&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey AJ,&lt;br/&gt;&lt;br/&gt;Right, I was probably confused between local/remote, especially when&lt;br/&gt;we&amp;#39;re talking about our anchor in the remote commitment (should it be&lt;br/&gt;called local anchor, which is from our point of view, or remote?).&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s call them Alice and Bob, and Bob is publishing a commitment.&lt;br/&gt;Correct me if I&amp;#39;m wrong there, what you&amp;#39;re suggesting is that:&lt;br/&gt;&lt;br/&gt;* Bob&amp;#39;s anchor on Bob&amp;#39;s commitment can be spent with revkey&lt;br/&gt;* Alice&amp;#39;s anchor on Bob&amp;#39;s commitment can be spent with Alice&amp;#39;s pubkey&lt;br/&gt;&lt;br/&gt;This does ensure that each participant is able to claim their anchor in&lt;br/&gt;the latest commitment, and Alice is able to claim both anchors in any of&lt;br/&gt;Bob&amp;#39;s outdated commitments.&lt;br/&gt;&lt;br/&gt;But I think it defeats the `OP_16 OP_CHECKSEQUENCEVERIFY` script branch.&lt;br/&gt;We have that branch to allow anyone to spend anchor outputs *after* the&lt;br/&gt;commitment is confirmed, to avoid keeping them around in the utxo set&lt;br/&gt;forever. However, the trick is that the internal pubkey must be set to&lt;br/&gt;something that is publicly revealed when the channel closes. Now that we&lt;br/&gt;put the revkey in internal pubkeys everywhere instead of script branches,&lt;br/&gt;that revkey is *not* revealed when channels close with the latest commit.&lt;br/&gt;So it would prevent people from using that script branch to clean up the&lt;br/&gt;utxo set...&lt;br/&gt;&lt;br/&gt;I have currently used &amp;lt;local_delayedpubkey&amp;gt; and &amp;lt;remote_pubkey&amp;gt; because&lt;br/&gt;they&amp;#39;re revealed whenever main outputs are claimed, but there is probably&lt;br/&gt;a smarter solution (maybe one that would let us use revkey here as you&lt;br/&gt;suggest), this will be worth thinking about a bit more.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mar. 21 déc. 2021 à 17:04, Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; On Tue, Dec 21, 2021 at 04:25:41PM &#43;0100, Bastien TEINTURIER wrote:&lt;br/&gt;&amp;gt; &amp;gt; The reason we have &amp;#34;toxic waste&amp;#34; with HTLCs is because we commit to the&lt;br/&gt;&amp;gt; &amp;gt; payment_hash directly inside the transaction scripts, so we need to&lt;br/&gt;&amp;gt; &amp;gt; remember all the payment_hash we&amp;#39;ve seen to be able to recreate the&lt;br/&gt;&amp;gt; &amp;gt; scripts (and spend the outputs, even if they are revoked).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think &amp;#34;toxic waste&amp;#34; refers to having old data around that, if used,&lt;br/&gt;&amp;gt; could cause you to lose all the funds in your channel -- that&amp;#39;s why it&amp;#39;s&lt;br/&gt;&amp;gt; toxic. This is more just regular landfill :)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; *_anchor: dust, who cares -- might be better if local_anchor used key =&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; revkey&lt;br/&gt;&amp;gt; &amp;gt; I don&amp;#39;t think we can use revkey,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; musig(revkey, remote_key)&lt;br/&gt;&amp;gt;   --&amp;gt; allows them to spend after you&amp;#39;ve revealed the secret for revkey&lt;br/&gt;&amp;gt;       you can never spend because you&amp;#39;ll never know the secret for&lt;br/&gt;&amp;gt;       remote_key&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; but if you just say:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (revkey)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; then you can spend (because you know revkey) immediately (because it&amp;#39;s&lt;br/&gt;&amp;gt; an anchor output, so intended to be immediately spent) or they can spend&lt;br/&gt;&amp;gt; if it&amp;#39;s an obsolete commitment and you&amp;#39;ve revealed the revkey secret.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; this would prevent us from bumping the&lt;br/&gt;&amp;gt; &amp;gt; current remote commitment if it appears on-chain (because we don&amp;#39;t know&lt;br/&gt;&amp;gt; &amp;gt; the private revkey yet if this is the latest commitment). Usually the&lt;br/&gt;&amp;gt; &amp;gt; remote peer should bump it, but if they don&amp;#39;t, we may want to bump it&lt;br/&gt;&amp;gt; &amp;gt; ourselves instead of publishing our own commitment (where our main&lt;br/&gt;&amp;gt; &amp;gt; output has a long CSV).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If we&amp;#39;re going to bump someone else&amp;#39;s commitment, we&amp;#39;ll use the&lt;br/&gt;&amp;gt; remote_anchor they provided, not the local_anchor, so I think this is&lt;br/&gt;&amp;gt; fine (as long as I haven&amp;#39;t gotten local/remote confused somewhere along&lt;br/&gt;&amp;gt; the way).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; aj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- 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/20211222/84da9f4a/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211222/84da9f4a/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxpnch8uctppln9rpthq8d7207cma9gzx3qnzv260n2mhxjn6qangzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukn6qhfs</id>
    
      <title type="html">📅 Original date posted:2021-12-21 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxpnch8uctppln9rpthq8d7207cma9gzx3qnzv260n2mhxjn6qangzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukn6qhfs" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8w7xj6af79ghhx7sxku9xyedz7d66h8gfdstwjed5nk3agnygpasra4452&#39;&gt;nevent1q…4452&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-21&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey AJ and list,&lt;br/&gt;&lt;br/&gt;That&amp;#39;s a very good point, it&amp;#39;s really worth highlighting!&lt;br/&gt;&lt;br/&gt;The reason we have &amp;#34;toxic waste&amp;#34; with HTLCs is because we commit to the&lt;br/&gt;payment_hash directly inside the transaction scripts, so we need to&lt;br/&gt;remember all the payment_hash we&amp;#39;ve seen to be able to recreate the&lt;br/&gt;scripts (and spend the outputs, even if they are revoked).&lt;br/&gt;&lt;br/&gt;But with PTLCs, we commit to a payment_point outside of the scripts (in&lt;br/&gt;the adaptor signature that is exchanged), so we&amp;#39;re able to recreate the&lt;br/&gt;scripts independently of the payment details! This also means that the&lt;br/&gt;payment_point never appears on-chain (which is good for privacy) whereas&lt;br/&gt;the payment_hash does appear on-chain for HTLCs.&lt;br/&gt;&lt;br/&gt;*_anchor: dust, who cares -- might be better if local_anchor used key =&lt;br/&gt;&amp;gt; revkey&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think we can use revkey, this would prevent us from bumping the&lt;br/&gt;current remote commitment if it appears on-chain (because we don&amp;#39;t know&lt;br/&gt;the private revkey yet if this is the latest commitment). Usually the&lt;br/&gt;remote peer should bump it, but if they don&amp;#39;t, we may want to bump it&lt;br/&gt;ourselves instead of publishing our own commitment (where our main&lt;br/&gt;output has a long CSV).&lt;br/&gt;&lt;br/&gt;But as you already mentioned, who cares, it&amp;#39;s dust and we don&amp;#39;t even need&lt;br/&gt;it to CPFP the revoked commitment, we can use any other output since the&lt;br/&gt;revocation path isn&amp;#39;t encumbered with a CSV 1.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le dim. 19 déc. 2021 à 23:23, Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; On Wed, Dec 08, 2021 at 04:02:02PM &#43;0100, Bastien TEINTURIER wrote:&lt;br/&gt;&amp;gt; &amp;gt; I updated my article [0], people jumping on the thread now may find it&lt;br/&gt;&amp;gt; &amp;gt; helpful to better understand this discussion.&lt;br/&gt;&amp;gt; &amp;gt; [0] &lt;a href=&#34;https://github.com/t-bast/lightning-docs/pull/16&#34;&gt;https://github.com/t-bast/lightning-docs/pull/16&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since merged, so&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/t-bast/lightning-docs/blob/master/taproot-updates.md&#34;&gt;https://github.com/t-bast/lightning-docs/blob/master/taproot-updates.md&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So imagine that this proposal is finished and widely adopted/deployed&lt;br/&gt;&amp;gt; and someone adds an additional feature bit that allows a channel to&lt;br/&gt;&amp;gt; forward PTLCs only, no HTLCs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then suppose that you forget every old PTLC, because you don&amp;#39;t like&lt;br/&gt;&amp;gt; having your channel state grow without bound. What happens if your&lt;br/&gt;&amp;gt; counterparty broadcasts an old state?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * the musig2 channel funding is irrelevant -- the funding tx has been&lt;br/&gt;&amp;gt;    spend at this point&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * the unspent commitment outputs pay to:&lt;br/&gt;&amp;gt;      to_local: ipk = musig(revkey, mykey) -- known ; scripts also known&lt;br/&gt;&amp;gt;      to_remote: claimable in 1 block, would be better if ipk was also musig&lt;br/&gt;&amp;gt;      *_anchor: dust, who cares -- might be better if local_anchor used&lt;br/&gt;&amp;gt;         key = revkey&lt;br/&gt;&amp;gt;      *_htlc: irrelevant by definition&lt;br/&gt;&amp;gt;      local_ptlc: ipk = musig(revkey, mykey) -- known; scripts also known&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  * commitment outputs may be immediately spent via layered txs. if so,&lt;br/&gt;&amp;gt;    their outputs are: ipk = musig(revkey, mykey); with fixed scripts,&lt;br/&gt;&amp;gt;    that include a relative timelock&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So provided you know the revocation key (which you do, because it&amp;#39;s an&lt;br/&gt;&amp;gt; old transaction and that only requires log(states) data to reconstruct)&lt;br/&gt;&amp;gt; and your own private key, you can reconstruct all the scripts and use&lt;br/&gt;&amp;gt; key path spends for every output immediately (excepting the local_anchor,&lt;br/&gt;&amp;gt; and to_remote is delayed by a block).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So while this doesn&amp;#39;t achieve eltoo&amp;#39;s goal of &amp;#34;no toxic waste&amp;#34;, I believe&lt;br/&gt;&amp;gt; it does achieve the goal of &amp;#34;state information is bounded no matter&lt;br/&gt;&amp;gt; how long you leave the channel open / how many transactions travel over&lt;br/&gt;&amp;gt; the channel&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (Provided you&amp;#39;re willing to wait for the other party to attempt to claim&lt;br/&gt;&amp;gt; a htlc via their layered transaction, you can use this strategy for&lt;br/&gt;&amp;gt; htlcs as well as ptlcs -- however this leaves you the risk that they&lt;br/&gt;&amp;gt; never attempt to claim the funds, which may leave you out of pocket,&lt;br/&gt;&amp;gt; and may give them the opportunity to do an attack along the lines of&lt;br/&gt;&amp;gt; &amp;#34;you don&amp;#39;t get access to the $10,000 locked in old HTLCs unless you pay&lt;br/&gt;&amp;gt; me $1,000&amp;#34;.  So I don&amp;#39;t think that&amp;#39;s really a smart thing to do)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; aj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- 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/20211221/471cbd0d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211221/471cbd0d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:41&#43;02:00</updated>
  </entry>

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

  <entry>
    <id>https://nostr.ae/nevent1qqsdvzr9lmyx3ua3gp5cr8xwmfcjydgvpan5xr7dfc3ezpuptdxgjjszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk2yjpjh</id>
    
      <title type="html">📅 Original date posted:2021-12-08 📝 Original message: Hi Z, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdvzr9lmyx3ua3gp5cr8xwmfcjydgvpan5xr7dfc3ezpuptdxgjjszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk2yjpjh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrcd67kpr67petdmt49h50lzn8zkav9y56m2yvpppz9s6qpwdzeagpjh396&#39;&gt;nevent1q…h396&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Z,&lt;br/&gt;&lt;br/&gt;`SIGHASH_NONE | SIGHASH_NOINPUT` (which will take another what, four&lt;br/&gt;&amp;gt; years?) or a similar &amp;#34;covenant&amp;#34; opcode,&lt;br/&gt;&lt;br/&gt;such as `OP_CHECKTEMPLATEVERIFY` without any commitments or an&lt;br/&gt;&amp;gt; `OP_CHECKSIGFROMSTACK` on an empty message.&lt;br/&gt;&amp;gt; All you really need is a signature for an empty message, really...&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;That fails my requirement of &amp;#34;deployable in 2022&amp;#34; :)&lt;br/&gt;&lt;br/&gt;Same thing applies to fast-forwards: I do see their value, but I&amp;#39;d like to&lt;br/&gt;focus on a first version with minimal changes to the transaction structure&lt;br/&gt;and the update protocol, to ensure we can actually get agreement on it&lt;br/&gt;somewhat quickly and ship it in 2022. Then we can start working on a&lt;br/&gt;more ambitious rework of the protocol that adds a lot of cool features,&lt;br/&gt;such as what AJ proposed recently.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mer. 8 déc. 2021 à 00:52, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning t-bast,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I believe these new transactions may require an additional round-trip.&lt;br/&gt;&amp;gt; &amp;gt; Let&amp;#39;s take a very simple example, where we have one pending PTLC in each&lt;br/&gt;&amp;gt; &amp;gt; direction: PTLC_AB was offered by A to B and PTLC_BA was offered by B to&lt;br/&gt;&amp;gt; A.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Now A makes some unrelated updates and wants to sign a new commitment.&lt;br/&gt;&amp;gt; &amp;gt; A cannot immediately send her `commitment_signed` to B.&lt;br/&gt;&amp;gt; &amp;gt; If she did, B would be able to broadcast this new commitment, and A would&lt;br/&gt;&amp;gt; &amp;gt; not be able to claim PTLC_BA from B&amp;#39;s new commitment (even if she knew&lt;br/&gt;&amp;gt; &amp;gt; the payment secret) because she wouldn&amp;#39;t have B&amp;#39;s signature for the new&lt;br/&gt;&amp;gt; &amp;gt; PTLC-remote-success transaction.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; So we first need B to send a new message `remote_ptlcs_signed` to A that&lt;br/&gt;&amp;gt; &amp;gt; contains B&amp;#39;s adaptor signatures for the PTLC-remote-success transactions&lt;br/&gt;&amp;gt; &amp;gt; that would spend B&amp;#39;s future commitment. After that A can safely send her&lt;br/&gt;&amp;gt; &amp;gt; `commitment_signed`. Similarly, A must send `remote_ptlcs_signed` to B&lt;br/&gt;&amp;gt; &amp;gt; before B can send its `commitment_signed`.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; It&amp;#39;s actually not that bad, we&amp;#39;re only adding one message in each&lt;br/&gt;&amp;gt; direction,&lt;br/&gt;&amp;gt; &amp;gt; and we&amp;#39;re not adding more data (apart from nonces) to existing messages.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If you have ideas on how to avoid this new message, I&amp;#39;d be glad to hear&lt;br/&gt;&amp;gt; &amp;gt; them, hopefully I missed something again and we can make it better!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; `SIGHASH_NONE | SIGHASH_NOINPUT` (which will take another what, four&lt;br/&gt;&amp;gt; years?) or a similar &amp;#34;covenant&amp;#34; opcode, such as `OP_CHECKTEMPLATEVERIFY`&lt;br/&gt;&amp;gt; without any commitments or an `OP_CHECKSIGFROMSTACK` on an empty message.&lt;br/&gt;&amp;gt; All you really need is a signature for an empty message, really...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alternately, fast-forwards, which avoid this because it does not change&lt;br/&gt;&amp;gt; commitment transactions on the payment-forwarding path.&lt;br/&gt;&amp;gt; You only change commitment transactions once you have enough changes to&lt;br/&gt;&amp;gt; justify collapsing them.&lt;br/&gt;&amp;gt; Even in the aj formulation, when A adds a PTLC it only changes the&lt;br/&gt;&amp;gt; transaction that hosts **only** A-&amp;gt;B PTLCs as well as the A main output,&lt;br/&gt;&amp;gt; all of which can be sent outright by A without changing any B-&amp;gt;A PTLCs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Basically... instead of a commitment tx like this:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;                         &#43;-------&#43;&lt;br/&gt;&amp;gt;     funding outpoint --&amp;gt;|       |--&amp;gt; A main&lt;br/&gt;&amp;gt;                         |       |--&amp;gt; B main&lt;br/&gt;&amp;gt;                         |       |--&amp;gt; A-&amp;gt;B PTLC&lt;br/&gt;&amp;gt;                         |       |--&amp;gt; B-&amp;gt;A PTLC&lt;br/&gt;&amp;gt;                         &#43;-------&#43;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We could do this instead:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;                         &#43;-------&#43;2of2  &#43;-----&#43;&lt;br/&gt;&amp;gt;     funding outpoint --&amp;gt;|       |-----&amp;gt;|     |--&amp;gt; A main&lt;br/&gt;&amp;gt;                         |       |      |     |--&amp;gt; A-&amp;gt;B PTLC&lt;br/&gt;&amp;gt;                         |       |      &#43;-----&#43;&lt;br/&gt;&amp;gt;                         |       |2or2  &#43;-----&#43;&lt;br/&gt;&amp;gt;                         |       |-----&amp;gt;|     |--&amp;gt; B main&lt;br/&gt;&amp;gt;                         |       |      |     |--&amp;gt; B-&amp;gt;A PTLC&lt;br/&gt;&amp;gt;                         &#43;-------&#43;      &#43;-----&#43;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then whenever A wants to add a new A-&amp;gt;B PTLC it only changes the tx inputs&lt;br/&gt;&amp;gt; of the *other* A-&amp;gt;B PTLCs without affecting the B-&amp;gt;A PTLCs.&lt;br/&gt;&amp;gt; Payment forwarding is fast, and you only change the &amp;#34;big&amp;#34; commitment tx&lt;br/&gt;&amp;gt; rarely to clean up claimed and failed PTLCs, moving the extra messages out&lt;br/&gt;&amp;gt; of the forwarding hot path.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But this is basically highly similar to what aj designed anyway, so...&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/20211208/531e3f1e/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211208/531e3f1e/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:38&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2n9y0qh3rf9rrvfgjrvyt6pcvz8uyrwgp00k3dduprfz8nk8fmvgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuks72g0z</id>
    
      <title type="html">📅 Original date posted:2021-12-07 📝 Original message: Hi Z, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2n9y0qh3rf9rrvfgjrvyt6pcvz8uyrwgp00k3dduprfz8nk8fmvgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuks72g0z" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsruxxg0pv2f24w0v7jt080t0pdkgu7gx3lwj9r8yg65059t7lswsg94yp83&#39;&gt;nevent1q…yp83&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Z, Lloyd,&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s ignore the musig nonce exchanges for now. I believe these can be&lt;br/&gt;easily included in existing messages: they probably aren&amp;#39;t the reason we&lt;br/&gt;need more round-trips (at least not the one I&amp;#39;m concerned about for now).&lt;br/&gt;&lt;br/&gt;Basically, if my memory and understanding are accurate, in the above,&lt;br/&gt;&amp;gt; it is the *PTLC-offerrer* which provides an adaptor signature.&lt;br/&gt;&amp;gt; That adaptor signature would be included in the `update_add_ptlc` message.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Neat, you&amp;#39;re completely right, I didn&amp;#39;t realize that the adaptor signature&lt;br/&gt;could be completed by the other party, this is a great property I had&lt;br/&gt;missed.&lt;br/&gt;Thanks for pointing it out, it does simplify the protocol a lot!&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t think you can include it in `update_add_ptlc` though, it has to&lt;br/&gt;be in `commitment_signed`, because if you do a batch of updates before&lt;br/&gt;signing, you would immediately invalidate the adaptor signatures you&lt;br/&gt;previously sent.&lt;br/&gt;&lt;br/&gt;But it would be a simple change, where the signatures in `commitment_signed`&lt;br/&gt;would actually be adaptor signatures for PTLC-success transactions and&lt;br/&gt;normal signatures for PTLC-timeout transactions.&lt;br/&gt;&lt;br/&gt;Isn&amp;#39;t it the case that all previous PTLC adaptor signatures need to be&lt;br/&gt;&amp;gt; re-sent for each update_add_ptlc message because the signatures would&lt;br/&gt;&amp;gt; no longer be valid once the commit tx changes&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Yes indeed, whenever the commitment changes, peers need to create new&lt;br/&gt;signatures and adaptor signatures for all pending PTLCs.&lt;br/&gt;&lt;br/&gt;This is completely fine for PTLC-success and PTLC-timeout transactions,&lt;br/&gt;but we also need to exchange signatures for the new pre-signed transactions&lt;br/&gt;that spend a PTLC from the remote commitment. Let&amp;#39;s call this new pre-signed&lt;br/&gt;transaction PTLC-remote-success (not a great name).&lt;br/&gt;&lt;br/&gt;I believe these new transactions may require an additional round-trip.&lt;br/&gt;Let&amp;#39;s take a very simple example, where we have one pending PTLC in each&lt;br/&gt;direction: PTLC_AB was offered by A to B and PTLC_BA was offered by B to A.&lt;br/&gt;&lt;br/&gt;Now A makes some unrelated updates and wants to sign a new commitment.&lt;br/&gt;A cannot immediately send her `commitment_signed` to B.&lt;br/&gt;If she did, B would be able to broadcast this new commitment, and A would&lt;br/&gt;not be able to claim PTLC_BA from B&amp;#39;s new commitment (even if she knew&lt;br/&gt;the payment secret) because she wouldn&amp;#39;t have B&amp;#39;s signature for the new&lt;br/&gt;PTLC-remote-success transaction.&lt;br/&gt;&lt;br/&gt;So we first need B to send a new message `remote_ptlcs_signed` to A that&lt;br/&gt;contains B&amp;#39;s adaptor signatures for the PTLC-remote-success transactions&lt;br/&gt;that would spend B&amp;#39;s future commitment. After that A can safely send her&lt;br/&gt;`commitment_signed`. Similarly, A must send `remote_ptlcs_signed` to B&lt;br/&gt;before B can send its `commitment_signed`.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s actually not that bad, we&amp;#39;re only adding one message in each direction,&lt;br/&gt;and we&amp;#39;re not adding more data (apart from nonces) to existing messages.&lt;br/&gt;&lt;br/&gt;If you have ideas on how to avoid this new message, I&amp;#39;d be glad to hear&lt;br/&gt;them, hopefully I missed something again and we can make it better!&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mar. 7 déc. 2021 à 09:04, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning LL, and t-bast,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Basically, if my memory and understanding are accurate, in the above,&lt;br/&gt;&amp;gt; it is the *PTLC-offerrer* which provides an adaptor signature.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; That adaptor signature would be included in the `update_add_ptlc`&lt;br/&gt;&amp;gt; message.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Isn&amp;#39;t it the case that all previous PTLC adaptor signatures need to be&lt;br/&gt;&amp;gt; re-sent for each update_add_ptlc message because the signatures would no&lt;br/&gt;&amp;gt; longer be valid once the commit tx changes. I think it&amp;#39;s better to put it&lt;br/&gt;&amp;gt; in `commitment_signed` if possible. This is what is done with pre-signed&lt;br/&gt;&amp;gt; HTLC signatures at the moment anyway.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Agreed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is also avoided by fast-forwards, BTW, simply because fast-forwards&lt;br/&gt;&amp;gt; delay the change of the commitment tx.&lt;br/&gt;&amp;gt; It is another reason to consider fast-forwards, too....&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&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/20211207/55feef47/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211207/55feef47/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8082jfud049vz54sjcfmc37z29dz0qj226tyz3nygj3dfl5uaagszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk552gw9</id>
    
      <title type="html">📅 Original date posted:2021-12-06 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8082jfud049vz54sjcfmc37z29dz0qj226tyz3nygj3dfl5uaagszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk552gw9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgdkyz4ac59mktmdxwdxqcrwp24fr4ex6x2s0pujp3gqrpddykuacmvmste&#39;&gt;nevent1q…mste&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;There was a great recent post on the mailing list detailing how we could&lt;br/&gt;do PTLCs on lightning with a lot of other goodies [0]. This proposal&lt;br/&gt;contained heavy changes to the transaction structure and the update&lt;br/&gt;protocol. While it&amp;#39;s certainly something we&amp;#39;ll want to do in the long&lt;br/&gt;run, I wanted to explore the minimal set of changes we would need to be&lt;br/&gt;able to deploy PTLCs as soon as possible.&lt;br/&gt;&lt;br/&gt;The current result is a somewhat high-level article, where each section&lt;br/&gt;could be a separate update of the lightning protocol [1].&lt;br/&gt;&lt;br/&gt;I tried to make PTLCs work with minimal changes to the transaction&lt;br/&gt;structure and the update protocol, but they introduce a fundamental&lt;br/&gt;change which forces us to make more changes than I&amp;#39;d like.&lt;br/&gt;&lt;br/&gt;With HTLCs, the payment secret (the preimage of the payment hash) was&lt;br/&gt;directly revealed in the witness of a spending transaction.&lt;br/&gt;&lt;br/&gt;With PTLCs, this isn&amp;#39;t the case anymore. The payment secret is a private&lt;br/&gt;key, and a spending transaction only reveals that key if you have a&lt;br/&gt;matching adaptor signature. This forces us to make two changes:&lt;br/&gt;&lt;br/&gt;1. We must obtain adaptor signatures before sending our commit_sig&lt;br/&gt;2. We must use a pre-signed HTLC-success transaction not only with our&lt;br/&gt;local commit, but also with the remote commit&lt;br/&gt;&lt;br/&gt;This means that we will need more round-trips whenever we update our&lt;br/&gt;commitment. I&amp;#39;d like to find the right design trade-off where we don&amp;#39;t&lt;br/&gt;introduce too many changes in the protocol while minimizing the number&lt;br/&gt;of additional round-trips.&lt;br/&gt;&lt;br/&gt;We currently exchange the following messages:&lt;br/&gt;&lt;br/&gt;Alice                       Bob&lt;br/&gt;      update_add_htlc&lt;br/&gt;  ---------------------------&amp;gt;&lt;br/&gt;      update_add_htlc&lt;br/&gt;  ---------------------------&amp;gt;&lt;br/&gt;      update_add_htlc&lt;br/&gt;  ---------------------------&amp;gt;&lt;br/&gt;        commit_sig&lt;br/&gt;  ---------------------------&amp;gt;&lt;br/&gt;       revoke_and_ack&lt;br/&gt;  &amp;lt;---------------------------&lt;br/&gt;        commit_sig&lt;br/&gt;  &amp;lt;---------------------------&lt;br/&gt;       revoke_and_ack&lt;br/&gt;  ---------------------------&amp;gt;&lt;br/&gt;&lt;br/&gt;It works well because the commit_sig sent by Alice only contains signatures&lt;br/&gt;for Bob&amp;#39;s transactions (commit and htlc transactions), and the commit_sig&lt;br/&gt;sent by Bob only contains signatures for Alice&amp;#39;s transactions, and Alice&lt;br/&gt;and Bob don&amp;#39;t need anything else to spend outputs from either commitment.&lt;br/&gt;&lt;br/&gt;But with PTLCs, Bob needs a signature from Alice to be able to fulfill a&lt;br/&gt;PTLC from Alice&amp;#39;s commitment. And Alice needs Bob to provide an adaptor&lt;br/&gt;signature for that transaction before she can give him her signature.&lt;br/&gt;We don&amp;#39;t have the clean ordering that we had before.&lt;br/&gt;&lt;br/&gt;The designs I came up with that keep the current messages and just insert&lt;br/&gt;new ones are either too costly (too many additional round-trips) or too&lt;br/&gt;complex (most likely broken in some edge cases).&lt;br/&gt;&lt;br/&gt;I believe we need to change the commit_sig / revoke_and_ack protocol if&lt;br/&gt;we want to find the sweet spot I&amp;#39;m looking for. I&amp;#39;d like to collect ideas&lt;br/&gt;from this list&amp;#39;s participants on how we could do that. This is probably&lt;br/&gt;something that should be bundled with option_simplified_commitment [2]&lt;br/&gt;(or at least we must ensure that option_simplified_commitment is a first&lt;br/&gt;step towards the protocol we&amp;#39;ll need for PTLCs). It&amp;#39;s also important to&lt;br/&gt;note that the protocol changes must work for both HTLCs and PTLCs, and&lt;br/&gt;shouldn&amp;#39;t change the structure of the transactions (not more than the&lt;br/&gt;simple addition of PTLC outputs done in [1]).&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[0]&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;[1] &lt;a href=&#34;https://github.com/t-bast/lightning-docs/pull/16&#34;&gt;https://github.com/t-bast/lightning-docs/pull/16&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://github.com/lightning/bolts/pull/867&#34;&gt;https://github.com/lightning/bolts/pull/867&lt;/a&gt;&lt;br/&gt;-------------- 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/20211206/c474a332/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211206/c474a332/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxr2t8uctl7nslukg07nf5mhqz9v8duznm836gvchqagul48spltszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukm27mc7</id>
    
      <title type="html">📅 Original date posted:2021-04-24 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxr2t8uctl7nslukg07nf5mhqz9v8duznm836gvchqagul48spltszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukm27mc7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8jwckz245k2yw9ckxvv0zr3jwf63kvcxty3gywstyskcc2574leqx55j4z&#39;&gt;nevent1q…5j4z&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-24&lt;br/&gt;📝 Original message:&lt;br/&gt;You&amp;#39;re right, I was thinking about trimmed HTLCs (which can re-appear in&lt;br/&gt;the commit tx&lt;br/&gt;if you lower the feerate via update_fee).&lt;br/&gt;&lt;br/&gt;Dust HTLCs will never appear in the commit tx regardless of subsequent&lt;br/&gt;update_fees,&lt;br/&gt;so Eugene&amp;#39;s suggestion could make sense!&lt;br/&gt;&lt;br/&gt;Le sam. 24 avr. 2021 à 06:02, Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; The update_fee message does not, as far as I recall, change the dust limit&lt;br/&gt;&amp;gt; for outputs in a channel (though I’ve suggested making such a change).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Apr 23, 2021, at 12:24, Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ﻿&lt;br/&gt;&amp;gt; Hi Eugene,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The reason dust HTLCs count for the 483 HTLC limit is because of&lt;br/&gt;&amp;gt; `update_fee`.&lt;br/&gt;&amp;gt; If you don&amp;#39;t count them and exceed the 483 HTLC limit, you can&amp;#39;t lower the&lt;br/&gt;&amp;gt; fee anymore&lt;br/&gt;&amp;gt; because some HTLCs that were previously dust won&amp;#39;t be dust anymore and you&lt;br/&gt;&amp;gt; may end&lt;br/&gt;&amp;gt; up with more than 483 HTLC outputs in your commitment, which opens the&lt;br/&gt;&amp;gt; door to other&lt;br/&gt;&amp;gt; kinds of attacks.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is the first issue that comes to mind, but there may be other&lt;br/&gt;&amp;gt; drawbacks if we dig into&lt;br/&gt;&amp;gt; this enough with an attacker&amp;#39;s mindset.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le ven. 23 avr. 2021 à 17:58, Eugene Siegel &amp;lt;elzeigel at gmail.com&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I propose a simple mitigation to increase the capital requirement of&lt;br/&gt;&amp;gt;&amp;gt; channel-jamming attacks. This would prevent an unsophisticated attacker&lt;br/&gt;&amp;gt;&amp;gt; with low capital from jamming a target channel.  It seems to me that this&lt;br/&gt;&amp;gt;&amp;gt; is a *free* mitigation without any downsides (besides code-writing), so I&amp;#39;d&lt;br/&gt;&amp;gt;&amp;gt; like to hear other opinions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In a commitment transaction, we trim dust HTLC outputs.  I believe that&lt;br/&gt;&amp;gt;&amp;gt; the reason for the 483 HTLC limit each side has in the spec is to prevent&lt;br/&gt;&amp;gt;&amp;gt; commitment tx&amp;#39;s from growing unreasonably large, and to ensure they are&lt;br/&gt;&amp;gt;&amp;gt; still valid tx&amp;#39;s that can be included in a block.  If we don&amp;#39;t include dust&lt;br/&gt;&amp;gt;&amp;gt; HTLCs in this calculation, since they are not on the commitment tx, we&lt;br/&gt;&amp;gt;&amp;gt; still allow 483 (x2) non-dust HTLCs to be included on the commitment tx.&lt;br/&gt;&amp;gt;&amp;gt; There could be a configurable limit on the number of outstanding dust&lt;br/&gt;&amp;gt;&amp;gt; HTLCs, but the point is that it doesn&amp;#39;t affect the non-dust throughput of&lt;br/&gt;&amp;gt;&amp;gt; the channel.  This raises the capital requirement of channel-jamming so&lt;br/&gt;&amp;gt;&amp;gt; that each HTLC must be non-dust, rather than spamming 1 sat payments.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Interested in others&amp;#39; thoughts.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Eugene (Crypt-iQ)&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;&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;&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/20210424/e0afd2d9/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210424/e0afd2d9/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:02:23&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspdhuv70s2ju4g2fyj3u6cw8ugyu087574cj7kt4rn42qt595cjjszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukdfr4c7</id>
    
      <title type="html">📅 Original date posted:2021-04-26 📝 Original message: I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspdhuv70s2ju4g2fyj3u6cw8ugyu087574cj7kt4rn42qt595cjjszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukdfr4c7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxr2t8uctl7nslukg07nf5mhqz9v8duznm836gvchqagul48splts4jr6vw&#39;&gt;nevent1q…r6vw&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-04-26&lt;br/&gt;📝 Original message:&lt;br/&gt;I looked into this more closely, and as far as I understand it, the spec&lt;br/&gt;already states that you should not count dust HTLCs:&lt;br/&gt;&lt;br/&gt;*if result would be offering more than the remote&amp;#39;s max_accepted_htlcs&lt;br/&gt;HTLCs, in the remote commitment transaction: *&lt;br/&gt;&lt;br/&gt;   - *MUST NOT add an HTLC.*&lt;br/&gt;&lt;br/&gt;Note that it clearly says &amp;#34;in the remote commitment transaction&amp;#34;, which&lt;br/&gt;means&lt;br/&gt;you don&amp;#39;t count HTLCs that are dust or trimmed.&lt;br/&gt;&lt;br/&gt;That matches eclair&amp;#39;s behavior: we don&amp;#39;t count dust HTLCs towards that&lt;br/&gt;limit.&lt;br/&gt;Is lnd including them in that count? What about other implementations?&lt;br/&gt;If that&amp;#39;s the case, that can simply be fixed in lnd without any spec change&lt;br/&gt;IMHO.&lt;br/&gt;&lt;br/&gt;Note that this also excludes trimmed HTLCs from the count, which means that&lt;br/&gt;nodes that set `max_accepted_htlcs` to 483 may be exposed to the issue I&lt;br/&gt;described earlier (impossible to lower the feerate because the HTLC count&lt;br/&gt;would&lt;br/&gt;become greater than the limit).&lt;br/&gt;&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le sam. 24 avr. 2021 à 10:01, Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; You&amp;#39;re right, I was thinking about trimmed HTLCs (which can re-appear in&lt;br/&gt;&amp;gt; the commit tx&lt;br/&gt;&amp;gt; if you lower the feerate via update_fee).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Dust HTLCs will never appear in the commit tx regardless of subsequent&lt;br/&gt;&amp;gt; update_fees,&lt;br/&gt;&amp;gt; so Eugene&amp;#39;s suggestion could make sense!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le sam. 24 avr. 2021 à 06:02, Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt; a&lt;br/&gt;&amp;gt; écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The update_fee message does not, as far as I recall, change the dust&lt;br/&gt;&amp;gt;&amp;gt; limit for outputs in a channel (though I’ve suggested making such a change).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Apr 23, 2021, at 12:24, Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; ﻿&lt;br/&gt;&amp;gt;&amp;gt; Hi Eugene,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The reason dust HTLCs count for the 483 HTLC limit is because of&lt;br/&gt;&amp;gt;&amp;gt; `update_fee`.&lt;br/&gt;&amp;gt;&amp;gt; If you don&amp;#39;t count them and exceed the 483 HTLC limit, you can&amp;#39;t lower&lt;br/&gt;&amp;gt;&amp;gt; the fee anymore&lt;br/&gt;&amp;gt;&amp;gt; because some HTLCs that were previously dust won&amp;#39;t be dust anymore and&lt;br/&gt;&amp;gt;&amp;gt; you may end&lt;br/&gt;&amp;gt;&amp;gt; up with more than 483 HTLC outputs in your commitment, which opens the&lt;br/&gt;&amp;gt;&amp;gt; door to other&lt;br/&gt;&amp;gt;&amp;gt; kinds of attacks.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This is the first issue that comes to mind, but there may be other&lt;br/&gt;&amp;gt;&amp;gt; drawbacks if we dig into&lt;br/&gt;&amp;gt;&amp;gt; this enough with an attacker&amp;#39;s mindset.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Le ven. 23 avr. 2021 à 17:58, Eugene Siegel &amp;lt;elzeigel at gmail.com&amp;gt; a&lt;br/&gt;&amp;gt;&amp;gt; écrit :&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I propose a simple mitigation to increase the capital requirement of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; channel-jamming attacks. This would prevent an unsophisticated attacker&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; with low capital from jamming a target channel.  It seems to me that this&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; is a *free* mitigation without any downsides (besides code-writing), so I&amp;#39;d&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; like to hear other opinions.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; In a commitment transaction, we trim dust HTLC outputs.  I believe that&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the reason for the 483 HTLC limit each side has in the spec is to prevent&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; commitment tx&amp;#39;s from growing unreasonably large, and to ensure they are&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; still valid tx&amp;#39;s that can be included in a block.  If we don&amp;#39;t include dust&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; HTLCs in this calculation, since they are not on the commitment tx, we&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; still allow 483 (x2) non-dust HTLCs to be included on the commitment tx.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; There could be a configurable limit on the number of outstanding dust&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; HTLCs, but the point is that it doesn&amp;#39;t affect the non-dust throughput of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; the channel.  This raises the capital requirement of channel-jamming so&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; that each HTLC must be non-dust, rather than spamming 1 sat payments.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Interested in others&amp;#39; thoughts.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Eugene (Crypt-iQ)&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;&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;&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/20210426/a59c0007/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210426/a59c0007/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:02:23&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxtgcjpu0va27cg6njv204dnswcz37eqpuhwm2yvepe57gyrn57xqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuku592wh</id>
    
      <title type="html">📅 Original date posted:2020-11-30 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxtgcjpu0va27cg6njv204dnswcz37eqpuhwm2yvepe57gyrn57xqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuku592wh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdpjf5rcvrwgraqruncguxk6uk8pkpfx8ppd85h76f8d34p2hal5sfuk843&#39;&gt;nevent1q…k843&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-11-30&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Joao,&lt;br/&gt;&lt;br/&gt;Thanks for the time you spent on this, the paper is clear on the trade-offs&lt;br/&gt;(sacrificing some privacy for&lt;br/&gt;efficiency).&lt;br/&gt;&lt;br/&gt;My main negative feedback here is that you seem to assume that nodes will&lt;br/&gt;honestly cooperate.&lt;br/&gt;It feels to me that nodes can cheat and gossip biased or invalid&lt;br/&gt;information to their peers in order to&lt;br/&gt;attract more payments through their nodes (and collect more fees or put&lt;br/&gt;honest routing nodes out of&lt;br/&gt;business).&lt;br/&gt;&lt;br/&gt;Is that something you&amp;#39;ve thought about?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le dim. 29 nov. 2020 à 00:46, João Valente &amp;lt;jvalente96 at gmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hey!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;ve been working on this new concept for routing in the lightning&lt;br/&gt;&amp;gt; network. It leverages the use of the information nodes have on the&lt;br/&gt;&amp;gt; distribution of funds in their channels to try and maximize the probability&lt;br/&gt;&amp;gt; of success for a payment.&lt;br/&gt;&amp;gt; Each node shares with his neighbours the information it has about the&lt;br/&gt;&amp;gt; distribution of funds in its own neighbourhood through the form of a&lt;br/&gt;&amp;gt; routing table. As nodes receive new tables they&amp;#39;ll be updating their own&lt;br/&gt;&amp;gt; locally maintained tables with the new information, periodically sharing&lt;br/&gt;&amp;gt; them with their neighbours.&lt;br/&gt;&amp;gt; Routing tables associate destination addresses (representing nodes in the&lt;br/&gt;&amp;gt; network) to the next hop in the maximum capacity path to these nodes.&lt;br/&gt;&amp;gt; If a new payment is to be made a payment probe is forwarded by the payer&lt;br/&gt;&amp;gt; and through every node in the path, collects the path information along the&lt;br/&gt;&amp;gt; way, and reaches the payee who returns it to the payer. The payer can then&lt;br/&gt;&amp;gt; use this knowledge and confidently use the discovered path to route LN&lt;br/&gt;&amp;gt; payments through.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I wrote a 10 page paper about the subject and would love to get some&lt;br/&gt;&amp;gt; feedback:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://drive.google.com/file/d/1dahW0X-N59138ZbY-4odpXjpDnX4Gb7Z/view?usp=sharing&#34;&gt;https://drive.google.com/file/d/1dahW0X-N59138ZbY-4odpXjpDnX4Gb7Z/view?usp=sharing&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; João Valente&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201130/83c558c8/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201130/83c558c8/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2tl7rsr3ftv6nlju8mswxj3lam3wqxvasjtdxqd99a84trdfhu5gzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukzrywv8</id>
    
      <title type="html">📅 Original date posted:2020-11-27 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2tl7rsr3ftv6nlju8mswxj3lam3wqxvasjtdxqd99a84trdfhu5gzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukzrywv8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdmq4sg942vs08skk7z27ve0c3gaw5pg3rf0eam5yq67uepcjx63cu7muvg&#39;&gt;nevent1q…muvg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-11-27&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;This is an interesting approach to solve this problem, I really like the&lt;br/&gt;idea.&lt;br/&gt;It definitely deserves digging more into it: the fact that it doesn&amp;#39;t add&lt;br/&gt;an additional&lt;br/&gt;payment makes it largely superior to upfront payment schemes in terms of UX.&lt;br/&gt;&lt;br/&gt;If we restrict these stake certificates to LN funding txs, which have a&lt;br/&gt;very specific format&lt;br/&gt;(multisig 2-of-2) there are probably smart ways to achieve this.&lt;br/&gt;If for example we&amp;#39;re able to do it easily with Schnorr-based funding txs,&lt;br/&gt;it may be worth&lt;br/&gt;waiting for that to happen.&lt;br/&gt;I&amp;#39;m a bit afraid of having to use ZKPs for general statements, I&amp;#39;d prefer&lt;br/&gt;something tailored&lt;br/&gt;to that specific case (it would likely be more efficient and have less new&lt;br/&gt;assumptions - even&lt;br/&gt;though you&amp;#39;re right to point out that this is a non-critical system, so&lt;br/&gt;we&amp;#39;re freer to experiment&lt;br/&gt;with hot new stuff).&lt;br/&gt;&lt;br/&gt;I completely agree with Z that it should be added to the requirements that&lt;br/&gt;a node cannot&lt;br/&gt;reuse a stake certificate from another node for himself.&lt;br/&gt;&lt;br/&gt;Another constraint is that the proof has to be small, since we have to fit&lt;br/&gt;&amp;gt; it all in a small onion...&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not sure that&amp;#39;s necessary. If I understand correctly, you&amp;#39;re saying&lt;br/&gt;that because in your&lt;br/&gt;model, the sender (Alice) creates one stake certificate for each node in&lt;br/&gt;the route (Bob, Carol)&lt;br/&gt;and puts them in the onion.&lt;br/&gt;&lt;br/&gt;But instead it could be a point-to-point property: each node provides its&lt;br/&gt;own stake certificate&lt;br/&gt;to the next node (and only to that node). Alice provides a stake&lt;br/&gt;certificate to Bob, then Bob&lt;br/&gt;provides a stake certificate to Carol, and so on. If that&amp;#39;s the case, it&lt;br/&gt;can be in a tlv field in the&lt;br/&gt;`update_add_htlc` message and doesn&amp;#39;t need to be inside the onion. This&lt;br/&gt;also makes it less&lt;br/&gt;likely that Alice is exposing herself to remote nodes in the route (payer&lt;br/&gt;privacy).&lt;br/&gt;&lt;br/&gt;Of course, this depends on the implementation details we choose, but I&lt;br/&gt;think it&amp;#39;s worth stressing&lt;br/&gt;that these two models exist and are quite different.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le ven. 27 nov. 2020 à 07:46, ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Gleb,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thank you for your interest :)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Quick question: if I am a routing node and receive a valid stake&lt;br/&gt;&amp;gt; certificate, can I reuse this stake certificate on my own outgoing payments?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; That probably should be avoided, otherwise a mediocre routing node gets&lt;br/&gt;&amp;gt; a lot of jamming opportunities for no good.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; You are right, that’s a strong argument for proof “interactivity”: every&lt;br/&gt;&amp;gt; Certificate should probably commit to *at least* public key of the routing&lt;br/&gt;&amp;gt; node it is generated for.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Right, it would be better to have the certificate commit to a specific&lt;br/&gt;&amp;gt; routing node rather than the payment hash/point as I proposed.&lt;br/&gt;&amp;gt; Committing to a payment hash/point allows a random forwarding node to&lt;br/&gt;&amp;gt; probe the rest of the network using the same certificate, lowering the&lt;br/&gt;&amp;gt; score for that certificate on much of the network.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Another constraint is that the proof has to be small, since we have to fit&lt;br/&gt;&amp;gt; it all in a small onion...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Presumably we also want the score to eventually &amp;#34;settle to 0&amp;#34; over time.&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; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; – gleb&lt;br/&gt;&amp;gt; &amp;gt; On Nov 27, 2020, 2:16 AM &#43;0200, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt;,&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Good morning Gleb and Antoine,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; This is certainly interesting!&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Quick question: if I am a routing node and receive a valid stake&lt;br/&gt;&amp;gt; certificate, can I reuse this stake certificate on my own outgoing payments?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; It seems to me that the proof-of-stake-certificate should also somehow&lt;br/&gt;&amp;gt; integrate a detail of the current payment (such as payment hash/point) so&lt;br/&gt;&amp;gt; it cannot be reused by routing nodes for their own outgoing payments.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; For example, looking only at your naive privacy-broken proposal, the&lt;br/&gt;&amp;gt; signature must use a `sign-to-contract` where the `R` in the signature is&lt;br/&gt;&amp;gt; actually `R&amp;#39; &#43; h(R&amp;#39; | payment_hash)` with the `R&amp;#39;` also revealed.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Hello list,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In this post, we explore a different approach to channel jamming&lt;br/&gt;&amp;gt; mitigation.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We won’t talk about the background here, for the problem description&lt;br/&gt;&amp;gt; as well as some proposed solutions (mainly upfront payment schemes), see&lt;br/&gt;&amp;gt; [1].&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We’re suggesting using UTXO ownership proofs (a.k.a. Stake&lt;br/&gt;&amp;gt; Certificates) to solve this problem. Previously, these proofs were only&lt;br/&gt;&amp;gt; used in the Lightning Network at channel announcement time to prevent&lt;br/&gt;&amp;gt; malicious actors from announcing channels they don’t control. One can think&lt;br/&gt;&amp;gt; of it as a “fidelity bond” (as a scarce resource) as a requirement for&lt;br/&gt;&amp;gt; sending HTLCs.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We start by overviewing issues with other solutions, and then&lt;br/&gt;&amp;gt; present a naive, privacy-broken Stake Certificates. Then we examine&lt;br/&gt;&amp;gt; designing a privacy-preserving version, evaluating them. At the end, we&lt;br/&gt;&amp;gt; talk about non-trivial design decisions and open questions.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Issues with other proposals&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We find unsatisfying that upfront payment schemes come at a cost of&lt;br/&gt;&amp;gt; new fees (forward and/or backward), thus inflating payment cost for *any*&lt;br/&gt;&amp;gt; payment.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In the future, the upfront base fee might even make “micropayments”&lt;br/&gt;&amp;gt; economically infeasible by exceeding the value they transfer. Thus, a good&lt;br/&gt;&amp;gt; solution should not inflate payment cost while still requiring “burning” a&lt;br/&gt;&amp;gt; scarce resource (so that the attack is not free).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Another issue with upfront payments is a circular trust dependency.&lt;br/&gt;&amp;gt; Ideally, we shouldn’t introduce anything less trust-minimized than the&lt;br/&gt;&amp;gt; Lightning Network itself.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Upfront payment schemes are not like that, because they in one way&lt;br/&gt;&amp;gt; or another rely on the honest behavior of route participants.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We believe Stake Certificates we are going to introduce are&lt;br/&gt;&amp;gt; satisfactory in both of these directions: they don’t inflate payment costs&lt;br/&gt;&amp;gt; for honest users and don’t require trust. The main disadvantage of Stake&lt;br/&gt;&amp;gt; Certificates seems to be the novel cryptography required.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; See more details in the “Evaluation” section.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Channel Ownership Proofs as Routing Credit Balance&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Let’s say Alice wants to relay an HTLC to Carol through Bob. Per the&lt;br/&gt;&amp;gt; Stake Certificates scheme, she has to commit to a particular channel UTXO&lt;br/&gt;&amp;gt; by embedding an ownership proof in the onion packet while sending an HTLC&lt;br/&gt;&amp;gt; to Bob.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Bob then unwraps the onion and verifies:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1) the channel identifier is pointing unambiguously to an on-chain&lt;br/&gt;&amp;gt; UTXO;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2) the ownership proof (e.g., a signature) is valid against the&lt;br/&gt;&amp;gt; previously disclosed UTXO witness script.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; If all those checks succeed, Bob should see if Alice hasn’t exceeded&lt;br/&gt;&amp;gt; her credit balance. In case she hasn’t, Bob has to “decrement Alice’s&lt;br/&gt;&amp;gt; credit balance” and relay the HTLC to Carol.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Decrementing credit balance unconditionally of packet success or&lt;br/&gt;&amp;gt; failure bounds liquidity abuse by malicious HTLC senders.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Since there is no credit assigned initially, “decrementing the&lt;br/&gt;&amp;gt; credit balance” means just remembering that “Alice spent X out of Y of the&lt;br/&gt;&amp;gt; credit she received for her Stake Certificates”.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Unfortunately, this naive protocol is a privacy nightmare, because&lt;br/&gt;&amp;gt; routing nodes can now easily assign every HTLC they forward to the sender’s&lt;br/&gt;&amp;gt; UTXO.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Let’s first define the terms here one more time, and then proceed to&lt;br/&gt;&amp;gt; the non-naive, private Stake Certificates.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Stake Certificate. Either means a solution we’re proposing or the&lt;br/&gt;&amp;gt; primitive it is based on, namely proof of UTXO ownership. As we will argue&lt;br/&gt;&amp;gt; later, it actually makes sense to use proof of LN channel UTXO ownership&lt;br/&gt;&amp;gt; specifically rather than any funds ownership.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Stake Certificate value. An amount of the corresponding UTXO or a&lt;br/&gt;&amp;gt; ballpark this amount provably  belongs to.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Credit balance. When Alice provides a routing node Bob with a&lt;br/&gt;&amp;gt; Stake Certificate, Bob should increase Alice’s routing credit balance.&lt;br/&gt;&amp;gt; Alice is then limited in her payments by this balance, and this rule is&lt;br/&gt;&amp;gt; enforced by routing nodes to prevent free channel jamming in the network.&lt;br/&gt;&amp;gt; Note that ideally “Alice’s credit balance“ should be virtual and only known&lt;br/&gt;&amp;gt; to Alice, while routing nodes should only observe per-UTXO credit balance.&lt;br/&gt;&amp;gt; We currently assume that each routing node keeps track of per-UTXO credit&lt;br/&gt;&amp;gt; balance separately, see “Design decisions” for more details.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Stake-to-credit function defines how much credit balance is given&lt;br/&gt;&amp;gt; per a Stake Certificate of a given value. This function is a policy of a&lt;br/&gt;&amp;gt; routing node, and it should be announced.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Credit-to-value-transferred function defines how much value a&lt;br/&gt;&amp;gt; sender can transfer along a given channel considering how much credit they&lt;br/&gt;&amp;gt; might claim. The function may also consider different factors (e.g., the&lt;br/&gt;&amp;gt; available capacity of a channel being used) to provide extra robustness.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Privacy-preserving Stake Certificates&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The presented scheme could preserve privacy if it relied on&lt;br/&gt;&amp;gt; zero-knowledge proofs of UTXO ownership by avoiding pointing to a&lt;br/&gt;&amp;gt; particular UTXO.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; More specifically, the verifier should be able to check that:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; a) The staked UTXO is an element of the current UTXO set&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; b) The prover knows the witness script committed by the UTXO witness&lt;br/&gt;&amp;gt; program&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; c) The prover knows a valid witness for the witness script&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; d) The staked UTXO was not used to produce a different Stake&lt;br/&gt;&amp;gt; Certificate which is currently in use as well.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The verifier should also have a way to see a Stake Certificate value&lt;br/&gt;&amp;gt; to properly account for the credit. This can be achieved by restricting the&lt;br/&gt;&amp;gt; UTXO set being proved upon to only those UTXOs with a specific range of&lt;br/&gt;&amp;gt; values: “I will prove that I own a UTXO among all UTXOs between 0.5 BTC and&lt;br/&gt;&amp;gt; 1 BTC”.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Unfortunately, steps (b) and (c) require zero-knowledge protocols&lt;br/&gt;&amp;gt; for general statements, which are more experimental primitives than most of&lt;br/&gt;&amp;gt; the stuff we have in Bitcoin protocols,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; although we assume it’s feasible to consider them for non-consensus&lt;br/&gt;&amp;gt; stuff.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Evaluation&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Stake Certificates, upfront payment schemes, and other potential&lt;br/&gt;&amp;gt; solutions (given a particular configuration) may be compared along the&lt;br/&gt;&amp;gt; following axis:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1) Economic feasibility&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1a) What is the cost of overcoming the protection for an attacker?&lt;br/&gt;&amp;gt; Likely a non-linear function: sats_spent =f(channels_to_jam, […])&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1b) How does this solution limit honest users?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2) How sophisticated is this solution in terms of integration and&lt;br/&gt;&amp;gt; making good UX?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 3) How complex is this solution in terms of protocol&lt;br/&gt;&amp;gt; design/implementation?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; When it comes to (1a), both Stake Certificates and upfront payments&lt;br/&gt;&amp;gt; are probably equal, in a way that they’re just best-effort ideas to&lt;br/&gt;&amp;gt; increase the attack cost. Unfortunately, we currently don’t know how to&lt;br/&gt;&amp;gt; design something as economically powerful as PoW in Bitcoin [3].&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This aspect can be properly evaluated by applying these ideas to&lt;br/&gt;&amp;gt; different hypothetical kinds of LN in a simulation and observing the&lt;br/&gt;&amp;gt; resulting trade-off between (1a) and (1b) considering different attack&lt;br/&gt;&amp;gt; strategies.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In the previous sections of this post, we have argued that Stake&lt;br/&gt;&amp;gt; Certificates may provide a much better (1b) for the cost of (3) because it&lt;br/&gt;&amp;gt; relies on zero-knowledge.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; When it comes to (2), the design of Stake Certificates may vary in&lt;br/&gt;&amp;gt; terms of UX burden, from completely automatic to requiring custom actions&lt;br/&gt;&amp;gt; with private keys from users.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Some of these trade-offs along with other interesting questions are&lt;br/&gt;&amp;gt; discussed in the following section.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Design decisions and questions&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### Should the credit spending be gossipped across the entire&lt;br/&gt;&amp;gt; network, or should only the routing nodes involved in the payment know?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Economically, these two approaches are likely to be equivalent, and&lt;br/&gt;&amp;gt; it’s just a matter of stake-to-credit ratio.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; However, announcing credit spending to the network results in a&lt;br/&gt;&amp;gt; privacy leak. It also imposes bandwidth and CPU overhead on the routing&lt;br/&gt;&amp;gt; nodes.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### Which zero-knowledge system should be used for Stake&lt;br/&gt;&amp;gt; Certificates?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Choosing a ZK system boils down to picking the right trade-offs of&lt;br/&gt;&amp;gt; proving and verifying time, and assumptions. As we mentioned previously, we&lt;br/&gt;&amp;gt; would need proving general statements.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; At the same time, we need something cheap in both proving and&lt;br/&gt;&amp;gt; verification, because Lightning is supposed to be fast.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; At the same time, the setup probably doesn’t matter, because proofs&lt;br/&gt;&amp;gt; are supposed to be verified only by one participant, a routing node this&lt;br/&gt;&amp;gt; proof is generated for.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Perhaps we can also pick any cryptographic assumptions we want since&lt;br/&gt;&amp;gt; this stuff is not mission-critical and can be easily updated if someone&lt;br/&gt;&amp;gt; breaks a cryptographic assumption and we observe an attack.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### Should we allow holding *any* Bitcoins (not just LN channels)&lt;br/&gt;&amp;gt; for Stake Certificates?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This idea might make sense if we’re worried that some LN users might&lt;br/&gt;&amp;gt; want to send more payments than they can afford per their credit. However,&lt;br/&gt;&amp;gt; we believe that allowing any UTXO would give an attacker more opportunities&lt;br/&gt;&amp;gt; to use their cold funds for this attack, or even have a secondary market&lt;br/&gt;&amp;gt; where holders sell their proofs (they have nothing to loose).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Instead, we should a) design the credit-to-stake-functions better;&lt;br/&gt;&amp;gt; b) encourage users send payments across different routing nodes (since&lt;br/&gt;&amp;gt; credits are not tracked globally) [4].&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### What’s the best credit-to-value-transferred function?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We reckon that this function should be not just linear to provide&lt;br/&gt;&amp;gt; maximum security against malicious channel jammers. For example, we can&lt;br/&gt;&amp;gt; charge more credit for the last 20% of the capacity of the *channel used&lt;br/&gt;&amp;gt; for routing*. Alternatively, we could discourage making too many payments&lt;br/&gt;&amp;gt; from the same UTXO within a short period of time by charging more credit in&lt;br/&gt;&amp;gt; this case.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### What about the interactivity and lifetime of Stake Certificates?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Interactive proofs mean that they are constructed on demand of a&lt;br/&gt;&amp;gt; routing node, non-interactive means constructed by a payment sender ahead&lt;br/&gt;&amp;gt; of time.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Both interactivity and lifetime have something to do with the ease&lt;br/&gt;&amp;gt; of producing proof and accessing keys.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We will omit the details of the trade-off we consider, but it&lt;br/&gt;&amp;gt; remains an open question.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### If Stake Certificates are valid for N blocks after proof&lt;br/&gt;&amp;gt; generation, does it mean that if the UTXO is spent during those N blocks,&lt;br/&gt;&amp;gt; new proof can be generated from the same coins without invalidating the old&lt;br/&gt;&amp;gt; proof?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Yes, but an attacker would, first of all, have to pay an on-chain&lt;br/&gt;&amp;gt; fee for this. If we’re still worried about this problem, there are&lt;br/&gt;&amp;gt; workaround ideas.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; For example, we could have epochs of 100 blocks (every epoch starts&lt;br/&gt;&amp;gt; at #XYZXYZ00 block). If at the start of an epoch, a channel wasn’t in the&lt;br/&gt;&amp;gt; UTXO set, it provides very little credit.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Alternatively, we could expand the zero-knowledge part to proving&lt;br/&gt;&amp;gt; that the coins were not yet spent.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### Should spending a UTXO reveal all Stake Certificates generated&lt;br/&gt;&amp;gt; from it?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This would also solve the problem in the previous question, but it&lt;br/&gt;&amp;gt; would mean a retrospective privacy leak again. To avoid a privacy leak, we&lt;br/&gt;&amp;gt; should prevent this.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### What if malicious Sybil *routing* nodes failing payments&lt;br/&gt;&amp;gt; causing other honest routing nodes to reduce the credit of an honest&lt;br/&gt;&amp;gt; payment sender?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Both Stake Certificates and upfront payment schemes suffer from&lt;br/&gt;&amp;gt; malicious routing nodes failing the payments and “wasting” the sender’s&lt;br/&gt;&amp;gt; credit or fees. This problem even applies out of the channel jamming&lt;br/&gt;&amp;gt; context, when considering payment failure rate.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This problem can be addressed by reducing the reputation of faulty&lt;br/&gt;&amp;gt; links and routing nodes on the payment sender node. When payment routing&lt;br/&gt;&amp;gt; becomes a for-profit activity, this would encourage routing nodes to&lt;br/&gt;&amp;gt; sanitize their links.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The mitigation can be even stronger by using “provable blaming”&lt;br/&gt;&amp;gt; introduced in [2].&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Conclusion&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We propose Stake Certificates, a new solution to channel jamming.&lt;br/&gt;&amp;gt; Perhaps, it might not be the best near-term solution due to the complexity,&lt;br/&gt;&amp;gt; but the zero satoshi overhead for honest payments is an appealing argument&lt;br/&gt;&amp;gt; to switch to it in the future.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This proposal also illustrates how stake-based protocols can solve&lt;br/&gt;&amp;gt; Sybil challenges in the Bitcoin ecosystem. Since this might be useful in&lt;br/&gt;&amp;gt; other contexts (Sybil-resistance of many kinds, proof-of-ownership),&lt;br/&gt;&amp;gt; discussing Stake Certificates is even more useful.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The next step is a discussion of Stake Certificates. If the&lt;br/&gt;&amp;gt; community finds it interesting, then we should discuss the design questions&lt;br/&gt;&amp;gt; mentioned above, and choose a cryptosystem.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Cheers,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Gleb Naumenko and Antoine Riard&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ———&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; References and footnotes:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1.&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/t-bast/lightning-docs/blob/master/spam-prevention.md&#34;&gt;https://github.com/t-bast/lightning-docs/blob/master/spam-prevention.md&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2.&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2015-August/000135.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2015-August/000135.html&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 3. We don’t actually suggest PoW to solve these issues, because a)&lt;br/&gt;&amp;gt; the trade-off between honest user cost and attacker cost is misaligned due&lt;br/&gt;&amp;gt; to specialized hardware and b) smartphones would die too fast if they have&lt;br/&gt;&amp;gt; to compute PoW; PoW is just an unreachable example of system robustness due&lt;br/&gt;&amp;gt; to well-aligned game theory.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 4. Secondary markets are still possible even if we restrict&lt;br/&gt;&amp;gt; acceptable proofs to only LN channels, but supply would be much smaller,&lt;br/&gt;&amp;gt; and markets would work much worse for an attacker.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201127/89af90d4/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201127/89af90d4/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsd9ljx5vfdrya4hvuurfy0gae9xkz7kj0hfcsnx0wcau2hatq8aaszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukw4s7lm</id>
    
      <title type="html">📅 Original date posted:2020-11-19 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsd9ljx5vfdrya4hvuurfy0gae9xkz7kj0hfcsnx0wcau2hatq8aaszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukw4s7lm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqfddntaqyz4uuv9tauq84k5rhtk8xs5tg2vsd0ew8lx8gh5ug3mggmzlsd&#39;&gt;nevent1q…zlsd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-11-19&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey Rusty,&lt;br/&gt;&lt;br/&gt;Good questions.&lt;br/&gt;&lt;br/&gt;I think we could use additive tweaks, and they are indeed faster so it can&lt;br/&gt;be worth doing.&lt;br/&gt;We would replace `B(i) = HMAC256(&amp;#34;blinded_node_id&amp;#34;, ss(i)) * P(i)` by `B(i)&lt;br/&gt;= HMAC256(&amp;#34;blinded_node_id&amp;#34;, ss(i)) * G &#43; P(i)`.&lt;br/&gt;Intuitively since the private key of the tweak comes from a hash function,&lt;br/&gt;it should offer the same security.&lt;br/&gt;But there may be dragons lurking there, I don&amp;#39;t know how to properly&lt;br/&gt;evaluate whether it&amp;#39;s as secure (whereas the multiplicative&lt;br/&gt;version is really just Sphinx, so we know it should be secure).&lt;br/&gt;&lt;br/&gt;If we&amp;#39;re able to use additive tweaks, we can probably indeed use x-only&lt;br/&gt;pubkeys.&lt;br/&gt;Even though we&amp;#39;re not storing these on-chain, so the 1 byte saved isn&amp;#39;t&lt;br/&gt;worth much.&lt;br/&gt;I&amp;#39;d say that if it&amp;#39;s trivial to use them, let&amp;#39;s do it, otherwise it&amp;#39;s not&lt;br/&gt;worth any additional effort.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mer. 18 nov. 2020 à 06:18, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; See:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/blob/route-blinding/proposals/route-blinding.md&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/blob/route-blinding/proposals/route-blinding.md&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Can we use additive tweaks instead of multiplicative?&lt;br/&gt;&amp;gt;    They&amp;#39;re slightly faster, and supported by the x-only secp API.&lt;br/&gt;&amp;gt; 2. Can we use x-only pubkeys?  It&amp;#39;s generally trivial, and a byte&lt;br/&gt;&amp;gt;    shorter.  I&amp;#39;m using them in offers to great effect.&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;-------------- 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/20201119/90ab3153/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201119/90ab3153/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswzetjz2dymlmg3l04uem5pfrsw4736ee8gjemrtm07c8carfnwhgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukc2a49m</id>
    
      <title type="html">📅 Original date posted:2020-10-14 📝 Original message: To be ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswzetjz2dymlmg3l04uem5pfrsw4736ee8gjemrtm07c8carfnwhgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukc2a49m" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs80r3w4sx5zq7da8yj2hs3zltney2zyglqgqx3n3tddkm8de0qquqm2hjnx&#39;&gt;nevent1q…hjnx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-14&lt;br/&gt;📝 Original message:&lt;br/&gt;To be honest the current protocol can be hard to grasp at first (mostly&lt;br/&gt;because it&amp;#39;s hard to reason&lt;br/&gt;about two commit txs being constantly out of sync), but from an&lt;br/&gt;implementation&amp;#39;s point of view I&amp;#39;m&lt;br/&gt;not sure your proposals are simpler.&lt;br/&gt;&lt;br/&gt;One of the benefits of the current HTLC state machine is that once you&lt;br/&gt;describe your state as a set&lt;br/&gt;of local changes (proposed by you) plus a set of remote changes (proposed&lt;br/&gt;by them), where each of&lt;br/&gt;these is split between proposed, signed and acked updates, the flow is&lt;br/&gt;straightforward to implement&lt;br/&gt;and deterministic.&lt;br/&gt;&lt;br/&gt;The only tricky part (where we&amp;#39;ve seen recurring compatibility issues) is&lt;br/&gt;what happens on&lt;br/&gt;reconnections. But it seems to me that the only missing requirement in the&lt;br/&gt;spec is on the order of&lt;br/&gt;messages sent, and more specifically that if you are supposed to send a&lt;br/&gt;`revoke_and_ack`, you must&lt;br/&gt;send that first (or at least before sending any `commit_sig`). Adding test&lt;br/&gt;scenarios in the spec&lt;br/&gt;could help implementers get this right.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s a bit tricky to get it right at first, but once you get it right you&lt;br/&gt;don&amp;#39;t need to touch that&lt;br/&gt;code again and everything runs smoothly. We&amp;#39;re pretty close to that state,&lt;br/&gt;so why would we want to&lt;br/&gt;start from scratch? Or am I missing something?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mar. 13 oct. 2020 à 13:58, Christian Decker &amp;lt;decker.christian at gmail.com&amp;gt;&lt;br/&gt;a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; I wonder if we should just go the tried-and-tested leader-based&lt;br/&gt;&amp;gt; mechanism:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  1. The node with the lexicographically lower node_id is determined to&lt;br/&gt;&amp;gt;     be the leader.&lt;br/&gt;&amp;gt;  2. The leader receives proposals for changes from itself and the peer&lt;br/&gt;&amp;gt;     and orders them into a logical sequence of changes&lt;br/&gt;&amp;gt;  3. The leader applies the changes locally and streams them to the peer.&lt;br/&gt;&amp;gt;  4. Either node can initiate a commitment by proposing a `flush` change.&lt;br/&gt;&amp;gt;  5. Upon receiving a `flush` the nodes compute the commitment&lt;br/&gt;&amp;gt;     transaction and exchange signatures.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is similar to your proposal, but does away with turn changes (it&amp;#39;s&lt;br/&gt;&amp;gt; always the leader&amp;#39;s turn), and therefore reduces the state we need to&lt;br/&gt;&amp;gt; keep track of (and re-negotiate on reconnect).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The downside is that we add a constant overhead to one side&amp;#39;s&lt;br/&gt;&amp;gt; operations, but since we pipeline changes, and are mostly synchronous&lt;br/&gt;&amp;gt; during the signing of the commitment tx today anyway, this comes out to&lt;br/&gt;&amp;gt; 1 RTT for each commitment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On the other hand a token-passing approach (which I think is what you&lt;br/&gt;&amp;gt; propose) require a synchronous token handover whenever a the direction&lt;br/&gt;&amp;gt; of the updates changes. This is assuming I didn&amp;#39;t misunderstand the turn&lt;br/&gt;&amp;gt; mechanics of your proposal :-)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Christian&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; Hi all,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;         Our HTLC state machine is optimal, but complex[1]; the Lightning&lt;br/&gt;&amp;gt; &amp;gt; Labs team recently did some excellent work finding another place the spec&lt;br/&gt;&amp;gt; &amp;gt; is insufficient[2].  Also, the suggestion for more dynamic changes makes&lt;br/&gt;&amp;gt; it&lt;br/&gt;&amp;gt; &amp;gt; more difficult, usually requiring forced quiescence.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The following protocol returns to my earlier thoughts, with cost of&lt;br/&gt;&amp;gt; &amp;gt; latency in some cases.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. The protocol is half-duplex, with each side taking turns; opener&lt;br/&gt;&amp;gt; first.&lt;br/&gt;&amp;gt; &amp;gt; 2. It&amp;#39;s still the same form, but it&amp;#39;s always one-direction so both sides&lt;br/&gt;&amp;gt; &amp;gt;    stay in sync.&lt;br/&gt;&amp;gt; &amp;gt;         update&#43;-&amp;gt; commitsig-&amp;gt; &amp;lt;-revocation &amp;lt;-commitsig revocation-&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 3. A new message pair &amp;#34;turn_request&amp;#34; and &amp;#34;turn_reply&amp;#34; let you request&lt;br/&gt;&amp;gt; &amp;gt;    when it&amp;#39;s not your turn.&lt;br/&gt;&amp;gt; &amp;gt; 4. If you get an update in reply to your turn_request, you lost the race&lt;br/&gt;&amp;gt; &amp;gt;    and have to defer your own updates until after peer is finished.&lt;br/&gt;&amp;gt; &amp;gt; 5. On reconnect, you send two flags: send-in-progress (if you have&lt;br/&gt;&amp;gt; &amp;gt;    sent the initial commitsig but not the final revocation) and&lt;br/&gt;&amp;gt; &amp;gt;    receive-in-progress (if you have received the initial commitsig&lt;br/&gt;&amp;gt; &amp;gt;    not not received the final revocation).  If either is set,&lt;br/&gt;&amp;gt; &amp;gt;    the sender (as indicated by the flags) retransmits the entire&lt;br/&gt;&amp;gt; &amp;gt;    sequence.&lt;br/&gt;&amp;gt; &amp;gt;    Otherwise, (arbitrarily) opener goes first again.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Pros:&lt;br/&gt;&amp;gt; &amp;gt; 1. Way simpler.  There is only ever one pair of commitment txs for any&lt;br/&gt;&amp;gt; &amp;gt;    given commitment index.&lt;br/&gt;&amp;gt; &amp;gt; 2. Fee changes are now deterministic.  No worrying about the case where&lt;br/&gt;&amp;gt; &amp;gt;    the peer&amp;#39;s changes are also in flight.&lt;br/&gt;&amp;gt; &amp;gt; 3. Dynamic changes can probably happen more simply, since we always&lt;br/&gt;&amp;gt; &amp;gt;    negotiate both sides at once.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Cons:&lt;br/&gt;&amp;gt; &amp;gt; 1. If it&amp;#39;s not your turn, it adds 1 RTT latency.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Unchanged:&lt;br/&gt;&amp;gt; &amp;gt; 1. Database accesses are unchanged; you need to commit when you send or&lt;br/&gt;&amp;gt; &amp;gt;    receive a commitsig.&lt;br/&gt;&amp;gt; &amp;gt; 2. You can use the same state machine as before, but one day (when&lt;br/&gt;&amp;gt; &amp;gt;    this would be compulsory) you&amp;#39;ll be able signficantly simplify;&lt;br/&gt;&amp;gt; &amp;gt;    you&amp;#39;ll need to record the index at which HTLCs were changed&lt;br/&gt;&amp;gt; &amp;gt;    (added/removed) in case peer wants you to rexmit though.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Cheers,&lt;br/&gt;&amp;gt; &amp;gt; Rusty.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [1] This is my fault; I was persuaded early on that optimality was more&lt;br/&gt;&amp;gt; &amp;gt;     important than simplicity in a classic nerd-snipe.&lt;br/&gt;&amp;gt; &amp;gt; [2] &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/issues/794&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/issues/794&lt;/a&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; _______________________________________________&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/20201014/dcec5288/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201014/dcec5288/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:20&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9cfszca2eeg4mdp39r6aek6zwp3y5k2zeawm4jaym2cwv78l8h0qzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuku28jr3</id>
    
      <title type="html">📅 Original date posted:2020-10-08 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9cfszca2eeg4mdp39r6aek6zwp3y5k2zeawm4jaym2cwv78l8h0qzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuku28jr3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv2qs7kdg2n5z4ees54e9eajr4n9evt3yyu2ggucuknuem4pf2qkgyrk7nk&#39;&gt;nevent1q…k7nk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Thanks (again) Antoine and Zman for your answers,&lt;br/&gt;&lt;br/&gt;On the other hand, a quick skim of your proposal suggests that it still&lt;br/&gt;&amp;gt; respects the &amp;#34;initiator pays&amp;#34; principle.&lt;br/&gt;&amp;gt; Basically, the fundee only pays fees for HTLCs they initiated, which is&lt;br/&gt;&amp;gt; not relevant to the above attack (since in the above attack, my node is a&lt;br/&gt;&amp;gt; dead end, you will never send out an HTLC through my channel to rebalance).&lt;br/&gt;&amp;gt; So it should still be acceptable.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I agree, my proposal would have the same result as today&amp;#39;s behavior in that&lt;br/&gt;case.&lt;br/&gt;Unless your throw-away node waited for me to add an HTLC in its channel, in&lt;br/&gt;that case I would pay a&lt;br/&gt;part of the fee (since I&amp;#39;m adding that HTLC). That leans towards the first&lt;br/&gt;of my two proposals,&lt;br/&gt;where the funder always pays the &amp;#34;base&amp;#34; fee and htlc fees are split&lt;br/&gt;depending on who proposed the HTLC.&lt;br/&gt;&lt;br/&gt;The channel initiator shouldn&amp;#39;t have to pay for channel-closing as it&amp;#39;s&lt;br/&gt;&amp;gt; somehow a liquidity allocation decision&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I agree 100%. Especially since mutual closing should be preferred most of&lt;br/&gt;the time.&lt;br/&gt;&lt;br/&gt;That said, a channel closing might be triggered due to a security&lt;br/&gt;&amp;gt; mechanism, like a HTLC to timeout onchain. Thus a malicious counterparty&lt;br/&gt;&amp;gt; can easily loop a HTLC forwarding on an honest peer. Then not cancel it&lt;br/&gt;&amp;gt; on-time to force the honest counterparty to pay onchain fees to avoid a&lt;br/&gt;&amp;gt; offered HTLC not being claimed back on time.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Yes, this is an issue, but the only way to fix it today is to never be the&lt;br/&gt;funder, always be fundee&lt;br/&gt;and I think that creates unhealthy, assymetric incentives.&lt;br/&gt;&lt;br/&gt;This is a scenario where the other node will only burn you once; if you&lt;br/&gt;notice that behavior you&amp;#39;ll&lt;br/&gt;be forced to pay on-chain fees, but you&amp;#39;ll ban this peer. And if he opened&lt;br/&gt;the channel to you, he&amp;#39;ll&lt;br/&gt;still be paying the &amp;#34;base&amp;#34; fee. I don&amp;#39;t think there&amp;#39;s a silver bullet here&lt;br/&gt;where you can completely&lt;br/&gt;avoid being bitten by such malicious nodes, but you can reduce exposure and&lt;br/&gt;ban them after the fact.&lt;br/&gt;&lt;br/&gt;Another note on using a minimal relay fee; in a potential future where&lt;br/&gt;on-chain fees are always&lt;br/&gt;high and layer 1 is consistently busy, even that minimal relay fee will be&lt;br/&gt;costly. You&amp;#39;ll want your&lt;br/&gt;peer to pay for the HTLCs it&amp;#39;s responsible for to split the on-chain fee&lt;br/&gt;more fairly. So I believe&lt;br/&gt;moving (slightly) away from the &amp;#34;funder pays all&amp;#34; model is desirable (or at&lt;br/&gt;least it&amp;#39;s worth&lt;br/&gt;exploring seriously in order to have a better reason to dismiss it than&lt;br/&gt;&amp;#34;it&amp;#39;s simpler&amp;#34;).&lt;br/&gt;&lt;br/&gt;Does that make sense?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mar. 6 oct. 2020 à 18:30, Antoine Riard &amp;lt;antoine.riard at gmail.com&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hello Bastien,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m all in for a model where channel transactions are pre-signed with a&lt;br/&gt;&amp;gt; reasonable minimal relay fee and the adjustment is done by the closer. The&lt;br/&gt;&amp;gt; channel initiator shouldn&amp;#39;t have to pay for channel-closing as it&amp;#39;s somehow&lt;br/&gt;&amp;gt; a liquidity allocation decision (&amp;#34;My balance could be better allocated&lt;br/&gt;&amp;gt; elsewhere than in this channel&amp;#34;).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That said, a channel closing might be triggered due to a security&lt;br/&gt;&amp;gt; mechanism, like a HTLC to timeout onchain. Thus a malicious counterparty&lt;br/&gt;&amp;gt; can easily loop a HTLC forwarding on an honest peer. Then not cancel it&lt;br/&gt;&amp;gt; on-time to force the honest counterparty to pay onchain fees to avoid a&lt;br/&gt;&amp;gt; offered HTLC not being claimed back on time.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; AFAICT, this issue is not solved by anchor outputs. A way to decentivize&lt;br/&gt;&amp;gt; this kind of behavior from a malicious counterparty is an upfront payment&lt;br/&gt;&amp;gt; where the upholding HTLC fee * HTLC block-buffer-before-onchain is higher&lt;br/&gt;&amp;gt; than the cost of going onchain. It should cost higher for the counterparty&lt;br/&gt;&amp;gt; to withhold a HTLC than paying onchain-fees to close the channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or can you think about another mitigation for the issue raised above ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Antoine&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le lun. 5 oct. 2020 à 09:13, Bastien TEINTURIER via Lightning-dev &amp;lt;&lt;br/&gt;&amp;gt; lightning-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Good morning list,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; It seems to me that the &amp;#34;funder pays all the commit tx fees&amp;#34; rule exists&lt;br/&gt;&amp;gt;&amp;gt; solely for simplicity&lt;br/&gt;&amp;gt;&amp;gt; (which was totally reasonable). I haven&amp;#39;t been able to find much&lt;br/&gt;&amp;gt;&amp;gt; discussion about this decision&lt;br/&gt;&amp;gt;&amp;gt; on the mailing list nor in the spec commits.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; At first glance, it&amp;#39;s true that at the beginning of the channel lifetime,&lt;br/&gt;&amp;gt;&amp;gt; the funder should be&lt;br/&gt;&amp;gt;&amp;gt; responsible for the fee (it&amp;#39;s his decision to open a channel after all).&lt;br/&gt;&amp;gt;&amp;gt; But as time goes by and&lt;br/&gt;&amp;gt;&amp;gt; both peers earn value from this channel, this rule becomes questionable.&lt;br/&gt;&amp;gt;&amp;gt; We&amp;#39;ve discovered since&lt;br/&gt;&amp;gt;&amp;gt; then that there is some risk associated with having pending HTLCs&lt;br/&gt;&amp;gt;&amp;gt; (flood-and-loot type of attacks,&lt;br/&gt;&amp;gt;&amp;gt; pinning, channel jamming, etc).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I think that *in some cases*, fundees should be paying a portion of the&lt;br/&gt;&amp;gt;&amp;gt; commit-tx on-chain fees,&lt;br/&gt;&amp;gt;&amp;gt; otherwise we may end up with a web-of-trust network where channels would&lt;br/&gt;&amp;gt;&amp;gt; only exist between peers&lt;br/&gt;&amp;gt;&amp;gt; that trust each other, which is quite limiting (I&amp;#39;m hoping we can do&lt;br/&gt;&amp;gt;&amp;gt; better).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Routing nodes may be at risk when they *receive* HTLCs. All the attacks&lt;br/&gt;&amp;gt;&amp;gt; that steal funds come from&lt;br/&gt;&amp;gt;&amp;gt; the fact that a routing node has paid downstream but cannot claim the&lt;br/&gt;&amp;gt;&amp;gt; upstream HTLCs (correct me&lt;br/&gt;&amp;gt;&amp;gt; if that&amp;#39;s incorrect). Thus I&amp;#39;d like nodes to pay for the on-chain fees of&lt;br/&gt;&amp;gt;&amp;gt; the HTLCs they offer&lt;br/&gt;&amp;gt;&amp;gt; while they&amp;#39;re pending in the commit-tx, regardless of whether they&amp;#39;re&lt;br/&gt;&amp;gt;&amp;gt; funder or fundee.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The simplest way to do this would be to deduce the HTLC cost (172 *&lt;br/&gt;&amp;gt;&amp;gt; feerate) from the offerer&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; main output (instead of the funder&amp;#39;s main output, while keeping the base&lt;br/&gt;&amp;gt;&amp;gt; commit tx weight paid&lt;br/&gt;&amp;gt;&amp;gt; by the funder).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; A more extreme proposal would be to tie the *total* commit-tx fee to the&lt;br/&gt;&amp;gt;&amp;gt; channel usage:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * if there are no pending HTLCs, the funder pays all the fee&lt;br/&gt;&amp;gt;&amp;gt; * if there are pending HTLCs, each node pays a proportion of the fee&lt;br/&gt;&amp;gt;&amp;gt; proportional to the number of&lt;br/&gt;&amp;gt;&amp;gt; HTLCs they offered. If Alice offered 1 HTLC and Bob offered 3 HTLCs, Bob&lt;br/&gt;&amp;gt;&amp;gt; pays 75% of the&lt;br/&gt;&amp;gt;&amp;gt; commit-tx fee and Alice pays 25%. When the HTLCs settle, the fee is&lt;br/&gt;&amp;gt;&amp;gt; redistributed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This model uses the on-chain fee as collateral for usage of the channel.&lt;br/&gt;&amp;gt;&amp;gt; If Alice wants to forward&lt;br/&gt;&amp;gt;&amp;gt; HTLCs through this channel (because she has something to gain - routing&lt;br/&gt;&amp;gt;&amp;gt; fees), she should be taking&lt;br/&gt;&amp;gt;&amp;gt; on some of the associated risk, not Bob. Bob will be taking the same risk&lt;br/&gt;&amp;gt;&amp;gt; downstream if he chooses&lt;br/&gt;&amp;gt;&amp;gt; to forward.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I believe it also forces the fundee to care about on-chain feerates,&lt;br/&gt;&amp;gt;&amp;gt; which is a healthy incentive.&lt;br/&gt;&amp;gt;&amp;gt; It may create a feedback loop between on-chain feerates and routing fees,&lt;br/&gt;&amp;gt;&amp;gt; which I believe is also&lt;br/&gt;&amp;gt;&amp;gt; a good long-term thing (but it&amp;#39;s hard to predict as there may be negative&lt;br/&gt;&amp;gt;&amp;gt; side-effects as well).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; What do you all think? Is this a terrible idea? Is it okay-ish, but not&lt;br/&gt;&amp;gt;&amp;gt; worth the additional&lt;br/&gt;&amp;gt;&amp;gt; complexity? Is it an amazing idea worth a lightning nobel? Please don&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt; take any of my claims&lt;br/&gt;&amp;gt;&amp;gt; for granted and challenge them, there may be negative side-effects I&amp;#39;m&lt;br/&gt;&amp;gt;&amp;gt; completely missing, this is&lt;br/&gt;&amp;gt;&amp;gt; a fragile game of incentives...&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Side-note: don&amp;#39;t forget to take into account that the fees for HTLC&lt;br/&gt;&amp;gt;&amp;gt; transactions (second-level txs)&lt;br/&gt;&amp;gt;&amp;gt; are always paid by the party that broadcasts them (which makes sense). I&lt;br/&gt;&amp;gt;&amp;gt; still think this is not&lt;br/&gt;&amp;gt;&amp;gt; enough and can even be abused by fundees in some setups.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; 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/20201008/45ed00b7/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201008/45ed00b7/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:01&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfhaht3aj020qgqgw4xy7cgy2vlqnt4fpfk7daahgwrnak038x5lszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukv0vgnv</id>
    
      <title type="html">📅 Original date posted:2020-10-05 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfhaht3aj020qgqgw4xy7cgy2vlqnt4fpfk7daahgwrnak038x5lszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukv0vgnv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsymmy6qnl2y29s5t3nayad48e6ytdprlgrft49ykkcdw44zewkf7gt22ejv&#39;&gt;nevent1q…2ejv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi darosior,&lt;br/&gt;&lt;br/&gt;This is true, but we haven&amp;#39;t solved yet how to estimate a good enough&lt;br/&gt;`min_relay_fee` that works&lt;br/&gt;for end-to-end tx propagation over the network.&lt;br/&gt;&lt;br/&gt;We&amp;#39;ve discussed this during the last two spec meetings, but it&amp;#39;s still&lt;br/&gt;unclear whether we&amp;#39;ll be able to solve&lt;br/&gt;this before package-relay lands in bitcoin, so I wanted to explore this as&lt;br/&gt;a potential more short-term&lt;br/&gt;solution. But maybe it&amp;#39;s not worth the effort and we should focus more on&lt;br/&gt;anchors and `min_relay_fee`,&lt;br/&gt;we&amp;#39;ll see ;)&lt;br/&gt;&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le lun. 5 oct. 2020 à 15:25, darosior &amp;lt;darosior at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Bastien,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think that *in some cases*, fundees should be paying a portion of the&lt;br/&gt;&amp;gt; commit-tx on-chain fees,&lt;br/&gt;&amp;gt; otherwise we may end up with a web-of-trust network where channels would&lt;br/&gt;&amp;gt; only exist between peers&lt;br/&gt;&amp;gt; that trust each other, which is quite limiting (I&amp;#39;m hoping we can do&lt;br/&gt;&amp;gt; better).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Agreed.&lt;br/&gt;&amp;gt; However in an anchor outputs future the funder only pays for the&lt;br/&gt;&amp;gt; &amp;#34;backbone&amp;#34; fees of the channel and the fees necessary to secure the&lt;br/&gt;&amp;gt; confirmation of transactions is paid in second stage by each interested&lt;br/&gt;&amp;gt; party (*). It seems to me to be a reasonable middle-ground.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (*) Credits to ZmnSCPxj for pointing this out to me on IRC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Darosior&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/20201005/b987b4a9/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201005/b987b4a9/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswyr2jrz4l2y552j794rp5max4hntd6y7nz5tegxzk9ecshmfg9nqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukwl7qm3</id>
    
      <title type="html">📅 Original date posted:2020-10-09 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswyr2jrz4l2y552j794rp5max4hntd6y7nz5tegxzk9ecshmfg9nqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukwl7qm3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswwaw6utm0kfe5z28pw6d8rm6mtdp6xmwmk7czytdw7278v4q4gys7mpp6l&#39;&gt;nevent1q…pp6l&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey Zman,&lt;br/&gt;&lt;br/&gt;raising the minimum payment size is another headache&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;It&amp;#39;s true that it may (depending on the algorithm) lower the success rate&lt;br/&gt;of MPP-split.&lt;br/&gt;But it&amp;#39;s already a parameter that node operators can configure at will (at&lt;br/&gt;channel creation time),&lt;br/&gt;so IMO it&amp;#39;s a complexity we have to deal with anyway. Making it dynamic&lt;br/&gt;shouldn&amp;#39;t have a high&lt;br/&gt;impact on MPP algorithms (apart from failures while `channel_update`s are&lt;br/&gt;propagating).&lt;br/&gt;&lt;br/&gt;To be fully honest, my (maybe unpopular) opinion about MPP is that it&amp;#39;s not&lt;br/&gt;necessary on the&lt;br/&gt;network&amp;#39;s backbone, only at its edges. Once the network matures, I expect&lt;br/&gt;channels between&lt;br/&gt;&amp;#34;serious&amp;#34; routing nodes to be way bigger than the size of individual&lt;br/&gt;payments. The only places&lt;br/&gt;where there may be small or almost-empty channels are between end-users&lt;br/&gt;(wallets) and&lt;br/&gt;routing nodes.&lt;br/&gt;If something like Trampoline were to be implemented, MPP would only be&lt;br/&gt;needed to reach a&lt;br/&gt;first routing node (short route), that routing node would aggregate the&lt;br/&gt;parts and forward as a&lt;br/&gt;single HTLC to the next routing node. It would be split again once it&lt;br/&gt;reaches the other edge&lt;br/&gt;of the network (for a short route as well). In a network like this, the MPP&lt;br/&gt;routes would only have&lt;br/&gt;to be computed on a small subset of the network, which makes brute-force&lt;br/&gt;algorithms completely&lt;br/&gt;reasonable and the success rate higher.&lt;br/&gt;&lt;br/&gt;This is an interesting fork of the discussion, but I don&amp;#39;t think it&amp;#39;s a&lt;br/&gt;good reason to prevent these&lt;br/&gt;parameters from being updated on live channels, what do you think?&lt;br/&gt;&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Le jeu. 8 oct. 2020 à 22:05, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning t-bast,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Please forget about channel jamming, upfront fees et al and simply&lt;br/&gt;&amp;gt; consider the parameters I&amp;#39;m&lt;br/&gt;&amp;gt; &amp;gt; mentioning. It feels to me that these are by nature dynamic channel&lt;br/&gt;&amp;gt; parameters (some of them are&lt;br/&gt;&amp;gt; &amp;gt; even present in `channel_update`, but no-one updates them yet because&lt;br/&gt;&amp;gt; direct peers don&amp;#39;t take the&lt;br/&gt;&amp;gt; &amp;gt; update into account anyway). I&amp;#39;d like to raise `htlc_minimum_msat` on&lt;br/&gt;&amp;gt; some big channels because&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;d like these channels to be used only for big-ish payments. Today I&lt;br/&gt;&amp;gt; can&amp;#39;t, I have to close that&lt;br/&gt;&amp;gt; &amp;gt; channel and open a new one for such a trivial configuration update,&lt;br/&gt;&amp;gt; which is sad.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At the risk of once more derailing the conversation: from the MPP&lt;br/&gt;&amp;gt; trenches, raising the minimum payment size is another headache.&lt;br/&gt;&amp;gt; The general assumption with MPP is that smaller amounts are more likely to&lt;br/&gt;&amp;gt; get through, but if anyone is making a significant bump up in&lt;br/&gt;&amp;gt; `htlc_minimum_msat`, that assumption is upended and we have to reconsider&lt;br/&gt;&amp;gt; if we may actually want to merge multiple failing splits into one, as well&lt;br/&gt;&amp;gt; as considering asymmetric splits (in particular asymmetric presplits)&lt;br/&gt;&amp;gt; because maybe the smaller splits will be unable to pass through the bigger&lt;br/&gt;&amp;gt; channels but the bigger-side split *might*.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On the other hand: one can consider that the use of big payments as an&lt;br/&gt;&amp;gt; aggregation.&lt;br/&gt;&amp;gt; For example: a forwarding node might support smaller `htlc_minimum_msat`,&lt;br/&gt;&amp;gt; then after making multiple such forwards, find that a channel is now&lt;br/&gt;&amp;gt; heavily balanced towards one side or another.&lt;br/&gt;&amp;gt; It can then make a single large rebalance via one of the&lt;br/&gt;&amp;gt; high-`htlc_minimum_msat` channels t-bast is running.&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/20201009/cdca8cc5/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201009/cdca8cc5/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:57&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqxuwc2ymqlwm6vwcx5eq3gdq4k6jev0w6wshtnhu6ltr4kkw70mszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukv06cl9</id>
    
      <title type="html">📅 Original date posted:2020-10-08 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqxuwc2ymqlwm6vwcx5eq3gdq4k6jev0w6wshtnhu6ltr4kkw70mszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukv06cl9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfc7jgnpykt9k4zg7x7rdxus79y5339lzc9vjxkyzrt37djqveh4sl43zmv&#39;&gt;nevent1q…3zmv&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Antoine and Zman,&lt;br/&gt;&lt;br/&gt;Thanks for your answers!&lt;br/&gt;&lt;br/&gt;I was thinking dynamic policy adjustment would be covered by the dynamic&lt;br/&gt;&amp;gt; commitment mechanism proposed by Laolu&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I didn&amp;#39;t mention this as I think we still have a long-ish way to go before&lt;br/&gt;dynamic commitments&lt;br/&gt;are spec-ed, implemented and deployed, and I think the parameters I&amp;#39;m&lt;br/&gt;interested in don&amp;#39;t require&lt;br/&gt;that complexity to be updated.&lt;br/&gt;&lt;br/&gt;Please forget about channel jamming, upfront fees et al and simply consider&lt;br/&gt;the parameters I&amp;#39;m&lt;br/&gt;mentioning. It feels to me that these are by nature dynamic channel&lt;br/&gt;parameters (some of them are&lt;br/&gt;even present in `channel_update`, but no-one updates them yet because&lt;br/&gt;direct peers don&amp;#39;t take the&lt;br/&gt;update into account anyway). I&amp;#39;d like to raise `htlc_minimum_msat` on some&lt;br/&gt;big channels because&lt;br/&gt;I&amp;#39;d like these channels to be used only for big-ish payments. Today I&lt;br/&gt;can&amp;#39;t, I have to close that&lt;br/&gt;channel and open a new one for such a trivial configuration update, which&lt;br/&gt;is sad.&lt;br/&gt;&lt;br/&gt;There is no need to stop the channel&amp;#39;s operations while you&amp;#39;re updating&lt;br/&gt;these parameters, since&lt;br/&gt;they can be updated unilaterally anyway. The only downside is that if you&lt;br/&gt;make your policy stricter,&lt;br/&gt;your peer may send you some HTLCs that you will immediately fail&lt;br/&gt;afterwards; it&amp;#39;s only a minor&lt;br/&gt;inconvenience that won&amp;#39;t trigger a channel closure.&lt;br/&gt;&lt;br/&gt;I&amp;#39;d like to know if other implementations than eclair have specificities&lt;br/&gt;that would make this&lt;br/&gt;feature particularly hard to implement or undesirable.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mar. 6 oct. 2020 à 18:43, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Antoine, and Bastien,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Instead of relying on reputation, the other alternative is just to have&lt;br/&gt;&amp;gt; an upfront payment system, where a relay node doesn&amp;#39;t have to account for a&lt;br/&gt;&amp;gt; HTLC issuer reputation to decide acceptance and can just forward a HTLC as&lt;br/&gt;&amp;gt; long it paid enough. More, I think it&amp;#39;s better to mitigate jamming with a&lt;br/&gt;&amp;gt; fees-based system than a web-of-trust one, less burden on network newcomers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let us consider some of the complications here.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A newcomer wants to make an outgoing payment.&lt;br/&gt;&amp;gt; Speculatively, it connects to some existing nodes based on some policy.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now, since forwarding is upfront, the newcomer fears that the node it&lt;br/&gt;&amp;gt; connected to might not even bother forwarding the payment, and instead just&lt;br/&gt;&amp;gt; fail it and claim the upfront fees.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In particular: how would the newcomer offer upfront fees to a node it is&lt;br/&gt;&amp;gt; not directly channeled with?&lt;br/&gt;&amp;gt; In order to do that, we would have to offer the upfront fees for that&lt;br/&gt;&amp;gt; node, to the node we *are* channeled with, so it can forward this as well.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * We can give the upfront fee outright to the first hop, and trust that if&lt;br/&gt;&amp;gt; it forwards, it will also forward the upfront fee for the next hop.&lt;br/&gt;&amp;gt;   * The first hop would then prefer to just fail the HTLC then and there&lt;br/&gt;&amp;gt; and steal all the upfront fees.&lt;br/&gt;&amp;gt;     * After all, the offerrer is a newcomer, and might be the sybil of a&lt;br/&gt;&amp;gt; hacker that is trying to tie up its liquidity.&lt;br/&gt;&amp;gt;       The first hop would (1) avoid this risk and (2) earn more upfront&lt;br/&gt;&amp;gt; fees because it does not forward those fees to later hops.&lt;br/&gt;&amp;gt;   * This is arguably custodial and not your keys not your coins applies.&lt;br/&gt;&amp;gt;     Thus, it returns us back to tr\*st anyway.&lt;br/&gt;&amp;gt; * We can require that the first hop prove *where* along the route errored.&lt;br/&gt;&amp;gt;  If it provably failed at a later hop, then the first hop can claim more&lt;br/&gt;&amp;gt; as upfront fees, since it will forward the upfront fees to the later hop as&lt;br/&gt;&amp;gt; well.&lt;br/&gt;&amp;gt;   * This has to be enforcable onchain in case the channel gets dropped&lt;br/&gt;&amp;gt; onchain.&lt;br/&gt;&amp;gt;     Is there a proposal SCRIPT which can enforce this?&lt;br/&gt;&amp;gt;   * If not enforcable onchain, then there may be onchain shenanigans&lt;br/&gt;&amp;gt; possible and thus this solution might introduce an attack vector even as it&lt;br/&gt;&amp;gt; fixes another.&lt;br/&gt;&amp;gt;     * On the other hand, sub-satoshi amounts are not enforcable onchain&lt;br/&gt;&amp;gt; too, and nobody cares, so...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On the other hand, a web-of-tr\*st might not be *that* bad.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One can say that &amp;#34;tr\*st is risk&amp;#34;, and consider that the size and age of a&lt;br/&gt;&amp;gt; channel to a peer represents your tr\*st that that peer will behave&lt;br/&gt;&amp;gt; correctly for fast and timely resolution of payments.&lt;br/&gt;&amp;gt; And anyone can look at the blockchain and the network gossip to get an&lt;br/&gt;&amp;gt; idea of who is generally considered tr\*stworthy, and since that&lt;br/&gt;&amp;gt; information is backed by Bitcoins locked in channels, this is reasonably&lt;br/&gt;&amp;gt; hard to fake.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On the other hand, this risks centralization around existing, long-lived&lt;br/&gt;&amp;gt; nodes.&lt;br/&gt;&amp;gt; *Sigh*.&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/20201008/22e78ab2/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201008/22e78ab2/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf8njf9unv0h4uun82jz7sand9rqykrtqeqqnx5ersjfhfk47j67czyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukau40tj</id>
    
      <title type="html">📅 Original date posted:2020-10-05 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf8njf9unv0h4uun82jz7sand9rqykrtqeqqnx5ersjfhfk47j67czyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukau40tj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst7ht8tp3lj754r567am377wpgmlp5j4f23s68r0mt37qvzppj5gsk22d5g&#39;&gt;nevent1q…2d5g&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Good evening list,&lt;br/&gt;&lt;br/&gt;Recent discussions around channel jamming [1] have highlighted again the&lt;br/&gt;need to think twice when&lt;br/&gt;configuring your channels parameters. There are currently parameters that&lt;br/&gt;are set once at channel&lt;br/&gt;creation that would benefit a lot from being configurable throughout the&lt;br/&gt;lifetime of the channel&lt;br/&gt;to avoid closing channels when we just want to reconfigure them:&lt;br/&gt;&lt;br/&gt;* max_htlc_value_in_flight_msat&lt;br/&gt;* max_accepted_htlcs&lt;br/&gt;* htlc_minimum_msat&lt;br/&gt;* htlc_maximum_msat&lt;br/&gt;&lt;br/&gt;Nodes can currently unilaterally udpate these by applying forwarding&lt;br/&gt;heuristics, but it would be&lt;br/&gt;better to tell our peer about the limits we want to put in place (otherwise&lt;br/&gt;we&amp;#39;re wasting a whole&lt;br/&gt;cycle of add/commit/revoke/fail messages for no good reason).&lt;br/&gt;&lt;br/&gt;I suggest adding tlv records in `commitment_signed` to tell our channel&lt;br/&gt;peer that we&amp;#39;re changing&lt;br/&gt;the values of these fields.&lt;br/&gt;&lt;br/&gt;Is someone opposed to that?&lt;br/&gt;Are there other fields you think would need to become dynamic as well?&lt;br/&gt;Do you think that needs a new message instead of using extensions of&lt;br/&gt;`commitment_signed`?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://twitter.com/joostjgr/status/1308414364911841281&#34;&gt;https://twitter.com/joostjgr/status/1308414364911841281&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201005/f98befeb/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201005/f98befeb/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:55&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf34jwmf5ksq2wuvt9te23g4rg4chjzkflpt6qp3s5mfvgmnk7d3gzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk0hz0wc</id>
    
      <title type="html">📅 Original date posted:2020-06-22 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf34jwmf5ksq2wuvt9te23g4rg4chjzkflpt6qp3s5mfvgmnk7d3gzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk0hz0wc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgjr4x94pjye087ax0ma308a90wgfw9jxregpjl26luqleqggcdeqhgwh62&#39;&gt;nevent1q…wh62&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-22&lt;br/&gt;📝 Original message:&lt;br/&gt;Thanks for the detailed write-up on how it affects incentives and&lt;br/&gt;centralization,&lt;br/&gt;these are good points. I need to spend more time thinking about them.&lt;br/&gt;&lt;br/&gt;This is one reason I suggested using independent pay-to-preimage&lt;br/&gt;&amp;gt; transactions[1]&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;While this works as a technical solution, I think it has some incentives&lt;br/&gt;issues too.&lt;br/&gt;In this attack, I believe the miners that hide the preimage tx in their&lt;br/&gt;mempool have&lt;br/&gt;to be accomplice with the attacker, otherwise they would share that tx with&lt;br/&gt;some of&lt;br/&gt;their peers, and some non-miner nodes would get that preimage tx and be&lt;br/&gt;able to&lt;br/&gt;gossip them off-chain (and even relay them to other mempools).&lt;br/&gt;&lt;br/&gt;If they are actively helping the attacker, they wouldn&amp;#39;t spend the&lt;br/&gt;pay-to-preimage tx,&lt;br/&gt;unless they gain more from it than the share the attacker gives them. This&lt;br/&gt;becomes&lt;br/&gt;a simple bidding war, and the honest user will always be the losing party&lt;br/&gt;here (the&lt;br/&gt;attacker has nothing to lose). For this reason I&amp;#39;m afraid it wouldn&amp;#39;t work&lt;br/&gt;out in practice&lt;br/&gt;as well as we&amp;#39;d hope...what do you think? And even if the honest user wins&lt;br/&gt;the bidding&lt;br/&gt;war, the attack still steals money from that user; it just goes into the&lt;br/&gt;miner&amp;#39;s pocket.&lt;br/&gt;&lt;br/&gt;But from the perspective of a single LN node, it&lt;br/&gt;&amp;gt; might make more sense to get the information and *not* share it&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I think it depends. If this attack becomes doable in practice and we see it&lt;br/&gt;happening,&lt;br/&gt;LN routing nodes and service providers have a very high incentive to thwart&lt;br/&gt;these attacks,&lt;br/&gt;because otherwise they&amp;#39;d lose their business as people would leave the&lt;br/&gt;lightning network.&lt;br/&gt;&lt;br/&gt;As long as enough nodes think that way (with &amp;#34;enough&amp;#34; being a very hard to&lt;br/&gt;define quantity),&lt;br/&gt;this should mitigate the attack. The only risk would be a big &amp;#34;exit scam&amp;#34;&lt;br/&gt;scenario, but the&lt;br/&gt;coordination cost between all these nodes makes that scenario unlikely&lt;br/&gt;(IMHO).&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le sam. 20 juin 2020 à 12:37, David A. Harding &amp;lt;dave at dtrt.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; On Sat, Jun 20, 2020 at 10:54:03AM &#43;0200, Bastien TEINTURIER wrote:&lt;br/&gt;&amp;gt; &amp;gt; We&amp;#39;re simply missing information, so it looks like the only good&lt;br/&gt;&amp;gt; &amp;gt; solution is to avoid being in that situation by having a foot in&lt;br/&gt;&amp;gt; &amp;gt; miners&amp;#39; mempools.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The problem I have with that approach is that the incentive is to&lt;br/&gt;&amp;gt; connect to the highest hashrate pools and ignore the long tail of&lt;br/&gt;&amp;gt; smaller pools and solo miners.  If miners realize people are doing this,&lt;br/&gt;&amp;gt; they may begin to charge for information about their mempool and the&lt;br/&gt;&amp;gt; largest miners will likely be able to charge more money per hashrate&lt;br/&gt;&amp;gt; than smaller miners, creating a centralization force by increasing&lt;br/&gt;&amp;gt; existing economies of scale.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Worse, information about a node&amp;#39;s mempool is partly trusted.  A node can&lt;br/&gt;&amp;gt; easily prove what transactions it has, but it can&amp;#39;t prove that it&lt;br/&gt;&amp;gt; doesn&amp;#39;t have a certain transaction.  This implies incumbent pools with a&lt;br/&gt;&amp;gt; long record of trustworthy behavior may be able to charge more per&lt;br/&gt;&amp;gt; hashrate than a newer pools, creating a reputation-based centralizing&lt;br/&gt;&amp;gt; force that pushes individual miners towards well-established pools.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is one reason I suggested using independent pay-to-preimage&lt;br/&gt;&amp;gt; transactions[1].  Anyone who knows the preimage can mine the&lt;br/&gt;&amp;gt; transaction, so it doesn&amp;#39;t provide reputational advantage or direct&lt;br/&gt;&amp;gt; economies of scale---pay-to-preimage is incentive equivalent to paying&lt;br/&gt;&amp;gt; normal onchain transaction fees.  There is an indirect economy of&lt;br/&gt;&amp;gt; scale---attackers are most likely to send the low-feerate&lt;br/&gt;&amp;gt; preimage-containing transaction to just the largest pools, so small&lt;br/&gt;&amp;gt; miners are unlikely to learn the preimage and thus unlikely to be able&lt;br/&gt;&amp;gt; to claim the payment.  However, if the defense is effective, the attack&lt;br/&gt;&amp;gt; should rarely happen and so this should not have a significant effect on&lt;br/&gt;&amp;gt; mining profitability---unlike monitoring miner mempools which would have&lt;br/&gt;&amp;gt; to be done continuously and forever.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ZmnSCPxj noted that pay-to-preimage doesn&amp;#39;t work with PTLCs.[2]  I was&lt;br/&gt;&amp;gt; hoping one of Bitcoin&amp;#39;s several inventive cryptographers would come&lt;br/&gt;&amp;gt; along and describe how someone with an adaptor signature could use that&lt;br/&gt;&amp;gt; information to create a pubkey that could be put into a transaction with&lt;br/&gt;&amp;gt; a second output that OP_RETURN included the serialized adaptor&lt;br/&gt;&amp;gt; signature.  The pubkey would be designed to be spendable by anyone with&lt;br/&gt;&amp;gt; the final signature in a way that revealed the hidden value to the&lt;br/&gt;&amp;gt; pubkey&amp;#39;s creator, allowing them to resolve the PTLC.  But if that&amp;#39;s&lt;br/&gt;&amp;gt; fundamentally not possible, I think we could advocate for making&lt;br/&gt;&amp;gt; pay-to-revealed-adaptor-signature possible using something like&lt;br/&gt;&amp;gt; OP_CHECKSIGFROMSTACK.[3]&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/lightning-dev/2020-April/002664.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-April/002664.html&lt;/a&gt;&lt;br/&gt;&amp;gt; [2]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-April/002667.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-April/002667.html&lt;/a&gt;&lt;br/&gt;&amp;gt; [3] &lt;a href=&#34;https://bitcoinops.org/en/topics/op_checksigfromstack/&#34;&gt;https://bitcoinops.org/en/topics/op_checksigfromstack/&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Do you think it&amp;#39;s unreasonable to expect at least some LN nodes to&lt;br/&gt;&amp;gt; &amp;gt; also invest in running nodes in mining pools, ensuring that they learn&lt;br/&gt;&amp;gt; &amp;gt; about attackers&amp;#39; txs and can potentially share discovered preimages&lt;br/&gt;&amp;gt; &amp;gt; with the network off-chain (by gossiping preimages found in the&lt;br/&gt;&amp;gt; &amp;gt; mempool over LN)?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ignoring my concerns about mining centralization and from the&lt;br/&gt;&amp;gt; perspective of just the Lightning Network, that doesn&amp;#39;t sound&lt;br/&gt;&amp;gt; unreasonable to me.  But from the perspective of a single LN node, it&lt;br/&gt;&amp;gt; might make more sense to get the information and *not* share it,&lt;br/&gt;&amp;gt; increasing your security and allowing you to charge lower routing fees&lt;br/&gt;&amp;gt; compared to your competitors.  This effect would only be enhanced if&lt;br/&gt;&amp;gt; miners charged for their mempool contents (indeed, to maximize their&lt;br/&gt;&amp;gt; revenue, miners might require that their mempool subscribers don&amp;#39;t share&lt;br/&gt;&amp;gt; the information---which they could trivially enforce by occasionally&lt;br/&gt;&amp;gt; sending subscribers a preimage specific to the subscriber and seeing if&lt;br/&gt;&amp;gt; it propagated to the public network).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I think that these recent attacks show that we need (at least some)&lt;br/&gt;&amp;gt; &amp;gt; off-chain nodes to be somewhat heavily invested in on-chain operations&lt;br/&gt;&amp;gt; &amp;gt; (layers can&amp;#39;t be fully decoupled with the current security assumptions&lt;br/&gt;&amp;gt; &amp;gt; - maybe Eltoo will help change that in the future?).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t see how eltoo helps.  Eltoo helps ensure you reach the final&lt;br/&gt;&amp;gt; channel state, but this problem involves an abuse of that final state.&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/lightning-dev/attachments/20200622/09e39b02/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200622/09e39b02/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv8ca88e2vzay0hqp69m3et6p87j6dzyevhw24m7glk8zgc3hjcnczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukyz4208</id>
    
      <title type="html">📅 Original date posted:2020-06-20 📝 Original message: Hello ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv8ca88e2vzay0hqp69m3et6p87j6dzyevhw24m7glk8zgc3hjcnczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukyz4208" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp2ky9zlzfwmm2749jedtal7hkdj4mm5tk4lrlrv6ptr8ck6qznhctsfppq&#39;&gt;nevent1q…fppq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-20&lt;br/&gt;📝 Original message:&lt;br/&gt;Hello Dave and list,&lt;br/&gt;&lt;br/&gt;Thanks for your quick answers!&lt;br/&gt;&lt;br/&gt;The attacker would be broadcasting the latest&lt;br/&gt;&amp;gt; state, so the honest counterparty would only need to send one blind&lt;br/&gt;&amp;gt; child.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Exactly, if the attacker submits an outdated transaction he would be&lt;br/&gt;shooting himself in the foot,&lt;br/&gt;as we could claim the revocation paths when seeing the transaction in a&lt;br/&gt;block and get all the&lt;br/&gt;channel funds (since the attacker&amp;#39;s outputs will be CSV-locked).&lt;br/&gt;&lt;br/&gt;The only way your Bitcoin peer will relay your blind child&lt;br/&gt;&amp;gt; is if it already has the parent transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;That&amp;#39;s an excellent point that I missed in the blind CPFP carve-out trick!&lt;br/&gt;I think this makes the&lt;br/&gt;blind CPFP carve-out quite hard in practice (even using getdata - thanks&lt;br/&gt;for detailing that option)...&lt;br/&gt;&lt;br/&gt;In the worst case scenario where most miners&amp;#39; mempools contain the&lt;br/&gt;attacker&amp;#39;s tx and the rest of&lt;br/&gt;the network&amp;#39;s mempools contains the honest participant&amp;#39;s tx, I think there&lt;br/&gt;isn&amp;#39;t much we can do.&lt;br/&gt;We&amp;#39;re simply missing information, so it looks like the only good solution&lt;br/&gt;is to avoid being in that&lt;br/&gt;situation by having a foot in miners&amp;#39; mempools. Do you think it&amp;#39;s&lt;br/&gt;unreasonable to expect at least&lt;br/&gt;some LN nodes to also invest in running nodes in mining pools, ensuring&lt;br/&gt;that they learn about&lt;br/&gt;attackers&amp;#39; txs and can potentially share discovered preimages with the&lt;br/&gt;network off-chain (by&lt;br/&gt;gossiping preimages found in the mempool over LN)? I think that these&lt;br/&gt;recent attacks show that&lt;br/&gt;we need (at least some) off-chain nodes to be somewhat heavily invested in&lt;br/&gt;on-chain operations&lt;br/&gt;(layers can&amp;#39;t be fully decoupled with the current security assumptions -&lt;br/&gt;maybe Eltoo will help&lt;br/&gt;change that in the future?).&lt;br/&gt;&lt;br/&gt;Thank you for your time!&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Le ven. 19 juin 2020 à 22:53, David A. Harding &amp;lt;dave at dtrt.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; On Fri, Jun 19, 2020 at 03:58:46PM -0400, David A. Harding via bitcoin-dev&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt; I think you&amp;#39;re assuming here that the attacker broadcast a particular&lt;br/&gt;&amp;gt; &amp;gt; state.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Whoops, I managed to confuse myself despite looking at Bastien&amp;#39;s&lt;br/&gt;&amp;gt; excellent explainer.  The attacker would be broadcasting the latest&lt;br/&gt;&amp;gt; state, so the honest counterparty would only need to send one blind&lt;br/&gt;&amp;gt; child.  However, the blind child will only be relayed by a Bitcoin peer&lt;br/&gt;&amp;gt; if the peer also has the parent transaction (the latest state) and, if&lt;br/&gt;&amp;gt; it has the parent transaction, you should be able to just getdata(&amp;#39;tx&amp;#39;,&lt;br/&gt;&amp;gt; $txid) that transaction from the peer without CPFPing anything.  That&lt;br/&gt;&amp;gt; will give you the preimage and so you can immediately resolve the HTLC&lt;br/&gt;&amp;gt; with the upstream channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Revising my conclusion from the previous post:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think the strongman argument for the attack would be that the attacker&lt;br/&gt;&amp;gt; will be able to perform a targeted relay of the low-feerate&lt;br/&gt;&amp;gt; preimage-containing transaction to just miners---everyone else on the&lt;br/&gt;&amp;gt; network will receive the honest user&amp;#39;s higher-feerate expired-timelock&lt;br/&gt;&amp;gt; transaction.  Unless the honest user happens to have a connection to a&lt;br/&gt;&amp;gt; miner&amp;#39;s node, the user will neither be able to CPFP fee bump nor use&lt;br/&gt;&amp;gt; getdata to retrieve the preimage.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sorry for the confusion.&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/lightning-dev/attachments/20200620/6caf18ec/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200620/6caf18ec/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:30&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs96vk2vqkenfpljqwsvcu26nfrfq4nuhhndczw2fw7yeecr33vteczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk0pyr00</id>
    
      <title type="html">📅 Original date posted:2020-06-19 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs96vk2vqkenfpljqwsvcu26nfrfq4nuhhndczw2fw7yeecr33vteczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk0pyr00" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyefpgn8agmec55unah7vt7twm8k49c30yyv28uzvjw670rdc8qtg3wpcxh&#39;&gt;nevent1q…pcxh&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-19&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;Sorry for being (very) late to the party on that subject, but better late&lt;br/&gt;than never.&lt;br/&gt;&lt;br/&gt;A lot of ideas have been thrown at the problem and are scattered across&lt;br/&gt;emails, IRC discussions,&lt;br/&gt;and github issues. I&amp;#39;ve spent some time putting it all together in one&lt;br/&gt;gist, hoping that it will&lt;br/&gt;help stir the discussion forward as well as give newcomers all the&lt;br/&gt;background they need to ramp up&lt;br/&gt;on this issue and join the discussion, bringing new ideas to the table.&lt;br/&gt;&lt;br/&gt;The gist is here, and I&amp;#39;d appreciate your feedback if I have wrongly&lt;br/&gt;interpreted some of the ideas:&lt;br/&gt;&lt;a href=&#34;https://gist.github.com/t-bast/22320336e0816ca5578fdca4ad824d12&#34;&gt;https://gist.github.com/t-bast/22320336e0816ca5578fdca4ad824d12&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Readers of this list can probably directly skip to the &amp;#34;Future work&amp;#34;&lt;br/&gt;section. I believe my&lt;br/&gt;&amp;#34;alternative proposal&amp;#34; should loosely reflect Matt&amp;#39;s proposal from the very&lt;br/&gt;first mail of this&lt;br/&gt;thread; note that I included anchors and new txs only in some places, as I&lt;br/&gt;think they aren&amp;#39;t&lt;br/&gt;necessary everywhere.&lt;br/&gt;&lt;br/&gt;My current state-of-mind (subject to change as I discover more potential&lt;br/&gt;attacks) is that:&lt;br/&gt;&lt;br/&gt;* The proposal to add more anchors and pre-signed txs adds non-negligible&lt;br/&gt;complexity and hurts&lt;br/&gt;small HTLCs, so it would be better if we didn&amp;#39;t need it&lt;br/&gt;* The blind CPFP carve-out trick is a one shot, so you&amp;#39;ll likely need to&lt;br/&gt;pay a lot of fees for it&lt;br/&gt;to work which still makes you lose money in case an attacker targets you&lt;br/&gt;(but the money goes to&lt;br/&gt;miners, not to the attacker - unless he is the miner). It&amp;#39;s potentially&lt;br/&gt;hard to estimate what fee&lt;br/&gt;you should put into that blind CPFP carve-out because you have no idea what&lt;br/&gt;the current fee of the&lt;br/&gt;pinned success transaction package is, so it&amp;#39;s unsure if that solution will&lt;br/&gt;really work in practice&lt;br/&gt;* If we take a step back, the only attack we need to protect against is an&lt;br/&gt;attacker pinning a&lt;br/&gt;preimage transaction while preventing us from learning that preimage for at&lt;br/&gt;least `N` blocks&lt;br/&gt;(see the gist for the complete explanation). Please correct me if that&lt;br/&gt;claim is incorrect as it&lt;br/&gt;will invalidate my conclusion! Thus if we have:&lt;br/&gt;* a high enough `cltv_expiry_delta`&lt;br/&gt;* [off-chain preimage broadcast](&lt;br/&gt;&lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/issues/783&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/issues/783&lt;/a&gt;)&lt;br/&gt;(or David&amp;#39;s proposal to do it by sending txs that can be redeemed via only&lt;br/&gt;the preimage)&lt;br/&gt;* LN hubs (or any party commercially investing in running a lightning node)&lt;br/&gt;participating in&lt;br/&gt;various mining pools to help discover preimages&lt;br/&gt;* decent mitigations for eclipse attacks&lt;br/&gt;* then the official anchor outputs proposal should be safe enough and is&lt;br/&gt;much simpler?&lt;br/&gt;&lt;br/&gt;Thank you for reading, I hope the work I put into this gist will be useful&lt;br/&gt;for some of you.&lt;br/&gt;&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le ven. 24 avr. 2020 à 00:47, Matt Corallo via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On 4/23/20 8:46 AM, ZmnSCPxj wrote:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   Miners, being economically rational, accept this proposal and&lt;br/&gt;&amp;gt; include this in a block.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; The proposal by Matt is then:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   The hashlock branch should instead be:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   B and C must agree, and show the preimage of some hash H (hashlock&lt;br/&gt;&amp;gt; branch).&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   Then B and C agree that B provides a signature spending the&lt;br/&gt;&amp;gt; hashlock branch, to a transaction with the outputs:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   Normal payment to C.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   Hook output to B, which B can use to CPFP this transaction.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   Hook output to C, which C can use to CPFP this transaction.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   B can still (somehow) not maintain a mempool, by:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   B broadcasts its timelock transaction.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   B tries to CPFP the above hashlock transaction.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; -   If CPFP succeeds, it means the above hashlock transaction exists&lt;br/&gt;&amp;gt; and B queries the peer for this transaction, extracting the preimage and&lt;br/&gt;&amp;gt; claiming the A-&amp;gt;B HTLC.&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Note that no query is required. The problem has been solved and the&lt;br/&gt;&amp;gt; preimage-containing transaction should now confirm just fine.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Ah, right, so it gets confirmed and the `blocksonly` B sees it in a&lt;br/&gt;&amp;gt; block.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Even if C hooks a tree of low-fee transactions on its hook output or&lt;br/&gt;&amp;gt; normal payment, miners will still be willing to confirm this and the B hook&lt;br/&gt;&amp;gt; CPFP transaction without, right?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Correct, once it makes it into the mempool we can CPFP it and all the&lt;br/&gt;&amp;gt; regular sub-package CPFP calculation will pick it&lt;br/&gt;&amp;gt; and its descendants up. Of course this relies on it not spending any other&lt;br/&gt;&amp;gt; unconfirmed inputs.&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/lightning-dev/attachments/20200619/70e88f70/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200619/70e88f70/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:00:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqpx0l79e4yfxjal0krn4xx40v3uy5ddy973dn3utd8z82a0n85kgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukc0fgfj</id>
    
      <title type="html">📅 Original date posted:2020-04-01 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqpx0l79e4yfxjal0krn4xx40v3uy5ddy973dn3utd8z82a0n85kgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukc0fgfj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspqhgrtfllc7dhyj0xy2yl0hpfa6kt4cmw0uew7dqpzyz9mfzy73gg68sc0&#39;&gt;nevent1q…8sc0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;In Bolt 11 we decided to use bech32 to encode lightning invoices.&lt;br/&gt;While bech32 has some nice properties, it isn&amp;#39;t well suited for invoices.&lt;br/&gt;The main drawback of Bolt 11 invoices is their size: when you start adding&lt;br/&gt;routing hints or rendezvous onions, invoices become huge and hard to share.&lt;br/&gt;&lt;br/&gt;Empirical evidence shows that most lightning transactions are done over&lt;br/&gt;Twitter&lt;br/&gt;(73,41% of all lightning payments in 2019 were made via tweets).&lt;br/&gt;Since Twitter only allows up to 280 characters per tweet, this has severely&lt;br/&gt;impacted&lt;br/&gt;the development of new features for lightning. Anything that made an&lt;br/&gt;invoice bigger&lt;br/&gt;ended up being unused as users were left without any option to share those&lt;br/&gt;invoices.&lt;br/&gt;&lt;br/&gt;After several months of research and experimentation at Acinq Research, we&lt;br/&gt;have come&lt;br/&gt;up with a highly efficient invoice encoding, optimized primarily for&lt;br/&gt;Twitter. This has&lt;br/&gt;caused further delays in the development of our iOS wallet, but we felt&lt;br/&gt;this was a&lt;br/&gt;much higher priority.&lt;br/&gt;&lt;br/&gt;Our encoding uses an AI-optimized mapping from 11-bit words to Twitter&lt;br/&gt;emojis.&lt;br/&gt;Early results show that emoji invoices are more than 2 times smaller than&lt;br/&gt;legacy invoices.&lt;br/&gt;&lt;br/&gt;Reckless users are already using this in production:&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://twitter.com/realtbast/status/1245258812279398400?s=20&#34;&gt;https://twitter.com/realtbast/status/1245258812279398400?s=20&lt;/a&gt;&lt;br/&gt;&lt;a href=&#34;https://twitter.com/acinq_co/status/1245258815597096960&#34;&gt;https://twitter.com/acinq_co/status/1245258815597096960&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;There is a spec PR available at [1], along with reference eclair code [2].&lt;br/&gt;We plan to release this feature in the next update of our Phoenix wallet&lt;br/&gt;[3].&lt;br/&gt;&lt;br/&gt;We&amp;#39;d like feedback from this list on how to improve this further. We&lt;br/&gt;believe the&lt;br/&gt;same encoding could be used to compress the bitcoin blockchain. With more&lt;br/&gt;training&lt;br/&gt;data, we believe our AI-optimized mapping could allow bitcoin blocks to fit&lt;br/&gt;in a&lt;br/&gt;single tweet; we would then be able to use Twitter feeds to store the whole&lt;br/&gt;blockchain.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/762&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/762&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://github.com/ACINQ/eclair/tree/emoji-encoding&#34;&gt;https://github.com/ACINQ/eclair/tree/emoji-encoding&lt;/a&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://phoenix.acinq.co/&#34;&gt;https://phoenix.acinq.co/&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200401/57b78392/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200401/57b78392/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst7evrkzc40rwxedgc5jmc46mqfetcqaj6km3zg36jvvpcyugvvlqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukkvv2mz</id>
    
      <title type="html">📅 Original date posted:2020-03-11 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst7evrkzc40rwxedgc5jmc46mqfetcqaj6km3zg36jvvpcyugvvlqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukkvv2mz" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq6mlpgcqhja2y0s2afjx7yeeh82hfw63ee3wehuucmhenwxrk0eg93pnu7&#39;&gt;nevent1q…pnu7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;Thanks Rusty for following up on this, I&amp;#39;m glad it may be useful for offers!&lt;br/&gt;I certainly want this as well for wallet users&amp;#39; privacy.&lt;br/&gt;&lt;br/&gt;I have gathered my proposal in a better format than my previous gist here:&lt;br/&gt;&lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/blob/route-blinding/proposals/route-blinding.md&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/blob/route-blinding/proposals/route-blinding.md&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;You will note that I&amp;#39;ve been able to simplify the scheme a bit compared to&lt;br/&gt;my&lt;br/&gt;gist. It&amp;#39;s now very clear that this is exactly the same kind of secrets&lt;br/&gt;derivation than what Sphinx does. I still have things I want to add to the&lt;br/&gt;proposal, but at least the crypto part should be ready to review (and I&lt;br/&gt;think&lt;br/&gt;it does need more eyes on it).&lt;br/&gt;&lt;br/&gt;Feel free to add comments directly on the branch commits, it may be easier&lt;br/&gt;to&lt;br/&gt;review that way. Let me know if you think I should turn it into a draft PR&lt;br/&gt;to&lt;br/&gt;facilitate discussions. It kept it vague on some specific parts on purpose&lt;br/&gt;(such as invoice fields, encrypted blob format); we will learn from early&lt;br/&gt;prototype implementations and enrich the proposal as we go.&lt;br/&gt;&lt;br/&gt;A few comments on your previous mails. I have removed the (ab)use of&lt;br/&gt;`payment_secret`, but I think your comment on using the `blinding` to&lt;br/&gt;replace&lt;br/&gt;it would not work because that blinding is known by the next-to-last node&lt;br/&gt;(which computes it and forwards it to the final node).&lt;br/&gt;The goal of `payment_secret` is explicitly to avoid having the next-to-last&lt;br/&gt;node&lt;br/&gt;discover it to prevent him from probing. But I think that you didn&amp;#39;t plan on&lt;br/&gt;doing the blinding the same way I&amp;#39;m doing it, which may explain the&lt;br/&gt;difference.&lt;br/&gt;&lt;br/&gt;As for ZmnSCPxj&amp;#39;s suggestion, I think there is the same kind of issue.&lt;br/&gt;The secrets we establish with anonymous multi-hops locks are between the&lt;br/&gt;*sender*&lt;br/&gt;and each of the hops. In the route blinding case, what we&amp;#39;re adding are&lt;br/&gt;secrets&lt;br/&gt;between the *recipient* and the hops, and we don&amp;#39;t want the sender to be&lt;br/&gt;able to&lt;br/&gt;influence those. It&amp;#39;s a kind of reverse Sphinx. So I&amp;#39;m not sure yet the&lt;br/&gt;recipient&lt;br/&gt;could safely contribute to those secrets, but maybe we&amp;#39;ll find a nice trick&lt;br/&gt;in&lt;br/&gt;the future!&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mer. 11 mars 2020 à 00:22, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; Good morning Rusty, et al.,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Note that this means no payment secret is necessary, since the incoming&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; `blinding` serves the same purpose. If we wanted to, we could (ab)use&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; payment_secret as the first 32-bytes to put in Carol&amp;#39;s enc1 (i.e. it&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; the ECDH for Carol to decrypt enc1).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I confess to not reading everything in detail, but it seems to me that,&lt;br/&gt;&amp;gt; with payment point &#43; scalar and path decorrelation, we need to establish a&lt;br/&gt;&amp;gt; secret with each hop anyway (the blinding scalar for path decorrelation),&lt;br/&gt;&amp;gt; so if you need a secret per hop, possibly this could be reused as well?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Indeed, this could be used the same way, though for that secret it can&lt;br/&gt;&amp;gt; simply be placed inside the onion rather than passed alongside.&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; 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/20200311/959e4614/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200311/959e4614/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:16&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst6p0a8yjxlrzphf5tpygp8dxut66m3plthalysgtnxcqatm2qkjczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk6ngyte</id>
    
      <title type="html">📅 Original date posted:2020-02-25 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst6p0a8yjxlrzphf5tpygp8dxut66m3plthalysgtnxcqatm2qkjczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk6ngyte" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsryv9hfzra53fkmzdlagef2dy2h2fafdwx8wxxvtcrf8h6fuwg40g5k3w3x&#39;&gt;nevent1q…3w3x&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-25&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Christian,&lt;br/&gt;&lt;br/&gt;This is great, thanks for sharing!&lt;br/&gt;What&amp;#39;s really nice with your proposal is that there is effectively no onion&lt;br/&gt;payload for `RV` in the partial onion, which frees up more space than mine.&lt;br/&gt;&lt;br/&gt;I believe this makes it quite usable in Bolt 11 invoices, without blowing up&lt;br/&gt;the size of the QR code (but more experimentation is needed on that).&lt;br/&gt;&lt;br/&gt;As an example such an onion, with 5 legacy hops (65 byte each) results&lt;br/&gt;&amp;gt; in a 325 &#43; 66 bytes onion, and we save 975 bytes.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;While having flexibility when choosing the length of the prefill stream&lt;br/&gt;feels nice,&lt;br/&gt;wouldn&amp;#39;t it be safer to impose a fixed size to avoid any kind of heuristic&lt;br/&gt;at `RV`&lt;br/&gt;to try to guess how many hops there are between him and the recipient?&lt;br/&gt;&lt;br/&gt;Compute a shared secret using a random ephemeral private key and&lt;br/&gt;&amp;gt; `RV`s public key, and then generate a prefill-key&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;While implementing, I felt that the part about the shared secret used to&lt;br/&gt;generate&lt;br/&gt;the prefill stream is a bit blurry (your proposal on Github doesn&amp;#39;t phrase&lt;br/&gt;it the&lt;br/&gt;same way). I think it&amp;#39;s important to stress that this secret is derived&lt;br/&gt;from both&lt;br/&gt;`ephkey` and `RV`&amp;#39;s private key, so that `RV&#43;1` can&amp;#39;t compute the same&lt;br/&gt;stream.&lt;br/&gt;&lt;br/&gt;Another thing that may be worth mentioning is error forwarding. Since the&lt;br/&gt;recipient generated the onion, `RV` won&amp;#39;t have the shared secrets (that&amp;#39;s by&lt;br/&gt;design). So it&amp;#39;s expected that payment errors won&amp;#39;t be readable by `RV`, but&lt;br/&gt;it&amp;#39;s probably a good idea if `RV` returns an indication to the sender that&lt;br/&gt;the&lt;br/&gt;payment failed *after* the rendezvous point.&lt;br/&gt;&lt;br/&gt;An important side-note is that your proposal is really quick and simple to&lt;br/&gt;implement&lt;br/&gt;from the existing Sphinx code. I have made ASCII diagrams of the scheme&lt;br/&gt;(see [1]).&lt;br/&gt;This may help readers visualize it more easily.&lt;br/&gt;&lt;br/&gt;It still has the issue that each hop&amp;#39;s amount/cltv is fixed at invoice&lt;br/&gt;generation&lt;br/&gt;time by the recipient. That means MPP cannot be used, and if any channel&lt;br/&gt;along the&lt;br/&gt;path updates their fee the partial onion becomes invalid (unless you&lt;br/&gt;overpay the fees).&lt;br/&gt;&lt;br/&gt;Trampoline should be able to address that since it provides more freedom to&lt;br/&gt;each&lt;br/&gt;trampoline node to find an efficient way to forward to the next trampoline.&lt;br/&gt;It&amp;#39;s not yet obvious to me how I can mix these two proposals to make it&lt;br/&gt;work though.&lt;br/&gt;I&amp;#39;ll spend more time experimenting with that.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1]&lt;br/&gt;&lt;a href=&#34;https://gist.github.com/t-bast/ab42a7f52eb2e73105557957c8359601#Christian&#34;&gt;https://gist.github.com/t-bast/ab42a7f52eb2e73105557957c8359601#Christian&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Le lun. 24 févr. 2020 à 19:22, Christian Decker &amp;lt;decker.christian at gmail.com&amp;gt;&lt;br/&gt;a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Bastien,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; seems you were a bit quicker than I was with my writeup of my&lt;br/&gt;&amp;gt; proposal. I came up with a scheme that allows us to drop a large part of&lt;br/&gt;&amp;gt; the partial onion, so that it can indeed fit into an outer onion, and&lt;br/&gt;&amp;gt; the rendez-vous node RV can re-construct the original packet from the&lt;br/&gt;&amp;gt; included data [1].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The construction comes down to initializing the part of the routing info&lt;br/&gt;&amp;gt; string that is not going to be used, in such a way that the incremental&lt;br/&gt;&amp;gt; unwrappings at the nodes in the partial onion cancels out. Like you&lt;br/&gt;&amp;gt; mentioned in your mail it comes down extending the filler generation to&lt;br/&gt;&amp;gt; also cover the unused part and then applying all the encryption streams&lt;br/&gt;&amp;gt; xored to the unused space. By doing this we get the middle part of the&lt;br/&gt;&amp;gt; onion consisting of only 0x00 bytes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I then decided to apply an additional ChaCha20 stream to this prefill,&lt;br/&gt;&amp;gt; such that the onion will not consist of mostly 0x00 bytes which would be&lt;br/&gt;&amp;gt; a dead giveaway to `RV&#43;1` that `RV` was a rendez-vous node.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The process for the partial onion creator boils down to:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - Compute a path from `RV` of its choice to recipient `R`.&lt;br/&gt;&amp;gt;  - Compute a shared secret using a random ephemeral private key and&lt;br/&gt;&amp;gt;   `RV`s public key, and then generate a prefill-key&lt;br/&gt;&amp;gt;  - Compute the prefill by combining the correct substrings of the&lt;br/&gt;&amp;gt;    encryption streams for the nodes along the path, then add the&lt;br/&gt;&amp;gt;    ChaCha20 stream keyed with the prefill-key.&lt;br/&gt;&amp;gt;  - Wrap the onion, including payloads for each of the nodes along path&lt;br/&gt;&amp;gt;    `RV` to `R`&lt;br/&gt;&amp;gt;  - Trim out the unused space, which now will match the obfuscation&lt;br/&gt;&amp;gt;    stream generated with the prefill-key&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As an example such an onion, with 5 legacy hops (65 byte each) results&lt;br/&gt;&amp;gt; in a 325 &#43; 66 bytes onion, and we save 975 bytes. See [2] for an example&lt;br/&gt;&amp;gt; of how this looks like.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The sender `S` then just does the following:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - Compute a route from `S` to `RV`&lt;br/&gt;&amp;gt;  - Build an onion with the route, specifying the trimmed partial onion&lt;br/&gt;&amp;gt;    as payload, along with the usual parameters, for `RV`&lt;br/&gt;&amp;gt;  - Initiate payment with the constructed onion&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Upon receiving an incoming HTLC with a partial onion the rendez-vous&lt;br/&gt;&amp;gt; node `RV` then just does the following:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;  - Verify all parameters as usual&lt;br/&gt;&amp;gt;  - Extract the partial onion&lt;br/&gt;&amp;gt;  - Use the ephemeral key from the partial onion to generate the shared&lt;br/&gt;&amp;gt;    secret and the prefill key&lt;br/&gt;&amp;gt;  - Generate the prefill stream and insert it in the correct place,&lt;br/&gt;&amp;gt;    before the HMAC. This reconstitutes the original routing packet&lt;br/&gt;&amp;gt;  - Swap out the original onion with the reconstituted onion and forward.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; My writeup [1] is an early draft, but I wanted to get it out early to&lt;br/&gt;&amp;gt; give the discussion a basis to work off. I&amp;#39;ll revisit it a couple of&lt;br/&gt;&amp;gt; times before opening a PR, but feel free to shout at me if I have&lt;br/&gt;&amp;gt; forgotten to consider something :-)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Christian&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/blob/rendez-vous/proposals/0001-rendez-vous.md&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/blob/rendez-vous/proposals/0001-rendez-vous.md&lt;/a&gt;&lt;br/&gt;&amp;gt; [2] &lt;a href=&#34;https://gist.github.com/cdecker/ec06452bc470749d9f6d2de73651c5fd&#34;&gt;https://gist.github.com/cdecker/ec06452bc470749d9f6d2de73651c5fd&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bastien TEINTURIER via Lightning-dev&lt;br/&gt;&amp;gt; &amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; Good morning list,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; After exploring decoys [1], which is a cheap way of doing route blinding,&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m turning back to exploring rendezvous.&lt;br/&gt;&amp;gt; &amp;gt; The previous mails on the mailing list mentioned that there was a&lt;br/&gt;&amp;gt; &amp;gt; technicality&lt;br/&gt;&amp;gt; &amp;gt; to make the HMACs check out, but didn&amp;#39;t provide a lot of details.&lt;br/&gt;&amp;gt; &amp;gt; The issue is that the filler generation needs to take into account some&lt;br/&gt;&amp;gt; hops&lt;br/&gt;&amp;gt; &amp;gt; that will be added *later*, by the payer.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; However it is quite easy to work-around, with a few space trade-offs.&lt;br/&gt;&amp;gt; &amp;gt; Let&amp;#39;s consider a typical rendezvous setup, where Alice wants to be paid&lt;br/&gt;&amp;gt; via&lt;br/&gt;&amp;gt; &amp;gt; rendezvous Bob, and Carol wants to pay that invoice:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Carol -&amp;gt; ... -&amp;gt; Bob -&amp;gt; ... -&amp;gt; Alice&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If Alice knows how many bytes Carol is going to use for her part of the&lt;br/&gt;&amp;gt; &amp;gt; onion&lt;br/&gt;&amp;gt; &amp;gt; payloads, Alice can easily take them into account when generating her&lt;br/&gt;&amp;gt; &amp;gt; filler by&lt;br/&gt;&amp;gt; &amp;gt; pre-pending the same amount of `0` bytes. It seems reasonable to impose a&lt;br/&gt;&amp;gt; &amp;gt; fixed&lt;br/&gt;&amp;gt; &amp;gt; number of onion bytes for each side of the rendezvous (650 each?) so&lt;br/&gt;&amp;gt; Alice&lt;br/&gt;&amp;gt; &amp;gt; would&lt;br/&gt;&amp;gt; &amp;gt; know that amount.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; When Carol completes the onion with her part of the route, she simply&lt;br/&gt;&amp;gt; needs&lt;br/&gt;&amp;gt; &amp;gt; to&lt;br/&gt;&amp;gt; &amp;gt; generate filler data for her part of the route following the normal&lt;br/&gt;&amp;gt; Sphinx&lt;br/&gt;&amp;gt; &amp;gt; protocol&lt;br/&gt;&amp;gt; &amp;gt; and apply it to the onion she found in the invoice.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; But the tricky part is that she needs to give Bob a way of generating the&lt;br/&gt;&amp;gt; &amp;gt; same&lt;br/&gt;&amp;gt; &amp;gt; filler data to unapply it. Then all HMACs correctly check out.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I see two ways of doing that:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * Carol simply sends that filler (650 bytes), probably via a TLV in&lt;br/&gt;&amp;gt; &amp;gt; `update_add_htlc`.&lt;br/&gt;&amp;gt; &amp;gt; This means every intermediate hop needs to forward that, which is painful&lt;br/&gt;&amp;gt; &amp;gt; and&lt;br/&gt;&amp;gt; &amp;gt; potentially leaking too much data.&lt;br/&gt;&amp;gt; &amp;gt; * Carol provides Bob with the rho keys used to generate her filler, and&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; &amp;gt; length&lt;br/&gt;&amp;gt; &amp;gt; used by each hop. This leaks to Bob an upper bound on the number of hops&lt;br/&gt;&amp;gt; &amp;gt; and the&lt;br/&gt;&amp;gt; &amp;gt; number of bytes sent to each hop.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Since shift-and-xor kind of crypto is hard to read as equations, but very&lt;br/&gt;&amp;gt; &amp;gt; easy to&lt;br/&gt;&amp;gt; &amp;gt; read as diagrams, I spent a bit of time doing beautiful ASCII art [2].&lt;br/&gt;&amp;gt; &amp;gt; Don&amp;#39;t hesitate&lt;br/&gt;&amp;gt; &amp;gt; to have a look at it to find more details about how that works. You can&lt;br/&gt;&amp;gt; &amp;gt; also print&lt;br/&gt;&amp;gt; &amp;gt; that on t-shirts to look fancy at conferences. I also have some sample&lt;br/&gt;&amp;gt; code&lt;br/&gt;&amp;gt; &amp;gt; working&lt;br/&gt;&amp;gt; &amp;gt; in eclair [3] for those who can read Scala without getting headaches.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Are there other tricks we can use to reconcile both sides of the onion at&lt;br/&gt;&amp;gt; &amp;gt; Bob&amp;#39;s?&lt;br/&gt;&amp;gt; &amp;gt; Maybe cdecker (or someone else) has an ace up his sleeve for me there? :)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; One important thing to note is that rendezvous on normal onions will be&lt;br/&gt;&amp;gt; &amp;gt; costly to&lt;br/&gt;&amp;gt; &amp;gt; integrate into invoices: it takes 1366 bytes to include one onion, and if&lt;br/&gt;&amp;gt; &amp;gt; we want&lt;br/&gt;&amp;gt; &amp;gt; to handle route failures or let the sender use multi-part, we will need&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; &amp;gt; have a&lt;br/&gt;&amp;gt; &amp;gt; handful of pre-encrypted onions in the invoice (hence a few kB, which may&lt;br/&gt;&amp;gt; &amp;gt; not be&lt;br/&gt;&amp;gt; &amp;gt; practical for QR codes).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; But I did mention before that doing rendezvous on the trampoline onion&lt;br/&gt;&amp;gt; &amp;gt; could have&lt;br/&gt;&amp;gt; &amp;gt; better properties [4]. When doing that, having Carol transmit her filler&lt;br/&gt;&amp;gt; &amp;gt; data only&lt;br/&gt;&amp;gt; &amp;gt; to Bob, via the outer onion payload becomes practical and doesn&amp;#39;t leak&lt;br/&gt;&amp;gt; &amp;gt; information.&lt;br/&gt;&amp;gt; &amp;gt; Multi-part would work with a single trampoline onion in the invoice (~500&lt;br/&gt;&amp;gt; &amp;gt; bytes),&lt;br/&gt;&amp;gt; &amp;gt; because nodes can do MPP between trampoline nodes thanks to the&lt;br/&gt;&amp;gt; &amp;gt; onion-in-onion&lt;br/&gt;&amp;gt; &amp;gt; construction. We simply need to decide the size of the trampoline onion&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; &amp;gt; allow&lt;br/&gt;&amp;gt; &amp;gt; each side of the rendezvous to be able to insert a number of hops we&amp;#39;re&lt;br/&gt;&amp;gt; &amp;gt; comfortable&lt;br/&gt;&amp;gt; &amp;gt; with. You can find more details in the &amp;#34;Rendezvous on a trampoline&amp;#34;&lt;br/&gt;&amp;gt; section&lt;br/&gt;&amp;gt; &amp;gt; of [2].&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m really interested in other approaches to making rendezvous work with&lt;br/&gt;&amp;gt; &amp;gt; the HMACs&lt;br/&gt;&amp;gt; &amp;gt; correctly checking out. If people on this list have drafts, intuitions or&lt;br/&gt;&amp;gt; &amp;gt; random&lt;br/&gt;&amp;gt; &amp;gt; thoughts about possible constructions, please share them, I&amp;#39;d be happy to&lt;br/&gt;&amp;gt; &amp;gt; dive into&lt;br/&gt;&amp;gt; &amp;gt; them to explore alternatives to the one I found, hoping we can make this&lt;br/&gt;&amp;gt; &amp;gt; work and&lt;br/&gt;&amp;gt; &amp;gt; provide this feature to our users in the near future.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A small side-note on Hornet. Hornet does offer many features that I&lt;br/&gt;&amp;gt; believe&lt;br/&gt;&amp;gt; &amp;gt; we will&lt;br/&gt;&amp;gt; &amp;gt; want in Lightning in the future. It may seem that doing a custom&lt;br/&gt;&amp;gt; rendezvous&lt;br/&gt;&amp;gt; &amp;gt; scheme&lt;br/&gt;&amp;gt; &amp;gt; is a waste of time since we&amp;#39;ll ditch it once/if we implement Hornet.&lt;br/&gt;&amp;gt; While&lt;br/&gt;&amp;gt; &amp;gt; that is&lt;br/&gt;&amp;gt; &amp;gt; true in the long run, I believe that if we&amp;#39;re able to find a rendezvous&lt;br/&gt;&amp;gt; &amp;gt; scheme that&lt;br/&gt;&amp;gt; &amp;gt; isn&amp;#39;t too much work to implement, it makes sense to have something&lt;br/&gt;&amp;gt; &amp;gt; available soon-ish.&lt;br/&gt;&amp;gt; &amp;gt; Hornet will likely be a longer-term effort that we won&amp;#39;t get as soon as&lt;br/&gt;&amp;gt; &amp;gt; we&amp;#39;d like&lt;br/&gt;&amp;gt; &amp;gt; (especially since it will probably require a network-wide update). But&lt;br/&gt;&amp;gt; who&lt;br/&gt;&amp;gt; &amp;gt; knows, maybe&lt;br/&gt;&amp;gt; &amp;gt; we may see that we are trying to create many features that are already&lt;br/&gt;&amp;gt; &amp;gt; built into Hornet&lt;br/&gt;&amp;gt; &amp;gt; (rendezvous, directed message support, etc) and will decide to implement&lt;br/&gt;&amp;gt; &amp;gt; Hornet sooner&lt;br/&gt;&amp;gt; &amp;gt; than expected?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Cheers,&lt;br/&gt;&amp;gt; &amp;gt; Bastien&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; [1]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002435.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002435.html&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; [2] &lt;a href=&#34;https://gist.github.com/t-bast/ab42a7f52eb2e73105557957c8359601&#34;&gt;https://gist.github.com/t-bast/ab42a7f52eb2e73105557957c8359601&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; [3] &lt;a href=&#34;https://github.com/ACINQ/eclair/tree/sphinx-rendezvous&#34;&gt;https://github.com/ACINQ/eclair/tree/sphinx-rendezvous&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; [4]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002237.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002237.html&lt;/a&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;&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/20200225/8301e226/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200225/8301e226/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:05&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspxw8kd6ylx7nf7sankwq4wrq9dwedf94uwf80pjkhrjhl4qss05qzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuksku62w</id>
    
      <title type="html">📅 Original date posted:2020-02-24 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspxw8kd6ylx7nf7sankwq4wrq9dwedf94uwf80pjkhrjhl4qss05qzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuksku62w" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgxuxe5h74625zr8a45lzmd28svnwlq9wf32u5d93mslprrwnrlrgzc6wwc&#39;&gt;nevent1q…6wwc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-24&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;After exploring decoys [1], which is a cheap way of doing route blinding,&lt;br/&gt;I&amp;#39;m turning back to exploring rendezvous.&lt;br/&gt;The previous mails on the mailing list mentioned that there was a&lt;br/&gt;technicality&lt;br/&gt;to make the HMACs check out, but didn&amp;#39;t provide a lot of details.&lt;br/&gt;The issue is that the filler generation needs to take into account some hops&lt;br/&gt;that will be added *later*, by the payer.&lt;br/&gt;&lt;br/&gt;However it is quite easy to work-around, with a few space trade-offs.&lt;br/&gt;Let&amp;#39;s consider a typical rendezvous setup, where Alice wants to be paid via&lt;br/&gt;rendezvous Bob, and Carol wants to pay that invoice:&lt;br/&gt;&lt;br/&gt;Carol -&amp;gt; ... -&amp;gt; Bob -&amp;gt; ... -&amp;gt; Alice&lt;br/&gt;&lt;br/&gt;If Alice knows how many bytes Carol is going to use for her part of the&lt;br/&gt;onion&lt;br/&gt;payloads, Alice can easily take them into account when generating her&lt;br/&gt;filler by&lt;br/&gt;pre-pending the same amount of `0` bytes. It seems reasonable to impose a&lt;br/&gt;fixed&lt;br/&gt;number of onion bytes for each side of the rendezvous (650 each?) so Alice&lt;br/&gt;would&lt;br/&gt;know that amount.&lt;br/&gt;&lt;br/&gt;When Carol completes the onion with her part of the route, she simply needs&lt;br/&gt;to&lt;br/&gt;generate filler data for her part of the route following the normal Sphinx&lt;br/&gt;protocol&lt;br/&gt;and apply it to the onion she found in the invoice.&lt;br/&gt;&lt;br/&gt;But the tricky part is that she needs to give Bob a way of generating the&lt;br/&gt;same&lt;br/&gt;filler data to unapply it. Then all HMACs correctly check out.&lt;br/&gt;&lt;br/&gt;I see two ways of doing that:&lt;br/&gt;&lt;br/&gt;* Carol simply sends that filler (650 bytes), probably via a TLV in&lt;br/&gt;`update_add_htlc`.&lt;br/&gt;This means every intermediate hop needs to forward that, which is painful&lt;br/&gt;and&lt;br/&gt;potentially leaking too much data.&lt;br/&gt;* Carol provides Bob with the rho keys used to generate her filler, and the&lt;br/&gt;length&lt;br/&gt;used by each hop. This leaks to Bob an upper bound on the number of hops&lt;br/&gt;and the&lt;br/&gt;number of bytes sent to each hop.&lt;br/&gt;&lt;br/&gt;Since shift-and-xor kind of crypto is hard to read as equations, but very&lt;br/&gt;easy to&lt;br/&gt;read as diagrams, I spent a bit of time doing beautiful ASCII art [2].&lt;br/&gt;Don&amp;#39;t hesitate&lt;br/&gt;to have a look at it to find more details about how that works. You can&lt;br/&gt;also print&lt;br/&gt;that on t-shirts to look fancy at conferences. I also have some sample code&lt;br/&gt;working&lt;br/&gt;in eclair [3] for those who can read Scala without getting headaches.&lt;br/&gt;&lt;br/&gt;Are there other tricks we can use to reconcile both sides of the onion at&lt;br/&gt;Bob&amp;#39;s?&lt;br/&gt;Maybe cdecker (or someone else) has an ace up his sleeve for me there? :)&lt;br/&gt;&lt;br/&gt;One important thing to note is that rendezvous on normal onions will be&lt;br/&gt;costly to&lt;br/&gt;integrate into invoices: it takes 1366 bytes to include one onion, and if&lt;br/&gt;we want&lt;br/&gt;to handle route failures or let the sender use multi-part, we will need to&lt;br/&gt;have a&lt;br/&gt;handful of pre-encrypted onions in the invoice (hence a few kB, which may&lt;br/&gt;not be&lt;br/&gt;practical for QR codes).&lt;br/&gt;&lt;br/&gt;But I did mention before that doing rendezvous on the trampoline onion&lt;br/&gt;could have&lt;br/&gt;better properties [4]. When doing that, having Carol transmit her filler&lt;br/&gt;data only&lt;br/&gt;to Bob, via the outer onion payload becomes practical and doesn&amp;#39;t leak&lt;br/&gt;information.&lt;br/&gt;Multi-part would work with a single trampoline onion in the invoice (~500&lt;br/&gt;bytes),&lt;br/&gt;because nodes can do MPP between trampoline nodes thanks to the&lt;br/&gt;onion-in-onion&lt;br/&gt;construction. We simply need to decide the size of the trampoline onion to&lt;br/&gt;allow&lt;br/&gt;each side of the rendezvous to be able to insert a number of hops we&amp;#39;re&lt;br/&gt;comfortable&lt;br/&gt;with. You can find more details in the &amp;#34;Rendezvous on a trampoline&amp;#34; section&lt;br/&gt;of [2].&lt;br/&gt;&lt;br/&gt;I&amp;#39;m really interested in other approaches to making rendezvous work with&lt;br/&gt;the HMACs&lt;br/&gt;correctly checking out. If people on this list have drafts, intuitions or&lt;br/&gt;random&lt;br/&gt;thoughts about possible constructions, please share them, I&amp;#39;d be happy to&lt;br/&gt;dive into&lt;br/&gt;them to explore alternatives to the one I found, hoping we can make this&lt;br/&gt;work and&lt;br/&gt;provide this feature to our users in the near future.&lt;br/&gt;&lt;br/&gt;A small side-note on Hornet. Hornet does offer many features that I believe&lt;br/&gt;we will&lt;br/&gt;want in Lightning in the future. It may seem that doing a custom rendezvous&lt;br/&gt;scheme&lt;br/&gt;is a waste of time since we&amp;#39;ll ditch it once/if we implement Hornet. While&lt;br/&gt;that is&lt;br/&gt;true in the long run, I believe that if we&amp;#39;re able to find a rendezvous&lt;br/&gt;scheme that&lt;br/&gt;isn&amp;#39;t too much work to implement, it makes sense to have something&lt;br/&gt;available soon-ish.&lt;br/&gt;Hornet will likely be a longer-term effort that we won&amp;#39;t get as soon as&lt;br/&gt;we&amp;#39;d like&lt;br/&gt;(especially since it will probably require a network-wide update). But who&lt;br/&gt;knows, maybe&lt;br/&gt;we may see that we are trying to create many features that are already&lt;br/&gt;built into Hornet&lt;br/&gt;(rendezvous, directed message support, etc) and will decide to implement&lt;br/&gt;Hornet sooner&lt;br/&gt;than expected?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002435.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002435.html&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://gist.github.com/t-bast/ab42a7f52eb2e73105557957c8359601&#34;&gt;https://gist.github.com/t-bast/ab42a7f52eb2e73105557957c8359601&lt;/a&gt;&lt;br/&gt;[3] &lt;a href=&#34;https://github.com/ACINQ/eclair/tree/sphinx-rendezvous&#34;&gt;https://github.com/ACINQ/eclair/tree/sphinx-rendezvous&lt;/a&gt;&lt;br/&gt;[4]&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002237.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002237.html&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200224/02d2cd82/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200224/02d2cd82/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:04&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrq2canzftjkqyq62yf6w5kznv3mrgzmkjaz6mnng2rkvjsaxjw3szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuknanf3d</id>
    
      <title type="html">📅 Original date posted:2020-02-13 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrq2canzftjkqyq62yf6w5kznv3mrgzmkjaz6mnng2rkvjsaxjw3szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuknanf3d" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsq4prqcjnuvq3gfrfkay2uq9rqz4gtqffrx299x8p83z35swql3gcevc055&#39;&gt;nevent1q…c055&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-13&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey Rusty and list,&lt;br/&gt;&lt;br/&gt;I was starting to think this whole thing was of marginal benefit: note&lt;br/&gt;&amp;gt; that solving &amp;#34;private channels need a temp scid&amp;#34; is far simpler[1].&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;That&amp;#39;s true, the simpler solution does break the on-chain / off-chain link&lt;br/&gt;but&lt;br/&gt;I think we can take this opportunity to also improve payee privacy to make&lt;br/&gt;sure&lt;br/&gt;two invoices can&amp;#39;t leak that they are from the same payee.&lt;br/&gt;&lt;br/&gt;Even better, this would be a replacement for current route hints&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Definitely, this is clearly a good opportunity to re-work route hints to&lt;br/&gt;something that can fix all the short-comings of current route hints, thanks&lt;br/&gt;for&lt;br/&gt;your suggestions on that. And if anyone on this list has other fields that&lt;br/&gt;may&lt;br/&gt;be useful in these new route hints, please do say it.&lt;br/&gt;&lt;br/&gt;Propose we take the `z` to use as bolt11 letter, because even the French&lt;br/&gt;&amp;gt; don&amp;#39;t pronounce it in &amp;#34;rendez-vous&amp;#34;!)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;As long as Z-man didn&amp;#39;t want to claim this bolt11 letter for himself or his&lt;br/&gt;puppet army, that sounds good :).&lt;br/&gt;&lt;br/&gt;I&amp;#39;ll get started on an implementation, and will start working on a spec PR&lt;br/&gt;as&lt;br/&gt;well. I&amp;#39;m hoping to get more reviews from anyone experienced with both&lt;br/&gt;lightning and cryptography to verify that the scheme isn&amp;#39;t broken. I&amp;#39;m still&lt;br/&gt;offering beers and cocktails to anyone who cracks it [1]!&lt;br/&gt;&lt;br/&gt;Thanks!&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://twitter.com/realtbast/status/1227233654503505925&#34;&gt;https://twitter.com/realtbast/status/1227233654503505925&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Le jeu. 13 févr. 2020 à 05:49, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; Hi Rusty,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks for the answer, and good luck with c-lightning 0.8.1-rc1 ;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ... Now -rc2.  I actually had a RL use for lightning (OMG!), and sure&lt;br/&gt;&amp;gt; enough found a bug.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;ve been thinking more about improving my scheme to not require any&lt;br/&gt;sender&lt;br/&gt;&amp;gt; &amp;gt; change, but I don&amp;#39;t think that&amp;#39;s possible at the moment. As with all&lt;br/&gt;&amp;gt; &amp;gt; Lightning&lt;br/&gt;&amp;gt; &amp;gt; tricks though, once we have Schnorr then it&amp;#39;s really easy to do.&lt;br/&gt;&amp;gt; &amp;gt; Alice simply needs to use `s * d_a` as her &amp;#34;preimage&amp;#34; (and the payment&lt;br/&gt;point&lt;br/&gt;&amp;gt; &amp;gt; becomes the P_I Bob needs). That may depend on the exact multi-hop locks&lt;br/&gt;&amp;gt; &amp;gt; construction we end up using though, so I&amp;#39;m not 100% sure about that&lt;br/&gt;yet.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I was starting to think this whole thing was of marginal benefit: note&lt;br/&gt;&amp;gt; that solving &amp;#34;private channels need a temp scid&amp;#34; is far simpler[1].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But since your scheme extends to rendevous, it&amp;#39;s much more tempting!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We would use this for normal private channels as well as private routes&lt;br/&gt;&amp;gt; aka new rendezvous.  Even better, this would be a replacement for&lt;br/&gt;&amp;gt; current route hints (which lack ability to specify feature bits, which&lt;br/&gt;&amp;gt; we would add here, and is also grossly inefficient if you just want to&lt;br/&gt;&amp;gt; use it for Routeboost[2]).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Propose we take the `z` to use as bolt11 letter, because even the French&lt;br/&gt;&amp;gt; don&amp;#39;t pronounce it in &amp;#34;rendez-vous&amp;#34;!)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then use TLV inside:[3]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * `z` (2): `data_length` variable. One or more entries containing extra&lt;br/&gt;&amp;gt;   routing information; there may be more than one `z` field.  Each entry&lt;br/&gt;&amp;gt;   looks like:&lt;br/&gt;&amp;gt;    * `tlv_len` (8 bits)&lt;br/&gt;&amp;gt;    * `rendezvous_tlv` (tlv_len bytes)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. tlvs: `rendezvous_tlv`&lt;br/&gt;&amp;gt; 2. types:&lt;br/&gt;&amp;gt;    1. type: 1 (`pubkey`)&lt;br/&gt;&amp;gt;    2. data:&lt;br/&gt;&amp;gt;       * [`point`:`nodeid`]&lt;br/&gt;&amp;gt;    1. type: 2 (`short_channel_id`)&lt;br/&gt;&amp;gt;    2. data:&lt;br/&gt;&amp;gt;       * [`short_channel_id`:`short_channel_id`]&lt;br/&gt;&amp;gt;    1. type: 3 (`fee_base_msat`)&lt;br/&gt;&amp;gt;    2. data:&lt;br/&gt;&amp;gt;       * [`tu32`:`fee_base_msat`]&lt;br/&gt;&amp;gt;    1. type: 4 (`fee_proportional_millionths`)&lt;br/&gt;&amp;gt;    2. data:&lt;br/&gt;&amp;gt;       * [`tu32`:`fee_proportional_millionths`]&lt;br/&gt;&amp;gt;    1. type: 5 (`cltv_expiry_delta`)&lt;br/&gt;&amp;gt;    2. data:&lt;br/&gt;&amp;gt;       * [`tu16`:`cltv_expiry_delta`]&lt;br/&gt;&amp;gt;    1. type: 6 (`features`)&lt;br/&gt;&amp;gt;    2. data:&lt;br/&gt;&amp;gt;       * [`...*byte`:`features`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That probably adds 6 bytes entry, but worth it I think.&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] Add a new field to &amp;#39;funding_locked&amp;#39;: &amp;#34;private_scid&amp;#34;.  If both sides&lt;br/&gt;&amp;gt;     support &amp;#39;option_private_scid&amp;#39; (?) then the &amp;#34;real&amp;#34; scid is no longer&lt;br/&gt;&amp;gt;     valid for routing, and we use the private scid.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [2] It&amp;#39;s enough to give the scid(s) in this case indicating where you&lt;br/&gt;&amp;gt;     have incoming capacity.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [3] I&amp;#39;m really starting to dislike my bolt11 format.  We should probably&lt;br/&gt;&amp;gt;     start afresh with a TLV-based one, where signature covers the hash&lt;br/&gt;&amp;gt;     of each entry (so they can be easily externalized!), but that&amp;#39;s a&lt;br/&gt;&amp;gt;     big, unrelated task.&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/20200213/5939bbb3/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200213/5939bbb3/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:58:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsx4eax03m07mhekvcknjgzq40da7esc2hmtm7gd52gj4gg3kvaa3szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk8tdfl6</id>
    
      <title type="html">📅 Original date posted:2020-02-11 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsx4eax03m07mhekvcknjgzq40da7esc2hmtm7gd52gj4gg3kvaa3szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk8tdfl6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr06hafrh3u3dytqh9qnk738yd3mflgwepvk5ls4fujcnmr40cqas98ztam&#39;&gt;nevent1q…ztam&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Rusty,&lt;br/&gt;&lt;br/&gt;Thanks for the answer, and good luck with c-lightning 0.8.1-rc1 ;)&lt;br/&gt;&lt;br/&gt;(I think we should probably ban forwarding to private channels,&lt;br/&gt;&amp;gt; too, for similar reasons).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Can you detail why? I believe that forwarding through private channels can&lt;br/&gt;actually be pretty useful in the future for payee privacy (more on that&lt;br/&gt;later).&lt;br/&gt;&lt;br/&gt;Note that with any self-assigned SCID schemes, Alice has to respond to&lt;br/&gt;&amp;gt; unknown scids in update_add_htlc with some BADONION code (which makes&lt;br/&gt;&amp;gt; *Bob* give Carol an error response, since Alice can&amp;#39;t without revealing&lt;br/&gt;&amp;gt; her identity).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I believe the difference is that in your scheme, Bob would answer with&lt;br/&gt;`unknown_next_peer`. When instead Alice responds with a `BADONION`, the only&lt;br/&gt;thing it reveals is that Alice does use the decoy feature (which Mallory&lt;br/&gt;already knows because she has seen an invoice from Alice). As long as this&lt;br/&gt;behavior is consistent throughout the network, I think both options offer&lt;br/&gt;the&lt;br/&gt;same privacy (unless I&amp;#39;m missing something).&lt;br/&gt;&lt;br/&gt;I expect such payments to become&lt;br/&gt;&amp;gt; significant, and as long as paying to a temporary id and paying to a&lt;br/&gt;&amp;gt; private channel looks identical, it&amp;#39;s too draconian to ban.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;True, that must become the default flow for receiving payments on mobile&lt;br/&gt;wallets.&lt;br/&gt;Granted, my solution would take longer to deploy because it needs to be&lt;br/&gt;added to&lt;br/&gt;sender wallets before receivers can require it.&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve been thinking more about improving my scheme to not require any sender&lt;br/&gt;change, but I don&amp;#39;t think that&amp;#39;s possible at the moment. As with all&lt;br/&gt;Lightning&lt;br/&gt;tricks though, once we have Schnorr then it&amp;#39;s really easy to do.&lt;br/&gt;Alice simply needs to use `s * d_a` as her &amp;#34;preimage&amp;#34; (and the payment point&lt;br/&gt;becomes the P_I Bob needs). That may depend on the exact multi-hop locks&lt;br/&gt;construction we end up using though, so I&amp;#39;m not 100% sure about that yet.&lt;br/&gt;&lt;br/&gt;But I did come up with what could be an interesting development.&lt;br/&gt;Nothing prevents the decoy scheme to be used for public channels too, and&lt;br/&gt;for&lt;br/&gt;multiple hops: that enables a cheap form of rendezvous that only costs a few&lt;br/&gt;hundred bytes in the invoice.&lt;br/&gt;&lt;br/&gt;Alice would select multiple hops to a rendezvous node, and would apply some&lt;br/&gt;blinding to those hops&amp;#39; `node_id` and `scid`. Alice would include these&lt;br/&gt;decoy&lt;br/&gt;hops in the invoice `routing_hints` (only costs 51 bytes per hop instead of&lt;br/&gt;a&lt;br/&gt;full onion). Mallory would only learn an upper bound on the distance between&lt;br/&gt;Alice and the rendezvous.&lt;br/&gt;&lt;br/&gt;I have a detailed version of the scheme in a gist [1] if people want to&lt;br/&gt;take a&lt;br/&gt;deeper look and break it (beer on me to the first one who breaks the&lt;br/&gt;scheme).&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://gist.github.com/t-bast/9972bfe9523bb18395bdedb8dc691faf&#34;&gt;https://gist.github.com/t-bast/9972bfe9523bb18395bdedb8dc691faf&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le lun. 10 févr. 2020 à 04:40, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; But Mallory can do the same attack, I think.  Just include the P_I from&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; the wrong invoice for Bob.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Good catch, that&amp;#39;s true, thanks for keeping me honest there! In that&lt;br/&gt;case&lt;br/&gt;&amp;gt; &amp;gt; my proposal&lt;br/&gt;&amp;gt; &amp;gt; would need the same mitigation as yours, Bob will need to include the&lt;br/&gt;&amp;gt; &amp;gt; `scid` he received&lt;br/&gt;&amp;gt; &amp;gt; in `update_add_htlc` (this is in fact not that hard once we allow TLV&lt;br/&gt;&amp;gt; &amp;gt; extensions on every&lt;br/&gt;&amp;gt; &amp;gt; message).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yes, I&amp;#39;ve added this to the PR.  Which gives a new validation path, I&lt;br/&gt;&amp;gt; think:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Figuring out what nodeid to use to decode onion&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Look up scid from HTLC; if it didn&amp;#39;t include one, use default.&lt;br/&gt;&amp;gt; 2. Look up payment_hash; if no invoice is found, use default.&lt;br/&gt;&amp;gt; 3. If invoice specified this scid, get nodeid and use that.&lt;br/&gt;&amp;gt; 4. ... and refuse to forward the HTLC (it must terminate here).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; My plan is to add an argument to `invoice` which is an array of one or&lt;br/&gt;&amp;gt; more scids: we get a temporary scids for each peer and use them in the&lt;br/&gt;&amp;gt; routehints.  We also assign a random temporary nodeid to that invoice.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The above algo is designed to ensure we behave like any other node which&lt;br/&gt;&amp;gt; has no idea about this nodeid if Mallory:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. tries to use a temporary node id on a normal channel to us.&lt;br/&gt;&amp;gt; 2. tries to pay another invoice using this temporary node id.&lt;br/&gt;&amp;gt; 3. tries to probe our outgoing channels using this routing hint&lt;br/&gt;&amp;gt;    (I think we should probably ban forwarding to private channels,&lt;br/&gt;&amp;gt;    too, for similar reasons).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ---&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Note that with any self-assigned SCID schemes, Alice has to respond to&lt;br/&gt;&amp;gt; unknown scids in update_add_htlc with some BADONION code (which makes&lt;br/&gt;&amp;gt; *Bob* give Carol an error response, since Alice can&amp;#39;t without revealing&lt;br/&gt;&amp;gt; her identity).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With Bob-assigned SCIDs, Alice simply needs to make him unallocate&lt;br/&gt;&amp;gt; it before forgetting the invoice, so she will simply never see old&lt;br/&gt;&amp;gt; invoices.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (All these schemes give limited privacy, of course: Bob knows who Alice&lt;br/&gt;&amp;gt; is, and fingerprinting and liveness attacks are always possible).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m extremely nervous about custodial lightning services restricting&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; what they will pay to.  This is not theoretical: they will come under&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; immense KYC pressure in the near future, which means they cannot pay&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; arbitrary invoices.&lt;br/&gt;&amp;gt; 1&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; That&amp;#39;s a very good point, thanks for raising this. However I believe&lt;br/&gt;that&lt;br/&gt;&amp;gt; &amp;gt; there are (and will be) enough&lt;br/&gt;&amp;gt; &amp;gt; non-custodial wallets to let motivated users pay whatever they want.&lt;br/&gt;Users&lt;br/&gt;&amp;gt; &amp;gt; can even run their own&lt;br/&gt;&amp;gt; &amp;gt; node to pay such invoices if needed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Not if ln_strike (no, the other one!) is the future.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If you are using a custodial wallet and KYC pressure kicks in, then&lt;br/&gt;&amp;gt; &amp;gt; regardless of that feature law may&lt;br/&gt;&amp;gt; &amp;gt; require users to completely reveal who they are paying, so even normal&lt;br/&gt;&amp;gt; &amp;gt; payments wouldn&amp;#39;t protect&lt;br/&gt;&amp;gt; &amp;gt; them, don&amp;#39;t you think? Regulation could for example disallow paying via&lt;br/&gt;&amp;gt; &amp;gt; unannounced channels entirely&lt;br/&gt;&amp;gt; &amp;gt; (or require you to show the funding tx associated to your unannounced&lt;br/&gt;&amp;gt; &amp;gt; channel).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Actually, as long as the same method is required for both normal private&lt;br/&gt;&amp;gt; channels (which will all use non-tx-based short_channel_ids in the near&lt;br/&gt;&amp;gt; future I hope!), I don&amp;#39;t really mind.  I expect such payments to become&lt;br/&gt;&amp;gt; significant, and as long as paying to a temporary id and paying to a&lt;br/&gt;&amp;gt; private channel looks identical, it&amp;#39;s too draconian to ban.  A business&lt;br/&gt;&amp;gt; would probably meet any KYC requirements by simply asking the user&lt;br/&gt;&amp;gt; (perhaps over a certain amount, etc).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (I&amp;#39;ve put my implementation on hold for a moment while I&amp;#39;m supposed to&lt;br/&gt;&amp;gt; be releasing 0.8.1-rc1 RSN!)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Rusty.&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200211/41e5aa47/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200211/41e5aa47/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:58:35&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2l2tlz7zq4l2fchelmjscq8zmusenj2sgp7vryttesd8rn5jkmfszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukntafud</id>
    
      <title type="html">📅 Original date posted:2020-02-04 📝 Original message: Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2l2tlz7zq4l2fchelmjscq8zmusenj2sgp7vryttesd8rn5jkmfszyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukntafud" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs80jvt0zkzjfvr2d9j0r2j868h2mdrjddpgmq8hv5get4mskvdh6gfz9kze&#39;&gt;nevent1q…9kze&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-04&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey again,&lt;br/&gt;&lt;br/&gt;Otherwise Mallory gets two invoices, and wants to know if they&amp;#39;re&lt;br/&gt;&amp;gt; actually the same node.  Inv1 has nodeid N1, routehint Bob-&amp;gt;C1, Inv2 has&lt;br/&gt;&amp;gt; nodeid N2, routehint Bob-&amp;gt;C2.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;I think this attack is interesting. AFAICT my proposal defends against this&lt;br/&gt;because of the way&lt;br/&gt;`payment_secret` and `decoy_key` are both used to derive the `decoy_scid`&lt;br/&gt;(but don&amp;#39;t trust me, do&lt;br/&gt;verify that I&amp;#39;m not missing something).&lt;br/&gt;&lt;br/&gt;If Mallory doesn&amp;#39;t use both the right `decoy_node_id` and `payment_secret`&lt;br/&gt;to compute `P_I`, Bob&lt;br/&gt;will not decode that to a valid real `scid` and will return an&lt;br/&gt;`unknown_next_peer` which is good&lt;br/&gt;for privacy.&lt;br/&gt;&lt;br/&gt;It seems to me that&lt;br/&gt;&lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/681&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/681&lt;/a&gt; cannot defend&lt;br/&gt;against this attack. If both invoices are currently valid, Bob will forward&lt;br/&gt;an HTLC that uses N1&lt;br/&gt;with C2 (because Bob has no way of knowing N1 from the onion, for privacy&lt;br/&gt;reasons).&lt;br/&gt;The only way I&amp;#39;d see to avoid is would be that Alice needs to share her&lt;br/&gt;`decoy_node_id`s with&lt;br/&gt;Bob (and the mapping to a `decoy_scid`) which means more state to&lt;br/&gt;manage...but maybe I&amp;#39;m just&lt;br/&gt;missing a better mitigation?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mar. 4 févr. 2020 à 15:09, Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m a bit confused, I don&amp;#39;t know if the implementation work you&amp;#39;re&lt;br/&gt;&amp;gt; mentioning refers to my proposal&lt;br/&gt;&amp;gt; or yours :).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When you say `temporary id`, could you clarify whether you mean a&lt;br/&gt;&amp;gt; temporary `node_id` or `scid`?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Firstly, need to brute-force the onion against your N keys.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is probably the part that confuses me. Are you talking about Bob or&lt;br/&gt;&amp;gt; Alice there?&lt;br/&gt;&amp;gt; Alice can easily have her `decoy_node_id` be derived from her real&lt;br/&gt;&amp;gt; `node_id`&amp;#39;s privacy key and the&lt;br/&gt;&amp;gt; `payment_hash` or `payment_preimage`. When she receives a payment, she&lt;br/&gt;&amp;gt; knows which `decoy_node_id`&lt;br/&gt;&amp;gt; should have been used so she doesn&amp;#39;t need to brute-force.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That means Alice doesn&amp;#39;t even have to change how she stores invoices. When&lt;br/&gt;&amp;gt; Alice retrieves the&lt;br/&gt;&amp;gt; invoice from her DB, if it has the `decoy_node_id` feature bit set, she&lt;br/&gt;&amp;gt; knows she needs to derive&lt;br/&gt;&amp;gt; the correct `node_id`. If it doesn&amp;#39;t have that feature bit set, it&amp;#39;s a&lt;br/&gt;&amp;gt; &amp;#34;legacy&amp;#34; invoice and she has&lt;br/&gt;&amp;gt; to use her real `node_id`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now Mallory uses Bob-&amp;gt;C2 to pay to N1 for Inv1. If it works, he knows it&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt; the same node issuing both invoices.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Same, that wouldn&amp;#39;t work because Alice can easily detect the mismatch and&lt;br/&gt;&amp;gt; pretend she can&amp;#39;t decrypt&lt;br/&gt;&amp;gt; the onion (the code doesn&amp;#39;t even have to pretend: it will use the expected&lt;br/&gt;&amp;gt; `node_id` and use the&lt;br/&gt;&amp;gt; existing error paths).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Actually, that was too hasty.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ok I think your second email came to the same conclusions and clarifies it&lt;br/&gt;&amp;gt; a bit :).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It&amp;#39;s true that this is code where the developer may easily get confused&lt;br/&gt;&amp;gt; between keys (but it&amp;#39;s a&lt;br/&gt;&amp;gt; lot simpler than the Sphinx or Noise implementation).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However in my opinion it&amp;#39;s still simpler than the `scid` state management&lt;br/&gt;&amp;gt; that needs to happen at&lt;br/&gt;&amp;gt; Alice and Bob in&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/681&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/681&lt;/a&gt; (but I would&lt;br/&gt;&amp;gt; need to&lt;br/&gt;&amp;gt; implement both E2E to be able to fairly judge that).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for the feedback, I&amp;#39;ll keep working on improving the proposal.&lt;br/&gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le mar. 4 févr. 2020 à 05:29, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; a&lt;br/&gt;&amp;gt; écrit :&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; That&amp;#39;s of course a solution as well. Even with that though, if Alice&lt;br/&gt;&amp;gt; opens&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; multiple channels to each of her Bobs,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; she should use Tor and a different node_id each time for better&lt;br/&gt;&amp;gt; privacy.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; There are two uses for this feature (both of which I started&lt;br/&gt;&amp;gt; implementing):&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 1. Simply always use a temporary id when you have a private channel, to&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;    obscure your onchain footprint.  This is a nobrainer.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 2. For an extra layer of transience, apply a new temporary id and new&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;    nodeid on every invoice *which applies only for that invoice*.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; But implementing the latter securely is fraught!&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Firstly, need to brute-force the onion against your N keys.  Secondly,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; if you use a temporary key, then you *don&amp;#39;t* end up using the HTLC to&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; pay an invoice matching that key, you *MUST* pretend you couldn&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; decrypt the onion!  This applies to all code paths between the two,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; including parsing the TLV, etc: they must ALL return&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; WIRE_INVALID_ONION_HMAC.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Otherwise, Mallory can get an invoice, then send malformed payments to&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Alice using the transient key in the invoice and see if she decrypts&lt;br/&gt;&amp;gt; it.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Actually, that was too hasty.  You can use the payment_hash as a&lt;br/&gt;&amp;gt; &amp;gt; fastpath:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. Look up invoice using payment_hash.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 2. If there is an invoice, and it has a temporary id associated with it,&lt;br/&gt;&amp;gt; &amp;gt;    try using that to decrypt the onion.  If that works, and the onion is&lt;br/&gt;&amp;gt; &amp;gt;    on the final hop, and the TLV decodes, and the payment_secret is&lt;br/&gt;&amp;gt; &amp;gt;    correct, you can go back and use this temporary key to decrypt the&lt;br/&gt;&amp;gt; onion.&lt;br/&gt;&amp;gt; &amp;gt;    Otherwise, go back and use the normal node key.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; That&amp;#39;s still quite a bit of tricky code though...&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Cheers,&lt;br/&gt;&amp;gt; &amp;gt; Rusty.&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/20200204/41cc31da/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200204/41cc31da/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:58:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyuekmkh09snue5xra074l90pkpy8qq496tu9qqawe30s0wkte2lczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk4wxw8p</id>
    
      <title type="html">📅 Original date posted:2020-02-05 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyuekmkh09snue5xra074l90pkpy8qq496tu9qqawe30s0wkte2lczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk4wxw8p" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs87pqccak5g852ddpkftf4u7q463fhar5p62p4n9wj3kvj6huw5qs9ek24y&#39;&gt;nevent1q…k24y&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-05&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But Mallory can do the same attack, I think.  Just include the P_I from&lt;br/&gt;&amp;gt; the wrong invoice for Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Good catch, that&amp;#39;s true, thanks for keeping me honest there! In that case&lt;br/&gt;my proposal&lt;br/&gt;would need the same mitigation as yours, Bob will need to include the&lt;br/&gt;`scid` he received&lt;br/&gt;in `update_add_htlc` (this is in fact not that hard once we allow TLV&lt;br/&gt;extensions on every&lt;br/&gt;message).&lt;br/&gt;&lt;br/&gt;I&amp;#39;m extremely nervous about custodial lightning services restricting&lt;br/&gt;&amp;gt; what they will pay to.  This is not theoretical: they will come under&lt;br/&gt;&amp;gt; immense KYC pressure in the near future, which means they cannot pay&lt;br/&gt;&amp;gt; arbitrary invoices.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;That&amp;#39;s a very good point, thanks for raising this. However I believe that&lt;br/&gt;there are (and will be) enough&lt;br/&gt;non-custodial wallets to let motivated users pay whatever they want. Users&lt;br/&gt;can even run their own&lt;br/&gt;node to pay such invoices if needed.&lt;br/&gt;&lt;br/&gt;If you are using a custodial wallet and KYC pressure kicks in, then&lt;br/&gt;regardless of that feature law may&lt;br/&gt;require users to completely reveal who they are paying, so even normal&lt;br/&gt;payments wouldn&amp;#39;t protect&lt;br/&gt;them, don&amp;#39;t you think? Regulation could for example disallow paying via&lt;br/&gt;unannounced channels entirely&lt;br/&gt;(or require you to show the funding tx associated to your unannounced&lt;br/&gt;channel).&lt;br/&gt;&lt;br/&gt;If we&amp;#39;re taking into account such KYC pressure, then I believe none of the&lt;br/&gt;solutions we can provide will&lt;br/&gt;be useful. It will be up to the recipient to decide whether he thus wants&lt;br/&gt;to use a normal invoice and&lt;br/&gt;reveal his identity or pass on that payment.&lt;br/&gt;&lt;br/&gt;What do you think? Do you believe `option_scid_assign` can do a better job&lt;br/&gt;in such situations?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mer. 5 févr. 2020 à 02:44, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; Hey again,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Otherwise Mallory gets two invoices, and wants to know if they&amp;#39;re&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; actually the same node.  Inv1 has nodeid N1, routehint Bob-&amp;gt;C1, Inv2 has&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; nodeid N2, routehint Bob-&amp;gt;C2.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I think this attack is interesting. AFAICT my proposal defends against&lt;br/&gt;&amp;gt; this&lt;br/&gt;&amp;gt; &amp;gt; because of the way&lt;br/&gt;&amp;gt; &amp;gt; `payment_secret` and `decoy_key` are both used to derive the `decoy_scid`&lt;br/&gt;&amp;gt; &amp;gt; (but don&amp;#39;t trust me, do&lt;br/&gt;&amp;gt; &amp;gt; verify that I&amp;#39;m not missing something).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If Mallory doesn&amp;#39;t use both the right `decoy_node_id` and&lt;br/&gt;&amp;gt; `payment_secret`&lt;br/&gt;&amp;gt; &amp;gt; to compute `P_I`, Bob&lt;br/&gt;&amp;gt; &amp;gt; will not decode that to a valid real `scid` and will return an&lt;br/&gt;&amp;gt; &amp;gt; `unknown_next_peer` which is good&lt;br/&gt;&amp;gt; &amp;gt; for privacy.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But Mallory can do the same attack, I think.  Just include the P_I from&lt;br/&gt;&amp;gt; the wrong invoice for Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; It seems to me that&lt;br/&gt;&amp;gt; &amp;gt; &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/681&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/681&lt;/a&gt; cannot defend&lt;br/&gt;&amp;gt; &amp;gt; against this attack. If both invoices are currently valid, Bob will&lt;br/&gt;&amp;gt; forward&lt;br/&gt;&amp;gt; &amp;gt; an HTLC that uses N1&lt;br/&gt;&amp;gt; &amp;gt; with C2 (because Bob has no way of knowing N1 from the onion, for privacy&lt;br/&gt;&amp;gt; &amp;gt; reasons).&lt;br/&gt;&amp;gt; &amp;gt; The only way I&amp;#39;d see to avoid is would be that Alice needs to share her&lt;br/&gt;&amp;gt; &amp;gt; `decoy_node_id`s with&lt;br/&gt;&amp;gt; &amp;gt; Bob (and the mapping to a `decoy_scid`) which means more state to&lt;br/&gt;&amp;gt; &amp;gt; manage...but maybe I&amp;#39;m just&lt;br/&gt;&amp;gt; &amp;gt; missing a better mitigation?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; No, Bob can include the scid he used in the update_add_htlc message, so&lt;br/&gt;&amp;gt; Alice can check.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m extremely nervous about custodial lightning services restricting&lt;br/&gt;&amp;gt; what they will pay to.  This is not theoretical: they will come under&lt;br/&gt;&amp;gt; immense KYC pressure in the near future, which means they cannot pay&lt;br/&gt;&amp;gt; arbitrary invoices.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus my preference for a system which doesn&amp;#39;t add any requirements on&lt;br/&gt;&amp;gt; the payer.&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;-------------- 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/20200205/08571a4f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200205/08571a4f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:58:34&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs80jvt0zkzjfvr2d9j0r2j868h2mdrjddpgmq8hv5get4mskvdh6gzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukg8240p</id>
    
      <title type="html">📅 Original date posted:2020-02-04 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs80jvt0zkzjfvr2d9j0r2j868h2mdrjddpgmq8hv5get4mskvdh6gzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukg8240p" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswnmsqaa7y8a2aujuvafh6v9jazwgpj08mddtfpsaye0r69pfq9pgyng6qf&#39;&gt;nevent1q…g6qf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-04&lt;br/&gt;📝 Original message:&lt;br/&gt;I&amp;#39;m a bit confused, I don&amp;#39;t know if the implementation work you&amp;#39;re&lt;br/&gt;mentioning refers to my proposal&lt;br/&gt;or yours :).&lt;br/&gt;&lt;br/&gt;When you say `temporary id`, could you clarify whether you mean a temporary&lt;br/&gt;`node_id` or `scid`?&lt;br/&gt;&lt;br/&gt;Firstly, need to brute-force the onion against your N keys.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This is probably the part that confuses me. Are you talking about Bob or&lt;br/&gt;Alice there?&lt;br/&gt;Alice can easily have her `decoy_node_id` be derived from her real&lt;br/&gt;`node_id`&amp;#39;s privacy key and the&lt;br/&gt;`payment_hash` or `payment_preimage`. When she receives a payment, she&lt;br/&gt;knows which `decoy_node_id`&lt;br/&gt;should have been used so she doesn&amp;#39;t need to brute-force.&lt;br/&gt;&lt;br/&gt;That means Alice doesn&amp;#39;t even have to change how she stores invoices. When&lt;br/&gt;Alice retrieves the&lt;br/&gt;invoice from her DB, if it has the `decoy_node_id` feature bit set, she&lt;br/&gt;knows she needs to derive&lt;br/&gt;the correct `node_id`. If it doesn&amp;#39;t have that feature bit set, it&amp;#39;s a&lt;br/&gt;&amp;#34;legacy&amp;#34; invoice and she has&lt;br/&gt;to use her real `node_id`.&lt;br/&gt;&lt;br/&gt;Now Mallory uses Bob-&amp;gt;C2 to pay to N1 for Inv1. If it works, he knows it&amp;#39;s&lt;br/&gt;&amp;gt; the same node issuing both invoices.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Same, that wouldn&amp;#39;t work because Alice can easily detect the mismatch and&lt;br/&gt;pretend she can&amp;#39;t decrypt&lt;br/&gt;the onion (the code doesn&amp;#39;t even have to pretend: it will use the expected&lt;br/&gt;`node_id` and use the&lt;br/&gt;existing error paths).&lt;br/&gt;&lt;br/&gt;Actually, that was too hasty.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Ok I think your second email came to the same conclusions and clarifies it&lt;br/&gt;a bit :).&lt;br/&gt;&lt;br/&gt;It&amp;#39;s true that this is code where the developer may easily get confused&lt;br/&gt;between keys (but it&amp;#39;s a&lt;br/&gt;lot simpler than the Sphinx or Noise implementation).&lt;br/&gt;&lt;br/&gt;However in my opinion it&amp;#39;s still simpler than the `scid` state management&lt;br/&gt;that needs to happen at&lt;br/&gt;Alice and Bob in &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/681&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/681&lt;/a&gt;&lt;br/&gt;(but I would need to&lt;br/&gt;implement both E2E to be able to fairly judge that).&lt;br/&gt;&lt;br/&gt;Thanks for the feedback, I&amp;#39;ll keep working on improving the proposal.&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le mar. 4 févr. 2020 à 05:29, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; a écrit&lt;br/&gt;:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; That&amp;#39;s of course a solution as well. Even with that though, if Alice&lt;br/&gt;opens&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; multiple channels to each of her Bobs,&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; she should use Tor and a different node_id each time for better&lt;br/&gt;privacy.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; There are two uses for this feature (both of which I started&lt;br/&gt;implementing):&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. Simply always use a temporary id when you have a private channel, to&lt;br/&gt;&amp;gt; &amp;gt;    obscure your onchain footprint.  This is a nobrainer.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 2. For an extra layer of transience, apply a new temporary id and new&lt;br/&gt;&amp;gt; &amp;gt;    nodeid on every invoice *which applies only for that invoice*.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; But implementing the latter securely is fraught!&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Firstly, need to brute-force the onion against your N keys.  Secondly,&lt;br/&gt;&amp;gt; &amp;gt; if you use a temporary key, then you *don&amp;#39;t* end up using the HTLC to&lt;br/&gt;&amp;gt; &amp;gt; pay an invoice matching that key, you *MUST* pretend you couldn&amp;#39;t&lt;br/&gt;&amp;gt; &amp;gt; decrypt the onion!  This applies to all code paths between the two,&lt;br/&gt;&amp;gt; &amp;gt; including parsing the TLV, etc: they must ALL return&lt;br/&gt;&amp;gt; &amp;gt; WIRE_INVALID_ONION_HMAC.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Otherwise, Mallory can get an invoice, then send malformed payments to&lt;br/&gt;&amp;gt; &amp;gt; Alice using the transient key in the invoice and see if she decrypts it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Actually, that was too hasty.  You can use the payment_hash as a&lt;br/&gt;&amp;gt; fastpath:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Look up invoice using payment_hash.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2. If there is an invoice, and it has a temporary id associated with it,&lt;br/&gt;&amp;gt;    try using that to decrypt the onion.  If that works, and the onion is&lt;br/&gt;&amp;gt;    on the final hop, and the TLV decodes, and the payment_secret is&lt;br/&gt;&amp;gt;    correct, you can go back and use this temporary key to decrypt the&lt;br/&gt;onion.&lt;br/&gt;&amp;gt;    Otherwise, go back and use the normal node key.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That&amp;#39;s still quite a bit of tricky code though...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Rusty.&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/20200204/f31934c0/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200204/f31934c0/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:58:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvjyfw2hcuyegeddy3ldta6mavx5kaetllhfjxycmmuj757lshs5czyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukc8awgc</id>
    
      <title type="html">📅 Original date posted:2020-02-03 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvjyfw2hcuyegeddy3ldta6mavx5kaetllhfjxycmmuj757lshs5czyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukc8awgc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxfv6kam5j878snw8vhwgk5usm274v6rrytrdfgg5zlv06m8z0l2cpx70cg&#39;&gt;nevent1q…70cg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;That is precisely what I am referring to, the lowest bits of the node ID&lt;br/&gt;&amp;gt; are embedded in the SCID, which we do not want to openly reveal to Carol.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;Got it, I wasn&amp;#39;t understanding your point correctly. We totally agree on&lt;br/&gt;that.&lt;br/&gt;&lt;br/&gt;Though if the point is to prevent Carol from correlating different invoices&lt;br/&gt;&amp;gt; as arising from the same payee, then my scheme fails against that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;IMO we should prevent Carol from correlating different invoices by using a&lt;br/&gt;different node_id for each invoice.&lt;br/&gt;This requires minimal changes and happens entirely payee-side (see my&lt;br/&gt;initial mail).&lt;br/&gt;&lt;br/&gt;Alice would do better to use multiple Bobs in that case.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;That&amp;#39;s of course a solution as well. Even with that though, if Alice opens&lt;br/&gt;multiple channels to each of her Bobs,&lt;br/&gt;she should use Tor and a different node_id each time for better privacy.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le lun. 3 févr. 2020 à 15:51, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning t-bast,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; This is relevant if we ever want to hide the node id of the last node:&lt;br/&gt;&amp;gt; Bob could provide a symmetric&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; encryption key to all its peers with unpublished channels, which the&lt;br/&gt;&amp;gt; peer can XOR with its own true&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; node id and use the lowest 40 bits (or 46 bits or 58 bits) in the SCID.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I don&amp;#39;t understand your point here. Alice cannot hide her node_id from&lt;br/&gt;&amp;gt; Bob since the `node_id` is&lt;br/&gt;&amp;gt; &amp;gt; tied to the (unannounced) channel creation.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; But this is not an issue. What Alice wants to break is the ability to&lt;br/&gt;&amp;gt; link multiple HTLCs together&lt;br/&gt;&amp;gt; &amp;gt; because they use the same `node_id`. Since Alice can use a different&lt;br/&gt;&amp;gt; `node_id` in every invoice,&lt;br/&gt;&amp;gt; &amp;gt; it&amp;#39;s easy for her to make sure Carol cannot tie those HTLCs together.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That is precisely what I am referring to, the lowest bits of the node ID&lt;br/&gt;&amp;gt; are embedded in the SCID, which we do not want to openly reveal to Carol.&lt;br/&gt;&amp;gt; Though if the point is to prevent Carol from correlating different&lt;br/&gt;&amp;gt; invoices as arising from the same payee, then my scheme fails against that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In order to hide from Bob, the best Alice can do is use a different&lt;br/&gt;&amp;gt; `node_id` for each channel she&lt;br/&gt;&amp;gt; &amp;gt; opens to Bob and use Tor. This way Bob cannot know that node_id_1 and&lt;br/&gt;&amp;gt; node_id_2 both belong to Alice.&lt;br/&gt;&amp;gt; &amp;gt; I don&amp;#39;t think we can do better than that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice would do better to use multiple Bobs in that case.&lt;br/&gt;&amp;gt;&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/20200203/acea682e/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200203/acea682e/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:58:32&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2raxtvnf4drfmmydppsld22jlm4d9q2h0qw72ulfevavzhwf5mmgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukuajxm4</id>
    
      <title type="html">📅 Original date posted:2020-02-03 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2raxtvnf4drfmmydppsld22jlm4d9q2h0qw72ulfevavzhwf5mmgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukuajxm4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2nrkd8d0rwnst675zggh5u9wfw862gnpjtulhhek8jfcrxtffjrgtlydr4&#39;&gt;nevent1q…ydr4&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Thanks for the feedback and discussion. Here are some more comments.&lt;br/&gt;&lt;br/&gt;This is relevant if we ever want to hide the node id of the last node: Bob&lt;br/&gt;&amp;gt; could provide a symmetric&lt;br/&gt;&amp;gt; encryption key to all its peers with unpublished channels, which the peer&lt;br/&gt;&amp;gt; can XOR with its own true&lt;br/&gt;&amp;gt; node id and use the lowest 40 bits (or 46 bits or 58 bits) in the SCID.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t understand your point here. Alice cannot hide her node_id from Bob&lt;br/&gt;since the `node_id` is&lt;br/&gt;tied to the (unannounced) channel creation.&lt;br/&gt;&lt;br/&gt;But this is not an issue. What Alice wants to break is the ability to link&lt;br/&gt;multiple HTLCs together&lt;br/&gt;because they use the same `node_id`. Since Alice can use a different&lt;br/&gt;`node_id` in every invoice,&lt;br/&gt;it&amp;#39;s easy for her to make sure Carol cannot tie those HTLCs together.&lt;br/&gt;&lt;br/&gt;In order to hide from Bob, the best Alice can do is use a different&lt;br/&gt;`node_id` for each channel she&lt;br/&gt;opens to Bob and use Tor. This way Bob cannot know that node_id_1 and&lt;br/&gt;node_id_2 both belong to Alice.&lt;br/&gt;I don&amp;#39;t think we can do better than that.&lt;br/&gt;&lt;br/&gt;I really don&amp;#39;t want a special marker on Carol; she needs to just pay like&lt;br/&gt;&amp;gt; normal.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I agree that this would be the ideal outcome (and my current proposal&lt;br/&gt;doesn&amp;#39;t achieve that, but I&amp;#39;m&lt;br/&gt;hoping I can improve it to achieve that). Do note that even though my&lt;br/&gt;current proposal requires&lt;br/&gt;a code update from Carol, the code-change would be very small. Adding&lt;br/&gt;support for `payment_secret`&lt;br/&gt;did require a change on Carol to improve security; I&amp;#39;m hoping that a small&lt;br/&gt;enough code-change with&lt;br/&gt;a big enough privacy improvement would eventually be supported by all three&lt;br/&gt;implementations (and&lt;br/&gt;then find its way inside wallets).&lt;br/&gt;&lt;br/&gt;I must admit I&amp;#39;m a bit turned off by the state management required by your&lt;br/&gt;proposal. I&amp;#39;m afraid it&lt;br/&gt;may be complex to get right, or be subject to fingerprinting and wouldn&amp;#39;t&lt;br/&gt;result in the privacy&lt;br/&gt;gain we&amp;#39;re hoping.&lt;br/&gt;&lt;br/&gt;I think this really needs to be cheap for Bob; if Bob can be DoS-ed by&lt;br/&gt;offering this feature, I&lt;br/&gt;don&amp;#39;t think the Bobs out there will activate it.&lt;br/&gt;&lt;br/&gt;I really feel some cryptography trick can allow us to find a solution that&lt;br/&gt;requires no more than a&lt;br/&gt;shared secret to be kept between Alice and Bob, and no&lt;br/&gt;synchronization/state management.&lt;br/&gt;I&amp;#39;d like to explore this option further.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le lun. 3 févr. 2020 à 07:51, m.a.holden via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; (I&amp;#39;m seeking a clever way that Bob can assign them and trivially tell&lt;br/&gt;&amp;gt; &amp;gt; which ID is assigned to which peer, but I can&amp;#39;t figure it out, so I&lt;br/&gt;&amp;gt; &amp;gt; guess Bob keeps a mapping and restricts each peer to 256 live scids?).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hi Rusty.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here&amp;#39;s a potential way for Alice and Bob to agree a set of 256 scids&lt;br/&gt;&amp;gt; without any additional messages or changes to existing messages beyond a&lt;br/&gt;&amp;gt; feature flag and a flag in open_channel, but comes with a computational&lt;br/&gt;&amp;gt; cost.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice and Bob agree on a random integer `r`. This could be negotiated on&lt;br/&gt;&amp;gt; `open_channel`, but we shouldn&amp;#39;t need to send additional information&lt;br/&gt;&amp;gt; because we already have a random integer we can use: the&lt;br/&gt;&amp;gt; `temporary_channel_id`. This is not known to anybody besides Alice and Bob.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When a channel is locked, Bob computes n=256 scids, using something&lt;br/&gt;&amp;gt; approximating `concat(n, trunc_bytes(sha256(ec_mult(2^n*r, Q)), 7))`, where&lt;br/&gt;&amp;gt; `Q` is Alice&amp;#39;s public key for the channel funding transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The chance of scid collisions between channels is 2^56, which is probably&lt;br/&gt;&amp;gt; no cause for concern.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Instead of keeping a map of 256 scids for each channel, Bob can use a&lt;br/&gt;&amp;gt; cuckoo filter for efficiency. The filter can be used for a quick membership&lt;br/&gt;&amp;gt; test and also as an associative map from scids to channels. It can also&lt;br/&gt;&amp;gt; support scid deletion in the event of channel closure (at the cost of&lt;br/&gt;&amp;gt; recomputing 256 ec_mults again).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So when Bob receives a new HTLC to forward, he tests it against his cuckoo&lt;br/&gt;&amp;gt; filter and retreives a candidate set of possible channels to which it may&lt;br/&gt;&amp;gt; refer. For each channel, he takes the most significant byte of the scid as&lt;br/&gt;&amp;gt; `m` and performs `trunc_bytes(sha256(ec_mult(2^m*r, Q)), 7)` and tests the&lt;br/&gt;&amp;gt; least-significant 7 bytes of the result against the scid.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice does not need to keep all of the scids she may use for invoices&lt;br/&gt;&amp;gt; because they can be computed on the fly, but she will need to keep a copy&lt;br/&gt;&amp;gt; of the `temporary_channel_id`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the reverse direction of Alice forwarding HTLCs to Bob, Bob&amp;#39;s public&lt;br/&gt;&amp;gt; key for the funding transaction is used instead.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; Mark Holden&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/20200203/46cc458b/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200203/46cc458b/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:58:32&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs20s4rl60c7t0r00g8aw22vnrm47yth3e3fnzrum9mndkc6cf0w4szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukda56mc</id>
    
      <title type="html">📅 Original date posted:2019-12-18 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs20s4rl60c7t0r00g8aw22vnrm47yth3e3fnzrum9mndkc6cf0w4szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukda56mc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrmza05lahl9wn4u2qzmhfj98573qdgmxz7u3m20fg0zuq043fc5srxr2ms&#39;&gt;nevent1q…r2ms&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-18&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;Thanks again for all the good suggestions, this is awesome.&lt;br/&gt;David and ZmnSCPxj&amp;#39;s proposals got me thinking (and I still need to dive&lt;br/&gt;into&lt;br/&gt;Antoine&amp;#39;s suggestion as well), and I may have found a very interesting&lt;br/&gt;construction. It&amp;#39;s either great or completely dumb. I hope you can help me&lt;br/&gt;figure out which of the two it&amp;#39;s going to be.&lt;br/&gt;&lt;br/&gt;The core idea is to modify Tapscript&amp;#39;s `OP_CHECKSIG`. Instead of reading the&lt;br/&gt;signature as a single 64-bytes stack argument, let&amp;#39;s add a small change to&lt;br/&gt;read&lt;br/&gt;the signature as two 32-bytes stack arguments: `R` first then `s`.&lt;br/&gt;Since Taproot already makes changes to this opcode, adding this small change&lt;br/&gt;seems to be quite simple and harmless (and this is the right time to propose&lt;br/&gt;such a change as we&amp;#39;re still in the Taproot review process).&lt;br/&gt;&lt;br/&gt;This effectively lets us leverage nonce reuse as a feature to prevent double&lt;br/&gt;spending once a signature has been shared off-chain.&lt;br/&gt;&lt;br/&gt;Let&amp;#39;s set the scene for this usecase. We have a service provider Patrick&lt;br/&gt;that&lt;br/&gt;wants to offer layer 2 services. Patrick prepares some of his UTXOs to have&lt;br/&gt;the&lt;br/&gt;following spending condition:&lt;br/&gt;&lt;br/&gt;* A provably unspendable key-path spend&lt;br/&gt;* A script-path spend with the following script (and only that script):&lt;br/&gt;OP_SWAP OP_DUP &amp;lt;R&amp;gt; OP_EQUALVERIFY OP_SWAP &amp;lt;P&amp;gt; OP_CHECKSIG&lt;br/&gt;* Notes:&lt;br/&gt;* The script could be more fancy (maybe we want to use hash(R) instead of R&lt;br/&gt;directly) but you get the idea&lt;br/&gt;* The OP_SWAP are needed because the spending stack will be &amp;lt;P&amp;gt; &amp;lt;R&amp;gt; &amp;lt;s&amp;gt;&lt;br/&gt;* P is of course different for every UTXO&lt;br/&gt;&lt;br/&gt;This means that Patrick is committing to the nonce he&amp;#39;ll be using to spend&lt;br/&gt;that&lt;br/&gt;output.&lt;br/&gt;&lt;br/&gt;Now comes our friend Alice. Patrick wants to open a channel to Alice and&lt;br/&gt;wants&lt;br/&gt;to start using this channel without waiting for on-chain confirmation.&lt;br/&gt;Alice and Patrick build the funding transaction as usual; once Alice sees&lt;br/&gt;the&lt;br/&gt;transaction in the mempool, she can verify that the inputs have the right&lt;br/&gt;format.&lt;br/&gt;Now Alice can be sure that Patrick will not double-spend the funding&lt;br/&gt;transaction&amp;#39;s inputs: if he does, he will be signing a different message&lt;br/&gt;with&lt;br/&gt;the same nonce. That would allow Alice to extract the private key for `P`&lt;br/&gt;and&lt;br/&gt;spend the UTXO to herself. She has nothing to lose there because it&amp;#39;s&lt;br/&gt;Patrick&amp;#39;s&lt;br/&gt;UTXO so she has an incentive to use much higher fees than Patrick.&lt;br/&gt;&lt;br/&gt;It seems to me that this construction can be generalized for many off-chain&lt;br/&gt;protocols that don&amp;#39;t want to wait for confirmation. I may be overly&lt;br/&gt;optimistic,&lt;br/&gt;but I think this could enable a whole lot of new use-cases and remove many&lt;br/&gt;pain points in Lightning.&lt;br/&gt;&lt;br/&gt;This is only a first draft, and there are things that can be improved. Let&amp;#39;s&lt;br/&gt;list what comes to mind (you will probably identify other issues):&lt;br/&gt;&lt;br/&gt;* Patrick can&amp;#39;t use RBF on transactions that spend this kind of UTXO&lt;br/&gt;because it&lt;br/&gt;would reveal his private key: that&amp;#39;s probably ok in practice (we can add an&lt;br/&gt;output for CPFP instead like we&amp;#39;re doing for anchor outputs [1])&lt;br/&gt;* These UTXOs are easy to recognize on-chain once spent, which may indicate&lt;br/&gt;that this is spent for an off-chain protocol&lt;br/&gt;* It would be great to have a way to allow key-path spend, but revoke this&lt;br/&gt;capability once the script has been revealed (off-chain): that would allow&lt;br/&gt;Patrick to encumber all his UTXOs with such a script and only use it when&lt;br/&gt;needed for an off-chain scenario (and use normal key-path spend otherwise)&lt;br/&gt;&lt;br/&gt;Please let me know if this is completely broken, completely dumb or worth&lt;br/&gt;sharing to the bitcoin-dev mailing list to consider including this&lt;br/&gt;`OP_CHECKSIG`&lt;br/&gt;change in the Taproot soft-fork.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/688&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/688&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Le mer. 18 déc. 2019 à 05:49, Antoine Riard &amp;lt;antoine.riard at gmail.com&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hi Bastien,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The use case you&amp;#39;re describing strikes me as similar to a slashing&lt;br/&gt;protocol for a LN node and a watchtower, i.e punishing&lt;br/&gt;&amp;gt; a lazy watchtower for not broadcasting a penalty tx on remote revoked&lt;br/&gt;state. In both case you want &amp;#34;if A don&amp;#39;t do X&lt;br/&gt;&amp;gt; unlock some funds for B&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Here a rough slashing protocol I&amp;#39;ve sketched out to someone else&lt;br/&gt;off-list, it may work for you use case if you replace the penalty tx&lt;br/&gt;&amp;gt; by the funding transaction as a way for the trusted channel funder to&lt;br/&gt;clear his liability. Though you will need onchain interactivity&lt;br/&gt;&amp;gt; before the fact but you may be able to reuse slashing outpoint for&lt;br/&gt;multiple channel funding.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Slashing Protocol&lt;br/&gt;&amp;gt; ----------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Alice and Bob lock fund in channel outpoint X. They issue commitment tx&lt;br/&gt;N.  Will the accountable watchtower locks fund&lt;br/&gt;&amp;gt; in a 2-of-2 slashing outpoint Y with Bob the client.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When Alice and Bob update channels to N&amp;#39;, Bob and Will use some output&lt;br/&gt;from commitment N (like upcoming anchor output)&lt;br/&gt;&amp;gt; to create an accountable tx M. M is paying to Bob after timelock&#43;Bob sig&lt;br/&gt;or is paying to transaction success_penalty P&lt;br/&gt;&amp;gt; with Will sig &#43; Bob sig. Success_penalty P will have 2 inputs, one from M&lt;br/&gt;and from J the justice tx than Bob has given&lt;br/&gt;&amp;gt; to Will. J is spending Alice&amp;#39;s revoked commitment N.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So this slashing protocol should avoid Bob making false claim, because&lt;br/&gt;you need a revoked broadcast to enable the claim&lt;br/&gt;&amp;gt; and at same time we use a justice tx output as a proof than Will have&lt;br/&gt;done its monitoring&#43;punishment job. Will shouldn&amp;#39;t&lt;br/&gt;&amp;gt; learn commitment balance if there is no channel breach and Alice and Bob&lt;br/&gt;wouldn&amp;#39;t be able to collude against Will, if&lt;br/&gt;&amp;gt; watchtower have a penalty tx on Alice non-revoked commitment tx, that&amp;#39;s&lt;br/&gt;her concern.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So topology would be:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;                                                        to_Bob&lt;br/&gt;&amp;gt;                                                      /&lt;br/&gt;&amp;gt;           X  &amp;lt;---------- N   &amp;lt;--------- J&lt;br/&gt;&amp;gt;                                 ^                   ^&lt;br/&gt;&amp;gt;                                    \                   \&lt;br/&gt;&amp;gt;             Y &amp;lt;---------------  M  &amp;lt;---------- P - to_Will&lt;br/&gt;&amp;gt;                                        \&lt;br/&gt;&amp;gt;                                         to_Bob&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Main idea of the protocol is to use transactions topology of a first&lt;br/&gt;contract as proofs for a subsidiary contract.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m quite sure it&amp;#39;s insecure, just quick ideas, any thoughts ?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (but would be really cool to have one accountable protocol to both&lt;br/&gt;watchtower and pay-to-open use cases to save&lt;br/&gt;&amp;gt; engineering costs)&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;&lt;br/&gt;&amp;gt; Le mar. 17 déc. 2019 à 16:08, Ethan Heilman &amp;lt;eth3rs at gmail.com&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; From where I&amp;#39;m sitting the fact that OP_CAT allows people to build&lt;br/&gt;&amp;gt;&amp;gt; more powerful constructions in Bitcoin without introducing additional&lt;br/&gt;&amp;gt;&amp;gt; complexity at the consensus layer is a positive not a negative. Using&lt;br/&gt;&amp;gt;&amp;gt; OP_CAT or OP_SUBSTRING to enforce ECDSA nonce reuse is a very powerful&lt;br/&gt;&amp;gt;&amp;gt; protocol tool for enforcing fairness in layer two protocols.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Tue, Dec 17, 2019 at 11:27 AM ZmnSCPxj via Lightning-dev&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Good morning t-bast,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Further, we can enforce that RBF is signalled for every spend of the&lt;br/&gt;output by:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;     &amp;lt;0&amp;gt; OP_CHECKSEQUENCEVERIFY OP_DROP &amp;lt;R&amp;gt; OP_SWAP OP_CAT &amp;lt;ACINQ&amp;gt;&lt;br/&gt;OP_CHECKSIG&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Requiring that RBF is signalled gives a little more assurance.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Suppose ACINQ becomes evil and double-spends the output.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; The transaction that is posted in the mempool must be marked by RBF&lt;br/&gt;due to the `OP_CHECKSEQUENCEVERIFY` opcode, since `nSequence` also doubles&lt;br/&gt;as RBF opt-in.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Then anyone who notices the double-spend can RBF the double-spending&lt;br/&gt;transaction to themselves rather than ACINQ.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; This also further publishes ACINQ private key, until the winning&lt;br/&gt;transaction has an `OP_RETURN` output that pays the entire value as fees&lt;br/&gt;and nobody can RBF it further.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; This is a minor increase in the assurability of the construction, by&lt;br/&gt;making any output that is double-spent directly revocable in favor of the&lt;br/&gt;miners.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Again, it requires `OP_CAT`, which is a very dangerous opcode,&lt;br/&gt;allowing such powerful constructions.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Thanks a lot David for the suggestion and pointers, that&amp;#39;s a really&lt;br/&gt;interesting solution.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; I will dive into that in-depth, it could be very useful for many&lt;br/&gt;layer-2 constructions.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Thanks ZmnSCPxj as well for the quick feedback and the `OP_CAT`&lt;br/&gt;construction,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; a lot of cool tricks coming up once (if?) we have such tools in the&lt;br/&gt;future ;)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Le mar. 17 déc. 2019 à 16:14, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Good morning David, t-bast, and all,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; I&amp;#39;m not aware of any way to currently force single-show&lt;br/&gt;signatures in&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Bitcoin, so this is pretty theoretical. Also, single-show&lt;br/&gt;signatures&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; add a lot of fragility to any setup and make useful features&lt;br/&gt;like RBF&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; fee bumping unavailable.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; With `OP_CAT`, we can enforce that a particular `R` is used, which&lt;br/&gt;allows to implement single-show signatures.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     # Assuming signatures are the concatenation of (R,s)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;     &amp;lt;R&amp;gt; OP_SWAP OP_CAT &amp;lt;ACINQ&amp;gt; OP_CHECKSIG&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The above would then feed `s` only on the witness stack.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 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; _______________________________________________&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;&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;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191218/723025ac/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191218/723025ac/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:57:49&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsx27j5ccay7ly0hgwr85j7cn3pkhgeeg43jm4lluwxyqq56jdrksczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukzgs8zk</id>
    
      <title type="html">📅 Original date posted:2019-12-17 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsx27j5ccay7ly0hgwr85j7cn3pkhgeeg43jm4lluwxyqq56jdrksczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukzgs8zk" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswghz6swzcdr8sqask76gfm85kyxemsz9r3lqwskw3v0856au2rsqks08yk&#39;&gt;nevent1q…08yk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-17&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;As everyone who has ever used a Lightning wallet is well aware, the&lt;br/&gt;onboarding process could be&lt;br/&gt;made smoother. With Phoenix [1], we&amp;#39;ve been experimenting with pay-to-open&lt;br/&gt;[2].&lt;br/&gt;&lt;br/&gt;That works well in practice and provides a great UX for newcomers, but it&lt;br/&gt;requires temporary trust&lt;br/&gt;between the user and our node (until the funding tx confirms).&lt;br/&gt;&lt;br/&gt;That trust relationship appears in two places:&lt;br/&gt;&lt;br/&gt;a. The user releases the preimage, then we fund the channel [2]&lt;br/&gt;b. The user trusts that we won&amp;#39;t double-spend the funding transaction&lt;br/&gt;&lt;br/&gt;We currently need (a) because we can&amp;#39;t ensure that the user will reveal the&lt;br/&gt;preimage once we&amp;#39;ve&lt;br/&gt;funded the channel.&lt;br/&gt;&lt;br/&gt;It&amp;#39;s (somewhat) easy to fix that once Bitcoin supports Schnorr.&lt;br/&gt;Let&amp;#39;s assume that we&amp;#39;re using PTLCs (where the secret is a private key) and&lt;br/&gt;MuSig for channel&lt;br/&gt;funding transactions.&lt;br/&gt;When Alice receives a PTLC to forward to Bob, if she doesn&amp;#39;t have a channel&lt;br/&gt;to Bob and Bob supports&lt;br/&gt;pay-to-open, she can initiate a tweaked channel opening flow. She can use&lt;br/&gt;tlv extensions in the&lt;br/&gt;`open_channel` message to tell Bob that this channel is linked to a PTLC&lt;br/&gt;with point `X=x*G`.&lt;br/&gt;Bob will tweak the MuSig nonce with `X` and provide Alice with a partial&lt;br/&gt;signature for that nonce.&lt;br/&gt;When Bob then provides the adaptor signature to finalize the funding&lt;br/&gt;transaction, it reveals `x` to&lt;br/&gt;Alice who can now fulfill the PTLC downstream.&lt;br/&gt;&lt;br/&gt;Note that in this simple version, Alice knows the nonce tweak beforehand.&lt;br/&gt;This may (or may not,&lt;br/&gt;that will need to be investigated thoroughly) be a security issue.&lt;br/&gt;Even if it turns out to be an issue, I&amp;#39;m pretty sure we can find a secure&lt;br/&gt;protocol that will allow&lt;br/&gt;this atomicity (let&amp;#39;s just add another round of communication, that&amp;#39;s&lt;br/&gt;usually how we fix broken&lt;br/&gt;cryptographic protocols).&lt;br/&gt;&lt;br/&gt;I&amp;#39;m more concerned about fixing (b). As long as the funding transaction is&lt;br/&gt;unconfirmed, there&amp;#39;s a&lt;br/&gt;risk of double-spending by the funder. I&amp;#39;m shamelessly trying to use this&lt;br/&gt;mailing list&amp;#39;s brainpower&lt;br/&gt;to figure out possible solutions for that. Does someone have ideas that&lt;br/&gt;could help? Can we setup&lt;br/&gt;the incentives so that it&amp;#39;s never rational for the funder to double-spend?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://phoenix.acinq.co/&#34;&gt;https://phoenix.acinq.co/&lt;/a&gt;&lt;br/&gt;[2] &lt;a href=&#34;https://medium.com/@ACINQ/phoenix-part-2-pay-to-open-4a8a482dd4d&#34;&gt;https://medium.com/@ACINQ/phoenix-part-2-pay-to-open-4a8a482dd4d&lt;/a&gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191217/9529e2b6/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191217/9529e2b6/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:57:45&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9jqmsmgh99fuvkaz54nhdrmujx9raqd7yx4p3luchv3mky2tgm5szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk5zct8r</id>
    
      <title type="html">📅 Original date posted:2019-11-22 📝 Original message: While ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9jqmsmgh99fuvkaz54nhdrmujx9raqd7yx4p3luchv3mky2tgm5szyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk5zct8r" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyaltv4tnp5hpea8mvmrvg5v62l2a0hjlwhz25em5g2shekz3fqcsvkxn86&#39;&gt;nevent1q…xn86&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-22&lt;br/&gt;📝 Original message:&lt;br/&gt;While I agree with most of your points, I think there are subtleties to&lt;br/&gt;explore before&lt;br/&gt;completely rejecting the idea.&lt;br/&gt;&lt;br/&gt;every use of proof-of-work today (other than to power Bitcoin itself, as&lt;br/&gt;&amp;gt; Bitcoin cannot support itself) can instead be done by using Bitcoins to&lt;br/&gt;&amp;gt; impose this economic cost.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;That is philosophically true, but the complexity of integrating that small&lt;br/&gt;PoW into Lightning&lt;br/&gt;is much lower than the complexity of integrating **fair, un-gameable**&lt;br/&gt;upfront payments.&lt;br/&gt;And not all PoW is born equal: there are a lot of PoW schemes that have&lt;br/&gt;different trade-offs&lt;br/&gt;than Bitcoin mining (think ASIC-resistance such as variants of Cuckoo&lt;br/&gt;Cycle).&lt;br/&gt;&lt;br/&gt;Another key point is that creating ASICs for this PoW is fundamentally&lt;br/&gt;different from creating&lt;br/&gt;ASICs for mining a crypto-currency. Solving this PoW doesn&amp;#39;t earn you any&lt;br/&gt;money: it merely&lt;br/&gt;allows you to spam to temporarily disrupt the network.&lt;br/&gt;Since this PoW isn&amp;#39;t used in any consensus, we can change the spam PoW&lt;br/&gt;algorithm anytime&lt;br/&gt;we want, making all previous ASICs obsolete.&lt;br/&gt;So it&amp;#39;s not obvious to me that anyone would find it viable to invest in&lt;br/&gt;creating such ASICs.&lt;br/&gt;&lt;br/&gt;As hardware specialization for the specific Lightning-Network-proof-of-work&lt;br/&gt;&amp;gt; arises, we will find that to practically limit spam, intermediate nodes&lt;br/&gt;&amp;gt; will have to increase and increase the threshold for accepting&lt;br/&gt;&amp;gt; proof-of-work, as spammers are going to switch to the more-specialized&lt;br/&gt;&amp;gt; hardware.&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;That&amp;#39;s where I think it can be more subtle than what you describe (I may be&lt;br/&gt;wrong though as&lt;br/&gt;predicting future behavior is hard).&lt;br/&gt;&lt;br/&gt;Since I&amp;#39;m ruling out ASICs, we&amp;#39;re only dealing with &amp;#34;normal&amp;#34; hardware&lt;br/&gt;bottlenecks (cpu/ram).&lt;br/&gt;That means attackers are not playing at a completely different scale than&lt;br/&gt;normal users.&lt;br/&gt;The cost for attackers to generate an amount of spam mimicking N normal&lt;br/&gt;users will then be&lt;br/&gt;somewhat linear in N (to be investigated further).&lt;br/&gt;That&amp;#39;s exactly the same result as upfront payments, where an attacker can&lt;br/&gt;still spam like&lt;br/&gt;he&amp;#39;s N users if he&amp;#39;s ready to pay a cost linear in N.&lt;br/&gt;&lt;br/&gt;I&amp;#39;m slightly playing devil&amp;#39;s advocate for the PoW proposal because I think&lt;br/&gt;it&amp;#39;s worth exploring&lt;br/&gt;more, even if we eventually abandon it. Maybe you&amp;#39;re right and it won&amp;#39;t be&lt;br/&gt;as effective to&lt;br/&gt;fight spam as upfront payments: but right now with the arguments I&amp;#39;ve seen&lt;br/&gt;on this thread,&lt;br/&gt;I&amp;#39;m not yet convinced of that.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&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/20191122/32cc41a8/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191122/32cc41a8/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:57:08&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9274z8jl23mkw7c5n2xa9vaxajuk3ellhe3se5e8mqek0dtrz5egzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukvgf5mx</id>
    
      <title type="html">📅 Original date posted:2019-11-22 📝 Original message: I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9274z8jl23mkw7c5n2xa9vaxajuk3ellhe3se5e8mqek0dtrz5egzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukvgf5mx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst3x8pmj4na03zm9w4v9jmgw7qzl8x5ajeytken9vj3ah8zps5zpgarsmf4&#39;&gt;nevent1q…smf4&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-11-22&lt;br/&gt;📝 Original message:&lt;br/&gt;I think there&amp;#39;s another alternative than upfront payments to prevent spam,&lt;br/&gt;which is maybe less&lt;br/&gt;controversial (but potentially less effective as well - to be investigated).&lt;br/&gt;&lt;br/&gt;Why not adapt what has been done with email spam and PoW/merkle puzzles?&lt;br/&gt;The high-level idea would be that the sender must solve a small PoW puzzle *for&lt;br/&gt;each intermediate *&lt;br/&gt;*node *and communicate the solution in the onion.&lt;br/&gt;There are many ways we could do that (a new field in each intermediate hop,&lt;br/&gt;grinding an HMAC&lt;br/&gt;prefix, etc) so before going into specifics I only wanted to submit the&lt;br/&gt;high-level idea.&lt;br/&gt;What&amp;#39;s neat with this is that it&amp;#39;s simple, doesn&amp;#39;t leak any privacy, and&lt;br/&gt;avoids having to create a&lt;br/&gt;node reputation system.&lt;br/&gt;&lt;br/&gt;We fight spam by forcing the sender to use some resources (instead of sats).&lt;br/&gt;Maybe this idea has already been proposed and broken, if that&amp;#39;s the case&lt;br/&gt;I&amp;#39;d love to see the&lt;br/&gt;discussion if someone can surface it.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le lun. 11 nov. 2019 à 00:32, Rusty Russell &amp;lt;rusty at rustcorp.com.au&amp;gt; a&lt;br/&gt;écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt; On Fri, Nov 08, 2019 at 01:08:04PM &#43;1030, Rusty Russell wrote:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; Anthony Towns &amp;lt;aj at erisian.com.au&amp;gt; writes:&lt;br/&gt;&amp;gt; &amp;gt;&amp;gt; [ Snip summary, which is correct ]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Huzzah!&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This correlates all the hops in a payment when the route reaches its end&lt;br/&gt;&amp;gt; &amp;gt; (due to the final preimage getting propogated back for everyone to&lt;br/&gt;&amp;gt; justify&lt;br/&gt;&amp;gt; &amp;gt; the funds they claim). Maybe solvable by converting from hashes to ECC&lt;br/&gt;&amp;gt; &amp;gt; as the trapdoor function?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I hadn&amp;#39;t thought of this, but yes, once we&amp;#39;ve eliminated the trivial&lt;br/&gt;&amp;gt; preimage correlation w/scriptless scripts it&amp;#39;d be a shame to reintroduce&lt;br/&gt;&amp;gt; it here.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We need an accumulator with some strange properties though:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Alice provides tokens and a base accumulator.&lt;br/&gt;&amp;gt; 2. Bob et. al can add these tokens to the accumulator.&lt;br/&gt;&amp;gt; 3. They can tell if invalid tokens have been added to the accumulator.&lt;br/&gt;&amp;gt; 4. They can tell how many tokens (alt: each token has a value and they&lt;br/&gt;&amp;gt;    can tell the value sum) have been added.&lt;br/&gt;&amp;gt; 5. They can&amp;#39;t tell what tokens have been added (unless they know all&lt;br/&gt;&amp;gt;    the tokens, which is trivial).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Any ideas?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The refund amount propogating back also reveals the path, probably.&lt;br/&gt;&amp;gt; &amp;gt; Could that be obfusticated by somehow paying each intermediate node&lt;br/&gt;&amp;gt; &amp;gt; both as the funds go out and come back, so the refund decreases on the&lt;br/&gt;&amp;gt; &amp;gt; way back?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Oh, can we make the amounts work like the onion, where it stays constant?&lt;br/&gt;&amp;gt; &amp;gt; So:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;   Alice wants to pay Dave via Bob, Carol. Bob gets 700 msat, Carol gets&lt;br/&gt;&amp;gt; &amp;gt;   400 msat, Dave gets 300 msat, and Alice gets 100 msat refunded.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;   Success:&lt;br/&gt;&amp;gt; &amp;gt;     Alice forwards 1500 msat to Bob   (-1500, &#43;1500, 0, 0)&lt;br/&gt;&amp;gt; &amp;gt;     Bob forwards 1500 msat to Carol   (-1500, 0, &#43;1500, 0)&lt;br/&gt;&amp;gt; &amp;gt;     Carol forwards 1500 msat to Dave  (-1500, 0, 0, &#43;1500)&lt;br/&gt;&amp;gt; &amp;gt;     Dave refunds 1200 msat to Carol   (-1500, 0, &#43;1200, &#43;300)&lt;br/&gt;&amp;gt; &amp;gt;     Carol refunds 800 msat to Bob     (-1500, &#43;800, &#43;400, &#43;300)&lt;br/&gt;&amp;gt; &amp;gt;     Bob refunds 100 msat to Alice     (-1400, &#43;700, &#43;400, &#43;300)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or, on success, upfront payment is fully refunded or not refunded at all&lt;br/&gt;&amp;gt; (since they get paid by normal fees)?  Either way, no data leak for that&lt;br/&gt;&amp;gt; case.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;   Clean routing failure at Carol/Dave:&lt;br/&gt;&amp;gt; &amp;gt;     Alice forwards 1500 msat to Bob   (-1500, &#43;1500, 0, 0)&lt;br/&gt;&amp;gt; &amp;gt;     Bob forwards 1500 msat to Carol   (-1500, 0, &#43;1500, 0)&lt;br/&gt;&amp;gt; &amp;gt;     Carol says Dave&amp;#39;s not talking&lt;br/&gt;&amp;gt; &amp;gt;     Carol refunds 1100 msat to Bob    (-1500, &#43;1100, &#43;400, 0)&lt;br/&gt;&amp;gt; &amp;gt;     Bob refunds 400 msat to Alice     (-1100, &#43;700, &#43;400, 0)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I think that breaks the correlation pretty well, so you just need a&lt;br/&gt;&amp;gt; &amp;gt; decent way of obscuring path length?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t see how this breaks correlation?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; In the uncooperative routing failure case, I wonder if using an ECC&lt;br/&gt;&amp;gt; &amp;gt; trapdoor and perhaps scriptless scripts, you could make it so Carol&lt;br/&gt;&amp;gt; &amp;gt; doesn&amp;#39;t even get an updated state without revealing the preimage...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not sure.  We can make it so Carol has Bob&amp;#39;s preimage(s), etc, so&lt;br/&gt;&amp;gt; that the node which fails doesn&amp;#39;t get paid.  I initially thought this&lt;br/&gt;&amp;gt; would just make people pair up (fake) nodes, but it&amp;#39;s probably not worth&lt;br/&gt;&amp;gt; it since their path would be less-selected in that case.&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; 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/20191122/c0045b8d/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191122/c0045b8d/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:57:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdre3w4ylyn0z8hslyclja426qk9n8z83vh0n68nzd38u82t58dvqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuksjhsm7</id>
    
      <title type="html">📅 Original date posted:2019-08-05 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdre3w4ylyn0z8hslyclja426qk9n8z83vh0n68nzd38u82t58dvqzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuksjhsm7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxlea8tjs375gv2zpa0q845twshptzg9tcd6qkprlf7ee8926g7eqdslxsk&#39;&gt;nevent1q…lxsk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-08-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning fiatjaf,&lt;br/&gt;&lt;br/&gt;This is a good question, I&amp;#39;m glad you asked.&lt;br/&gt;&lt;br/&gt;As ZmnSCPxj points out, Alice doesn&amp;#39;t know. By not syncing the full network&lt;br/&gt;graph, Alice has to accept&lt;br/&gt;&amp;#34;being in the dark&amp;#34; for some decisions. She is merely hoping that RT2 *can&lt;br/&gt;find a route* to Bob. Note that&lt;br/&gt;it&amp;#39;s quite easy to help Alice make informed decision by proving routing&lt;br/&gt;hints in the invoice and in gossip&lt;br/&gt;messages (which we already do for &amp;#34;normal&amp;#34; routing).&lt;br/&gt;&lt;br/&gt;The graph today is strongly connected, so it&amp;#39;s quite a reasonable&lt;br/&gt;assumption (and Alice can easily retry&lt;br/&gt;with another choice of trampoline node if the first one fails - just like&lt;br/&gt;we do today with normal payments).&lt;br/&gt;&lt;br/&gt;I fully agree with ZmnSCPxj though that in the future this might not be&lt;br/&gt;true anymore. When/if the network&lt;br/&gt;becomes too large we will likely lose its strongly connected nature. When&lt;br/&gt;that happens, the Lightning&lt;br/&gt;Network will need some kind of hierarchical / packet switched routing&lt;br/&gt;architecture and we won&amp;#39;t require&lt;br/&gt;trampoline nodes to know the whole network graph and be able to route to&lt;br/&gt;mostly anyone.&lt;br/&gt;I argue that trampoline routing is a first step towards enabling that. It&amp;#39;s&lt;br/&gt;a good engineering trade-off between&lt;br/&gt;ease of implementation and deployment, fixing a problem we have today and&lt;br/&gt;enabling future scaling for&lt;br/&gt;problems we&amp;#39;ll have tomorrow. It&amp;#39;s somewhat easy once we have trampoline&lt;br/&gt;payments to evolve that to a&lt;br/&gt;system closer to the internet&amp;#39;s packet switching infrastructure, so we&amp;#39;ll&lt;br/&gt;deal with that once the need for it&lt;br/&gt;becomes obvious.&lt;br/&gt;&lt;br/&gt;Does that answer your question?&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le sam. 3 août 2019 à 05:48, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning fiatjaf,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I proposed before that we could institute a rule where nodes are mapped to&lt;br/&gt;&amp;gt; some virtual space, and nodes should preferably retain the part of the&lt;br/&gt;&amp;gt; network graph that connects itself to those nodes near to it in this&lt;br/&gt;&amp;gt; virtual space (and possibly prefer to channel to those nodes).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-April/001959.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-April/001959.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus Alice might **not** know that some route exists between T1 and T2.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; T1 itself might not know of a route from itself to T2.&lt;br/&gt;&amp;gt; But if T1 knows a route to T1.5, and it knows that T1.5 is nearer to T2&lt;br/&gt;&amp;gt; than to itself in the virtual space, it can **try** to route through T1.5&lt;br/&gt;&amp;gt; in the hope T1.5 knows a route from itself to T2.&lt;br/&gt;&amp;gt; This can be done if T1 can remove itself from the trampoline route and&lt;br/&gt;&amp;gt; replace itself with T1.5, offerring in exchange some of the fee to T1.5.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Other ways of knowing some distillation of the public network without&lt;br/&gt;&amp;gt; remembering the channel level details are also possible.&lt;br/&gt;&amp;gt; My recent pointlessly long spam email for example has a section on&lt;br/&gt;&amp;gt; Hierarchical Maps.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-August/002095.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-August/002095.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sent with ProtonMail Secure Email.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐&lt;br/&gt;&amp;gt; On Saturday, August 3, 2019 12:29 AM, fiatjaf &amp;lt;fiatjaf at alhur.es&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Ok, since you seem to imply each question is valuable, here&amp;#39;s mine: how&lt;br/&gt;&amp;gt; does Alice know RT2 has a route to Bob? If she knows that, can she also&lt;br/&gt;&amp;gt; know T1 has a route to Bob? In any case, why can&amp;#39;t she just build her small&lt;br/&gt;&amp;gt; onion with Alice -&amp;gt; T1 -&amp;gt; Bob? I would expect that to be the most common&lt;br/&gt;&amp;gt; case, am I right?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Friday, August 2, 2019, Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Good morning list,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I realized that trampoline routing has only been briefly described to&lt;br/&gt;&amp;gt; this list (credits to cdecker and pm47 for laying&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; out the foundations). I just published an updated PR [1] and want to&lt;br/&gt;&amp;gt; take this opportunity to present the high level&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; view here and the parts that need a concept ACK and more feedback.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Trampoline routing is conceptually quite simple. Alice wants to send a&lt;br/&gt;&amp;gt; payment to Bob, but she doesn&amp;#39;t know a&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; route to get there because Alice only keeps a small area of the&lt;br/&gt;&amp;gt; routing table locally (Alice has a crappy phone,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; damn it Alice sell some satoshis and buy a real phone). However, Alice&lt;br/&gt;&amp;gt; has a few trampoline nodes in her&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; friends-of-friends and knows some trampoline nodes outside of her&lt;br/&gt;&amp;gt; local area (but she doesn&amp;#39;t know how to reach&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; them). Alice would like to send a payment to a trampoline node she can&lt;br/&gt;&amp;gt; reach and defer calculation of the rest of&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; the route to that node.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; The onion routing part is very simple now that we have variable-length&lt;br/&gt;&amp;gt; onion payloads (thanks again cdecker!).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Just like russian dolls, we simply put a small onion inside a big&lt;br/&gt;&amp;gt; onion. And the HTLC management forwards very&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; naturally.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; It&amp;#39;s always simpler with an example. Let&amp;#39;s imagine that Alice can&lt;br/&gt;&amp;gt; reach three trampoline nodes: T1, T2 and T3.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; She also knows the details of many remote trampoline nodes that she&lt;br/&gt;&amp;gt; cannot reach: RT1, RT2, RT3 and RT4.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Alice selects T1 and RT2 to use as trampoline hops. She builds a small&lt;br/&gt;&amp;gt; onion that describes the following route:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Alice -&amp;gt; T1 -&amp;gt; RT2 -&amp;gt; Bob&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; She finds a route to T1 and builds a normal onion to send a payment to&lt;br/&gt;&amp;gt; T1:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Alice -&amp;gt; N1 -&amp;gt; N2 -&amp;gt; T1&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; In the payload for T1, Alice puts the small trampoline onion.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; When T1 receives the payment, he is able to peel one layer of the&lt;br/&gt;&amp;gt; trampoline onion and discover that he must&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; forward the payment to RT2. T1 finds a route to RT2 and builds a&lt;br/&gt;&amp;gt; normal onion to send a payment to RT2:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; T1 -&amp;gt; N3 -&amp;gt; RT2&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; In the payload for RT2, T1 puts the peeled small trampoline onion.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; When RT2 receives the payment, he is able to peel one layer of the&lt;br/&gt;&amp;gt; trampoline onion and discover that he must&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; forward the payment to Bob. RT2 finds a route to Bob and builds a&lt;br/&gt;&amp;gt; normal onion to send a payment:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; RT2 -&amp;gt; N4 -&amp;gt; N5 -&amp;gt; Bob&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; In the payload for Bob, RT2 puts the peeled small trampoline onion.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; When Bob receives the payment, he is able to peel the last layer of&lt;br/&gt;&amp;gt; the trampoline onion and discover that he is&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; the final recipient, and fulfills the payment.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Alice has successfully sent a payment to Bob deferring route&lt;br/&gt;&amp;gt; calculation to some chosen trampoline nodes.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; That part was simple and (hopefully) not controversial, but it left&lt;br/&gt;&amp;gt; out some important details:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 1.  How do trampoline nodes specify their fees and cltv requirements?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 2.  How does Alice sync the fees and cltv requirements for her remote&lt;br/&gt;&amp;gt; trampoline nodes?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; To answer 1., trampoline nodes needs to estimate a fee and cltv that&lt;br/&gt;&amp;gt; allows them to route to (almost) any other&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; trampoline node. This is likely going to increase the fees paid by&lt;br/&gt;&amp;gt; end-users, but they can&amp;#39;t eat their cake and&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; have it too: by not syncing the whole network, users are trading fees&lt;br/&gt;&amp;gt; for ease of use and payment reliability.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; To answer 2., we can re-use the existing gossip infrastructure to&lt;br/&gt;&amp;gt; exchange a new node_update message that&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; contains the trampoline fees and cltv. However Alice doesn&amp;#39;t want to&lt;br/&gt;&amp;gt; receive every network update because she&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; doesn&amp;#39;t have the bandwidth to support it (damn it again Alice, upgrade&lt;br/&gt;&amp;gt; your mobile plan). My suggestion is to&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; create a filter system (similiar to BIP37) where Alice sends gossip&lt;br/&gt;&amp;gt; filters to her peers, and peers only forward to&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Alice updates that match these filters. This doesn&amp;#39;t have the issues&lt;br/&gt;&amp;gt; BIP37 has for Bitcoin because it has a cost&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; for Alice: she has to open a channel (and thus lock funds) to get a&lt;br/&gt;&amp;gt; connection to a peer. Peers can refuse to serve&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; filters if they are too expensive to compute, but the filters I&lt;br/&gt;&amp;gt; propose in the PR are very cheap (a simple xor or a&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; node distance comparison).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; If you&amp;#39;re interested in the technical details, head over to [1].&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I would really like to get feedback from this list on the concept&lt;br/&gt;&amp;gt; itself, and especially on the gossip and fee estimation&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; parts. If you made it that far, I&amp;#39;m sure you have many questions and&lt;br/&gt;&amp;gt; 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; Bastien&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; [1] &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/654&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/654&lt;/a&gt;&lt;br/&gt;&amp;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/lightning-dev/attachments/20190805/b9f66da2/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190805/b9f66da2/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:55:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8d22zdhunsuquz6rkyazgjj2pswknqws5df53frdc0um69pfhdwczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuktrr5ep</id>
    
      <title type="html">📅 Original date posted:2019-05-15 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8d22zdhunsuquz6rkyazgjj2pswknqws5df53frdc0um69pfhdwczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuktrr5ep" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstygtnpykt69jm9ym2y64jzj0dwrde9r0apnm9ffrqya2wcy9xw5gks8fkd&#39;&gt;nevent1q…8fkd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-05-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;I have been digging into Anthony Towns&amp;#39; anyprevout BIP&lt;br/&gt;&amp;lt;&lt;a href=&#34;https://github.com/ajtowns/bips/blob/bip-anyprevout/bip-anyprevout.mediawiki&amp;gt&#34;&gt;https://github.com/ajtowns/bips/blob/bip-anyprevout/bip-anyprevout.mediawiki&amp;gt&lt;/a&gt;;&lt;br/&gt;proposal&lt;br/&gt;to verify that it has everything we need for Eltoo&lt;br/&gt;&amp;lt;&lt;a href=&#34;https://blockstream.com/eltoo.pdf&amp;gt&#34;&gt;https://blockstream.com/eltoo.pdf&amp;gt&lt;/a&gt;;.&lt;br/&gt;&lt;br/&gt;The separation between anyprevout and anyprevoutanyscript is very handy&lt;br/&gt;(compared to the previous noinput proposal).&lt;br/&gt;Unless I&amp;#39;m missing something, it would simplify the funding tx (to a simple&lt;br/&gt;multisig without cltv/csv) and remove the need for the trigger tx.&lt;br/&gt;&lt;br/&gt;The more tricky part to integrate is the chaperone signature.&lt;br/&gt;If I understand it correctly (which I&amp;#39;m not guaranteeing), we would need to&lt;br/&gt;modify the update transactions to something like:&lt;br/&gt;&lt;br/&gt;OP_IF&lt;br/&gt;&lt;br/&gt;    10 OP_CSV&lt;br/&gt;&lt;br/&gt;    1 A(s,i) B(s,i) 2 OP_CHECKMULTISIGVERIFY          &amp;lt;- public keys&amp;#39; first&lt;br/&gt;&amp;gt; byte in this line is 0x02 or 0x03&lt;br/&gt;&lt;br/&gt;    2 A(s,i) B(s,i) 2 OP_CHECKMULTISIGVERIFY          &amp;lt;- public keys&amp;#39; first&lt;br/&gt;&amp;gt; byte in this line is 0x00 or 0x01&lt;br/&gt;&lt;br/&gt;OP_ELSE&lt;br/&gt;&lt;br/&gt;    &amp;lt;S(i) &#43; 1&amp;gt; OP_CLTV&lt;br/&gt;&lt;br/&gt;    1 A(u) B(u) 2  OP_CHECKMULTISIGVERIFY          &amp;lt;- public keys&amp;#39; first&lt;br/&gt;&amp;gt; byte in this line is 0x02 or 0x03&lt;br/&gt;&lt;br/&gt;    2 A(u) B(u) 2  OP_CHECKMULTISIGVERIFY          &amp;lt;- public keys&amp;#39; first&lt;br/&gt;&amp;gt; byte in this line is 0x00 or 0x01&lt;br/&gt;&lt;br/&gt;OP_END&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;(I ommitted the tapscript changes, ie moving to OP_CHECKSIGADD, to&lt;br/&gt;highlight only the chaperone changes)&lt;br/&gt;&lt;br/&gt;When updating the channel, Alice and Bob would exchange their&lt;br/&gt;anyprevoutanyscript signatures (for the 2-of-2 multisig).&lt;br/&gt;The chaperone signature can be provided by either Alice or Bob at&lt;br/&gt;transaction broadcast time (so that it commits to a specific input&lt;br/&gt;transaction).&lt;br/&gt;&lt;br/&gt;It seems to me that using the same key for both signatures (the chaperone&lt;br/&gt;one and the anyprevoutanyscript one) is safe here, but if someone knows&lt;br/&gt;better I&amp;#39;m interested.&lt;br/&gt;If that&amp;#39;s unsafe, we simply need to introduce another key-pair (chaperone&lt;br/&gt;key).&lt;br/&gt;&lt;br/&gt;Is that how you guys understand it too? Do you have other ideas on how to&lt;br/&gt;comply with the need for a chaperone signature?&lt;br/&gt;&lt;br/&gt;Note that as Anthony said himself, the BIP isn&amp;#39;t final and we don&amp;#39;t know&lt;br/&gt;yet if chaperone signatures will eventually be needed, but I think it&amp;#39;s&lt;br/&gt;useful to make sure that Eltoo could support it.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;Bastien&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/20190515/ce50601f/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190515/ce50601f/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:54:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsynfp2qz6tgdj8u38hjmuh7e9za9xe7wucj840pgpauzckqe00lkgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk86h86l</id>
    
      <title type="html">📅 Original date posted:2022-09-29 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsynfp2qz6tgdj8u38hjmuh7e9za9xe7wucj840pgpauzckqe00lkgzyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcuk86h86l" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs295u8fy9ew5jz0ym7ezcczy2eepugtqzyrx8npdhjnvlj7axg6dq6ulujc&#39;&gt;nevent1q…lujc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-29&lt;br/&gt;📝 Original message:Hi Gloria, Greg,&lt;br/&gt;&lt;br/&gt;&amp;gt; I interpret most of the discussion around limitations as ideas for&lt;br/&gt;&amp;gt; future improvements rather than criticisms of the proposal&lt;br/&gt;&lt;br/&gt;As far as I&amp;#39;m concerned, definitely!&lt;br/&gt;&lt;br/&gt;My current understanding is that the main change/improvement that would&lt;br/&gt;make sense here is restricting the whole v3 package&amp;#39;s size (instead of&lt;br/&gt;just the child) via committing to a specific value in the taproot annex&lt;br/&gt;(also note that it&amp;#39;s probably not just the v3 package&amp;#39;s size, it should&lt;br/&gt;be the whole unconfirmed package including potential v2 unconfirmed&lt;br/&gt;ancestors).&lt;br/&gt;&lt;br/&gt;While I think this would be very valuable and would like to see this&lt;br/&gt;happen, I believe that can be done in a second, separate step since this&lt;br/&gt;would make relay policy stricter (some v3 transactions that previously&lt;br/&gt;propagated wouldn&amp;#39;t propagate under this new rule). As long as you are&lt;br/&gt;able to find a path to miners through upgraded peers that use this annex&lt;br/&gt;approach, you should be able to resolve ACP pinning issues?&lt;br/&gt;&lt;br/&gt;I&amp;#39;m curious to know how other people feel about that: is it ok to do&lt;br/&gt;later or should we try to implement this for the first release of v3&lt;br/&gt;transactions?&lt;br/&gt;&lt;br/&gt;The other change mentioned (making OP_TRUE standard and allowing outputs&lt;br/&gt;that are below dust) can be added later, as those won&amp;#39;t be standard until&lt;br/&gt;we start allowing them, so there shouldn&amp;#39;t be any backwards-compatibility&lt;br/&gt;issue with postponing this change. But maybe it&amp;#39;s still worth having from&lt;br/&gt;the get-go, even though it may take a bit more time? Again, I&amp;#39;m curious to&lt;br/&gt;have other people&amp;#39;s opinion here, I&amp;#39;d be happy to get all of those directly&lt;br/&gt;in the first release of v3 transactions, but I don&amp;#39;t know how much&lt;br/&gt;implementation will have to go into that.&lt;br/&gt;&lt;br/&gt;&amp;gt; For clarification, package RBF is ParentTx*s*(plural), and&lt;br/&gt;ChildTx(singular),&lt;br/&gt;&amp;gt; so it might be a bit more complicated than we&amp;#39;re thinking&lt;br/&gt;&lt;br/&gt;Right, good catch, this does require new logic to handle this case.&lt;br/&gt;As Gloria points out, this should be doable, and is definitely worth&lt;br/&gt;adding (those CSV 1 on every other output are really hacky, glad to&lt;br/&gt;find a way to get rid of them).&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le lun. 26 sept. 2022 à 18:48, Gloria Zhao &amp;lt;gloriajzhao at gmail.com&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Greg, Antoine, Bastien,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks very much for the feedback! I interpret most of the discussion&lt;br/&gt;&amp;gt; around limitations as ideas for future improvements rather than criticisms&lt;br/&gt;&amp;gt; of the proposal (please correct me if I&amp;#39;m wrong). I&amp;#39;ll try to respond to as&lt;br/&gt;&amp;gt; much as possible.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Also I realize that I didn&amp;#39;t contextualize this proposal clearly enough;&lt;br/&gt;&amp;gt; it is very tailored for LN Penalty and definitely doesn&amp;#39;t close all pinning&lt;br/&gt;&amp;gt; attacks possible (sorry for confusing anyone). I also agree that some bits&lt;br/&gt;&amp;gt; can be a little ugly or tack-on; I would definitely prefer a comprehensive&lt;br/&gt;&amp;gt; RBF revamp to fix all our problems and enable other fee-bumping strategies&lt;br/&gt;&amp;gt; such as&lt;br/&gt;&amp;gt; sign-ANYONECANPAY-then-bring-your-own-fees-by-adding-inputs-at-broadcast. I&lt;br/&gt;&amp;gt; was hoping to get some ideas with the &amp;#34;RBF Improvements&amp;#34; post in January,&lt;br/&gt;&amp;gt; but it doesn&amp;#39;t seem like we&amp;#39;re much closer to a workable proposal. I think&lt;br/&gt;&amp;gt; this is a minimally-invasive step that works for Lightning today, a small&lt;br/&gt;&amp;gt; fix similar to CPFP carve out.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As you likely know from previous discussions the biggest scenario this&lt;br/&gt;&amp;gt; does not fix in my estimation is ANYONECANPAY situations. If the parent&lt;br/&gt;&amp;gt; transaction can be &amp;#34;inflated&amp;#34; by tacking on additional inputs, this means&lt;br/&gt;&amp;gt; the total weight of the parent tx lowers the effective feerate of the&lt;br/&gt;&amp;gt; package.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (For more context to other readers I wrote an explanation for this in&lt;br/&gt;&amp;gt; &amp;#34;SIGHASH_ANYONECANPAY Pinning&amp;#34; section of RBF ML post).  Yes, this&lt;br/&gt;&amp;gt; unfortunately doesn&amp;#39;t fix any of the existing pinning attacks for single&lt;br/&gt;&amp;gt; transaction RBF but also doesn&amp;#39;t make them worse. This boils down to adding&lt;br/&gt;&amp;gt; an incentive compatibility rule that ensures you can&amp;#39;t replace a&lt;br/&gt;&amp;gt; transaction with something that will confirm slower. Package RBF has an&lt;br/&gt;&amp;gt; ancestor feerate-based rule for this (note it is quite conservative and not&lt;br/&gt;&amp;gt; perfect).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So in the scenario above with the &amp;#34;inflated&amp;#34; parent that was signed ACP,&lt;br/&gt;&amp;gt; the replacement would be rejected because the package ancestor feerate is&lt;br/&gt;&amp;gt; lower than the feerate of what is being replaced. But it is imperfect&lt;br/&gt;&amp;gt; (explained below) and thus I wouldn&amp;#39;t recommend it for single transaction&lt;br/&gt;&amp;gt; replacement. So that attack still exists for single transactions, yes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The strategy of using ACP to bring-your-own-fees has its own challenges&lt;br/&gt;&amp;gt; but hopefully has no current use cases as you say. AFAIK LN Penalty is not&lt;br/&gt;&amp;gt; affected by this since it doesn&amp;#39;t use ACP, though obviously I agree we&lt;br/&gt;&amp;gt; should fix it for the future.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So when I said &amp;#34;this is intended for fee-bumping presigned txns in&lt;br/&gt;&amp;gt; contracting protocols,&amp;#34; I should have said &amp;#34;this is intended for&lt;br/&gt;&amp;gt; fee-bumping presigned txns specifically using CPFP and anchor outputs.&amp;#34;&lt;br/&gt;&amp;gt; Apologies for forgetting to contextualize, I&amp;#39;ve been sitting on this for&lt;br/&gt;&amp;gt; too long.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The other scenario it doesn&amp;#39;t really fix is where HTLC/commitment-like&lt;br/&gt;&amp;gt; transactions are being resolved in a batch, but due to relative time&lt;br/&gt;&amp;gt; constraints, you may want to accelerate some and not others. Now you must&lt;br/&gt;&amp;gt; pay higher rates to replace all of the transaction bumps. This is a&lt;br/&gt;&amp;gt; &amp;#34;self-pin&amp;#34; and &amp;#34;get good at utxos noob&amp;#34; type problem, but it&amp;#39;s something&lt;br/&gt;&amp;gt; that axing rule#3 in favor of a Replace-by-ancestor-feerate system would&lt;br/&gt;&amp;gt; get us.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I understand you to mean &amp;#34;if you don&amp;#39;t have enough UTXOs and you&amp;#39;re forced&lt;br/&gt;&amp;gt; to batch-bump, you over-pay because you need to bring them all to the&lt;br/&gt;&amp;gt; highest target feerate.&amp;#34; Isn&amp;#39;t this kind of separate, wallet-related&lt;br/&gt;&amp;gt; problem? Contracting or not, surely every wallet needs to have enough UTXOs&lt;br/&gt;&amp;gt; to not batch transactions that shouldn&amp;#39;t be batched... I don&amp;#39;t see how a&lt;br/&gt;&amp;gt; replace-by-ancestor-feerate policy would make any difference for this?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Also in general I&amp;#39;d like to reiterate that ancestor feerate is not a&lt;br/&gt;&amp;gt; panacea to all our RBF incentive compatibility concerns. Like individual&lt;br/&gt;&amp;gt; feerate, unless we run the mining algorithm, it cannot tell us exactly how&lt;br/&gt;&amp;gt; quickly this transaction would be mined.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We&amp;#39;re estimating the incentive compatibility of the original&lt;br/&gt;&amp;gt; transaction(s) and replacement transaction(s), with the goal of not letting&lt;br/&gt;&amp;gt; a transaction replace something that would have been more incentive&lt;br/&gt;&amp;gt; compatible to mine. As such, we don&amp;#39;t want to overestimate how good the&lt;br/&gt;&amp;gt; replacement is, and we don&amp;#39;t want to underestimate how good the original&lt;br/&gt;&amp;gt; transactions are. This rule &amp;#34;The minimum between package feerate and&lt;br/&gt;&amp;gt; ancestor feerate of the child is not lower than the individual feerates of&lt;br/&gt;&amp;gt; all directly conflicting transactions and the ancestor feerates of all&lt;br/&gt;&amp;gt; original transactions&amp;#34; is a conservative estimate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Would kind of be nice if package RBF would detect a &amp;#34;sibling output&lt;br/&gt;&amp;gt; spend&amp;#34; conflict, and knock it out of the mempool via the other replacement&lt;br/&gt;&amp;gt; rules? Getting rid of the requirement to 1 block csv lock every output&lt;br/&gt;&amp;gt; would be quite nice from a smart contracting composability point of view.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Interesting, so when a transaction hits a mempool tx&amp;#39;s descendant limit,&lt;br/&gt;&amp;gt; we consider evicting one of its descendants in favor of this transaction,&lt;br/&gt;&amp;gt; based on the RBF rules.&lt;br/&gt;&amp;gt; Cool idea! After chewing on this for a bit, I think this *also* just boils&lt;br/&gt;&amp;gt; down to the fact that RBF should require replacements to be better mining&lt;br/&gt;&amp;gt; candidates. As in, if we added this policy and it can make us evict the&lt;br/&gt;&amp;gt; sibling and accept a transaction with a bunch of low-feerate ancestor junk,&lt;br/&gt;&amp;gt; it would be a new pinning vector.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If you&amp;#39;re a miner and you receive a non-V3, second descendant of an&lt;br/&gt;&amp;gt; unconfirmed V3 transaction, if the offered fee is in the top mempool&lt;br/&gt;&amp;gt; backlog, I think you would have an interest to accept such a transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; So I&amp;#39;m not sure if those two rules are compatible with miners&lt;br/&gt;&amp;gt; incentives...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The same argument can be made for the 26th descendant of a mempool&lt;br/&gt;&amp;gt; transaction; it&amp;#39;s also not entirely incentive-compatible to reject it, but&lt;br/&gt;&amp;gt; that is not the *only* design goal in mempool policy. Of course, the&lt;br/&gt;&amp;gt; difference here is that the 25-descendant limit rule is a sensible DoS&lt;br/&gt;&amp;gt; protection, while this 1-descendant limit rule is more of a &amp;#34;help the&lt;br/&gt;&amp;gt; Bitcoin ecosystem&amp;#34; policy, just like CPFP carve-out, dust limit, etc. I can&lt;br/&gt;&amp;gt; of course understand why not everyone would be in favor of this, but I do&lt;br/&gt;&amp;gt; think it&amp;#39;s worth it.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 4. A V3 transaction that has an unconfirmed V3 ancestor cannot be&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;    larger than 1000 virtual bytes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If I understand correctly the 1000 vb upper bound rational, it would be&lt;br/&gt;&amp;gt; to constraint the pinning counterparty to attach a high fee to a child due&lt;br/&gt;&amp;gt; to the limited size, if they would like this transaction to be stuck in the&lt;br/&gt;&amp;gt; network mempools. By doing so  this child has high odds to confirm.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Yeah exactly, the &amp;#34;Rule 3 pin&amp;#34; is done by adding a child that&amp;#39;s high-fee&lt;br/&gt;&amp;gt; (so you have to pay that much to evict it). Because they *don&amp;#39;t* want this&lt;br/&gt;&amp;gt; tx to confirm, normally, this child would be really large. If they only&lt;br/&gt;&amp;gt; have 1000vB for the child, they can&amp;#39;t increase the replacement cost without&lt;br/&gt;&amp;gt; also fee-bumping the transaction to make it confirm faster.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As of today, I think yes you can already fingerprint LN transactions on&lt;br/&gt;&amp;gt; the  spec-defined amount value of the anchor outputs, 330 sats. There is&lt;br/&gt;&amp;gt; always one of them on post-anchor commitment transactions. And sadly I&lt;br/&gt;&amp;gt; would say we&amp;#39;ll always have tricky fingerprints leaking from unilateral LN&lt;br/&gt;&amp;gt; closures such as HTLC/PTLC timelocks...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I agree with you, this isn&amp;#39;t worse than today, unilateral closes will&lt;br/&gt;&amp;gt; probably always be identifiable on-chain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Great to hear that there is no privacy worsening!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Gloria&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Mon, Sep 26, 2022 at 5:02 PM Greg Sanders &amp;lt;gsanders87 at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Bastien,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; This may be already covered by the current package RBF logic, in that&lt;br/&gt;&amp;gt;&amp;gt; scenario we are simply replacing [ParentTx, ChildTx1] with&lt;br/&gt;&amp;gt;&amp;gt; [ParentTx, ChildTx2] that pays more fees, right?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; For clarification, package RBF is ParentTx*s*(plural), and&lt;br/&gt;&amp;gt;&amp;gt; ChildTx(singular), so it might be a bit more complicated than we&amp;#39;re&lt;br/&gt;&amp;gt;&amp;gt; thinking, and currently the V3 proposal would first de-duplicate the&lt;br/&gt;&amp;gt;&amp;gt; ParentTx based on what is in the mempool, then look at the &amp;#34;rest&amp;#34; of the&lt;br/&gt;&amp;gt;&amp;gt; transactions as a package, then individually. Not the same, not sure how&lt;br/&gt;&amp;gt;&amp;gt; different. I&amp;#39;ll defer to experts.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt; Greg&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; On Mon, Sep 26, 2022 at 11:48 AM Bastien TEINTURIER via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Thanks Gloria for this great post.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; This is very valuable work for L2 contracts, and will greatly improve&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; their security model.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;#34;Only 1 anchor output? What if I need to bump counterparty&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; commitment tx in mempool?&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; You won&amp;#39;t need to fee-bump a counterparty&amp;#39;s commitment tx using CPFP.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; You would just package RBF it by attaching a high-feerate child to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; your commitment tx.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Note that we can also very easily make that single anchor spendable by&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; both participants (or even anyone), so if you see your counterparty&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; commitment in your mempool, you can bump it without publishing your&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; own commitment, which is quite desirable (your own commitment tx has&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; CSV delays on your outputs, whereas your counterparty&amp;#39;s commitment tx&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; doesn&amp;#39;t).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;#34;Is this a privacy issue, i.e. doesn&amp;#39;t it allow fingerprinting LN&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; transactions based on nVersion?&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I agree with you, this isn&amp;#39;t worse than today, unilateral closes will&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; probably always be identifiable on-chain.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Would kind of be nice if package RBF would detect a &amp;#34;sibling output&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; spend&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; conflict, and knock it out of the mempool via the other replacement&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; rules?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Getting rid of the requirement to 1 block csv lock every output would&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; quite nice from a smart contracting composability point of view.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &#43;1, that would be very neat!&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; This may be already covered by the current package RBF logic, in that&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; scenario we are simply replacing [ParentTx, ChildTx1] with&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; [ParentTx, ChildTx2] that pays more fees, right?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; 1) I do think that we should seriously consider allowing OP_TRUE to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; become&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; a standard script type as part of this policy update. If pinning is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; solved,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; then there&amp;#39;s no reason to require all those extra bytes for &amp;#34;binding&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; an&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; anchor to a specific wallet/user. We can save quite a few bytes by&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; having&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; the input be empty of witness data.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; 2) If we allow for a single dust-value(0 on up) output which is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; immediately&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; spent by the package, anchors become even easier to to design. No&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; value has&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; to be &amp;#34;sapped&amp;#34; from contract participants to make an anchor output.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; There&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; more complications for this, such as making sure the parent&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; transaction is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; dropped if the child spend is dropped, but maybe it&amp;#39;s worth the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; squeeze.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; I also think both of these could be quite useful. This would probably&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; always&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; be used in combination with a parent transaction that pays 0 fees, so the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; 0-value output would always be spent in the same block.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; But this means we could end up with 0-value outputs in the utxo set, if&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; for&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; some reason the parent tx is CPFP-ed via another output than the 0-value&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; one,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; which would be a utxo set bloat issue. But I&amp;#39;d argue that we&amp;#39;re probably&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; already creating utxo set bloat with the 330 sat anchor outputs&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; (especially&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; since we use two of them, but only one is usually spent), so it would&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; probably be *better* than what we&amp;#39;re doing today.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; Le lun. 26 sept. 2022 à 03:22, Antoine Riard via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi Gloria,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks for the progress on package RBF, few early questions.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; 2. Any descendant of an unconfirmed V3 transaction must also be V3.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; 3. An unconfirmed V3 transaction cannot have more than 1 descendant.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If you&amp;#39;re a miner and you receive a non-V3, second descendant of an&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unconfirmed V3 transaction, if the offered fee is in the top mempool&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; backlog, I think you would have an interest to accept such a transaction.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; So I&amp;#39;m not sure if those two rules are compatible with miners&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; incentives...&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; 4. A V3 transaction that has an unconfirmed V3 ancestor cannot be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;    larger than 1000 virtual bytes.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If I understand correctly the 1000 vb upper bound rational, it would be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to constraint the pinning counterparty to attach a high fee to a child due&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to the limited size, if they would like this transaction to be stuck in the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; network mempools. By doing so  this child has high odds to confirm.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I still wonder if this compatible with miner incentives in period of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; empty mempools, in the sense that if you&amp;#39;ve already a V3 transaction of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; size 100Kvb offering 2 sat/vb, it&amp;#39;s more interesting than a V3 replacement&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; candidate of size 1000 vb offering 10 sat/vb. It could be argued the former&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; should be conserved.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (That said, the hard thing with any replacement strategy we might evict&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; a parent transaction *now* to which is attached a high-feerate child&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; *latter* making for a utxo considered the best ancestor set. Maybe in the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; long-term miners should keep every transaction ever accepted...)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; (Lower bound) the smaller this limit, the fewer UTXOs a child may use&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; to fund this fee-bump. For example, only allowing the V3 child to have&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; 2 inputs would require L2 protocols to manage a wallet with high-value&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; UTXOs and make batched fee-bumping impossible. However, as the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; fee-bumping child only needs to fund fees (as opposed to payments),&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; just a few UTXOs should suffice.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Reminder for L2 devs, batched fee-bumping of time-sensitive&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; confirmations of commitment transactions is unsafe, as the counterparty&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; could enter in a &amp;#34;cat-and-mouse&amp;#34; game to replace one of the batch element&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; at each block to delay confirmation of the remaining elements in the batch,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I think.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On the other hand, I wonder if we wouldn&amp;#39;t want a higher bound. LN&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; wallets are likely to have one big UTXO in their fee-bumping reserve pool,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; as the cost of acquiring UTXO is non-null and in the optimistic case, you&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; don&amp;#39;t need to do unilateral closure. Let&amp;#39;s say you close dozens of channels&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; at the same time, a UTXO pool management strategy might be to fan-out the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; first spends UTXOs in N fan-out outputs ready to feed the remaining&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; in-flight channels.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; 1. The rule around unconfirmed inputs was&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; originally &amp;#34;A package may include new unconfirmed inputs, but the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; ancestor feerate of the child must be at least as high as the ancestor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; feerates of every transaction being replaced.&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Note, I think we would like this new RBF rule to also apply to single&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transaction package, e.g second-stage HTLC transactions, where a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; counterparty pins a HTLC-preimage by abusing rule 3. In that case, the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; honest LN node should be able to broadcast a &amp;#34;at least as high ancestor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feerate&amp;#34; HTLC-timeout transaction. With `option_anchor_outputs&amp;#34; there is no&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unconfirmed ancestor to replace, as the commitment transaction, whatever&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the party it is originating from, should already be confirmed.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;#34;Is this a privacy issue, i.e. doesn&amp;#39;t it allow fingerprinting LN&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions based on nVersion?&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; As of today, I think yes you can already fingerprint LN transactions on&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the  spec-defined amount value of the anchor outputs, 330 sats. There is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; always one of them on post-anchor commitment transactions. And sadly I&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; would say we&amp;#39;ll always have tricky fingerprints leaking from unilateral LN&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; closures such as HTLC/PTLC timelocks...&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; &amp;#34;Can a V2 transaction replace a V3 transaction and vice versa?&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; IIUC, a V3 package could replace a V2 package, with the benefit of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; new package RBF rules applied. I think this would be a significant&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; advantage for LN, as for the current ~85k of opened channels, the old V2&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; states shouldn&amp;#39;t be pinning vectors. Currently, commitment transactions&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; signal replaceability.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Le ven. 23 sept. 2022 à 11:26, Gloria Zhao via bitcoin-dev &amp;lt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi everyone,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I&amp;#39;m writing to propose a very simple set of mempool/transaction relay&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; policies intended to aid L2/contract protocols. I realized that&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the previously proposed Package Mempool Accept package RBF [1]&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; had a few remaining problems after digging into the RBF logic more [2].&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This additional set of policies solves them without requiring a huge&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RBF overhaul.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I&amp;#39;ve written an implementation (and docs) for Bitcoin Core:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/25038&#34;&gt;https://github.com/bitcoin/bitcoin/pull/25038&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (You may notice that this proposal incorporates feedback on the PR -&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; thanks Suhas Daftuar, Gregory Sanders, Bastien Teinturier, Anthony Towns,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and others.)&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If you are interested in using package RBF/relay to bump presigned&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions, I think you may be interested in reviewing this proposal.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This should solve Rule 3 pinning and perhaps allow us&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to get rid of CPFP carve-out (yay!). I&amp;#39;m keen to hear if people find&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the 1-anchor-output, 1000vB child limit too restrictive. Also, if you&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; find a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; pinning attack or something that makes it unusable for you, I would&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; really really like to know.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Note that transactions with nVersion=3 (&amp;#34;V3 transactions&amp;#34;) are&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; currently non-standard in Bitcoin Core. That means **anything that was&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; standard before this policy change would still be standard&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; afterwards.** If you don&amp;#39;t want your transactions to be subject to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; these rules, just continue whatever you&amp;#39;re doing and don&amp;#39;t use&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; nVersion=3. AFAICT this shouldn&amp;#39;t break anything, but let me know if&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; this would be disruptive for you?&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; **New Policies:**&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This includes:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - a set of additional policy rules applying to V3 transactions&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - modifications to package RBF rules&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; **V3 transactions:**&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Existing standardness rules apply to V3 (e.g. min/max tx weight,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; standard output types, cleanstack, etc.). The following additional&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; rules apply to V3:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1. A V3 transaction can be replaced, even if it does not signal BIP125&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;    replaceability. (It must also meet the other RBF rules around fees,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; etc. for replacement to happen).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2. Any descendant of an unconfirmed V3 transaction must also be V3.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; *Rationale*: Combined with Rule 1, this gives us the property of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;#34;inherited&amp;#34; replaceability signaling when descendants of unconfirmed&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions are created. Additionally, checking whether a transaction&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; signals replaceability this way does not require mempool traversal,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and does not change based on what transactions are mined. It also&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; makes subsequent rules about descendant limits much easier to check.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; *Note*: The descendant of a *confirmed* V3 transaction does not need&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to be V3.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 3. An unconfirmed V3 transaction cannot have more than 1 descendant.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; *Rationale*: (Upper bound) the larger the descendant limit, the more&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions may need to be replaced. This is a problematic pinning&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; attack, i.e., a malicious counterparty prevents the transaction from&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; being replaced by adding many descendant transactions that aren&amp;#39;t&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; fee-bumping.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (Lower bound) at least 1 descendant is required to allow CPFP of the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; presigned transaction. The contract protocol can create presigned&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions paying 0 fees and 1 output for attaching a CPFP at&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; broadcast time (&amp;#34;anchor output&amp;#34;). Without package RBF, multiple anchor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; outputs would be required to allow each counterparty to fee-bump any&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; presigned transaction. With package RBF, since the presigned&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions can replace each other, 1 anchor output is sufficient.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 4. A V3 transaction that has an unconfirmed V3 ancestor cannot be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;    larger than 1000 virtual bytes.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; *Rationale*: (Upper bound) the larger the descendant size limit, the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; more vbytes may need to be replaced. With default limits, if the child&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is e.g. 100,000vB, that might be an additional 100,000sats (at&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1sat/vbyte) or more, depending on the feerate.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (Lower bound) the smaller this limit, the fewer UTXOs a child may use&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to fund this fee-bump. For example, only allowing the V3 child to have&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2 inputs would require L2 protocols to manage a wallet with high-value&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; UTXOs and make batched fee-bumping impossible. However, as the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; fee-bumping child only needs to fund fees (as opposed to payments),&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; just a few UTXOs should suffice.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; With a limit of 1000 virtual bytes, depending on the output types, the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; child can have 6-15 UTXOs, which should be enough to fund a fee-bump&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; without requiring a carefully-managed UTXO pool. With 1000 virtual&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bytes as the descendant limit, the cost to replace a V3 transaction&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; has much lower variance.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; *Rationale*: This makes the rule very easily &amp;#34;tacked on&amp;#34; to existing&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; logic for policy and wallets. A transaction may be up to 100KvB on its&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; own (`MAX_STANDARD_TX_WEIGHT`) and 101KvB with descendants&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (`DEFAULT_DESCENDANT_SIZE_LIMIT_KVB`). If an existing V3 transaction&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; in the mempool is 100KvB, its descendant can only be 1000vB, even if&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the policy is 10KvB.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; **Package RBF modifications:**&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1. The rule around unconfirmed inputs was&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; originally &amp;#34;A package may include new unconfirmed inputs, but the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ancestor feerate of the child must be at least as high as the ancestor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feerates of every transaction being replaced.&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The package may still include new unconfirmed inputs. However,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the new rule is modified to be &amp;#34;The minimum between package feerate&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and ancestor feerate of the child is not lower than the individual&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feerates of all directly conflicting transactions and the ancestor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feerates of all original transactions.&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; *Rationale*: We are attempting to ensure that the replacement&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions are not less incentive-compatible to mine. However, a&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; package/transaction&amp;#39;s ancestor feerate is not perfectly representative&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; of its incentive compatibility; it may overestimate (some subset of&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the ancestors could be included by itself if it has other high-feerate&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; descendants or are themselves higher feerate than this&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; package/transaction). Instead, we use the minimum between the package&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; feerate and ancestor feerate of the child as a more conservative value&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; than what was proposed originally.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2. A new rule is added, requiring that all package transactions with&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; mempool conflicts to be V3. This also means the &amp;#34;sponsoring&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; child transaction must be V3.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; *Note*: Combined with the V3 rules, this means the package must be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; a child-with-parents package. Since package validation is only&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; attempted if the transactions do not pay sufficient fees to be&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; accepted on their own, this effectively means that only V3&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions can pay to replace their ancestors&amp;#39; conflicts, and only&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; V3 transactions&amp;#39; replacements may be paid for by a descendant.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; *Rationale*: The fee-related rules are economically rational for&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ancestor packages, but not necessarily other types of packages.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; A child-with-parents package is a type of ancestor package. It&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; may be fine to allow any ancestor package, but it&amp;#39;s more difficult&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to account for all of the possibilities. For example, it gets much&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; harder to see that we&amp;#39;re applying the descendant limits correctly if&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the package has a gnarly, many-generation, non-tree shape. I&amp;#39;m also&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; not sure if this policy is 100% incentive-compatible if the sponsor&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is not a direct descendant of the sponsee.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Please see doc/policy/version3_transactions.md and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; doc/policy/packages.md in the PR for the full set of rules.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; **Intended usage for LN:**&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Commitment transactions should be V3 and have 1 anchor output. They&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; can be signed with 0 fees (or 1sat/vbyte) once package relay is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; deployed&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; on a significant portion of the network. If the commitment tx must&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; be broadcast, determine the desired feerate at broadcast time and&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; spend the anchor output in a high feerate transaction. I&amp;#39;m going to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; call the broadcasted commitment tx &amp;#34;the parent&amp;#34; and the attached&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; fee-bumping tx &amp;#34;the child.&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - This child must be V3.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - This child must be at most 1000vB. Note this restricts the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;   number of inputs you can use to fund the fee bump. Depending&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; on the output types, this is around 6-15.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - One child may fund fees for multiple commitment tx (&amp;#34;batched&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;   fee-bumping&amp;#34;).&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; - To do a second fee-bump to add more fees, replace the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;   *child* with a higher-feerate tx. Do not try to attach a grandchild.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Otherwise, never try to spend from an unconfirmed V3 transaction. The&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; descendant limits for V3 transactions are very restrictive.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; **Expected Questions:**&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;#34;Does this fix Rule 3 Pinning?&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Yes. The V3 descendant limit restricts both you and your counterparty.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Assuming nodes adopted this policy, you may reasonably assume that you&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; only need to replace the commitment transaction &#43; up to 1000vB.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;#34;Only 1 anchor output? What if I need to bump counterparty&amp;#39;s&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; commitment tx in mempool?&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; You won&amp;#39;t need to fee-bump a counterparty&amp;#39;s commitment tx using CPFP.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; You would just package RBF it by attaching a high-feerate child to&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; your commitment tx.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;#34;Is this a privacy issue, i.e. doesn&amp;#39;t it allow fingerprinting LN&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions based on nVersion?&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Indeed it may be unrealistic to assume V3 transactions will be in&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; widespread use outside of L2. IIUC, unilateral closes are already&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; obvious LN transactions because of the HTLC inputs. For e.g.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; cooperative closes and opens, I think it makes sense to continue using&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; V2. So, unless I&amp;#39;m missing something, this shouldn&amp;#39;t make it worse.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;#34;So a V3 transaction that doesn&amp;#39;t signal BIP125 replaceability is&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; replaceable? Is that a backward compatibility issue?&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Yes it&amp;#39;s replaceable. It&amp;#39;s not an issue AFAICT because,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; under previous policy, the V3 transaction wouldn&amp;#39;t have been&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; in the mempool in the first place.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;#34;Can a V2 transaction replace a V3 transaction and vice versa?&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Yes, otherwise someone can use V3 transactions to censor V2&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; transactions spending shared inputs. Note if the&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; original V3 transaction has an unconfirmed V3 parent, this would&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; violate the &amp;#34;inherited V3&amp;#34; rule and would be rejected.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks for reading! Feedback and review would be much appreciated.&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [1]:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-September/019464.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-September/019464.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [2]:&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019817.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019817.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Gloria&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220929/dba37dc7/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220929/dba37dc7/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T01:13:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyr6uky8fjrlka7efq48wk4ref98l9celpa99z74p9esnveu5mczczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukmteaqv</id>
    
      <title type="html">📅 Original date posted:2021-09-20 📝 Original message:Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyr6uky8fjrlka7efq48wk4ref98l9celpa99z74p9esnveu5mczczyrex26dpp7pldy6hj7ut2w58ja8aesw7d27nrca35wsehkhdsqcukmteaqv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsf50z7hc0x2krs4y7u6mavdfw2md3qnv2nr9867ptf92ev4ejlw5qtq743p&#39;&gt;nevent1q…743p&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-09-20&lt;br/&gt;📝 Original message:Hi Gloria,&lt;br/&gt;&lt;br/&gt;Thanks for this detailed post!&lt;br/&gt;&lt;br/&gt;The illustrations you provided are very useful for this kind of graph&lt;br/&gt;topology problems.&lt;br/&gt;&lt;br/&gt;The rules you lay out for package RBF look good to me at first glance&lt;br/&gt;as there are some subtle improvements compared to BIP 125.&lt;br/&gt;&lt;br/&gt;&amp;gt; 1. A package cannot exceed `MAX_PACKAGE_COUNT=25` count and&lt;br/&gt;&amp;gt; `MAX_PACKAGE_SIZE=101KvB` total size [8]&lt;br/&gt;&lt;br/&gt;I have a question regarding this rule, as your example 2C could be&lt;br/&gt;concerning for LN (unless I didn&amp;#39;t understand it correctly).&lt;br/&gt;&lt;br/&gt;This also touches on the package RBF rule 5 (&amp;#34;The package cannot&lt;br/&gt;replace more than 100 mempool transactions.&amp;#34;)&lt;br/&gt;&lt;br/&gt;In your example we have a parent transaction A already in the mempool&lt;br/&gt;and an unrelated child B. We submit a package C &#43; D where C spends&lt;br/&gt;another of A&amp;#39;s inputs. You&amp;#39;re highlighting that this package may be&lt;br/&gt;rejected because of the unrelated transaction(s) B.&lt;br/&gt;&lt;br/&gt;The way I see this, an attacker can abuse this rule to ensure&lt;br/&gt;transaction A stays pinned in the mempool without confirming by&lt;br/&gt;broadcasting a set of child transactions that reach these limits&lt;br/&gt;and pay low fees (where A would be a commit tx in LN).&lt;br/&gt;&lt;br/&gt;We had to create the CPFP carve-out rule explicitly to work around&lt;br/&gt;this limitation, and I think it would be necessary for package RBF&lt;br/&gt;as well, because in such cases we do want to be able to submit a&lt;br/&gt;package A &#43; C where C pays high fees to speed up A&amp;#39;s confirmation,&lt;br/&gt;regardless of unrelated unconfirmed children of A...&lt;br/&gt;&lt;br/&gt;We could submit only C to benefit from the existing CPFP carve-out&lt;br/&gt;rule, but that wouldn&amp;#39;t work if our local mempool doesn&amp;#39;t have A yet,&lt;br/&gt;but other remote mempools do.&lt;br/&gt;&lt;br/&gt;Is my concern justified? Is this something that we should dig into a&lt;br/&gt;bit deeper?&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Bastien&lt;br/&gt;&lt;br/&gt;Le jeu. 16 sept. 2021 à 09:55, Gloria Zhao via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi there,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m writing to propose a set of mempool policy changes to enable package&lt;br/&gt;&amp;gt; validation (in preparation for package relay) in Bitcoin Core. These would&lt;br/&gt;&amp;gt; not&lt;br/&gt;&amp;gt; be consensus or P2P protocol changes. However, since mempool policy&lt;br/&gt;&amp;gt; significantly affects transaction propagation, I believe this is relevant&lt;br/&gt;&amp;gt; for&lt;br/&gt;&amp;gt; the mailing list.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; My proposal enables packages consisting of multiple parents and 1 child.&lt;br/&gt;&amp;gt; If you&lt;br/&gt;&amp;gt; develop software that relies on specific transaction relay assumptions&lt;br/&gt;&amp;gt; and/or&lt;br/&gt;&amp;gt; are interested in using package relay in the future, I&amp;#39;m very interested&lt;br/&gt;&amp;gt; to hear&lt;br/&gt;&amp;gt; your feedback on the utility or restrictiveness of these package policies&lt;br/&gt;&amp;gt; for&lt;br/&gt;&amp;gt; your use cases.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A draft implementation of this proposal can be found in [Bitcoin Core&lt;br/&gt;&amp;gt; PR#22290][1].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; An illustrated version of this post can be found at&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://gist.github.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a&#34;&gt;https://gist.github.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a&lt;/a&gt;.&lt;br/&gt;&amp;gt; I have also linked the images below.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Background&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Feel free to skip this section if you are already familiar with mempool&lt;br/&gt;&amp;gt; policy&lt;br/&gt;&amp;gt; and package relay terminology.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Terminology Clarifications&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Package = an ordered list of related transactions, representable by a&lt;br/&gt;&amp;gt; Directed&lt;br/&gt;&amp;gt;   Acyclic Graph.&lt;br/&gt;&amp;gt; * Package Feerate = the total modified fees divided by the total virtual&lt;br/&gt;&amp;gt; size of&lt;br/&gt;&amp;gt;   all transactions in the package.&lt;br/&gt;&amp;gt;     - Modified fees = a transaction&amp;#39;s base fees &#43; fee delta applied by the&lt;br/&gt;&amp;gt; user&lt;br/&gt;&amp;gt;       with `prioritisetransaction`. As such, we expect this to vary across&lt;br/&gt;&amp;gt; mempools.&lt;br/&gt;&amp;gt;     - Virtual Size = the maximum of virtual sizes calculated using [BIP141&lt;br/&gt;&amp;gt;       virtual size][2] and sigop weight. [Implemented here in Bitcoin&lt;br/&gt;&amp;gt; Core][3].&lt;br/&gt;&amp;gt;     - Note that feerate is not necessarily based on the base fees and&lt;br/&gt;&amp;gt; serialized&lt;br/&gt;&amp;gt;       size.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Fee-Bumping = user/wallet actions that take advantage of miner&lt;br/&gt;&amp;gt; incentives to&lt;br/&gt;&amp;gt;   boost a transaction&amp;#39;s candidacy for inclusion in a block, including&lt;br/&gt;&amp;gt; Child Pays&lt;br/&gt;&amp;gt; for Parent (CPFP) and [BIP125][12] Replace-by-Fee (RBF). Our intention in&lt;br/&gt;&amp;gt; mempool policy is to recognize when the new transaction is more economical&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; mine than the original one(s) but not open DoS vectors, so there are some&lt;br/&gt;&amp;gt; limitations.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Policy&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The purpose of the mempool is to store the best (to be most&lt;br/&gt;&amp;gt; incentive-compatible&lt;br/&gt;&amp;gt; with miners, highest feerate) candidates for inclusion in a block. Miners&lt;br/&gt;&amp;gt; use&lt;br/&gt;&amp;gt; the mempool to build block templates. The mempool is also useful as a&lt;br/&gt;&amp;gt; cache for&lt;br/&gt;&amp;gt; boosting block relay and validation performance, aiding transaction relay,&lt;br/&gt;&amp;gt; and&lt;br/&gt;&amp;gt; generating feerate estimations.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Ideally, all consensus-valid transactions paying reasonable fees should&lt;br/&gt;&amp;gt; make it&lt;br/&gt;&amp;gt; to miners through normal transaction relay, without any special&lt;br/&gt;&amp;gt; connectivity or&lt;br/&gt;&amp;gt; relationships with miners. On the other hand, nodes do not have unlimited&lt;br/&gt;&amp;gt; resources, and a P2P network designed to let any honest node broadcast&lt;br/&gt;&amp;gt; their&lt;br/&gt;&amp;gt; transactions also exposes the transaction validation engine to DoS attacks&lt;br/&gt;&amp;gt; from&lt;br/&gt;&amp;gt; malicious peers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As such, for unconfirmed transactions we are considering for our mempool,&lt;br/&gt;&amp;gt; we&lt;br/&gt;&amp;gt; apply a set of validation rules in addition to consensus, primarily to&lt;br/&gt;&amp;gt; protect&lt;br/&gt;&amp;gt; us from resource exhaustion and aid our efforts to keep the highest fee&lt;br/&gt;&amp;gt; transactions. We call this mempool _policy_: a set of (configurable,&lt;br/&gt;&amp;gt; node-specific) rules that transactions must abide by in order to be&lt;br/&gt;&amp;gt; accepted&lt;br/&gt;&amp;gt; into our mempool. Transaction &amp;#34;Standardness&amp;#34; rules and mempool&lt;br/&gt;&amp;gt; restrictions such&lt;br/&gt;&amp;gt; as &amp;#34;too-long-mempool-chain&amp;#34; are both examples of policy.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Package Relay and Package Mempool Accept&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In transaction relay, we currently consider transactions one at a time for&lt;br/&gt;&amp;gt; submission to the mempool. This creates a limitation in the node&amp;#39;s ability&lt;br/&gt;&amp;gt; to&lt;br/&gt;&amp;gt; determine which transactions have the highest feerates, since we cannot&lt;br/&gt;&amp;gt; take&lt;br/&gt;&amp;gt; into account descendants (i.e. cannot use CPFP) until all the transactions&lt;br/&gt;&amp;gt; are&lt;br/&gt;&amp;gt; in the mempool. Similarly, we cannot use a transaction&amp;#39;s descendants when&lt;br/&gt;&amp;gt; considering it for RBF. When an individual transaction does not meet the&lt;br/&gt;&amp;gt; mempool&lt;br/&gt;&amp;gt; minimum feerate and the user isn&amp;#39;t able to create a replacement transaction&lt;br/&gt;&amp;gt; directly, it will not be accepted by mempools.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This limitation presents a security issue for applications and users&lt;br/&gt;&amp;gt; relying on&lt;br/&gt;&amp;gt; time-sensitive transactions. For example, Lightning and other protocols&lt;br/&gt;&amp;gt; create&lt;br/&gt;&amp;gt; UTXOs with multiple spending paths, where one counterparty&amp;#39;s spending path&lt;br/&gt;&amp;gt; opens&lt;br/&gt;&amp;gt; up after a timelock, and users are protected from cheating scenarios as&lt;br/&gt;&amp;gt; long as&lt;br/&gt;&amp;gt; they redeem on-chain in time. A key security assumption is that all&lt;br/&gt;&amp;gt; parties&amp;#39;&lt;br/&gt;&amp;gt; transactions will propagate and confirm in a timely manner. This&lt;br/&gt;&amp;gt; assumption can&lt;br/&gt;&amp;gt; be broken if fee-bumping does not work as intended.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The end goal for Package Relay is to consider multiple transactions at the&lt;br/&gt;&amp;gt; same&lt;br/&gt;&amp;gt; time, e.g. a transaction with its high-fee child. This may help us better&lt;br/&gt;&amp;gt; determine whether transactions should be accepted to our mempool,&lt;br/&gt;&amp;gt; especially if&lt;br/&gt;&amp;gt; they don&amp;#39;t meet fee requirements individually or are better RBF candidates&lt;br/&gt;&amp;gt; as a&lt;br/&gt;&amp;gt; package. A combination of changes to mempool validation logic, policy, and&lt;br/&gt;&amp;gt; transaction relay allows us to better propagate the transactions with the&lt;br/&gt;&amp;gt; highest package feerates to miners, and makes fee-bumping tools more&lt;br/&gt;&amp;gt; powerful&lt;br/&gt;&amp;gt; for users.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The &amp;#34;relay&amp;#34; part of Package Relay suggests P2P messaging changes, but a&lt;br/&gt;&amp;gt; large&lt;br/&gt;&amp;gt; part of the changes are in the mempool&amp;#39;s package validation logic. We call&lt;br/&gt;&amp;gt; this&lt;br/&gt;&amp;gt; *Package Mempool Accept*.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Previous Work&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Given that mempool validation is DoS-sensitive and complex, it would be&lt;br/&gt;&amp;gt;   dangerous to haphazardly tack on package validation logic. Many efforts&lt;br/&gt;&amp;gt; have&lt;br/&gt;&amp;gt; been made to make mempool validation less opaque (see [#16400][4],&lt;br/&gt;&amp;gt; [#21062][5],&lt;br/&gt;&amp;gt; [#22675][6], [#22796][7]).&lt;br/&gt;&amp;gt; * [#20833][8] Added basic capabilities for package validation, test&lt;br/&gt;&amp;gt; accepts only&lt;br/&gt;&amp;gt;   (no submission to mempool).&lt;br/&gt;&amp;gt; * [#21800][9] Implemented package ancestor/descendant limit checks for&lt;br/&gt;&amp;gt; arbitrary&lt;br/&gt;&amp;gt;   packages. Still test accepts only.&lt;br/&gt;&amp;gt; * Previous package relay proposals (see [#16401][10], [#19621][11]).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Existing Package Rules&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; These are in master as introduced in [#20833][8] and [#21800][9]. I&amp;#39;ll&lt;br/&gt;&amp;gt; consider&lt;br/&gt;&amp;gt; them as &amp;#34;given&amp;#34; in the rest of this document, though they can be changed,&lt;br/&gt;&amp;gt; since&lt;br/&gt;&amp;gt; package validation is test-accept only right now.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. A package cannot exceed `MAX_PACKAGE_COUNT=25` count and&lt;br/&gt;&amp;gt; `MAX_PACKAGE_SIZE=101KvB` total size [8]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    *Rationale*: This is already enforced as mempool ancestor/descendant&lt;br/&gt;&amp;gt; limits.&lt;br/&gt;&amp;gt; Presumably, transactions in a package are all related, so exceeding this&lt;br/&gt;&amp;gt; limit&lt;br/&gt;&amp;gt; would mean that the package can either be split up or it wouldn&amp;#39;t pass this&lt;br/&gt;&amp;gt; mempool policy.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2. Packages must be topologically sorted: if any dependencies exist between&lt;br/&gt;&amp;gt; transactions, parents must appear somewhere before children. [8]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 3. A package cannot have conflicting transactions, i.e. none of them can&lt;br/&gt;&amp;gt; spend&lt;br/&gt;&amp;gt; the same inputs. This also means there cannot be duplicate transactions.&lt;br/&gt;&amp;gt; [8]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 4. When packages are evaluated against ancestor/descendant limits in a test&lt;br/&gt;&amp;gt; accept, the union of all of their descendants and ancestors is considered.&lt;br/&gt;&amp;gt; This&lt;br/&gt;&amp;gt; is essentially a &amp;#34;worst case&amp;#34; heuristic where every transaction in the&lt;br/&gt;&amp;gt; package&lt;br/&gt;&amp;gt; is treated as each other&amp;#39;s ancestor and descendant. [8]&lt;br/&gt;&amp;gt; Packages for which ancestor/descendant limits are accurately captured by&lt;br/&gt;&amp;gt; this&lt;br/&gt;&amp;gt; heuristic: [19]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are also limitations such as the fact that CPFP carve out is not&lt;br/&gt;&amp;gt; applied&lt;br/&gt;&amp;gt; to package transactions. #20833 also disables RBF in package validation;&lt;br/&gt;&amp;gt; this&lt;br/&gt;&amp;gt; proposal overrides that to allow packages to use RBF.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ## Proposed Changes&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The next step in the Package Mempool Accept project is to implement&lt;br/&gt;&amp;gt; submission&lt;br/&gt;&amp;gt; to mempool, initially through RPC only. This allows us to test the&lt;br/&gt;&amp;gt; submission&lt;br/&gt;&amp;gt; logic before exposing it on P2P.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Summary&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Packages may contain already-in-mempool transactions.&lt;br/&gt;&amp;gt; - Packages are 2 generations, Multi-Parent-1-Child.&lt;br/&gt;&amp;gt; - Fee-related checks use the package feerate. This means that wallets can&lt;br/&gt;&amp;gt; create a package that utilizes CPFP.&lt;br/&gt;&amp;gt; - Parents are allowed to RBF mempool transactions with a set of rules&lt;br/&gt;&amp;gt; similar&lt;br/&gt;&amp;gt;   to BIP125. This enables a combination of CPFP and RBF, where a&lt;br/&gt;&amp;gt; transaction&amp;#39;s descendant fees pay for replacing mempool conflicts.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There is a draft implementation in [#22290][1]. It is WIP, but feedback is&lt;br/&gt;&amp;gt; always welcome.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Details&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; #### Packages May Contain Already-in-Mempool Transactions&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A package may contain transactions that are already in the mempool. We&lt;br/&gt;&amp;gt; remove&lt;br/&gt;&amp;gt; (&amp;#34;deduplicate&amp;#34;) those transactions from the package for the purposes of&lt;br/&gt;&amp;gt; package&lt;br/&gt;&amp;gt; mempool acceptance. If a package is empty after deduplication, we do&lt;br/&gt;&amp;gt; nothing.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *Rationale*: Mempools vary across the network. It&amp;#39;s possible for a parent&lt;br/&gt;&amp;gt; to be&lt;br/&gt;&amp;gt; accepted to the mempool of a peer on its own due to differences in policy&lt;br/&gt;&amp;gt; and&lt;br/&gt;&amp;gt; fee market fluctuations. We should not reject or penalize the entire&lt;br/&gt;&amp;gt; package for&lt;br/&gt;&amp;gt; an individual transaction as that could be a censorship vector.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; #### Packages Are Multi-Parent-1-Child&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Only packages of a specific topology are permitted. Namely, a package is&lt;br/&gt;&amp;gt; exactly&lt;br/&gt;&amp;gt; 1 child with all of its unconfirmed parents. After deduplication, the&lt;br/&gt;&amp;gt; package&lt;br/&gt;&amp;gt; may be exactly the same, empty, 1 child, 1 child with just some of its&lt;br/&gt;&amp;gt; unconfirmed parents, etc. Note that it&amp;#39;s possible for the parents to be&lt;br/&gt;&amp;gt; indirect&lt;br/&gt;&amp;gt; descendants/ancestors of one another, or for parent and child to share a&lt;br/&gt;&amp;gt; parent,&lt;br/&gt;&amp;gt; so we cannot make any other topology assumptions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *Rationale*: This allows for fee-bumping by CPFP. Allowing multiple parents&lt;br/&gt;&amp;gt; makes it possible to fee-bump a batch of transactions. Restricting&lt;br/&gt;&amp;gt; packages to a&lt;br/&gt;&amp;gt; defined topology is also easier to reason about and simplifies the&lt;br/&gt;&amp;gt; validation&lt;br/&gt;&amp;gt; logic greatly. Multi-parent-1-child allows us to think of the package as&lt;br/&gt;&amp;gt; one big&lt;br/&gt;&amp;gt; transaction, where:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Inputs = all the inputs of parents &#43; inputs of the child that come from&lt;br/&gt;&amp;gt;   confirmed UTXOs&lt;br/&gt;&amp;gt; - Outputs = all the outputs of the child &#43; all outputs of the parents that&lt;br/&gt;&amp;gt;   aren&amp;#39;t spent by other transactions in the package&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Examples of packages that follow this rule (variations of example A show&lt;br/&gt;&amp;gt; some&lt;br/&gt;&amp;gt; possibilities after deduplication): ![image][15]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; #### Fee-Related Checks Use Package Feerate&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Package Feerate = the total modified fees divided by the total virtual&lt;br/&gt;&amp;gt; size of&lt;br/&gt;&amp;gt; all transactions in the package.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To meet the two feerate requirements of a mempool, i.e., the pre-configured&lt;br/&gt;&amp;gt; minimum relay feerate (`minRelayTxFee`) and dynamic mempool minimum&lt;br/&gt;&amp;gt; feerate, the&lt;br/&gt;&amp;gt; total package feerate is used instead of the individual feerate. The&lt;br/&gt;&amp;gt; individual&lt;br/&gt;&amp;gt; transactions are allowed to be below feerate requirements if the package&lt;br/&gt;&amp;gt; meets&lt;br/&gt;&amp;gt; the feerate requirements. For example, the parent(s) in the package can&lt;br/&gt;&amp;gt; have 0&lt;br/&gt;&amp;gt; fees but be paid for by the child.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *Rationale*: This can be thought of as &amp;#34;CPFP within a package,&amp;#34; solving the&lt;br/&gt;&amp;gt; issue of a parent not meeting minimum fees on its own. This allows L2&lt;br/&gt;&amp;gt; applications to adjust their fees at broadcast time instead of&lt;br/&gt;&amp;gt; overshooting or&lt;br/&gt;&amp;gt; risking getting stuck/pinned.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We use the package feerate of the package *after deduplication*.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *Rationale*:  It would be incorrect to use the fees of transactions that&lt;br/&gt;&amp;gt; are&lt;br/&gt;&amp;gt; already in the mempool, as we do not want a transaction&amp;#39;s fees to be&lt;br/&gt;&amp;gt; double-counted for both its individual RBF and package RBF.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Examples F and G [14] show the same package, but P1 is submitted&lt;br/&gt;&amp;gt; individually before&lt;br/&gt;&amp;gt; the package in example G. In example F, we can see that the 300vB package&lt;br/&gt;&amp;gt; pays&lt;br/&gt;&amp;gt; an additional 200sat in fees, which is not enough to pay for its own&lt;br/&gt;&amp;gt; bandwidth&lt;br/&gt;&amp;gt; (BIP125#4). In example G, we can see that P1 pays enough to replace M1, but&lt;br/&gt;&amp;gt; using P1&amp;#39;s fees again during package submission would make it look like a&lt;br/&gt;&amp;gt; 300sat&lt;br/&gt;&amp;gt; increase for a 200vB package. Even including its fees and size would not be&lt;br/&gt;&amp;gt; sufficient in this example, since the 300sat looks like enough for the&lt;br/&gt;&amp;gt; 300vB&lt;br/&gt;&amp;gt; package. The calculcation after deduplication is 100sat increase for a&lt;br/&gt;&amp;gt; package&lt;br/&gt;&amp;gt; of size 200vB, which correctly fails BIP125#4. Assume all transactions&lt;br/&gt;&amp;gt; have a&lt;br/&gt;&amp;gt; size of 100vB.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; #### Package RBF&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If a package meets feerate requirements as a package, the parents in the&lt;br/&gt;&amp;gt; transaction are allowed to replace-by-fee mempool transactions. The child&lt;br/&gt;&amp;gt; cannot&lt;br/&gt;&amp;gt; replace mempool transactions. Multiple transactions can replace the same&lt;br/&gt;&amp;gt; transaction, but in order to be valid, none of the transactions can try to&lt;br/&gt;&amp;gt; replace an ancestor of another transaction in the same package (which&lt;br/&gt;&amp;gt; would thus&lt;br/&gt;&amp;gt; make its inputs unavailable).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *Rationale*: Even if we are using package feerate, a package will not&lt;br/&gt;&amp;gt; propagate&lt;br/&gt;&amp;gt; as intended if RBF still requires each individual transaction to meet the&lt;br/&gt;&amp;gt; feerate requirements.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We use a set of rules slightly modified from BIP125 as follows:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ##### Signaling (Rule #1)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; All mempool transactions to be replaced must signal replaceability.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *Rationale*: Package RBF signaling logic should be the same for package&lt;br/&gt;&amp;gt; RBF and&lt;br/&gt;&amp;gt; single transaction acceptance. This would be updated if single transaction&lt;br/&gt;&amp;gt; validation moves to full RBF.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ##### New Unconfirmed Inputs (Rule #2)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A package may include new unconfirmed inputs, but the ancestor feerate of&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; child must be at least as high as the ancestor feerates of every&lt;br/&gt;&amp;gt; transaction&lt;br/&gt;&amp;gt; being replaced. This is contrary to BIP125#2, which states &amp;#34;The replacement&lt;br/&gt;&amp;gt; transaction may only include an unconfirmed input if that input was&lt;br/&gt;&amp;gt; included in&lt;br/&gt;&amp;gt; one of the original transactions. (An unconfirmed input spends an output&lt;br/&gt;&amp;gt; from a&lt;br/&gt;&amp;gt; currently-unconfirmed transaction.)&amp;#34;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; *Rationale*: The purpose of BIP125#2 is to ensure that the replacement&lt;br/&gt;&amp;gt; transaction has a higher ancestor score than the original transaction(s)&lt;br/&gt;&amp;gt; (see&lt;br/&gt;&amp;gt; [comment][13]). Example H [16] shows how adding a new unconfirmed input&lt;br/&gt;&amp;gt; can lower the&lt;br/&gt;&amp;gt; ancestor score of the replacement transaction. P1 is trying to replace M1,&lt;br/&gt;&amp;gt; and&lt;br/&gt;&amp;gt; spends an unconfirmed output of M2. P1 pays 800sat, M1 pays 600sat, and M2&lt;br/&gt;&amp;gt; pays&lt;br/&gt;&amp;gt; 100sat. Assume all transactions have a size of 100vB. While, in isolation,&lt;br/&gt;&amp;gt; P1&lt;br/&gt;&amp;gt; looks like a better mining candidate than M1, it must be mined with M2, so&lt;br/&gt;&amp;gt; its&lt;br/&gt;&amp;gt; ancestor feerate is actually 4.5sat/vB.  This is lower than M1&amp;#39;s ancestor&lt;br/&gt;&amp;gt; feerate, which is 6sat/vB.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In package RBF, the rule analogous to BIP125#2 would be &amp;#34;none of the&lt;br/&gt;&amp;gt; transactions in the package can spend new unconfirmed inputs.&amp;#34; Example J&lt;br/&gt;&amp;gt; [17] shows&lt;br/&gt;&amp;gt; why, if any of the package transactions have ancestors, package feerate is&lt;br/&gt;&amp;gt; no&lt;br/&gt;&amp;gt; longer accurate. Even though M2 and M3 are not ancestors of P1 (which is&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; replacement transaction in an RBF), we&amp;#39;re actually interested in the entire&lt;br/&gt;&amp;gt; package. A miner should mine M1 which is 5sat/vB instead of M2, M3, P1,&lt;br/&gt;&amp;gt; P2, and&lt;br/&gt;&amp;gt; P3, which is only 4sat/vB. The Package RBF rule cannot be loosened to only&lt;br/&gt;&amp;gt; allow&lt;br/&gt;&amp;gt; the child to have new unconfirmed inputs, either, because it can still&lt;br/&gt;&amp;gt; cause us&lt;br/&gt;&amp;gt; to overestimate the package&amp;#39;s ancestor score.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, enforcing a rule analogous to BIP125#2 would not only make&lt;br/&gt;&amp;gt; Package RBF&lt;br/&gt;&amp;gt; less useful, but would also break Package RBF for packages with parents&lt;br/&gt;&amp;gt; already&lt;br/&gt;&amp;gt; in the mempool: if a package parent has already been submitted, it would&lt;br/&gt;&amp;gt; look&lt;br/&gt;&amp;gt; like the child is spending a &amp;#34;new&amp;#34; unconfirmed input. In example K [18],&lt;br/&gt;&amp;gt; we&amp;#39;re&lt;br/&gt;&amp;gt; looking to replace M1 with the entire package including P1, P2, and P3. We&lt;br/&gt;&amp;gt; must&lt;br/&gt;&amp;gt; consider the case where one of the parents is already in the mempool (in&lt;br/&gt;&amp;gt; this&lt;br/&gt;&amp;gt; case, P2), which means we must allow P3 to have new unconfirmed inputs.&lt;br/&gt;&amp;gt; However,&lt;br/&gt;&amp;gt; M2 lowers the ancestor score of P3 to 4.3sat/vB, so we should not replace&lt;br/&gt;&amp;gt; M1&lt;br/&gt;&amp;gt; with this package.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, the package RBF rule regarding new unconfirmed inputs is less strict&lt;br/&gt;&amp;gt; than&lt;br/&gt;&amp;gt; BIP125#2. However, we still achieve the same goal of requiring the&lt;br/&gt;&amp;gt; replacement&lt;br/&gt;&amp;gt; transactions to have a ancestor score at least as high as the original&lt;br/&gt;&amp;gt; ones. As&lt;br/&gt;&amp;gt; a result, the entire package is required to be a higher feerate mining&lt;br/&gt;&amp;gt; candidate&lt;br/&gt;&amp;gt; than each of the replaced transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Another note: the [comment][13] above the BIP125#2 code in the original RBF&lt;br/&gt;&amp;gt; implementation suggests that the rule was intended to be temporary.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ##### Absolute Fee (Rule #3)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The package must increase the absolute fee of the mempool, i.e. the total&lt;br/&gt;&amp;gt; fees&lt;br/&gt;&amp;gt; of the package must be higher than the absolute fees of the mempool&lt;br/&gt;&amp;gt; transactions&lt;br/&gt;&amp;gt; it replaces. Combined with the CPFP rule above, this differs from BIP125&lt;br/&gt;&amp;gt; Rule #3&lt;br/&gt;&amp;gt; - an individual transaction in the package may have lower fees than the&lt;br/&gt;&amp;gt;   transaction(s) it is replacing. In fact, it may have 0 fees, and the&lt;br/&gt;&amp;gt; child&lt;br/&gt;&amp;gt; pays for RBF.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ##### Feerate (Rule #4)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The package must pay for its own bandwidth; the package feerate must be&lt;br/&gt;&amp;gt; higher&lt;br/&gt;&amp;gt; than the replaced transactions by at least minimum relay feerate&lt;br/&gt;&amp;gt; (`incrementalRelayFee`). Combined with the CPFP rule above, this differs&lt;br/&gt;&amp;gt; from&lt;br/&gt;&amp;gt; BIP125 Rule #4 - an individual transaction in the package can have a lower&lt;br/&gt;&amp;gt; feerate than the transaction(s) it is replacing. In fact, it may have 0&lt;br/&gt;&amp;gt; fees,&lt;br/&gt;&amp;gt; and the child pays for RBF.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ##### Total Number of Replaced Transactions (Rule #5)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The package cannot replace more than 100 mempool transactions. This is&lt;br/&gt;&amp;gt; identical&lt;br/&gt;&amp;gt; to BIP125 Rule #5.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ### Expected FAQs&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. Is it possible for only some of the package to make it into the mempool?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    Yes, it is. However, since we evict transactions from the mempool by&lt;br/&gt;&amp;gt; descendant score and the package child is supposed to be sponsoring the&lt;br/&gt;&amp;gt; fees of&lt;br/&gt;&amp;gt; its parents, the most common scenario would be all-or-nothing. This is&lt;br/&gt;&amp;gt; incentive-compatible. In fact, to be conservative, package validation&lt;br/&gt;&amp;gt; should&lt;br/&gt;&amp;gt; begin by trying to submit all of the transactions individually, and only&lt;br/&gt;&amp;gt; use the&lt;br/&gt;&amp;gt; package mempool acceptance logic if the parents fail due to low feerate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 2. Should we allow packages to contain already-confirmed transactions?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     No, for practical reasons. In mempool validation, we actually aren&amp;#39;t&lt;br/&gt;&amp;gt; able to&lt;br/&gt;&amp;gt; tell with 100% confidence if we are looking at a transaction that has&lt;br/&gt;&amp;gt; already&lt;br/&gt;&amp;gt; confirmed, because we look up inputs using a UTXO set. If we have&lt;br/&gt;&amp;gt; historical&lt;br/&gt;&amp;gt; block data, it&amp;#39;s possible to look for it, but this is inefficient, not&lt;br/&gt;&amp;gt; always&lt;br/&gt;&amp;gt; possible for pruning nodes, and unnecessary because we&amp;#39;re not going to do&lt;br/&gt;&amp;gt; anything with the transaction anyway. As such, we already have the&lt;br/&gt;&amp;gt; expectation&lt;br/&gt;&amp;gt; that transaction relay is somewhat &amp;#34;stateful&amp;#34; i.e. nobody should be&lt;br/&gt;&amp;gt; relaying&lt;br/&gt;&amp;gt; transactions that have already been confirmed. Similarly, we shouldn&amp;#39;t be&lt;br/&gt;&amp;gt; relaying packages that contain already-confirmed transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/22290&#34;&gt;https://github.com/bitcoin/bitcoin/pull/22290&lt;/a&gt;&lt;br/&gt;&amp;gt; [2]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bips/blob/1f0b563738199ca60d32b4ba779797fc97d040fe/bip-0141.mediawiki#transaction-size-calculations&#34;&gt;https://github.com/bitcoin/bips/blob/1f0b563738199ca60d32b4ba779797fc97d040fe/bip-0141.mediawiki#transaction-size-calculations&lt;/a&gt;&lt;br/&gt;&amp;gt; [3]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/94f83534e4b771944af7d9ed0f40746f392eb75e/src/policy/policy.cpp#L282&#34;&gt;https://github.com/bitcoin/bitcoin/blob/94f83534e4b771944af7d9ed0f40746f392eb75e/src/policy/policy.cpp#L282&lt;/a&gt;&lt;br/&gt;&amp;gt; [4]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/16400&#34;&gt;https://github.com/bitcoin/bitcoin/pull/16400&lt;/a&gt;&lt;br/&gt;&amp;gt; [5]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/21062&#34;&gt;https://github.com/bitcoin/bitcoin/pull/21062&lt;/a&gt;&lt;br/&gt;&amp;gt; [6]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/22675&#34;&gt;https://github.com/bitcoin/bitcoin/pull/22675&lt;/a&gt;&lt;br/&gt;&amp;gt; [7]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/22796&#34;&gt;https://github.com/bitcoin/bitcoin/pull/22796&lt;/a&gt;&lt;br/&gt;&amp;gt; [8]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/20833&#34;&gt;https://github.com/bitcoin/bitcoin/pull/20833&lt;/a&gt;&lt;br/&gt;&amp;gt; [9]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/21800&#34;&gt;https://github.com/bitcoin/bitcoin/pull/21800&lt;/a&gt;&lt;br/&gt;&amp;gt; [10]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/16401&#34;&gt;https://github.com/bitcoin/bitcoin/pull/16401&lt;/a&gt;&lt;br/&gt;&amp;gt; [11]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/19621&#34;&gt;https://github.com/bitcoin/bitcoin/pull/19621&lt;/a&gt;&lt;br/&gt;&amp;gt; [12]: &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki&lt;/a&gt;&lt;br/&gt;&amp;gt; [13]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/6871/files#diff-34d21af3c614ea3cee120df276c9c4ae95053830d7f1d3deaf009a4625409ad2R1101-R1104&#34;&gt;https://github.com/bitcoin/bitcoin/pull/6871/files#diff-34d21af3c614ea3cee120df276c9c4ae95053830d7f1d3deaf009a4625409ad2R1101-R1104&lt;/a&gt;&lt;br/&gt;&amp;gt; [14]:&lt;br/&gt;&amp;gt;  &lt;img src=&#34;https://user-images.githubusercontent.com/25183001/133567078-075a971c-0619-4339-9168-b41fd2b90c28.png&#34;&gt; &lt;br/&gt;&amp;gt; [15]:&lt;br/&gt;&amp;gt;  &lt;img src=&#34;https://user-images.githubusercontent.com/25183001/132856734-fc17da75-f875-44bb-b954-cb7a1725cc0d.png&#34;&gt; &lt;br/&gt;&amp;gt; [16]:&lt;br/&gt;&amp;gt;  &lt;img src=&#34;https://user-images.githubusercontent.com/25183001/133567347-a3e2e4a8-ae9c-49f8-abb9-81e8e0aba224.png&#34;&gt; &lt;br/&gt;&amp;gt; [17]:&lt;br/&gt;&amp;gt;  &lt;img src=&#34;https://user-images.githubusercontent.com/25183001/133567370-21566d0e-36c8-4831-b1a8-706634540af3.png&#34;&gt; &lt;br/&gt;&amp;gt; [18]:&lt;br/&gt;&amp;gt;  &lt;img src=&#34;https://user-images.githubusercontent.com/25183001/133567444-bfff1142-439f-4547-800a-2ba2b0242bcb.png&#34;&gt; &lt;br/&gt;&amp;gt; [19]:&lt;br/&gt;&amp;gt;  &lt;img src=&#34;https://user-images.githubusercontent.com/25183001/133456219-0bb447cb-dcb4-4a31-b9c1-7d86205b68bc.png&#34;&gt; &lt;br/&gt;&amp;gt; [20]:&lt;br/&gt;&amp;gt;  &lt;img src=&#34;https://user-images.githubusercontent.com/25183001/132857787-7b7c6f56-af96-44c8-8d78-983719888c19.png&#34;&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/20210920/adec3501/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20210920/adec3501/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-08T00:59:25&#43;02:00</updated>
  </entry>

</feed>