core-lightning/plugins
Christian Decker 891adfca1e pay: Speed up pay and fix the shadow route construction
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 routes
2020-04-04 16:24:57 +10:30
..
.gitignore gitignore: extend with recently added build products 2020-02-21 09:44:41 +01:00
autoclean.c libplugin: generalize the plugin_timer callback type 2020-02-12 11:45:07 +10:30
bcli.c bcli: use a more urgent feerate for HTLCs and penalty transactions 2020-04-01 23:02:47 -05:00
fundchannel.c cleanup: make 'u8 *features' and 'struct feature_set *fset' more explicit. 2020-04-03 13:13:21 +10:30
libplugin.c cleanup: make 'u8 *features' and 'struct feature_set *fset' more explicit. 2020-04-03 13:13:21 +10:30
libplugin.h libplugin: demarshal and stash the feature set given by lightningd. 2020-04-03 13:13:21 +10:30
Makefile fix: adds bcli plugin to check-source targets 2020-03-04 14:04:51 +10:30
pay.c pay: Speed up pay and fix the shadow route construction 2020-04-04 16:24:57 +10:30
README.md doc: fix wording in plugins/README.md 2020-01-06 12:57:59 +01:00

Plugin Directory

Any file in this directory which is executable and whose name only consists of alphanumeric characters, space, '.', '-' or '_' will be automatically loaded when lightningd starts (unless suppressed with commandline options).