Announcing lnd 0.15 beta: To Taproot and Beyond! ♾️
We're pleased to announce lnd 0.15 beta, our first release of 2022! Building on our commitment to make the Lightning Network more reliable, robust, and secure, our latest release includes:
- The ability to create and spend from Taproot addresses
- New RPC methods to support experimental MuSig2 signing
- Database space reduction of ~95% by reducing state stored in revocation logs for new data
- New pathfinding variable to give more control over time and cost tradeoff
- Mobile improvements including a new neutrino subserver and exposing main subservers by default
This release wouldn't have been possible without tremendous community support (over 50 contributors to this release alone, a new all time high 🎉 ). A special thanks to YY for his critical work on the database space reduction, an oft requested fix from our users. In this post, we've included a list of the highlights. You can find more detail in the full release notes.
Bringing the Latest Bitcoin Improvements to Lightning
Given the community excited around Taproot and the functionality it enables, we wanted to prioritize "taproot-ifying" lnd. This release gives complete Taproot support for the internal lnd wallet, making it one of the most advanced Taproot wallets today. Further, this release has support for an experimental Musig2 API compliant with the latest BIP draft.
With this release, lnd now has the ability to generate P2TR addresses for receiving (
lncli newaddress p2tr), and sending via bech32m. Additionally, users can use the new PSBT extensions to fund, populate, and validate an empty or complete PSBT, along with signing logic for: normal keyspend paths, BIP 86 keyspend paths, and also tapscript signing. Finally, lnd's seed format, aezeed, also comes with a new internal version bump to indicate that newer seeds may contain taproot outputs. An offline tool will be made available to allow users to "upgrade" their seeds securely, which in the future will make wallet import and rescan more efficient. In order for the Taproot functionality to properly work, users running btcd should upgrade to v0.23.1. The functionality will work with any bitcoind version after bitcoind v0.21.
Experimental Musig2 API Support
This release also adds support for an experimental Musig2 API compliant with the latest BIP draft. This is marked as experimental as things may still change. We have already started integrating Musig2-based multi-party signing into various systems we operate using these APIs, so keep a lookout for more to come there in the near future. Given the new and experimental nature of this inclusion, we've taken careful steps to make the API developer-friendly via the way it manages nonce/session state.
Database Size Reduction of ~95% for Future Data
Revocation Log Redundancy Removal
In order to safely advance the commitment state, lnd saves the past states and constructs a justice transaction in case of a remote breach. The states can grow very large on disk given a busy operating channel. We've consistently heard from our community of developers that one of the biggest improvements to make would be reducing the database size. So, in the latest release, redundant data has been removed from the revocation log bucket in order to reduce the db size and improve node performance. Initial testing shows that users can expect around 95% reduction in disk space consumed by new channel updates, a huge improvement! It's worth noting that this doesn't reclaim the disk space for existing states. A follow up minor release will introduce an optional migration that reclaims that old disk space (an early user reported a reduction from 30 GB to 129 MB!).
Laying the Foundation for Scaling Reliably
More Pathfinding Control
Developers have often asked for the ability to control pathfinding in a more granular way. This request comes from the fact that certain payments may need to reach the destination faster whereas some payments may be interested in optimizing for lower cost. So, in this release, users have more control over pathfinding preferences with the variable
time-pref that gives users control over the time to cost tradeoff for pathfinding. This variable is a continuous variable in the range of [-1,1] whereby setting the variable at -1 will optimize for fees only, giving the payer a lower cost route. Conversely, setting the variable at 1 will optimize for reliability which can reduce the time it takes to complete a payment, but can also result in higher fees. Giving users choice with regard to this variable means that for different payments, users could select different options based on their needs. One could imagine a world where a wallet has a slider built in where users can slide between lower cost or higher reliability. We can't wait to see how wallets use this new functionality!
Optional Bitcoind Polling Mode
As an alternative to ZMQ (ZeroMQ), in this release, users have the option of using bitcoind polling to configure block and transaction subscription notifications. Rather than using ZMQ for these notifications, users can poll the JSON-RPC interface. This change has the benefit of potentially being less error prone than needing to use ZMQ when a cluster of lnd nodes are feeding from a single bitcoind node. However, just based on historical usage, the existing ZMQ mode should be considered more stable at this time.
Advancing Developer Tooling
Delivering Tooling for Liquidity Service Providers
In this release, users can use a more robust version of the HTLC interceptor, a tool to allow for custom forwarding logic, which can now: send custom failure messages, intercept on-chain HTLCs, and also be configured to always assume its existence. These improvements allow for the build out of more advanced Lightning services like the Lightning Multiplexer, a more scalable way to setup nodes with the need for high availability and reliability. For liquidity service providers, who compete on uptime, functionality, and reliability, these tooling improvements can be critical to help better serve their customers.
Further, from our community of developers, we've heard about the importance of custom and flexible access sessions for nodes for security and ease of use purposes. With the new CLI command,
lncli constrainmacaroon, developers can add constraints to an existing macaroon without having to bake a new one. This allows for increased flexibility with regard to node access and security.
Improving the Mobile Developer Experience
For developers focused on mobile, this release includes a few key improvements to subservers to set the foundation for more robust mobile developer support in future releases. These improvements include a new neutrino sub-server capable of status checks, adding, disconnecting and listing peers, fetching compact filters and block/block headers. Additionally, the gomobile bindings now include all sub-servers by default, which enables more custom mobile applications built on top of lnd.
Conclusion: Taproot is Here, It's Time to Buidl!
We've introduced a number of improvements in v0.15-beta to give developers and users access to the latest and greatest Bitcoin protocol improvements like Taproot and Musig2. Since 0.14, we've made immense progress to better meet the needs of our developer community. We're excited to deliver this technology to our builder community around the world to see what amazing use cases they can bring to users.
With all the recent developments this year, we're humbled to be contributing to the continued growth of the Lightning Network with this release. If you haven't already, join the lnd Slack, reach out to us on Twitter, attend the lnd PR review club, contribute a PR, or subscribe to our newsletter!