Skip to content

BIP 342

Validation of Taproot Scripts

Original title: Validation of Taproot Scripts

Status
Deployed
Type / Layer
Specification / Consensus (soft fork)
Author
Pieter Wuille, Jonas Nick, Anthony Towns
Assigned
Status verified
Source
github.com/bitcoin/bips/blob/master/bip-0342.mediawiki

Summary

Specifies the validation rules for tapscript, the script environment executed on Taproot's script path. Where BIP341 changes where scripts live and how they are structured, this BIP updates opcode semantics to match. There are four main changes. OP_CHECKSIG and OP_CHECKSIGVERIFY verify BIP340 Schnorr signatures rather than ECDSA. OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY are disabled, replaced by OP_CHECKSIGADD, which accumulates the number of successful signature checks on the stack; because each check stands alone, it suits batch validation. The script size limit and the cap on non-push opcodes are removed, and the block-wide sigops limit gives way to a per-input budget of 50 plus the serialised size of that input's witness, so the amount of signature checking scales with the fee paid to carry it. Finally, a range of OP_SUCCESSx opcodes and unknown public key types are reserved, leaving room to give them meaning through later soft forks.

Why it matters

It is the execution environment for expressing non-trivial conditions under Taproot, and threshold multisig built with OP_CHECKSIGADD lives here. Removing the script size limit is also one of the reasons uses such as Ordinals — placing large data inside a tapscript leaf — became possible, with the practical ceiling now set by standardness limits on transaction weight rather than by the script itself.

Related BIPs

Related articles

This page carries a summary, not a translation. The original document is authoritative, and the metadata above — including Status — was transcribed from the bips repository on the verification date shown. Always consult the original when implementing or verifying.

Read the original on bitcoin/bips