<oembed><type>rich</type><version>1.0</version><author_name>fiatjaf [ARCHIVE] (npub1v2…pmakl)</author_name><author_url>https://nostr.ae/npub1v2xa40strmvauf2gr5gjj5c3yqlytar7p3v64nfg0ke6e0vkvvkqxpmakl</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2019-08-02&#xA;📝 Original message:&#xA;Ok, since you seem to imply each question is valuable, here&#39;s mine: how&#xA;does Alice know RT2 has a route to Bob? If she knows that, can she also&#xA;know T1 has a route to Bob? In any case, why can&#39;t she just build her small&#xA;onion with Alice -&gt; T1 -&gt; Bob? I would expect that to be the most common&#xA;case, am I right?&#xA;&#xA;On Friday, August 2, 2019, Bastien TEINTURIER &lt;bastien at acinq.fr&gt; wrote:&#xA;&#xA;&gt; Good morning list,&#xA;&gt;&#xA;&gt; I realized that trampoline routing has only been briefly described to this&#xA;&gt; list (credits to cdecker and pm47 for laying&#xA;&gt; out the foundations). I just published an updated PR [1] and want to take&#xA;&gt; this opportunity to present the high level&#xA;&gt; view here and the parts that need a concept ACK and more feedback.&#xA;&gt;&#xA;&gt; Trampoline routing is conceptually quite simple. Alice wants to send a&#xA;&gt; payment to Bob, but she doesn&#39;t know a&#xA;&gt; route to get there because Alice only keeps a small area of the routing&#xA;&gt; table locally (Alice has a crappy phone,&#xA;&gt; damn it Alice sell some satoshis and buy a real phone). However, Alice has&#xA;&gt; a few trampoline nodes in her&#xA;&gt; friends-of-friends and knows some trampoline nodes outside of her local&#xA;&gt; area (but she doesn&#39;t know how to reach&#xA;&gt; them). Alice would like to send a payment to a trampoline node she can&#xA;&gt; reach and defer calculation of the rest of&#xA;&gt; the route to that node.&#xA;&gt;&#xA;&gt; The onion routing part is very simple now that we have variable-length&#xA;&gt; onion payloads (thanks again cdecker!).&#xA;&gt; Just like russian dolls, we simply put a small onion inside a big onion.&#xA;&gt; And the HTLC management forwards very&#xA;&gt; naturally.&#xA;&gt;&#xA;&gt; It&#39;s always simpler with an example. Let&#39;s imagine that Alice can reach&#xA;&gt; three trampoline nodes: T1, T2 and T3.&#xA;&gt; She also knows the details of many remote trampoline nodes that she cannot&#xA;&gt; reach: RT1, RT2, RT3 and RT4.&#xA;&gt; Alice selects T1 and RT2 to use as trampoline hops. She builds a small&#xA;&gt; onion that describes the following route:&#xA;&gt;&#xA;&gt; *Alice -&gt; T1 -&gt; RT2 -&gt; Bob*&#xA;&gt;&#xA;&gt; She finds a route to T1 and builds a normal onion to send a payment to T1:&#xA;&gt;&#xA;&gt; *Alice -&gt; N1 -&gt; N2 -&gt; T1*&#xA;&gt;&#xA;&gt; In the payload for T1, Alice puts the small trampoline onion.&#xA;&gt; When T1 receives the payment, he is able to peel one layer of the&#xA;&gt; trampoline onion and discover that he must&#xA;&gt; forward the payment to RT2. T1 finds a route to RT2 and builds a normal&#xA;&gt; onion to send a payment to RT2:&#xA;&gt;&#xA;&gt; *T1 -&gt; N3 -&gt; RT2*&#xA;&gt;&#xA;&gt; In the payload for RT2, T1 puts the peeled small trampoline onion.&#xA;&gt; When RT2 receives the payment, he is able to peel one layer of the&#xA;&gt; trampoline onion and discover that he must&#xA;&gt; forward the payment to Bob. RT2 finds a route to Bob and builds a normal&#xA;&gt; onion to send a payment:&#xA;&gt;&#xA;&gt; *RT2 -&gt; N4 -&gt; N5 -&gt; Bob*&#xA;&gt;&#xA;&gt; In the payload for Bob, RT2 puts the peeled small trampoline onion.&#xA;&gt; When Bob receives the payment, he is able to peel the last layer of the&#xA;&gt; trampoline onion and discover that he is&#xA;&gt; the final recipient, and fulfills the payment.&#xA;&gt;&#xA;&gt; Alice has successfully sent a payment to Bob deferring route calculation&#xA;&gt; to some chosen trampoline nodes.&#xA;&gt; That part was simple and (hopefully) not controversial, but it left out&#xA;&gt; some important details:&#xA;&gt;&#xA;&gt;    1. How do trampoline nodes specify their fees and cltv requirements?&#xA;&gt;    2. How does Alice sync the fees and cltv requirements for her remote&#xA;&gt;    trampoline nodes?&#xA;&gt;&#xA;&gt; To answer 1., trampoline nodes needs to estimate a fee and cltv that&#xA;&gt; allows them to route to (almost) any other&#xA;&gt; trampoline node. This is likely going to increase the fees paid by&#xA;&gt; end-users, but they can&#39;t eat their cake and&#xA;&gt; have it too: by not syncing the whole network, users are trading fees for&#xA;&gt; ease of use and payment reliability.&#xA;&gt;&#xA;&gt; To answer 2., we can re-use the existing gossip infrastructure to exchange&#xA;&gt; a new *node_update *message that&#xA;&gt; contains the trampoline fees and cltv. However Alice doesn&#39;t want to&#xA;&gt; receive every network update because she&#xA;&gt; doesn&#39;t have the bandwidth to support it (damn it again Alice, upgrade&#xA;&gt; your mobile plan). My suggestion is to&#xA;&gt; create a filter system (similiar to BIP37) where Alice sends gossip&#xA;&gt; filters to her peers, and peers only forward to&#xA;&gt; Alice updates that match these filters. This doesn&#39;t have the issues BIP37&#xA;&gt; has for Bitcoin because it has a cost&#xA;&gt; for Alice: she has to open a channel (and thus lock funds) to get a&#xA;&gt; connection to a peer. Peers can refuse to serve&#xA;&gt; filters if they are too expensive to compute, but the filters I propose in&#xA;&gt; the PR are very cheap (a simple xor or a&#xA;&gt; node distance comparison).&#xA;&gt;&#xA;&gt; If you&#39;re interested in the technical details, head over to [1].&#xA;&gt; I would really like to get feedback from this list on the concept itself,&#xA;&gt; and especially on the gossip and fee estimation&#xA;&gt; parts. If you made it that far, I&#39;m sure you have many questions and&#xA;&gt; suggestions ;).&#xA;&gt;&#xA;&gt; Cheers,&#xA;&gt; Bastien&#xA;&gt;&#xA;&gt; [1] https://github.com/lightningnetwork/lightning-rfc/pull/654&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190802/305c6328/attachment.html&gt;</html></oembed>