Lightning This Week | 601,934

Powerful macaroons, L-BTC support, and many LN test networks

André Neves
Nov 1, 2019 · 4 min read

Hello Lightning enthusiasts,

This is the first release of Lightning This Week, a weekly post filled with information geared towards engineers, coders and tinkerers of the Lightning Network. Each week I will be selecting a few items (commits, PRs, announcements, releases, etc) deemed interesting to highlight, and will explain them in a bit more detail. While there will inevitably be Bitcoin L1 topics discussed, I do want to focus primarily on Lightning L2 developments. These are meant to be short reads to quickly catch you up to speed with some of the latest developments. Without further ado.

Custom LND Macaroons

If you’re using latest master LND, you can now leverage the new gRPC method BakeMacaroon to create custom authentication macaroons that have specific access features to your node.

Merged PR:

The way custom macaroons work is through a set of Entities and Actions. You can think of Entities as onchain and offchain funds, and Actions as read (see info) and write (spend funds). There’s a new bakemacaroon command available to lncli that might help illustrate this a bit better.

lncli bakemacaroon --permission=invoices:write --permission=invoices:read --save_to=~/.lnd/custom-invoice-type.macaroon --timeout=86400

This will create a new custom-invoice-type.macaroon authentication macaroon that can read and write invoices, valid only for the next 24 hours (86400 seconds).

In order to understand the many Entities and Actions available in LND please refer to this RPCServer permissions mapping.

Note: You will need to delete or move the current admin.macaroon, readonly.macaroon and invoices.macaroon files before starting LND v0.9.0. This is so the new admin macaroon can be generated with the required permission entity to allow for creation of custom macaroons.

C-Lightning v0.7.3

Bitcoin’s Proof of Stake, the latest release of C-Lightning has been posted. v0.7.3 introduces many bug fixes and some new features and capabilities worth discussing further.

Since loss of data, or use of outdated channel state can lead to loss of funds for Lightning node operators, data integrity is of utmost importance. In this release C-Lightning adds an abstraction framework that allows the configuration of other SQL-based database services as backends (apart from the currently supported sqlite3). As of right now PostgreSQL has been merged and other drivers are under development.

v0.7.3 introduces support for Elements, which means lightningd can now be made to support L-BTC. Additionally, the work towards implementing dual-funded channels continues with the recent refactor of fundchannel command to become a C-Lightning plugin. This way the feature can be tested under the experimental flag. More information on dual-funded channels available here and here.

Note: v0.7.3 removes RPC method listpayments in favor of listpays.

As a bonus, Spark Wallet v0.2.9 has also been released with support for the latest C-Lightning release. Do note it also drops support for C-Lightning v0.7.0 and below — which is good since v0.7.1 and above are the only release versions that contain the fix to the recently disclosed CVEs.


One-click Bitcoin Lightning networks for local app development & testing

Polar is a much needed addition to the set of Lightning Network testing tools available to developers. While still in a pre-release version, the tool is already very powerful, allowing for the full creation and management of multiple regtest Bitcoin Lightning Networks in a matter of seconds.

With Polar you can simulate the opening and closing of channels between nodes, manually mine new regtest blocks, and add as many LN nodes as you wish simply by dragging and dropping. The RPC information for each node is also readily available allowing for easy connection to the test nodes through mobile and desktop apps or CLI tools.

Polar currently supports latest two versions of LND with upcoming support for other Lightning implementations such as C-Lightning and Eclair. If you are interested in the project and wish to contribute to the codebase and/or testing the application head over to GitHub.

Polar App Demo

That is all for Lightning This Week. If I’ve missed something important please let me know through the comments or on Twitter.

ZEBEDEE’s mission is to develop software and infrastructure to introduce first-class Bitcoin and Lightning support into digital experiences and gaming environments. This allows players, developers, streamers, and watchers to interact and instantly exchange value in a frictionless manner.

To learn more, visit our website and follow us on Twitter.

ZEBEDEE Engineering

ZEBEDEE — Bitcoin Digital Economic Engines

André Neves

Written by


ZEBEDEE Engineering

ZEBEDEE — Bitcoin Digital Economic Engines

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade