lightning-dev

OP_CAT was Re: Continuing the discussion about noinput / anyprevout

OP_CAT was Re: Continuing the discussion about noinput / anyprevout

Original Postby Ethan Heilman

Posted on: October 3, 2019 15:05 UTC

In a conversation about Bitcoin design flaws, the topic of disabled op codes such as OP_CAT was brought up.

A researcher noted that OP_CAT would be extremely valuable for building protocols on Bitcoin and would greatly reduce transaction sizes for TumbleBit. The researcher suggested that if they could enable one disabled op code it would be OP_CAT, with the caveat that the size of concatenated values must be limited to 64 Bytes or less. In a separate conversation, ZmnSCPxj proposed a radical idea to excise SIGHASH flags from signatures and put them on public keys instead. This proposal would require a new opcode, OP_SETPUBKEYSIGHASH, to specify which sighash algorithm to use. By default, public keys would not have an attached SIGHASH byte, implying SIGHASH_ALL, but non-SIGHASH_ALL would be allowed only if explicitly specified in the output script. ZmnSCPxj argued that this proposal would be a superior solution to the current design flaws of Bitcoin.