Oct 21 - Oct 27, 2023
The proposed opcode allows for the concatenation of two values on the stack, providing a general-purpose way to combine objects in tapscript. This enhances the functionality and expressiveness of tapscript, enabling the construction and evaluation of merkle trees and other hashed data structures.
Enabling OP_CAT would have various use cases, including tree signatures, Post-Quantum Lamport Signatures, non-equivocation contracts in tapscript, vaults, and replicating CheckSigFromStack. Tree signatures allow for multisignature scripts with a logarithmic size in the number of public keys, while Post-Quantum Lamport Signatures require the ability to hash and concatenate values on the stack. Non-equivocation contracts provide a mechanism to punish double spending in Bitcoin payment channels, and vaults block malicious parties from stealing funds. Replicating CheckSigFromStack enables the creation of simple covenants and advanced contracts without presigning spending transactions.
OP_CAT was previously available in early versions of Bitcoin but was removed due to memory usage concerns. However, tapscript now enforces a maximum stack element size of 520 Bytes, making this opcode viable again. The specification for implementing OP_CAT includes checking the stack size, concatenating the values, and pushing the result onto the stack. A reference implementation can be found in the Elements project's interpreter.cpp file.
The email also provides several references for further reading on related topics, including program design in the UNIX environment, multisig using tree signatures, OP_CAT for quantum security, penalizing equivocation by loss of bitcoins, Bitcoin covenants, and covenants with CAT and ECDSA. These references offer additional information and insights into the proposed activation of OP_CAT as a tapscript opcode.
Overall, the proposed activation of OP_CAT aims to enhance Bitcoin tapscript by enabling the concatenation of stack values and facilitating the implementation of various use cases. The email encourages the community to provide feedback, comments, and suggestions for improvements or alternative approaches.
TLDR
We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project?
Give Feedback