Miniscript on LN (was: eltoo implementation in Bitcoin functional test framework) [combined summary]



Individual post summaries: Click here to read the original discussion on the lightning-dev mailing list

Published on: 2019-09-09T07:51:08+00:00


Summary:

In a recent email exchange, David A. Harding and ZmnSCPxj discussed the potential benefits of using Miniscript for Lightning Network scripts. While some have questioned its value, Harding suggests that incorporating Miniscript into Bitcoin Core could make it easier for wallets to create valid witnesses for Miniscript-aware scripts. This would allow users to sign for their lightning update and settlement transactions using a Miniscript-compatible wallet. However, there are complications with deriving signing keys from base keys in Lightning scripts, requiring information on how the derivation is done. Despite this, Harding sees the value of using Miniscript for Lightning scripts, especially as other wallets may add support for libminiscript in the future.The discussion also took place on Lightning-dev, where the use of Miniscript for Lightning was questioned. While carefully-coded SCRIPT may be easier for implementing some contracts, the primary use of Miniscript is not necessarily to create optimized Bitcoin scripts. Instead, Miniscript makes it easy for any Miniscript-aware wallet to create a valid witness for the script. This means that Bitcoin Core, for example, could sign for LN update and settlement transactions if someone imported their keys and invoice pre-images into their wallet. Furthermore, other wallets like hardware wallets and exchange HSMs may add support for libminiscript, allowing LN nodes to delegate signing to outside devices without changing their code.The author of the message questions the use of Miniscript for Lightning unless it supports transporting arbitrary contracts. They argue that using carefully coded SCRIPT for HTLCs would be easier. The author also discusses the implications of supporting arbitrary contracts over payment channels, such as limited routability and the lifetime of the hosting payment channel being determined by absolute timelocks. In conclusion, while Miniscript helps produce optimized scripts, its true potential lies in allowing any wallet to sign for any Miniscript-compatible script, eliminating the need for developers to write sensitive signing code or coordinate changes across different software.


Updated on: 2023-07-31T21:54:09.621311+00:00