By Lisa Neigut
The c-lightning team is proud to announce the release of version 0.7.3. This is the second of our “every two months” timed releases; the next is slated for December.
This issue is packed with some great new features:
- Options for database backends: prior to 0.7.3, c-lightning came with a single option for a database engine — sqlite3. With an eye towards improving c-lightning’s persistence and backup toolset, core dev Christian Decker contributed an SQL re-writing engine and a Postgres driver, officially making c-lightning ‘BYODB’ (bring your own database).
- Liquid Bitcoin support: c-lightning now has nominal support for Liquid Bitcoin (L-BTC) transactions. Note that Liquid’s Issued Assets are not supported at this time.
- Gossip improvements: Gossip queries were introduced as experimental in 0.7.2 and have now been promoted to be the standard method for asking peers for gossip (provided that they support it). Additionally, we’ve much improved (i.e. reduced) the number of peers and quantity of gossip that we solicit from those peers. This should positively impact c-lightning’s bandwidth usage, at the cost of slightly slower gossip propagation.
- New RPC methods: c-lightning now supports signing (
signmessage
) and verifying (checkmessage
) the sender of encrypted messages, using a node’s public key. This matches similar functionality provided by LND. - Coin control: low-level APIs have been added so plugins can do more intelligent coin control, including coins not in the c-lightning wallet (e.g. hardware wallet support).
Towards More Robust Data Storage
c-lightning now supports options for database backends. Originally built with a sqlite3
data store, we’re now shipping c-lightning with an option to use a Postgres driver instead.
How to use it
This version of c-lightning is shipping with a Postgres driver. To take advantage of it, set the new lightningd configuration option wallet
to the fully qualified datasource name, e.g. postgres://postgres:password@localhost:{port}/{dbname}
.
Note that the configure
command now verifies that you have the proper Postgres libraries installed on your machine.
Why offer options
sqlite3
is a robust, small footprint database that works great for small scale data storage, particularly on low-memory devices. However, the backup and replication ecosystem for supporting sqlite3
data are not as robust as the tooling available for other data storage backends, such as Postgres. By opening up the options for backends that c-lightning works with natively, we hope to give users and node operators more flexibility and capabilities for securing their node’s data.
Wallet Hardening and External Support
0.7.3 also includes a much requested feature, from contributor @darosior: the option to encrypt the BIP32 hsm_secret
on disk. Once the hsm_secret
has been encrypted, you’ll need to provide the passphrase at startup in order to unlock the wallet. Our next release will have more tools for hsm encryption and decryption, so watch this space.
In addition to seed encryption, 0.7.3 includes a few tweaks to existing RPC calls to further support external wallet integration. We’ve added the ability to close to a specified address using the close
RPC call. You can also now take advantage of a channel’s upfront_shutdown_script
capability (if supported by your node peer) by passing a close_to
address to fundchannel_start
. For mutual channel closures, the channel funds will be paid to this address.
Unilateral channel closures, however, will still see the funds returned to the c-lightning wallet, no matter if you’ve specified a shutdown script. This is due to a protocol level restriction on how unilateral outputs are calculated.
For those of you interested in hardware wallet integration with channel opens, there’s now a demo HWI plugin by Justin Moon.
If you want to get started using c-lightning or c-lightning development, check out Rusty Russell’s “Getting Started” webinar. We can also be found on IRC (#c-lightning on Freenode) as well as on GitHub reviewing bugs, feature requests, and new code!
Note: This blog was originally posted at https://medium.com/p/f86476af05d7