From 0267139ddc4a2d68e99aefeaea8c3ec3915dfbc6 Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 11 Mar 2020 01:45:50 +0100 Subject: [PATCH] =?UTF-8?q?Updated=20OP=5FCODESEPARATOR=20and=20OP=5FCHECK?= =?UTF-8?q?SIG=20to=20BCH=E2=80=98s=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OP_CODESEPARATOR and OP_CHECKSIGā€˜s descriptions were based on pre-BCH rules and have been updated to the current BCH rules --- protocol/blockchain/script.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/blockchain/script.md b/protocol/blockchain/script.md index 8b605dc..56396ba 100644 --- a/protocol/blockchain/script.md +++ b/protocol/blockchain/script.md @@ -163,8 +163,8 @@ Op codes marked with **(do not use)** are disallowed and will make a transaction | OP_SHA256 | 168 | 0xa8 | in | hash | Hashes input with SHA-256. | | OP_HASH160 | 169 | 0xa9 | in | hash | Hashes input with SHA-256 and then with RIPEMD-160. | | OP_HASH256 | 170 | 0xaa | in | hash | Hashes input twice with SHA-256. | -| OP_CODESEPARATOR | 171 | 0xab | Nothing | Nothing | All of the signature checking words will only match signatures to the data after the most recently-executed OP_CODESEPARATOR. | -| OP_CHECKSIG | 172 | 0xac | sig pubkey | true / false | The entire transaction's outputs, inputs, and script (from the most recently-executed OP_CODESEPARATOR to the end) are hashed. The signature used by OP_CHECKSIG must be a valid signature for this hash and public key. If it is, 1 is returned, 0 otherwise. | +| OP_CODESEPARATOR | 171 | 0xab | Nothing | Nothing | Makes `OP_CHECK(MULTI)SIG(VERIFY)` set `scriptCode` to everything after the most recently-executed OP_CODESEPARATOR when computing the sighash. | +| OP_CHECKSIG | 172 | 0xac | sig pubkey | true / false | The last byte (=sighash type) of the signature is removed. The sighash for this input is calculated based on the sighash type. The truncated signature used by OP_CHECKSIG must be a valid ECDSA or Schnorr signature for this hash and public key. If it is valid, 1 is returned, if it is empty, 0 is returned, otherwise the operation fails. | | OP_CHECKSIGVERIFY | 173 | 0xad | sig pubkey | Nothing / *fail* | Same as OP_CHECKSIG, but OP_VERIFY is executed afterward. | | OP_CHECKMULTISIG | 174 | 0xae | dummy sig1 sig2 ... <# of sigs> pub1 pub2 ... <# of pubkeys> | true / false | Signatures are checked against public keys. Signatures must be placed in the unlocking script using the same order as their corresponding public keys were placed in the locking script or redeem script. If all signatures are valid, 1 is returned, 0 otherwise. All elements are removed from the stack. For more information on the execution of this opcode, see [Multisignature](/protocol/blockchain/cryptography/multisignature). | | OP_CHECKMULTISIGVERIFY | 175 | 0xaf | dummy sig1 sig2 ... <# of sigs> pub1 pub2 ... <# of pubkeys> | Nothing / *fail* | Same as OP_CHECKMULTISIG, but OP_VERIFY is executed afterward. |