From 547a14531bb949457a9fc90b06dfcb7f225b09f6 Mon Sep 17 00:00:00 2001 From: "Andreas M. Antonopoulos" Date: Thu, 30 Jul 2020 09:28:17 -0400 Subject: [PATCH 1/2] Copy from ch03 --- path-finding.asciidoc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/path-finding.asciidoc b/path-finding.asciidoc index 16ae127..db54fcf 100644 --- a/path-finding.asciidoc +++ b/path-finding.asciidoc @@ -12,3 +12,25 @@ Relevant questions to answer: * What information can be sent to intermediate and the final node aside from the critical routing data? * What are multi-hop locks? What addition privacy and security guarantees to they offer? * How can the flexible onion space be used to enabled packet switching in the network? + + + + +==== Finding a path + +Payments on the Lightning Network are forwarded along a path of channels from one participant to another. +Thus, a path of payment channels has to be selected. +If we knew the exact channel balances of every channel we could easily compute a payment path using any of the standard path finding algorithms taught in any computer science program. +This could even be done in a way to optimize the fees that would have to be paid by the payer to the nodes that kindly forward the payment. +However, as discussed the balance information of all channels is and cannot be available to all participants of the network. +Thus, we need to have one or more innovative path finding strategy. +These strategies must relate closely to the routing algorithm that is used. +As we will see in the next section, the Lightning Network uses a source based onion routing protocol for routing payments. +This means in particular that the sender of the payment has to find a path through the network. +With only partial information about the network topology available this is a real challenge and active research is still being conducted into optimizing this part of the Lightning Network implementations. +The fact that the path finding problem is not fully solved for the case of the Lightning Network is a major point of criticism towards the technology. +The path finding strategy currently implemented in Lightning nodes is to probe paths until one is found that has enough liquidity to forward the payment. +While this is not optimal and certainly can be improved, it should be noted that even this simplistic strategy works well. +This probing is done by the Lightning node or wallet and is not directly seen by the user of the software. +The user might only realize that probing is taking place if the payment is not going through instantly. +The algorithm currently also does not necessarily result in the path with the lowest fees. From 94d7a82a3ccf34eab152cd1580525eebbdbed561 Mon Sep 17 00:00:00 2001 From: Rene Pickhardt Date: Thu, 30 Jul 2020 15:28:24 +0200 Subject: [PATCH 2/2] Update onion-routing-htlc-forwarding.asciidoc link to file name --- onion-routing-htlc-forwarding.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onion-routing-htlc-forwarding.asciidoc b/onion-routing-htlc-forwarding.asciidoc index dad95d4..2866787 100644 --- a/onion-routing-htlc-forwarding.asciidoc +++ b/onion-routing-htlc-forwarding.asciidoc @@ -43,7 +43,7 @@ In all cases, some privacy of the payer and the recipient are lost. [[malicious-routing-diagram]] .If the Malicious node knows there are 2 layers left, then it knows that the payment recipient is either Node 19 (and there were only 19 hops) or one of Node 19's channel partners -image:images/malicious-routing-diagram.png["If the Malicious node knows there are 2 layers left, then it knows that the payment recipient is either Node 19 (and there were only 19 hops) or one Node 19's channel partners"] +image:images/malicious-routing-diagram.PNG["If the Malicious node knows there are 2 layers left, then it knows that the payment recipient is either Node 19 (and there were only 19 hops) or one Node 19's channel partners"] We can extend this example. Imagine a malicious entity sets up multiple Lightning nodes connected to other well-connected nodes, and it also connects itself across popular payment routes.