2

My understanding is this sig version is only for taproot keyspends, why is it allowed to be used in OP_CHECKSIGADD?

https://github.com/bitcoin/bitcoin/blob/e826b22da252e0599c61d21c98ff89f366b3120f/src/script/interpreter.h#L191

https://github.com/bitcoin/bitcoin/blob/8035b5c80df51130af7cd398da84186ee42dd6e3/src/script/interpreter.cpp#L1086

1 Answer 1

4

It's not; that option is unreachable.

In SigVersion::TAPROOT mode, there is no script to speak of, so the script interpreter is never invoked with it. See line 417 where this is asserted.

The line you link to only makes sure that calling OP_CHECKSIGADD causes failures in the two other SigVersion modes that are reachable.

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.