Opcodes · criptografía · habilitado

OP_CHECKMULTISIG (0xae)

Verifica firmas m de n y apila 1 o 0. Desde noviembre de 2019 acepta firmas Schnorr cuando el elemento ficticio es un campo de bits que indica qué claves firmaron; el modo ECDSA requiere un elemento ficticio nulo.

Verificado
Pila: entrada → salida
dummy sig… m pubkey… n → ok
Desde
Script original de Bitcoin
Costo
Base instruction cost 100 plus 26,000 per signature check, plus hashing cost for the signing serialization (2025 VM limits). Schnorr mode counts one check per signature (M). ECDSA mode counts one per public key (N), or none if every signature is empty. Also counted by the 2020 SigChecks limit. Before 2025 it also added n to the 201-operation count; that limit is gone.
Estado en Bitcoin
Funciona de otra manera en Bitcoin (BTC)BTC has no Schnorr multisig mode and disables OP_CHECKMULTISIG in Tapscript in favor of OP_CHECKSIGADD (BIP-342).

Ejemplo

OP_0 <sigA> <sigB> OP_2 <pkA> <pkB> <pkC> OP_3 OP_CHECKMULTISIG

Recórrelo opcode por opcode en Bitauth IDE, el depurador de la VM de BCH en el navegador.

Fuentes

  1. Libauth BCH_2023_05 opcodes (bch-2023-opcodes.ts)
  2. BCHN upgrade specs: 2019-11-15 Schnorr multisig
  3. CHIP-2021-05 VM Limits: Targeted Virtual Machine Limits
  4. BIP-342: Validation of Taproot Scripts
  5. BCHN script interpreter (interpreter.cpp)