Pinging a route for capacity



Summary:

When choosing a route to send funds over, it is best to determine all possible routes and rank them by estimated fees based on channel announcements and number of hops. However, doing a full HTLC commitment handshake on each hop just to find out that the last hop in the route didn't have sufficient remaining capacity is inefficient. This could lead to more payment failures because bandwidth is locked up in HTLCs that are about to fail anyway. To improve efficiency, one idea is to enable the ability to send a ping over an onion route asking if every hop has the capacity to send X msat. Every hop would forward the onion request if the answer is yes or immediately send the response back up the circuit if the answer is no. The hops could also respond with the latest fee rate in case channel updates are slow to propagate. This approach would make it quicker to send a successful payment because latency is lower than sending an actual payment, and the sender could ping all possible routes in parallel. However, the downside is that it is faster and cheaper for someone to extract information about channel capacities on the network with a binary search. Overall, this approach has the potential to improve payment success rates while maintaining privacy.


Updated on: 2023-05-24T21:22:54.886023+00:00