3

BIP-341 describes how to construct the message to be signed for taproot (subsection Common signature message). It mostly makes sense but I have a couple of quick questions:

  • Is the ext_flag 0 when spending default key path and 1 if spending with a script?

  • In the 'Data about this input' it says that scriptPubKey is always 35 bytes. How so? I would assume it is (a) "OP_1 OP_PUSHDATA(1) <32 bytes>" so 34 bytes. Does "serialized as script inside CTxOut" mean that we need another byte for the length of (a), thus making it 35 bytes?

1 Answer 1

3

Yes, ext_flag is (currently) only 0 for key path spends. The only defined script path spend (Tapscript, BIP342) sets ext_flag to 1.

The size of a Taproot ScriptPubKey is indeed always 35 bytes because there is:

  • 1 byte for the size of the script
  • 1 OP_1
  • A 32 bytes push (which is 33 bytes accounting for the length prefix)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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