Reading Assignment: Script

  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

OP_CHECKSIGVERIFY is the same as OP_CHECKSIG but then it will execute OP_VERIFY after.

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

The Pop function is called OP_DROP

  1. What is the hexadecimal OP Code for OP_CHECKMULTISIG?

Opcode 174 - Hexadecimal 0xae

1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

The difference between OP_CHECKSIG and OP_CHECKSIGVERIFY is that OP_CHECKSIGVERIFY still executes an OP_VERIFY at the end. The result is that the script either runs through (nothing) or it runs into a (fail).

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

OP_DROP

  1. What is the hexadecimal OP Code for OP_CHECKMULTISIG?

0xae

1 Like

1.What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY
In my understanding it is nearly the same, OP_CHECKSIGVERIFY is executed after OP_CHECKSIG which needs a valid signature for hash and public key.

2. What is the “Pop” functions called in Script?
It is called OP_DROP.

What is the hexadecimal OP Code for OP_CHECKMULTISIG?
The hexadecimal OP Code for OP_CHECKMULTISIG is Hexadecimal 0xae and OP Code 174.

  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

The entire transaction’s output, inputs and scripts are hashed, the other one is the same thing but you add verify Marks transaction as invalid if top stack value is not true.**

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

  2. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
    0xae

1 Like

1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

  1. OP_CHECKSIG hashes the entire transaction’s outputs, inputs and script (from the most recently-executed OP_CODESEPARATOR to the end). OP_CHECKSIGVERIFY does the same, but OPVERIFY is executed afterwards, namely the transaction is marked as invalid if top stack value is not true.
    2. What is the “Pop” functions called in Script? (It is not called OP_POP)
    pop is used too remove an element from the top of the stack only

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

1 Like

Answers

  1. The only difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY is that OP_OP_CHECKSIGVERIFY calls an operation afterwards that is OP_VERIFY.

  2. The function to “Pop” in script is called OP_DROP.

  3. The hexadecimal OP code for OP_CHECKMULTISIG is 0xAE.

2 Likes
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

OP_CHECKSIGVERIFY Same as OP_CHECKSIG, but OP_VERIFY is executed afterward.

  1. What is the “Pop” functions called in Script? (It is not called OP_POP)
    OP_1SUB 1 is subtracted from the input. (I think)

  2. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
    0xae

1 Like
  1. OP_OP CHECKSIGVERIFY does the same as OP_OP_CHECKSIG but it also does the OP_VERIFY as well at the end which will make the transaction as invalid if the top stack value is not true

  2. OP_DROP

  3. Oxae

1 Like

1.OP_OP_CHECKSIG must be a valid signature for this hash and public key then OP_OP_CHECKSIGVERIFY is executed after.

  1. I don’t know

3.0xae

Did you check the wiki?

  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    op_op_checksig - entire tx’s input, output and script are hashed, signature used must be valid signature for this hash and public key.
    op_op_checksigverify - it is the same as op_op_checksig, but op_verify is executed afterward.
  2. What is the “Pop” functions called in Script? (It is not called OP_POP)
    Pop function is removing elements from the stack. Pushing elements out of the stack, be removing from the top of the stack. It is called: op_drop
  3. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
    0xae
1 Like

1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

OP_CHECKSIG :

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.

(It “Checks” the signature by hashing the transactions outputs, inputs and script. It returns 1 “TRUE” if it is correct, or 0 “FALSE” if not)

OP_CHECKSIGVERIFY :

Same as OP_CHECKSIG, but OP_VERIFY is executed afterward.

OP_VERIFY :

Mark transaction as invalid if top stack value is not true. The top stack value is removed.

(It marks a transaction invalid if OP_CHECKSIG returned 0 “FALSE”)

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

  • OP_DROP (Removes the top stack item.)

  • OP_NIP (Removes the second to top stack item)

3. What is the hexadecimal OP Code for OP_CHECKMULTISIG?

0xae

1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    The difference is OP_CHECKSIGNVERIFY execute the OP_CHECKSIGN and the OP_VERIFY afterwards.

  2. What is the “Pop” functions called in Script? (It is not called OP_POP)
    OP_DROP (remove the top stack item) and OP_2DROP(remove the top two stack item)
    “Pop” removes item from stack.

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

1 Like

Homework on Reading Assignment: Script:

  1. OP_CHECKSIGVERIFY consists of OP_CHECKSIG and OP_VERIFY
  2. OP_DROP
  3. 0xae
1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

A: op_op_checksig will return a bool. op_op_checkSigVerify will first perform the checksig, gets back the bool, if it is false, it will remove it from the stack.

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

A: OP_DROP

  1. What is the hexadecimal OP Code for OP_CHECKMULTISIG?

A: 0xae

1 Like

1- OP_CHECKSIG insures whether the transaction output is true or false and return the result “true or false” in the stack accordingly. OP_CHECKSSIGVERIFY return fail just in case of the previous evaluation was false.

2- OP_DROP

3- Oxae

1 Like
  1. The practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY is that OP_ CHECKSIG after evaluating 2 input parameters will push True (1) or False (0) to the stack, OP_CHECKSIGVERIFY does not leave anything in the stack after the evaluation, and the the script will fail if OP_CHECKSIG does not return true.
  2. The POP function is called OP_DROP.
  3. The hexadecimal OP Code for OP_CHECKMULTISIG is OxAE
1 Like
  1. OP_CHECKSIG takes 2 inputs - signature and public key and returns 1 (pushes 1 to the stack) if the signature is true
    OP_CHECKSIGVERIFY is same as above except that if it is true, then nothing is pushed to the stack, else it fails

2)OP_FROMALTSTACK is used to PUSH
OP_DROP is used to POP

  1. 0xae
1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    The difference between the 2 opcodes would be that they do the same thing, except for OP_OP_CHECKSIGVERIFY would run OP_VERIFY after the completion of OP_OP_CHECKSIG, which would Mark transaction as invalid if the top stack is not true, and also removes top value from the stack.
  2. What is the “Pop” functions called in Script? (It is not called OP_POP)
    The “Pop” opcode is called OP_DROP.
  3. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
    0xae
1 Like

1)The practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY is the following: The OP_OP_CHECKSIG gives either a OP_1 (output is 1 / true) or OP_0 (output =0 / false). The adding of OP_OP_CHECKSIGVERIFY is to check is the output is valid (1) or invalid (0). When valid, it does nothing, so it leaves the top stack element as is. When invalid, it removes the top element/value from the stack.

  1. The pop function in Script is called OP_DROP

  2. the hexadecimal OP Code for OP_CHECKMULTISIG is 0xae

1 Like