OP_CAT was Re: Continuing the discussion about noinput / anyprevout [combined summary]



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

Published on: 2019-10-09T16:56:51+00:00


Summary:

The conversations surrounding the development of Bitcoin have focused on various opcodes and approaches to improve efficiency, address limitations, and enable new possibilities for protocol building. One proposal suggests encoding `SIGHASH` on public keys by using either 33-byte or 34-byte representations, which would allow operations like `OP_CHECKSIG` to determine the sighash algorithm based on the public key rather than the signature.Another topic of discussion has been the limitations of Merkle trees in Bitcoin blocks, specifically in determining whether a hash represents a subnode or a leaf transaction. To address this, there is a proposal to implement tagged SHA256 as a new opcode, which could help solve the issue.There have also been considerations about the usefulness and efficiency of OP_CAT, an opcode that concatenates stack values. Concerns have been raised regarding its efficiency and behavior when allocating new memory and copying existing data. Suggestions have been made to set maximum output size limits for OP_CAT, ranging from 64 bytes to 256 bytes, as a way to reduce worst-case behavior.The Lightning-dev mailing list has seen discussions about replacing OP_CAT with OP_SHA256STREAM, which would allow unlimited data concatenation using the streaming properties of a SHA256 hash function. The advantages and disadvantages of this proposal have been explored, including the tension between generic-use components and specific-use components. However, it is noted that OP_SHA256STREAM would become unusable if SHA256 is ever compromised.Various individuals have shared their opinions on OP_CAT versus other options like SHA256STREAM in email threads. Additionally, conversations have revolved around scriptless scripts, adaptor signatures, and paying for a merkle path without validating it on-chain.Throughout these discussions, participants emphasize the need for basic tools and opcodes like OP_CAT to facilitate the development of future protocols on Bitcoin. They also highlight the importance of designing layer 2 protocols first and then adapting layer 1 accordingly.In summary, the conversations surrounding Bitcoin's development involve evaluating the benefits and trade-offs of different opcodes and approaches. The focus is on improving efficiency, addressing limitations, and enabling new possibilities for protocol building. Notably, developments such as the introduction of new opcodes and the proposed `OP_SETPUBKEYSIGHASH` are significant for enhancing the security and privacy of Bitcoin transactions.


Updated on: 2023-08-02T01:25:51.727532+00:00