Reading Assignment: Script

  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. 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

1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    OP_CHECKSIG checks whether the hash is true (1) or false (0). OP_CHECKSIGVERIFY also marks the transaction valid or invalid.

  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. OP_OP_CHECKSIG
    The entire transaction’s outputs, inputs, and script 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
This does everything OP_CHECKSIG does but also executes OP_VERIFY afterwards.

  1. OP_DROP
  2. 0xae
1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    OP_CHECKSIGVERIF does the same than OP_CHECKSIG but once done it executes OP_VERIFY which verify is top value is true and removes it if not.

  2. What is the “Pop” functions called in Script? (It is not called OP_POP)
    It removes the most recent input from the stack

  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?
OP_CHECKSIG checks to see if the hash is true (1) or false (0) gives the corresponding output.
OP_OP_CHECKSIGVERIFY does the same but then additionally executes OP_VERIFY which verifies if the top stack value is true or if not marks it as invalid and removes it.

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

What is the hexadecimal OP Code for OP_CHECKMULTISIG?
0xae

1 Like
  1. OP_VERIFY is executed afterward
  2. OP_DROP
  3. 0xAE
1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    • OP_CHECKSIG checks to see if the hash is true (1) or false (0) giving the corresponding output.
    OP_CHECKSIGVERIFY does the same thing then calls OP_VERIFY which checks the top stack value. If the value is false (0) it marks it as invalid and then removes it.

  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

2 Likes
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    The only difference is that OP_CHECKSIGVERIFY is doing one more operation right after called OP_VERIFY.

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

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

1 Like

OP_DROP is correct, because OP_2DROP removes the top two and OP_NIP removes the second one from the top. :slight_smile:

1 Like
  1. What is the practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY?
  • The later add OP_VERIFY, otherwise it’s the same.
  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
  • What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

OP_CHECKSIG will check the signature and will return either false or true. This command can be used to with OP_IF etc

OP_CHECKSIGVERIFY work same as OP_CHECKSIG, but OP_VERIFY is executed afterward. It means it validate or invalidate the transection.

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

  • What is the hexadecimal OP Code for OP_CHECKMULTISIG?
    its * 0xae

1 Like
  1. The practical difference is that OP_CHECKSIG returns either 0 or 1, while OP_CHECKSIGVERIFY perform the first the OP_CHECKSIG giving 0 or 1 as a result, and then OP_VERIFY at the element. If the result from OP_VERIFY is false, this would halt the execution, if the result is true then execution continues
  2. The “pop” function is called OP_DROP
  3. 0xae
1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?

OP_CHECKSIGVERY runs OP_VERIFY automatically after OP_CHECKSIG. It marks the transaction as invalid if the top stack is not true and removes the top stack value.

  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

EDIT: Changed **OF**_DROP to **OP**_DROP. Thank you for correcting me @Alko89 sensei ! :pray:

1 Like

Its OP_DROP :slight_smile:

  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    OP_CHECKSIGVERIFY is the same as OP_CHECKSIG except it is executed afterwards.

  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. OP_CHECKSIGVERIFY is a convenience to execute: OP_CHECKSIG OP_VERIFY
  2. OP_DROP
  3. 0xae
1 Like
  1. What is the practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY?
    a. OP_CHECKSIG: This operation is used to check if transaction inputs are valid. It will also
    expect a couple of values on the stacks, the public key, and the signature of the scrip.

    b. OP_CHECKSIGVERIFY: This operation code is two ops combined into one. The opcode will
    checks if the top stack value is not true. If it’s not true, it will remove the top stack value.

  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. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    checksig will return a true or false to the top of the stack
    checksigverify will additionally remove the top stack value if checksig returns a false

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

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

2 Likes
  1. The difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY is In OP_OP_CHECKSIGVERIFY the OP_OP_VERIFY is required after using OP_OP_CHECKSIGVERIFY.
  2. the Pop function in Script is OP-DROP.
  3. the Hexadecimal OP Code for OP_CHECKMULTISIG is 0xae
1 Like

1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY? That OP_CHECKSIGVERIFY does the same as 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.) but also runs OP_VERIFY (Marks transaction as invalid if top stack value is not true. The top stack value is removed) right after.
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