<p>Bitcoind cannot tell it is a multisig input until it is signed. Prior to signing, all p2sh outputs are identical, and can be any script. Most commonly, it would either be a multisig or a p2sh-p2wsh, or a p2sh-p2wpkh, but an unsigned transaction does not contain enough information to differentiate between them.</p>

<p>If the script's redeemscript is known to your bitcoind instance (such as by being part of an active, loaded wallet), you might be able to get more information even prior to signing.</p>

CC BY-SA 4.0
2020-02-11T08:54:44.007Z
I included an update above, thanks a lot for the explanation. The reedemScript is known, I already included it into my update using `signrawtransaction()`.
t0berius
CC BY-SA 4.0
2020-02-11T18:00:37.743Z
**You** know the redeemScript, but the bitcoind wallet does not. Even though you created the multisig and passed the redeemScript using Core, none of the information is stored in the wallet unless you explicitly do so using `addmultisigaddress` or `importscript`/`importmulti`.
Ava Chow
CC BY-SA 4.0
2020-02-19T11:47:59.970Z
@Andrew Chow Thanks for your reply, I already used importmulti before, since I need to watch the address for incoming payments. See first post (edited it). Any ideas where the problem may be located? importscript isn't found at all and addmultisigaddress should only be used for non-watchonly addresses
t0berius
CC BY-SA 4.0
2020-02-11T08:34:32.007Z
2020-02-11T08:34:32.007Z
Raghav Sood
<p>Seems like there was a change in how multisig transactions are being created. Running a node using bitcoind v0.16.3 and another one using latest bitcoind (v.0.19.0.1).</p>
<p>The multisig transaction created on the old node can be decoded by <a href="https://coinb.in/#sign" rel="nofollow noreferrer">coinb.in</a> correctly (it's displayed as a multisig 2:3 transaction). Using the newest bitcoind to create transaction coinb.in isn't able to display it correctly.</p>
<p>Someone involved into this / is there a way to use bitcoind latest version to create a multisig transaction which can be decoded on coinb.in (maybe using parameters when signing)?</p>
<p>Example using bitcoind latest version (<code>v.0.19.0.1</code>).</p>
<pre><code>./bitcoin-cli createmultisig 2 &quot;[\&quot;02ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e\&quot;,\&quot;037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c\&quot;,\&quot;034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb67\&quot;]&quot;
{
  &quot;address&quot;: &quot;3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8&quot;,
  &quot;redeemScript&quot;: &quot;522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae&quot;
}
</code></pre>
<p>Now found the address using TX <code>63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01</code></p>
<p>Important part using <code>getrawtransaction</code>:</p>
<pre><code>{
  &quot;value&quot;: 0.00053938,
  &quot;n&quot;: 1,
  &quot;scriptPubKey&quot;: {
    &quot;asm&quot;: &quot;OP_HASH160 7b3c11ea9596776b98f1d7e68ffcf891e860216f OP_EQUAL&quot;,
    &quot;hex&quot;: &quot;a9147b3c11ea9596776b98f1d7e68ffcf891e860216f87&quot;,
    &quot;reqSigs&quot;: 1,
    &quot;type&quot;: &quot;scripthash&quot;,
    &quot;addresses&quot;: [
      &quot;3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8&quot;
    ]
  }
</code></pre>
<p>Create a transaction using the information</p>
<pre><code>./bitcoin-cli createrawtransaction &quot;[{\&quot;txid\&quot;:\&quot;63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01\&quot;,\&quot;vout\&quot;:1}]&quot; &quot;[{\&quot;1GAFEtKWhwn5wQTt53kFMgd4b7xEyCxHHg\&quot;:0.00048961}]&quot;
</code></pre>
<p>Generated transaction (unsigned) <strong>Decode on coinb.in shows no multisig details</strong>:</p>
<p><code>0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c8630100000000ffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000</code></p>
<p>After signing there are still no details about multisig shown on <code>coinb.in</code>, using bitcoind <code>v0.16.3</code> the transaction itself is shown as type <code>multisig</code> correctly. Any ideas how to get the same result using the latest bitcoind?</p>
<h2>Update</h2>
<p>Signing the transaction with 1 key:</p>
<pre><code>'signrawtransactionwithkey',[
            &quot;0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c8630100000000ffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000&quot;,
            [
                &quot;privkey&quot;,
            ],
            [
                &quot;txid&quot;              =&gt; &quot;63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01&quot;,
                &quot;vout&quot;              =&gt; 1,
                &quot;scriptPubKey&quot;      =&gt; &quot;a9147b3c11ea9596776b98f1d7e68ffcf891e860216f87&quot;,
                &quot;redeemScript&quot;      =&gt; &quot;522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae&quot;,
                &quot;amount&quot;            =&gt; 0.00053938,
            ],
        ]
</code></pre>
<p>Returns:</p>
<pre><code>{
&quot;result&quot;:{
&quot;hex&quot;:&quot;0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c86301000000b50047304402200e83a051845ff6d5d20fd9cab5c6e15e8ae99ab0b2ac14bcf991f4f3bad3b4a00220555c7c3d419e80165e8f42385b158ca01a125686e19bf01a522332c35e689dd701004c69522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753aeffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000&quot;,
&quot;complete&quot;:false,
&quot;errors&quot;:[
{
&quot;txid&quot;:&quot;63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01&quot;,
&quot;vout&quot;:1,
&quot;witness&quot;:[
],
&quot;scriptSig&quot;:&quot;0047304402200e83a051845ff6d5d20fd9cab5c6e15e8ae99ab0b2ac14bcf991f4f3bad3b4a00220555c7c3d419e80165e8f42385b158ca01a125686e19bf01a522332c35e689dd701004c69522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae&quot;,
&quot;sequence&quot;:4294967295,
&quot;error&quot;:&quot;CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)&quot;
}
]
},
&quot;error&quot;:null,
&quot;id&quot;:null
}
</code></pre>
<p>Is the transaction itself signed correctly?</p>
<p>Transaction can be decoded using <code>coinb.in</code> but it says <code>signed by 2 parts</code> which is incorrect for sure.</p>
<h2>Update 2</h2>
<p>I tried to use <code>importmulti</code> before creating the transaction too:</p>
<pre><code>'importmulti',
        [
            [
                [
                    'scriptPubKey'  =&gt; [
                        'address'   =&gt; &quot;3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8&quot;,
                    ],
                    'timestamp'     =&gt; 'now',
                    'redeemscript'  =&gt; &quot;522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae&quot;,
                    'watchonly'     =&gt; true,
                    'internal'      =&gt; false,

                ]
            ],
            [
                'rescan' =&gt; false
            ]
        ]));

        array:1 [▼
          0 =&gt; {#757 ▼
            +&quot;success&quot;: true
          }
        ]
