Browse Source
The shadow route algorithm is extending the route randomly using channels adjacent to the current destination, in the hope to create a plausible route extension. However, instead of only retrieving the channels adjacent to the destination it was retrieving all channels in the entire topology, and selecting a random channel from there. This resulted in a very large request for all channels being processed, and then mostly not being used, but also in shadow extensions to the path which were not plausible (they didn't extend the real path, just random edges). This is fixed by restricting the call to `listchannels` to the channels with the current destination as source. On my laptop retrieving all channels in the current mainnet takes approximately 1.2 seconds, and given the geometric series expansion of the 50% extension probability this indeed would result in an overhead of 1.2 seconds to the `pay` command. In contrast specifying a source results in an overhead of ~30ms. So good news everyone, your pay commands just shaved 1.17 seconds off their runtime. Changelog-Changed: pay: Improved the performance of the `pay`-plugin by limiting the `listchannels` when computing the shadow route. Changelog-Fixed: pay: The `pay`-plugin was generating non-contiguous shadow routestravis-debug
Christian Decker
5 years ago
committed by
Rusty Russell
1 changed files with 1 additions and 0 deletions
Loading…
Reference in new issue