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

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

<pre><code>48'/0'/2'0/0
48'/0'/3'0/0
48'/0'/1'0/0
</code></pre>

<p>But only one address is used (twice) to sign the TXN</p>

<pre><code>48'/0'/2'/0/0
</code></pre>

<p>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 <code>48'/0'/2'/0/0</code></p>

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

CC BY-SA 4.0
2018-12-12T14:29:46.043Z
yup that is correct. I got it working.
Sunny
CC BY-SA 4.0
2018-12-12T14:41:04.680Z
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
CC BY-SA 4.0
2018-12-12T14:50:49.427Z
pls post your findings. I would also like to know. thanks
Sunny
CC BY-SA 4.0
2018-12-12T14:54:12.433Z
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
CC BY-SA 4.0
2018-12-13T02:23:53.097Z
@Sunny, I figured it out, the reason the sigs are different is because they are signing different inputs.  From the wiki on [`OP_SIGCHECK`](https://en.bitcoin.it/wiki/OP_CHECKSIG) (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
CC BY-SA 4.0
2018-12-12T14:22:10.297Z
2018-12-12T14:22:10.297Z
Dan
<p>I am trying to do a multisig </p>

<p>here is my final hex</p>

<pre><code>0100000002ac55020798f18acf9354c2e8ced3b00ba7950590992b70adfcd566ec7c10525000000000fc004730440220281525305913c55bd9559c3bd5fdd61ea35783725e0b6b08b291b52c5bc6cd6302206dca418325d8a2d6972056813fc37cb4079fdf7026fd072b3840040fee39ad360147304402201756981e916c2611160fa3b34f7f3f274e21027f543aae55d52038aed82d3dee022048f86ca2b0c36d3333f3113e425c244a1ccd9e27a44d55cb131629fe14fece6f014c695221020c81e690eace25dfc949b85109256769a6a6051412b72ec739886e265c6dd8a7210210bcb0788c50f89122ff912bce2dec291aa41ed22a7f447c1a8f638cbf0d9d5d2102842d33deb2139b78260bcd3e0962c28963c3f08a6a378a4f4eb9e1d352447edb53aeffffffff8d0c5abf19ec4cbd61344bbde265fe426ab4aaed4445c89f350580ef330e56ac00000000fc004730440220281525305913c55bd9559c3bd5fdd61ea35783725e0b6b08b291b52c5bc6cd6302206dca418325d8a2d6972056813fc37cb4079fdf7026fd072b3840040fee39ad360147304402202e137d2123e6b5bbbc996884af591b70e00e33c6274f9ad7143237b7796aaeb1022066b1842fecba09cbb72bad841aea68d58637b02b5ad0c4b2fa6c9a756aa348fe014c695221020c81e690eace25dfc949b85109256769a6a6051412b72ec739886e265c6dd8a7210210bcb0788c50f89122ff912bce2dec291aa41ed22a7f447c1a8f638cbf0d9d5d2102842d33deb2139b78260bcd3e0962c28963c3f08a6a378a4f4eb9e1d352447edb53aeffffffff02a08601000000000017a9148624340a6f5cd0117bcd237af85f7ef303257d0a87a08601000000000017a9148624340a6f5cd0117bcd237af85f7ef303257d0a8700000000
</code></pre>

<p>and here is the script I am using</p>

<p><a href="https://pastebin.com/Nvcui563" rel="nofollow noreferrer">https://pastebin.com/Nvcui563</a></p>

<p>error I am getting when broadcasting</p>

<p><code>Error validating transaction: Error running script for input 1 referencing ac560e33ef8005359fc84544edaab46a42fe65e2bd4b3461bd4cec19bf5a0c8d at 0: Script was NOT verified successfully..</code></p>

<testnet><python><multi-signature><trezor>
Mutlisig tansactions with trezor with multiple inputs and outputs not able to broadcast
Sunny
# Mutlisig tansactions with trezor with multiple inputs and outputs not able to broadcast

(Asked by: username_0 on 2018-12-12)

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..`

**Tags:** testnet, python, multi-signature, trezor


---

## 1 answers

### Answer by username_1 on 2018-12-12. Score: 1 | Accepted answer

@username_0, 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.

> **Comments:**
> **username_0**: yup that is correct. I got it working.  
> **username_1**: 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.  
> **username_0**: pls post your findings. I would also like to know. thanks  
> **username_1**: 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  
> **username_1**: @username_0, I figured it out, the reason the sigs are different is because they are signing different inputs.  From the wiki on [`OP_SIGCHECK`](https://en.bitcoin.it/wiki/OP_CHECKSIG) (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.  

---