</code></pre>
<p>Doesn't change the generated transaction at all.</p>

<bitcoin-core><bitcoind><multi-signature><createrawtransaction><signrawtransaction>
bitcoind multisig transaction not shown as multisig transaction / shown as "signed" by 2:3
t0berius
# bitcoind multisig transaction not shown as multisig transaction / shown as "signed" by 2:3

(Asked by: username_0 on 2020-02-11)

Seems like there was a change in how multisig transactions are being created. Running a node using bitcoind v0.16.3 and another one using latest bitcoind (v.0.19.0.1).

The multisig transaction created on the old node can be decoded by [coinb.in](https://coinb.in/#sign) correctly (it's displayed as a multisig 2:3 transaction). Using the newest bitcoind to create transaction coinb.in isn't able to display it correctly.

Someone involved into this / is there a way to use bitcoind latest version to create a multisig transaction which can be decoded on coinb.in (maybe using parameters when signing)?

Example using bitcoind latest version (`v.0.19.0.1`).

```
./bitcoin-cli createmultisig 2 "[\"02ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e\",\"037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c\",\"034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb67\"]"
{
  "address": "3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8",
  "redeemScript": "522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae"
}

```

Now found the address using TX `63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01`

Important part using `getrawtransaction`:

```
{
  "value": 0.00053938,
  "n": 1,
  "scriptPubKey": {
    "asm": "OP_HASH160 7b3c11ea9596776b98f1d7e68ffcf891e860216f OP_EQUAL",
    "hex": "a9147b3c11ea9596776b98f1d7e68ffcf891e860216f87",
    "reqSigs": 1,
    "type": "scripthash",
    "addresses": [
      "3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8"
    ]
  }

```

Create a transaction using the information

```
./bitcoin-cli createrawtransaction "[{\"txid\":\"63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01\",\"vout\":1}]" "[{\"1GAFEtKWhwn5wQTt53kFMgd4b7xEyCxHHg\":0.00048961}]"

```

Generated transaction (unsigned) **Decode on coinb.in shows no multisig details**:

`0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c8630100000000ffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000`

After signing there are still no details about multisig shown on `coinb.in`, using bitcoind `v0.16.3` the transaction itself is shown as type `multisig` correctly. Any ideas how to get the same result using the latest bitcoind?

## Update

Signing the transaction with 1 key:

```
'signrawtransactionwithkey',[
            "0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c8630100000000ffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000",
            [
                "privkey",
            ],
            [
                "txid"              => "63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01",
                "vout"              => 1,
                "scriptPubKey"      => "a9147b3c11ea9596776b98f1d7e68ffcf891e860216f87",
                "redeemScript"      => "522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae",
                "amount"            => 0.00053938,
            ],
        ]

```

Returns:

```
{
"result":{
"hex":"0200000001011c64d052c5f91e81520ecc5b204c3387d6ff96448501263a69bf3c8ac6c86301000000b50047304402200e83a051845ff6d5d20fd9cab5c6e15e8ae99ab0b2ac14bcf991f4f3bad3b4a00220555c7c3d419e80165e8f42385b158ca01a125686e19bf01a522332c35e689dd701004c69522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753aeffffffff0141bf0000000000001976a914a6498450eb421d3926fcf12366e5abe2e7dfb93688ac00000000",
"complete":false,
"errors":[
{
"txid":"63c8c68a3cbf693a2601854496ffd687334c205bcc0e52811ef9c552d0641c01",
"vout":1,
"witness":[
],
"scriptSig":"0047304402200e83a051845ff6d5d20fd9cab5c6e15e8ae99ab0b2ac14bcf991f4f3bad3b4a00220555c7c3d419e80165e8f42385b158ca01a125686e19bf01a522332c35e689dd701004c69522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae",
"sequence":4294967295,
"error":"CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)"
}
]
},
"error":null,
"id":null
}

```

Is the transaction itself signed correctly?

Transaction can be decoded using `coinb.in` but it says `signed by 2 parts` which is incorrect for sure.

## Update 2

I tried to use `importmulti` before creating the transaction too:

```
'importmulti',
        [
            [
                [
                    'scriptPubKey'  => [
                        'address'   => "3Cvczsgf3JTCHSjPgRACCia5gtyQKJWng8",
                    ],
                    'timestamp'     => 'now',
                    'redeemscript'  => "522102ab224d0d8de7d5ad5568bf4f66b9c29ea7afd0f196176f9b09a311c11da6377e21037b3ccfb03f8dc58598619b2f3a91e33012444469fc69b4459760d04c20c4d69c21034254badc6cd5c4fa4e0ca10fb88d289bd7260331c5355ec2361312eafb26eb6753ae",
                    'watchonly'     => true,
                    'internal'      => false,

                ]
            ],
            [
                'rescan' => false
            ]
        ]));

        array:1 [▼
          0 => {#757 ▼
            +"success": true
          }
        ]

```

Doesn't change the generated transaction at all.

**Tags:** bitcoin-core, bitcoind, multi-signature, createrawtransaction, signrawtransaction


---

## 1 answers

### Answer by username_1 on 2020-02-11. Score: 1

Bitcoind cannot tell it is a multisig input until it is signed. Prior to signing, all p2sh outputs are identical, and can be any script. Most commonly, it would either be a multisig or a p2sh-p2wsh, or a p2sh-p2wpkh, but an unsigned transaction does not contain enough information to differentiate between them.

If the script's redeemscript is known to your bitcoind instance (such as by being part of an active, loaded wallet), you might be able to get more information even prior to signing.

> **Comments:**
> **username_0**: I included an update above, thanks a lot for the explanation. The reedemScript is known, I already included it into my update using `signrawtransaction()`.  
> **username_2**: **You** know the redeemScript, but the bitcoind wallet does not. Even though you created the multisig and passed the redeemScript using Core, none of the information is stored in the wallet unless you explicitly do so using `addmultisigaddress` or `importscript`/`importmulti`.  
> **username_0**: @Andrew username_2 Thanks for your reply, I already used importmulti before, since I need to watch the address for incoming payments. See first post (edited it). Any ideas where the problem may be located? importscript isn't found at all and addmultisigaddress should only be used for non-watchonly addresses  

---

