Reading Assignment: Script

  1. verify happens afterwards. it looks like transaction signatures and verification.
    2.OP_DROP
    3.0xae
2 Likes
  1. OP_OP_CHECKSIG checks inputs, outputs and scripts and must be valid signature, OP_OP_CHECKSIGVERIFY does the same thing but also does OP_VERIFY afterwards

2.OP_DROP

3.0xae

1 Like
  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
  • OP_CHECKSIGVERIFY is executed afterward.
  1. What is the “Pop” functions called in Script? (It is not called OP_POP)
  • It’s called OP_DROP.
  1. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
  • It’s 0xae.

OP_CHECKSIGVERIFY executes OP_VERIFY after OP_CHECKSIG. :slight_smile:

1 Like

Thanks a lot. :slight_smile:

  1. OP_CHECKSIG simply checks that the signature is valid and returns true or false, but CHECKSIGVERIFY checks and marks transaction as invalid if CHECKSIG returns false and then that is removed from the stack.
  2. OP_DROP
    3.0xae
1 Like

OP_CHECKSIG and OP_CHECKSIGVERIFY are essentially calling the same method, OP_CHECKSIG, that is to check check whether the provided signature is a valid signature for a particular transaction hash (which include the transaction’s output, inputs and script) and its public key. The only difference between the two is for OP_CHECKVIGVERIFY it calls an additional OP_VERIFY after calling OP_CHECKSIG.

OP_DROP is the Script’s equivalent of POP

OxAE

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

A// The practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY is that both validate if the hash is 1 (true) or 0 (false), in OP_CHECKSIGVERIFY is the same but after the process OP_VERIFY marks transactions invalid if the top stack value is not true (0) the top is removed.

  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. What is the practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY?
    The practical difference between the commands is that OP_VERIFY is executed after OP_CHECKSIG in OP_CHECKSIGVERIFY. It’s a combination of the commands.
  2. What is the “Pop” functions called in Script? (It is not called OP_POP)
    OP_DROP - Removes the top stack item.
  3. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
    0xae
1 Like

Hello Bitcoin learners, :cowboy_hat_face:

  1. Opcodes ending in …VERIFY fail the current transaction if conditions are not met.

For instance OP_CHECKSIGVERIFY fails the current transaction if the given signature is invalid, while OP_CHECKSIG merely returns true or false.

  1. OP_DROP removes the top-stack item, which is equivalent to popping
  2. OP_CHECKMULTISIG opcode in hex is 0xae.
1 Like

1. What is the practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY?
OP_CHKSIG verifies whether the signature is valid or not for a Tx input. To do this it requires a) Signature b) Public key. If the signature check passes it returns 1 (true), otherwise it returns 0 (false).
OP_CHKSIGVERIFY does the same as above however it does not return/leave any output on stack but immediately fails the script validation.

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. checksigverify is the same as checksig but executed afterwards

  2. op_drop

  3. 0xae

1 Like

1.OP_CHECKSIG is when the output, inputs, and scripts are hashed. Then checked against the signature and public key. OP_CHECKSIGVERIFY does the same operation as OP_CHECKSIG but the verify function is ran after.

  1. the pop function is called OP_DROP.

3.The OP code for OP_CHECKMULTISIG is 174 and the hex is 0xae.

1 Like

What is the practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY?

OP_CHECKSIG The entire transaction outputs, inputs and script are hashed. The signature of the OP_CHECKSIG should be a valid signautre for the hasha and public key. This should return 1 for true or 0 if false.

OP_CHECKSIGVERIFY does the same as OP_CHECKSIG but in addition, executes OP_VERIFY.

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

In Script the “Pop” function is call OP_DROP.

What is the hexadecimal OP Code for OP_CHECKMULTISIG?

The hexadecimal code for OP_CHECKMULTISIG is 0xae

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

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

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.

And then OP_VERIFY is executed after OP_CHECKSIG which Marks transaction as invalid if top stack value is not true. The top stack value is removed.

  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. The practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY is that in operation OP_OP_CHECKSIGVERIFY, OP_VERIFY is executed afterward.

  2. OP_DROP removes the top stack item.

  3. 0xae

  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    Basically, the same but OP_CHECKSIGVERIFY 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. The operation OP_CHECKSIGVERIFY executes the command of OP_CHECKSIG but with an additional verification, as well.
  2. OP_DROP, OP_NIP, OP_2DROP are all “pop” functions.
  3. 0xae