Author: David A. Harding 2019-09-06 18:43:05
Published on: 2019-09-06T18:43:05+00:00
In a recent discussion on Lightning-dev, the use of miniscript for Lightning was questioned. While it may be useful for transporting arbitrary contracts, using carefully-coded SCRIPT to transport HTLCs would be easier implementation-wise. However, the primary use of miniscript is not necessarily to create optimized Bitcoin scripts. Miniscript also makes it easy for any miniscript-aware wallet to figure out how to create a valid witness for the miniscript. If someone imported their keys and invoice pre-images into their Bitcoin Core wallet, then Bitcoin Core could sign for their LN update and settlement transactions. Later, other wallets such as hardware wallets and exchange HSMs may add support for libminiscript, making it easy for LN nodes to delegate signing to outside devices without anyone having to change the code of those hard-to-change devices. In conclusion, while miniscript does help produce machine-optimized scripts, its true potential may come from allowing any wallet to sign for any miniscript-compatible script, freeing developers from having to write sensitive signing code or heavily coordinating changes across different software.
Updated on: 2023-06-02T20:12:13.258015+00:00