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