LNRadar
April 27, 2026 ยท View on GitHub
A Core-Lightning plugin to probe the Lightning Network. Every payment probe perfomed by LNRadar contains information about the state of a subset of the lightning network, currently we are just able to deduce a lower and upper bound on liquidity on the channels probed along a choosen path. This information is gathered into an askrene layer called "lnradar" and it can be used to improve real payments reliability by using with in combination with xpay. For example:
lightning-cli -k xpay invstring=<some real payment invoice> layers='["lnradar"]'
Quickstart
The basic usage can be done through the CLI helper, for example:
$ lightning-cli -- lnradar
A CLN plugin to probe the lightning network to estimate liquidity allocation.
Usage: lightning-cli -- lnradar [COMMAND]
Commands:
testinvoice Create an invoice that can be used to make a payment probe.
testpayment Make a single payment probe attempt to a desired destination.
testpayment-loop Make several payment probes in a loop.
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
The testinvoice sub-command can be used to generate a fake invoice to perform a
payment probe. These invoices generated by lnradar can be safely paid using any
payment plugin, and no funds will be transfered with this action because there
is no known preimage to the payment hash generated. They are meant to fail at
the destination node with either unknown_next_peer or
incorrect_or_unknown_payment_details.
The testpayment sub-command can be used to make a single direct probe through
lnradar to a selected destination. lnradar uses askrene's getroutes method to
compute a path candidate. Internally lnradar will be able to gather the
liquidity information from this probe and save it into "lnradar" askrene layer.
A probe is said to be successfull if get an unknown_next_peer or
incorrect_or_unknown_payment_details at the destination node.
The testpayment-loop sub-command performs many consecutive payment probes to
the selected destination until either a probe successfully reaches the
destination or there no more available paths we could try.
Installation
lnradar is a Core-Lightning (CLN) written in Rust. In order to add this plugin
to CLN the binary lnradar must first be built in this project.
Whith Rust intalled in your environemnt
run the following:
cargo build
This command will generate the plugin at the following path ./target/debug/lnradar.
Then you may add the path to lnradar in your CLN configuration file, eg.
plugin=<your build directory>/target/debug/lnradar
Restart ligthningd and lnradar should be running.
Settings
LNRadar can be configured through lightning's configuration file. The following options are currently available:
lnradar-favorite-destination: this option accepts multiple values, with it the user can specify a list of destination that will be probed by LNRadar regularly in the background with different random amounts. For example:
# ACINQ
lnradar-favorite-destination=03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f
# Wallet of Satoshi
lnradar-favorite-destination=035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226
Acknowledgement
This plugin is based on an earlier paytest plugin by @cdecker.
Thanks to @endothermicdev for heads up and discussions.