1

The proposed Taproot soft fork (BIP 342) defines the new opcode OP_CHECKSIGADD to verify Schnorr multisignatures whilst OP_CHECKMULTISIG (and OP_CHECKMULTISIGVERIFY) are disabled for Taproot spends (SegWit version 1). Could we use the OP_CHECKSIGADD opcode for verifying new SegWit version 0 ECDSA multisignatures? Obviously you don't get the same batch verification benefits if the individual signatures are ECDSA but it would still be more efficient to use the counter system of CHECKSIGADD?

For an explanation of how the opcode CHECKSIGADD works see this presentation from James Chiang. Or see Tapscript BIP 342.

"The opcode 186 (0xba) is named as OP_CHECKSIGADD"

"OP_CHECKSIGADD is functionally equivalent to OP_ROT OP_SWAP OP_CHECKSIG OP_ADD"

1

No because the opcode 186 (0xba) is undefined for SegWit version 0 spends. You can only take advantage of this opcode in SegWit version 1 spends. If you included this opcode in your SegWit version 0 transaction script any attempt to spend it would encounter this script error.

| improve this answer | |
  • 2
    Indeed, the opcode only exists in tapscript spends. – Pieter Wuille Jul 29 at 16:49
  • 1
    In fact, enabling the same semantics for existing script versions would be a hardfork. It pops elements off the stack, so a script consisting of just "OP_CHECKSIGADD OP_SIZE 1 OP_EQUAL", and fed 3 elements as input would be invalid currently, but valid if such an opcode was added. – Pieter Wuille Jul 29 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.