Core Lightning v23.02: "CBDC Backing Layer"
Today, we welcome the latest Core Lightning release, v23.02, codenamed CBDC Backing Layer (courtesy of Matt Whitlock). The February 2023 release has some exciting features in store for CLN users, including:
SQL plugin: Running complex queries from a remote client is now easier than ever with this new plugin.
Performance improvements: Common operations and pain points for large nodes have both been improved with a new RPC: listpeerchannels
, and the "100K channels" performance optimization project.
Spec updates: Dual funding (liquidity ads) and offers (BOLT12) are both undergoing development and compatibility testing by additional Lightning implementations. This collaborative testing has informed and updated the draft specifications, bringing them closer to adoption. Core Lightning has updated the dual funding and offers features to reflect these changes.
For a detailed list of all changes in v23.02, review the changelog, which contains many more features, performance improvements, bug fixes, and deprecations.
Unleash the Developers
The Lightning Network has grown dramatically over the last five years and new features are added regularly. One of the biggest requests of UI developers is more performant access to fine-grained data. To that end, the SQL plugin now offers custom queries of many CLN database tables:
Bookkeeper Account Events
Bookkeeper Income
Channels
Forwards
HTLCS
Invoices
Nodes
Offers
Peer Channels
Peers
Sendpays
Transactions
For instance, finding all nodes supporting liquidity ads and sorting by contribution or liquidity rate may now be done in a single direct query. Pairing this feature with the commando
plugin allows remote access to a wide variety of data while allowing the Lightning node to perform all filtering and return only the desired data.
The documentation features several examples to get started:
$ lightning-cli sql -o "SELECT nodeid, alias, nodes_addresses.type, nodes_addresses.port, nodes_addresses.address FROM nodes INNER JOIN nodes_addresses ON nodes_addresses.row = nodes.rowid"
{
"rows": [
[
"02ba9965e3db660385bd1dd2c09dd032e0f2179a94fc5db8917b60adf0b363da00",
"YELLOWWATCH-22.11rc2-31-gcd7593b",
"dns",
7272,
"localhost"
],
[
"0214739d625944f8fdc0da9d2ef44dbd7af58443685e494117b51410c5c3ff973a",
"HOPPINGSQUIRREL-1rc2-31-gcd7593b",
"dns",
7171,
"localhost"
]
]
}
See man lightning-sql
for full documentation of supported tables and SQLfunctions.
100K Peers Project
Core Lightning power users have identified pain points related to node startup and peer connection when numerous peers and channels are involved. To address these issues, Rusty Russell performed a test taken to the logical extreme: 100K peers connected to a single node! The offending linked lists were identified and banished. The result is a significant performance improvement for larger CLN nodes during startup, reconnection, and the listpeers
RPC call.
Take it Mainstream
Two experimental features introduced by Core Lightning are finally nearing specification adoption. Both dual funding and offers (BOLT12) are undergoing interoperability testing.
To recap, the Lightning Network adopts features into the specification by a process of:
1) Proposal of the feature with a draft spec.
2) Demonstration of the feature in a Lightning implementation (i.e., Core Lightning).
3) Interoperability testing by another implementation, which identifies any missing documentation in the spec and generally produces an improved result.
4) Merging the updated proposal into the Lightning BOLTs and gaining cross-implementation interoperability.
We are pleased to see both offers and dual funding in the interoperability testing stage. This has also resulted in breaking changes in both cases. (You are still waiting to get that offers tattoo, right?) While this will cause some temporary pain as CLN experimental nodes update to the latest release, it means we are nearly ready for ratification of these features and wider adoption across the network.
Join the CLN Community
We want to give a shoutout to all the contributors (31 for the v23.02 release) who continue to help us improve CLN with every update. We are grateful for your continued support, and the new release would not have been possible without your astute attention to detail and feedback. We now have special CLN contributors and node runner pages on the new Build On L2 community platform to help facilitate discussion better. It is free to sign up, and nyms are more than welcome!
Also, as always, let us know what you like or what we could improve by starting a thread there or by commenting via our regular social channels: Twitter, Telegram, or Discord.