Reading Assignment: Script

  1. OP_CHECKSIGVERIFY is same as OP_CHECKSIG, but OP_VERIFY is executed afterwards.
  2. OP_DROP
  3. 0xae
  1. OP_CHECKSIGVERIFY do verification of the top stack on top of OP_Checksig
  2. OP_DROP
  3. 0xae
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    The difference is that OP_CHECKSIGVERIFY also the OP_VERIFY is done afterwards - meaning that the top stack value has to be true.

  2. What is the “Pop” functions called in Script? (It is not called OP_POP)
    Cause “Pop” only pops out the top stack(LIFO), I would say it is “OP_DROP”.

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

Welcome to this reading assignment on the Script programming language. If you haven’t already, read through the wiki page describing all the op-codes in script and answer the following questions. Post your answers in the forum thread .

  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    OP_CHECKSIG 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. --> Output True or False

OP_CHECKSIGVERIFY
Same as OP_CHECKSIG, but OP_VERIFY is executed afterward. --> Output fail or nothing

  1. What is the “Pop” functions called in Script? (It is not called OP_POP)
    OP-fromalstack
  2. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
    0Xae

Reading Assignment: Script

What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

  1. OP_CHECKSIG hashes the entire script, inputs and outputs. The signature must be valid for the the script to return a number 1 or else a 0 is returned.
  2. OP_CHECKSIGVERIFY is basically the same as OP_CHECKSIG with the difference being OP_VERIFY is called straight afterwards which marks the transaction as invalid if top stack is not true.

What is the “Pop” functions called in Script?

The pop function is called OP_DROP

What is the hexadecimal OP Code for OP_CHECKMULTISIG?

The hexadecimal code for OP_CHECKMULTISIG is 0xae

1 Like
  1. The difference is OP_CHECKSIGVERIFY executes OP_VERIFY after executing OP_CHECKSIG.

  2. OP_DROP.

  3. 0xae

OP_CHECKSIG hashes the transaction inputs, outputs and script and checks that the signature is valid. If it’s valid then 1 is returned. Otherwise zero is returned.

  1. OP_CHECKSIGVERIFY does the same as the above but runs OP_VERIFY afterwards which takes the output and marks the transaction as valid or invalid. The top stack is removed.

  2. I’m not sure how to answer. There are many functions that involve removing the top stack item (“pop” functions). They have many different names and these don’t have a “category”. However, I’m now going to try following the hint you gave below…

  3. 0xae

OK I couldn’t figure it out so I looked up the other answers. OP_DROP is the simplest example of a Pop function as it simply removes the top item from the stack.

  1. OP_CHECKSIG hashes a transaction’s outputs, inputs, and script, the signature must be valid in order for this to occur. With OP_CHECKSIGVERIFY the OP_VERIFY is executed afterwards. OP_VERIFY marks transaction as invalid if top stack value is not true.

  2. OP_DROP Removes the top stack item

  3. 0xae

  1. Both functions will return a Boolean value (1 or 0) whether the hash of entire transactions has a valid or not valid signature. However, the difference is that OP_OP_CHECKSIGVERIFY will run OP_VERIFY function afterward. This function marks a transaction as invalid if the top stack value is not true. The top stack value is then removed.
  2. OP_DROP
  3. 0xae
  1. OP_OP_CHECKSIG: The entire transaction (output, input and script) are hashed. The signature must be valid for the hash and public key.
    OP_OP_CHECKSIGVERIFY: OP_VERIFY is executed afterwards. The rest is the same.

  2. OP_DROP, OP_NIP, OP_2DROP

3.0xae

1 Like
  1. OP_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.

OP_OP_CHECKSIGVERIFY - Same as OP_CHECKSIG, but OP_VERIFY is executed afterward.

  1. OP_Drop

  2. 0xae

1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    The first returns a value true or false whilst the latter verifies and returns only if fails.
    Or as to quote the description:
    “OP_CHECKSIG will push true to the stack if the check passed, false otherwise. OP_CHECKSIG_VERIFY leaves nothing on the stack but will cause the script eval to fail immediately if the check does not pass.”
  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? 0xea
2 Likes
  1. What is the practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY?
    OP_CHECKSIG - Checks if the signature is valid for the hash and public key
    OP_CHECKSIGVERIFY - Does the same as OP_CHECKSIG and then it runs a OP_VERIFY
    OP_VERIFY - If top stack item is not true, then the script fails. Also removes the top stack item
  1. What is the “Pop” functions called in Script? (It is not called OP_POP)
    OP_DROP removes the top stack item

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

1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
OP_CHECKSIG will output the result has a boolean (true or false) by verifying if the hashed transaction belongs to the signature.
While OP_CHECKSIGVERIFY consist on 2 operations:
1st run the OP_CHECKSIG and depending of the result will run the OP_VERIFY to remove the value from the stack if is not valid.

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
  • What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

Both operations will take the entire transaction and hash it. The signature that is used by OP_CHECKSIG must be valid for this hash and public key. If it is, 1 is returned, 0 otherwise. Only OP_CHECKSIGVERIFY will run OP_VERIFY afterwards.

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

The pop function is Script is called OP_DROP

  • What is the hexadecimal OP Code for OP_CHECKMULTISIG?

The hexadecimal OP Code for Checkmultisig is Oxae.

1 Like
  1. OP_CHECKSIG checks to see if the sig or the hash is true or false by returning 1 or 0. OP_CHECKSIGVERIFY uses the same command but it adds OP_VERIFY functionality by marking transactions and signatures as valid or not and if they are not valid , it removes them from the STACK.

  2. OP_DROP is a Pop function present into the scripting programming language.

  3. 0xaf

1 Like
  1. Op_checksigverify is the same except it executes a OP_VERIFY afterwards.
  2. OP_DROP, OP_NIP, OP_2DROP
  3. 0xae

1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
OP_CHECHSIG - 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_CHECKVERIFY - Same as OP_CHECKSIG, but OP_VERIFY is executed afterward
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? Oxae

1 Like
  1. OP_CHECKSIG will check the signature for validity and return true or false on the top of the stack, requiring OP_VERIFY to evaluate that top value and continue (true) or mark the transaction invalid (false)
    OP_CHECKSIGVERIFY will perform both of these operations.
  1. OP_DROP will pop the top value off the stack.

  2. 0xae is the OP Code for OP_CHECKMULTISIG.

1 Like