Core Lightning v0.12.0: "Web-8 init"
We're pleased to announce the v0.12.0 (codename Web-8 init) release of Core Lightning. This release features a host of new plugins that add extraordinary new payment data collection and inspection capabilities and unlocks the power of runes for connecting to your CLN node remotely and securely.
The release also covers features for the growing LSP category of Lightning node operators as well as a range of bug fixes.
Let’s get into the headline features for this release: bookkeeping, commando, and emergency channel backups!
bookkeeper
- Keeping track of where your satoshis go in real time on Lightning has historically been a bit of a challenge. This version of Core Lightning ships with a plugin that will give you better than ever data about where your funds are, where they're moving, your on-chain costs, and routing income. It'll even print out CSVs that import directly to a few popular accounting software projects, such as Koinly and CoinTracker.commando
– Rusty Russell's (@rusty_twit) direct-to-node plugin has been re-written in C and now ships natively with CLN. This plugin will let you set runes to create fine-grained access controls to your node's RPC , and provides access to those same RPCs via Lightning-native network connections. Want to hear more? Scroll down to our in-depth section and check out our video of William Casarin (@jb55) walking through how to create runes and connect to a Lightning node via lnsocket.emergencyrecover
– A long-requested feature originally pioneered by the LND team under the name 'SCBs' or Static Channel Backups, v0.12.0 of CLN includes a recovery plugin that keeps track of which channels you've opened and provides an RPC for emergency recovering your funds from this channel (by asking the channel peer to close the channel).
In addition to these new plugins, we've also added zeroconf
and zeroreserve
, included some bug fixes, updated our handling of ‘internal errors’ from LND nodes and gossip that we consider spammy, and added M1 architecture support for developers!
Improved Accounting with bookkeeper
Knowing where your sats are and being able to communicate your current balances and flow of satoshis to external parties (such as your accountant) has long been a difficult task with existing Lightning node software. In this version of Core Lightning, we're proud to ship what we believe is a best-in-class data warehouse and business intelligence plugin, the bookkeeper
.
Curious about where your sats are moving? How much you're shelling out for payment processing fees when paying an invoice? Want to know what it costs to close a channel account? The bookkeeper
has you covered. With millisatoshi (1/1000th of a satoshi) resolution, the bookkeeper makes it possible to get a better understanding and snapshots of funds on your node in real-time.
Let's take a look at the new RPCs the bookkeeper
plugin unleashes for your node:
bkpr-listbalances
will list the real time balances of every 'account' (the bookkeeper's term for channels) on your node, which is useful for taking periodic snapshots of where your funds are.
bkpr-listaccountevents
is a raw data dump of every movement of every millisatoshi on your node that can additionally be filtered by account to narrow your search. This is a lot of data, and is probably best suited for power users.
Your Sats, Your Data
bkpr-listincome
whittles down the data the bookkeeper has collected and rolls up just the bottom line impacting events: anything that has resulted in a net-gain or net-outflow of funds from your node is reflected here. Note that this data is what's output to the CSV in bkpr-dumpincomecsv
. Want to know how much you're spending on rebalancing or gaining in routing fees per channel? This command will give you the raw data you need to better understand the costs and income of your node.
Speaking of, the bkpr-dumpincomecsv
will dump all of your income data into a CSV. This release includes formats that upload natively to both Koinly and CoinTracker, as well as support for the open-source Harmony CSV 0.2 format pioneered by Clark Moody.
Understanding Channels On-Chain
When a channel drops to chain, it can be challenging to follow the on-chain resolution of it, particularly if there are penalty transactions or pending HTLCs that get resolved on-chain. The new bkpr-inspect
command takes an channel-account tag to show you UTXO and transaction level data about a channel, making it easier to see the on-chain cost of a channel close as well as helping you understand where the money is in real-time as the close completes.
See Your Channel APYs
Calculating the return on your node's deployed capital is a hot topic these days. The bookkeeper plugin provides a bkpr-channelsapy
command, which will give you a rolled up summary view of the usage of funds in a channel, the APY you've earned to date on those funds via routing fees (note that it'll only include routing data from the time the bookkeeper
plugin was initiated).
If you're selling or buying channels via liquidity-ads, we'll also include data about your return per-channel on liquidity sales.
See the video below for a quick overview of how bookkeeper
makes your node's payment data visible.
Build Directly on CLN with commando
Initially released as a self-serve python plugin, CLN v0.12.0 will also ship with a commando
plugin, which adds two new RPC methods:: commando
and commando-rune
.
commando
allows you to send a directly connected peer an RPC request, who, in turn, will run and send the result to you. This uses the secure connections that Lightning nodes establish with each other onconnect
. As arbitrary RPC executions by any connected node can be dangerous, generally, the peer will only allow you to execute the command if you've also provided a rune.commando-rune
is the RPC command that allows you to construct a base64 encoded permissions string, which can be handed to peers to allow them to usecommando
to query or ask your node for things remotely. runes have restrictions added to them, meaning no one can remove a restriction from a rune you've generated and handed them. These restrictions allow you to carefully craft the RPC commands a caller is allowed to access, the number of times that they can do so, the length of time the rune is valid for, and more.
For more details on using runes, read through the docs or watch the short clip below from a recent talk with William Casarin (@jb55) on how he constructs runes.
Want to build a web or mobile app that talks directly to a CLN node over commando with runes? Check out the lnsocket library also by William.
Lightweight Channel Recovery with chanbackup
The v0.12.0 edition of CLN includes a chanbackup
plugin, written by our Summer of Bitcoin intern Aditya Sharma. This plugin keeps track of your current open channels, writing some basic information about them into an encrypted on-disk file called emergency.recover
in your lightning-directory.
In the unfortunate event that you lose your CLN node, you can ask CLN to connect to each of the peers in the emergency.recover
file and request that they force close the channel with the new emergencyrecover
RPC command. This allows you to retrieve your channel funds from the channel but requires your peer to be online and not to attempt to cheat you.
For a quick overview of the chanbackup
plugin, watch the video below.
Other Notable Updates
In addition to these new packaged plugins, we've also added some great new features and bug fixes to CLN itself, including:
- The ability to establish channels with zero confirmation time. Also known as
zeroconf
, these channels don't require the funding transaction to be confirmed before routing payments over them. Note that this is a high-trust operation, requiring you to add a node to a whitelist before you'll accept a zero-confirmation time from a peer at open. This is typically useful for LSPs. - How PSBT signatures are formatted and an improved ability to sign externally constructed PSBTs for inputs contained within the CLN wallet; we also addressed some stability issues for channel multiplexing that was shipped last release and the ability to log to multiple files.
Finally, due to dependency issues on some platforms, we included a tarball of pre-generated manual pages with this release.
Join the CLN Community
In v0.12.0, Core Lightning's robust plugins architecture is on full display. We hope this new suite of built-in options will continue to grow the CLN ecosystem of apps and demonstrate new and exciting ways to understand the flow of payments on your node.
You can update to the latest version of CLN by heading over to the release page, or if you'd like to see more details, check out the changelog, and tell us what you like or what we could improve via Telegram or Discord.
We want to give a special thank you to all the contributors and volunteers who continue to help us improve CLN with every new release. We're grateful to the community for their support and look forward to continuing to partner with you all on building on Lightning.
Subscribe below to have the latest announcements and news from our Lightning, Research, and other teams delivered to your inbox.