Advanced Bitcoin Scripting - Discussion

#1

Welcome to the discussion about this section. Here you can ask questions or post feedback about this specific lecture.

0 Likes

#2

Reading Assignment

  1. What is the practical difference between OP_OP_CHECKSIG and OP_OP_CHECKSIGVERIFY?
    Answer:
    OP_CHECKSIG returns either 1 or 0 for True/False; thus, OP_OP_CHECKSIG would be OP of the return value from the first operation which is OP_1 or OP_0 (still returns True or False)
    OP_CHECKSIGVERIFY performs first the operations which is OP_CHECKSIG; returns stated above, thereafter performs OP_VERIFY on the return. This would return fail (mark the transaction invalid and remove it from the top of the stack) if the input value is false.
    So OP_OPCHECKSIGVERIFY would be the OP of the return from OP_CHECKSIGVERIFY.

  2. What are the “Push” and “Pop” functions called in Script? (They are not called OP_PUSH and OP_POP)
    Answer
    No idea (help me out)

  3. What is the hexadecimal OP Code for OP_CHECKMULTISIG?
    Answer: 174

0 Likes

#3
  1. Hint. Look through the script wiki page and go down to the script section with op-codes. There you will find them: https://en.bitcoin.it/wiki/Script

  2. Correct, but in hex it is 0xae

0 Likes

#4

Need help! Not printing the multisigScript on console as your powershell

0 Likes

#5

try changing your console.log line to

console.log(multiSigScript.toString('utf8'));
0 Likes

#6

Thanks filip, it worked , why you don’t have to do this conversion in your script?

0 Likes

#7

Now getting below error
Tried below
1.uninstalling /installing nodjs and npm.
2.tried running power-shell as admin and repeating 1 but not working

0 Likes