I am trying to do a multisig

here is my final hex


and here is the script I am using


error I am getting when broadcasting

Error validating transaction: Error running script for input 1 referencing ac560e33ef8005359fc84544edaab46a42fe65e2bd4b3461bd4cec19bf5a0c8d at 0: Script was NOT verified successfully..


@Sunny, looks like you just broadcast a valid TXN on those UTXOs, so I assume you figured it out.

For those reading at home, the problem was that there were three addresses in the redeem script:


But only one address is used (twice) to sign the TXN


The result is that your script hash is correct, since you used the proper three addresses, but you don't meet the 2 of 3 requirement to spend since you've only proven ownership of the private keys for 48'/0'/2'/0/0

I assume you simply corrected the error and added a second address to your script.

  • yup that is correct. I got it working.
    – Sunny
    Dec 12 '18 at 14:29
  • what I found interesting looking at the failed TXN is that even though you signed with the same key twice, the signatures were different. I'll have to go back through the spec and see what info changes on subsequent multisig signing paths. I would have thought that the serialized TXN would look the same on the first pass as it did on the third. Apparently not.
    – Dan
    Dec 12 '18 at 14:41
  • pls post your findings. I would also like to know. thanks
    – Sunny
    Dec 12 '18 at 14:50
  • I'll plagerize your work if you don't mind. Just leave your pastbin up, as well as this thread. Easier to reference. I'll make a new SE question later when I've done my research just to make sure its not already known
    – Dan
    Dec 12 '18 at 14:54
  • 1
    @Sunny, I figured it out, the reason the sigs are different is because they are signing different inputs. From the wiki on OP_SIGCHECK (steps 7 and 8) you will see that extra script bits are added to the input your signing. So when you change from signing inp1 to inp1, even though you use the same key, the extra script bits are in different parts of the signature.
    – Dan
    Dec 13 '18 at 2:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.