Opcodes · criptografía · habilitado

OP_HASH160 (0xa9)

Reemplaza el elemento superior por su hash SHA-256 seguido de RIPEMD-160 (20 bytes). Se usa en las direcciones P2PKH y P2SH20.

Verificado
Pila: entrada → salida
x → hash(x)
Desde
Script original de Bitcoin
Costo
Base instruction cost 100 plus result length, plus 192 per hash digest iteration under relay policy (64 under consensus); digest iterations also count toward the per-input hashing limit (2025 VM limits). The two-round hash adds one extra digest iteration.
Estado en Bitcoin
Igual en Bitcoin (BTC)

Ejemplo

OP_DUP OP_HASH160 <pkh> OP_EQUALVERIFY OP_CHECKSIG

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. CHIP-2021-05 VM Limits: Targeted Virtual Machine Limits
  3. BCHN VM limits (vm_limits.h)