1

I am trying to do a multisig

here is my final hex

0100000002ac55020798f18acf9354c2e8ced3b00ba7950590992b70adfcd566ec7c10525000000000fc004730440220281525305913c55bd9559c3bd5fdd61ea35783725e0b6b08b291b52c5bc6cd6302206dca418325d8a2d6972056813fc37cb4079fdf7026fd072b3840040fee39ad360147304402201756981e916c2611160fa3b34f7f3f274e21027f543aae55d52038aed82d3dee022048f86ca2b0c36d3333f3113e425c244a1ccd9e27a44d55cb131629fe14fece6f014c695221020c81e690eace25dfc949b85109256769a6a6051412b72ec739886e265c6dd8a7210210bcb0788c50f89122ff912bce2dec291aa41ed22a7f447c1a8f638cbf0d9d5d2102842d33deb2139b78260bcd3e0962c28963c3f08a6a378a4f4eb9e1d352447edb53aeffffffff8d0c5abf19ec4cbd61344bbde265fe426ab4aaed4445c89f350580ef330e56ac00000000fc004730440220281525305913c55bd9559c3bd5fdd61ea35783725e0b6b08b291b52c5bc6cd6302206dca418325d8a2d6972056813fc37cb4079fdf7026fd072b3840040fee39ad360147304402202e137d2123e6b5bbbc996884af591b70e00e33c6274f9ad7143237b7796aaeb1022066b1842fecba09cbb72bad841aea68d58637b02b5ad0c4b2fa6c9a756aa348fe014c695221020c81e690eace25dfc949b85109256769a6a6051412b72ec739886e265c6dd8a7210210bcb0788c50f89122ff912bce2dec291aa41ed22a7f447c1a8f638cbf0d9d5d2102842d33deb2139b78260bcd3e0962c28963c3f08a6a378a4f4eb9e1d352447edb53aeffffffff02a08601000000000017a9148624340a6f5cd0117bcd237af85f7ef303257d0a87a08601000000000017a9148624340a6f5cd0117bcd237af85f7ef303257d0a8700000000

and here is the script I am using

https://pastebin.com/Nvcui563

error I am getting when broadcasting

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

1

@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:

48'/0'/2'0/0
48'/0'/3'0/0
48'/0'/1'0/0

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

48'/0'/2'/0/0

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.