- What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
- OP_OP_CHECKSIG
- Checks to see if the hash is true(1) or false (0) giving the corresponding value
- OP_OP_CHECKSIGVERIFY
- Same as above but the calles OP_VERIFY which checks the top stack value, if false (0) marked as invalid and removed from the stack
- OP_OP_CHECKSIG
- 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
Reading Assignment: Script
-
What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
OP_OP_CHECKSIGVERIFY will run OP_VERIFY afterward, that will Mark transaction as invalid if top stack value is not true. The top stack value is removed. -
What is the “Pop” functions called in Script? (It is not called OP_POP)
OP_DROP
It removes the top stacked item. -
What is the hexadecimal OP Code for OP_CHECKMULTISIG?
OP Code: 174
Hexadecimal: 0xae
- What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
With OP_CHECKSIG the output is either True(1) or False (0). With OP_CHECKSIGVERIFY this is the same as OP_CHECKSIG but OP_CHECKSIGVERIFY is executed afterwards. OP_CHECKSIG_VERIFY leaves nothing on the stack but will cause the script eval to fail immediately if the check does not pass.
-
What is the “Pop” functions called in Script? (It is not called OP_POP)
OP_DROP which removes the top stack item. -
What is the hexadecimal OP Code for OP_CHECKMULTISIG?
0xae
1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
OP_OP_CHECKSIG checks the outputs, inputs, and script are hashed and will return either true or false depending on the pubkey
parameter given. On the other hand, OP_OP_CHECKSIGVERIFY is the same as OP_OP_CHECKSIG plus additional execution of OP_VERIFY afterwards, and will return nothing if it is successful or fail if there is an error.
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 What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
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
1. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
0xae
-
OP_CHECKSIGVERIFY runs an OP_VERIFY after OP_CHECKSIG has hashed the i/o and script (since last CODESEPARATOR)
-
OP_DROP is the “pop” equivalent in BTC’s “Script”
-
0xae is the hex formatted opcode for OP_CHECKMULTISIG
-
OP_CHECKSIGVERIFY will have Nothing/fail as an output while OP_CHECKSIG will have True/false as an output.
-
The pop command is called OP_DROP in bitcoin script
-
The hexadecimal output for OP_CHECKMULTISIG is 0xae
1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
Runs OP_VERIFY on the result of OP_CHECKSIG. That is, it will mark the transaction as invalid if OP_CHECKSIG fails and return nothing if it passes. This in contrast to returning 0 or 1 in the case of OP_CHECKSIG
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. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
The only difference is that OP_CHECKSIGVERIFY performs OP_VERIFY after OP_CHECKSIG, marking the transaction as invalid and deleting the top stack value if it is not true (1).
2. What is the “Pop” functions called in Script? (It is not called OP_POP)
OP_DRIO
3. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
0xae
Is this a typo?
- Both process validity of transaction signature. Op_checksigverify continues on to execute op_verify.
- op_drop
- 0xae
-
OP_CHECKSIGVERIFY will mark transaction as invalid if OP_CHECKSIG value is not true and will remove it.
-
OP_DROP
-
0xae
What is the practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY?
- The
OP_CHECKSIG
hashes all the inputs, outputs and scripts of a transaction and returns 1 if the signature is valid, and 0 if it is not (like a boolean). - The
OP_CHECKSIGVERIFY
executes theOP_CHECKSIG
operation, and then performs theOP_VERIFY
operation afterward - The
OP_VERIFY
operation marks a transaction as invalid if the top-stack value is not true, and it will be removed.
So the only operational difference between OP_CHECKSIG
and OP_CHECKSIGVERIFY
is that the latter will remove the value from the top of the stack if it is invalid, whereas OP_CHECKSIG
will merely return a 1 if the signature is valid, or 0 if it is not.
What is the “Pop” functions called in Script? (It is not called OP_POP)
The Pop function in Script is call OP_DROP
.
This is where the value on the top of the stack is popped, or rather, removed from the top of the stack.
What is the hexadecimal OP Code for OP_CHECKMULTISIG?
The hexadecimal OP Code for OP_CHECKMULTISIG
is 0xae => which is 174.
- OP_VERIFY is executed after OP_CHECKSIG
- OP_DROP
- 0xae
-
OP_CHECKSIG checks if hash is valid(1)/invalid(0) by giving the corresponding output
OP_CHECKSIGVERIFY is similar but it then uses OP_VERIFY that checks the top stack value.
If it’s invalid (false) it’ll be removed -
OP_DROP (top item of stack is removed
-
0xae
- The second operation is the same as the first (OP_CHECKSIG) but also executes OP_VERIFY.
- It’s OP_DROP.
- It’s “0xae”.
What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
OP_OP_CHECKSIGVERIFY will also execute the OP_VERIFY
What is the “Pop” functions called in Script? (It is not called OP_POP)
You can remove the item on top of the stack using OP_DROP
What is the hexadecimal OP Code for OP_CHECKMULTISIG?
0xae
-
What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
OP_OP_CHECKSIGVERIFY will perform additional operation OP_VERIFY to check if the transaction is valid or not by checking the top stack value is true or false. -
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. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
OP_CHECKSIG hashes the entire tx and returns a True/False (1/0) depending on whether or not the signature used is a valid one for the hash and key.
OP_CHECKSIGVERIFY does all the above, and then executes OP_VERIFY after.
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
-
The practical difference between OP_CHECKSIG and OP_CHECKSIGVERIFY is that if the signature is invalid, the latter will mark it invalid and remove the top stack, the former will only return 0.
-
OP_DROP
-
0xae