spec-bip-0342-mediawiki
Specifies Tapscript validation rules for Bitcoin Taproot script-path spends: BIP340 Schnorr signature opcodes, OP_CHECKSIGADD, OP_SUCCESSx upgrades, and a sigops budget.
Schemes: BIP-342, BIP-341, BIP-340, BIP-141, Schnorr, OP_CHECKSIGADD, OP_SUCCESSx, MuSig
Findings (quotes checked against the source text)
-
Tapscript replaces ECDSA signature opcodes with BIP340 Schnorr verification and disables OP_CHECKMULTISIG, adding OP_CHECKSIGADD for batch-verifiable threshold policies.
The inefficient
OP_CHECKMULTISIGandOP_CHECKMULTISIGVERIFYopcodes are disabled. -
Tapscript defines OP_SUCCESSx opcodes so that scripts containing them pass unconditionally, providing a soft-fork upgrade path for new opcodes and signature types.
Tapscript can be upgraded through soft forks by defining unknown key types, for example to add new
hash_typesor signature algorithms. -
Signature opcode cost is bounded by a per-input sigops budget tied to witness size rather than a block-wide sigops limit.
The budget equals 50 + the total serialized size in bytes of the transaction input's witness (including the
CompactSizeprefix). -
Signature messages commit to the tapleaf hash and the last executed OP_CODESEPARATOR position, so script-path signatures bind to the executed leaf.
The signature message commits to the executed script through the ''tapleaf_hash'' which includes the leaf version and script instead of ''scriptCode''.
Numbers (as extracted, not quote-checked)
- Sigops budget per signature opcode with non-empty signature: 50 weight units
- Budget base offset: 50 + witness size
For builders
If building a PQ chain on Taproot-style script paths, note that Tapscript's sigops budget and OP_SUCCESSx mechanics were designed around 64-byte Schnorr signatures and would need re-deriving for larger PQ signature sizes.
Limits
Specifies classical Schnorr/BIP340 semantics only; contains no post-quantum primitives, and its sigops budget and 520-byte element limit assume small signatures.
Topics: bitcoin-migration sig-other chain-design