lightning-dev

OP_CAT was Re: Continuing the discussion about noinput / anyprevout

OP_CAT was Re: Continuing the discussion about noinput / anyprevout

Original Postby Lloyd Fournier

Posted on: October 6, 2019 07:02 UTC

The email thread on the Lightning-dev mailing list discusses two main topics.

The first topic is about protocols that could benefit from OP_CAT and whether there exists a scriptless counterpart. Lloyd asks Ethan about the protocols he needs OP_CAT for, and Ethan explains that it is a basic building block that could allow for future protocols. They also discuss the limitations of scriptless scripts and the possibility of using multiple transactions spending from the same output to achieve what Ethan wants. The second topic is the proposed solution for the malleability issue that affects Bitcoin transactions. ZmnSCPxj proposes using the script "OP_SETPUBKEYSIGHASH OP_CHECKSIG" to allow selecting the SIGHASH flag at time-of-signing while still committing to the SIGHASH it was created for. By default, public keys will not have an attached SIGHASH byte, implying SIGHASH_ALL and disallowing non-SIGHASH_ALL. This approach removes the problems with SIGHASH_NONE and SIGHASH_SINGLE as they are allowed only if the output specifically says so.Ethan believes that Bitcoin should give people basic tools to build protocols without first knowing what all those protocols are, especially when those tools have very little downside. He values OP_CAT as an extremely valuable op code and wishes that he could turn it on with the change that size of each concatenated value must be 64 Bytes or less. Overall, the email thread discusses important issues related to Bitcoin transaction malleability and the use of OP_CAT in building protocols.