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




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

</feed>