Reading Assignment: Script

  1. It sounds like the signature used by OP_CHECKSIG must match the hash signature and the public key signature. If it matches 1 is pushed onto the stack. But with OP_CHECKSIGNVERIFY, the transaction will be removed from the stack if its invalid.

  2. The opcode for “pop” is OP_DROP

  3. 0xae

1 Like
  1. Running the hash versus checking the validity
  2. OP_DROP
  3. Oxae
1 Like

1. The practical difference is that OP_CHECKSIGVERIFY completes the same action that OP_CHECKSIG does execute it afterwards (The entire transaction’s Output, Inputs and script being hashed).

2. OP_DROP

3.0xae

1 Like

op_checksig / true or false output. The entire transaction’s outputs, inputs, and script are hashed and the signature used by op_checksig must be a valid signature for this hash and public key.
op_checksigverify / nothing or fail output. Same as op_checkings but is executed afterward.

op_drop
0xae

1 Like

1 What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
With OP_CHECKSIG the entire transaction’s output, input and script are hashed. The signature used must be a valid signature for this hash and public key if it is true(1) is returned if not false(0). OP_CHECKSIGVERIFY does the same, however, if the signature used if not valid for this hash and public key i.e. it is false(0) , it will be removed of the top of the stack.

2 What is the “Pop” functions called in Script? (It is not called OP_POP)
OP_DROP

3 What is the hexadecimal OP Code for OP_CHECKMULTISIG?
0xae

1 Like
  1. NONE, the both do not exist. OP_OP_* is the wrong syntax. The practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY however is: Different time of execution and OP_CHECKSIG has an output of true/false and OP_CHECKSIGVERIFY outputs nothing to the stack, it exualy removes the last value.
  2. OP_DROP
  3. 0xae
1 Like
  1. 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_CHECKSIGVERIFY acts same, but OP_VERIFY is executed afterward.
  2. OP_Drop
  3. 0xae
1 Like