<p>It seems that the problem is related to the testnet itself. Since the fees in the testnet aren't real the minors don't have the incentive to mine complicated scripts. Hence scripts such as MULTISIG might not get mined (for me with a high probability approaching one!).</p>

<p>To see this you may add a big number at the beginning of the scriptSig.</p>

<p>For the case of MULTISIG it is enough not to use P2SH method. i.e.</p>

<pre><code> ex32a_txout_scriptPubKey = CScript([2, J1_public_key, J2_public_key, J3_public_key, 3, OP_CHECKMULTISIG])
</code></pre>

<p>and the scriptSig can be:</p>

<pre><code>CScript([dummy, dummy, J2_signature, J3_signature])
</code></pre>

<p>This transaction gets recognized as <code>pay-to-multi-pubkey-hash</code> and get <a href="https://live.blockcypher.com/btc-testnet/tx/2176fcb87e46144f0694c00c22333c1358695979c3cb3715f85d7ae1f866cb65/" rel="nofollow noreferrer">mined</a>. </p>

<p>However this will not resolve the problem with more complicated scripts on testnet.</p>

CC BY-SA 4.0
2018-12-05T06:16:46.203Z
2018-12-05T18:00:11.923Z
2018-12-05T18:00:11.923Z
SMA.D
<p>I'm trying to check the following simple MULTISIG P2SH script on bitcoin testnet (using <code>python-bitcoinlib</code>):</p>

<pre><code>Redeem = CScript([2, J1_public_key, J2_public_key, J3_public_key, 3, OP_CHECKMULTISIG])
ex31a_txout_scriptPubKey = Redeem.to_p2sh_scriptPubKey()
</code></pre>

<p>My first transaction got mined. Here is the <a href="https://live.blockcypher.com/btc-testnet/tx/74637832f2a7a830444494570b95880b158171859046427e26c97cba1fb4121e/" rel="nofollow noreferrer">link</a>. It is verified by the python library <code>python-bitcoinlib</code> that the following <code>scriptSig</code> can redeem the coin.  </p>

<pre><code>J2_signature = create_OP_CHECKSIG_signature(txin, txout, Redeem,
                                          J2_private_key)
J3_signature = create_OP_CHECKSIG_signature(txin, txout, Redeem,
                                          J3_private_key)

dummy = 123
txin_scriptSig = CScript([dummy, J2_signature, J3_signature, Redeem])   
</code></pre>

<blockquote>
  <p>However my redeeming transaction don't get mined on the testnet. I don't know why!</p>
</blockquote>

<hr>

<h2>Edit</h2>

<p>A minimal example is replaced instead of the previous one.</p>

<p>The new script uses P2SH.</p>

<p>Here is the API code of the transaction:</p>

<pre><code>{
  "block_height": -1,
  "block_index": -1,
  "hash": "6371461a476ae87dd31b89e7deb9ff59b9679306b23ff86036dc3d7851a76a3c",
  "hex": "01000000019d8e6c705ba87c12f785542ea6253478585a24d871624036c3cfa30b1c0bfbe400000000fddb01017b483045022100dc369db54ceaa7b182969f23a176ae21d14272dff8d941360a5140d17f196e24022044ed2a8c05c5eff115fd5536478027b74a8aeea8f8e393377fcf7c8c232b352201483045022100c227a4fa63b5040bc85a5e7b15c0b081aadd4c538223fa9d8c90cadbc04e649702205a72760687a8c9e74202bfd11b6661f44f093e51a7a4eb4d89876303a9bc94d8014730440220586615cbc74089d7ab4aaf96dc857c0d523df77260159dced512f72c9d3d88b30220177c6f3eb5622ed263c28052ffcda89062a1bda74fdf8e398fba76dd85942bbd014cfd6e51210245aef9640296f238a04b0ee9af1e8dc62a6fe51214af7d3c5bfe518a9cd5afaf2103482de8ad8bf744318b97063544d2fc59322f63baad3d1054ea57609cdb059b6452af6e52210245aef9640296f238a04b0ee9af1e8dc62a6fe51214af7d3c5bfe518a9cd5afaf2103482de8ad8bf744318b97063544d2fc59322f63baad3d1054ea57609cdb059b6452ae635167522102e1183cefc9b3fb15e15bfc53703a6d2e626ccf42cc017f84ec41486114d8cefe210200139f5a548a7cebce4be1308a0262fbb04ec2ea6fc5b38bb3c4ac140ccb5d852102259a3b4527adf82a32e06fb177f27e0606c10f329a22ba7b206ea3eef0e5aa2853ae68ffffffff01a0860100000000001976a9149f9a7abd600c0caa03983a77c8c3df8e062cb2fa88ac00000000",
  "addresses": [
    "2Mz66CzbFYADatUbwXWqHxayRrMHoTCAqXn",
    "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
  ],
  "total": 100000,
  "fees": 400000,
  "size": 562,
  "preference": "high",
  "relayed_by": "194.225.46.158",
  "received": "2018-11-18T21:19:22.298Z",
  "ver": 1,
  "double_spend": false,
  "vin_sz": 1,
  "vout_sz": 1,
  "confirmations": 0,
  "inputs": [
    {
      "prev_hash": "e4fb0b1c0ba3cfc336406271d8245a58783425a62e5485f7127ca85b706c8e9d",
      "output_index": 0,
      "script": "017b483045022100dc369db54ceaa7b182969f23a176ae21d14272dff8d941360a5140d17f196e24022044ed2a8c05c5eff115fd5536478027b74a8aeea8f8e393377fcf7c8c232b352201483045022100c227a4fa63b5040bc85a5e7b15c0b081aadd4c538223fa9d8c90cadbc04e649702205a72760687a8c9e74202bfd11b6661f44f093e51a7a4eb4d89876303a9bc94d8014730440220586615cbc74089d7ab4aaf96dc857c0d523df77260159dced512f72c9d3d88b30220177c6f3eb5622ed263c28052ffcda89062a1bda74fdf8e398fba76dd85942bbd014cfd6e51210245aef9640296f238a04b0ee9af1e8dc62a6fe51214af7d3c5bfe518a9cd5afaf2103482de8ad8bf744318b97063544d2fc59322f63baad3d1054ea57609cdb059b6452af6e52210245aef9640296f238a04b0ee9af1e8dc62a6fe51214af7d3c5bfe518a9cd5afaf2103482de8ad8bf744318b97063544d2fc59322f63baad3d1054ea57609cdb059b6452ae635167522102e1183cefc9b3fb15e15bfc53703a6d2e626ccf42cc017f84ec41486114d8cefe210200139f5a548a7cebce4be1308a0262fbb04ec2ea6fc5b38bb3c4ac140ccb5d852102259a3b4527adf82a32e06fb177f27e0606c10f329a22ba7b206ea3eef0e5aa2853ae68",
      "output_value": 500000,
      "sequence": 4294967295,
      "addresses": [
        "2Mz66CzbFYADatUbwXWqHxayRrMHoTCAqXn"
      ],
      "script_type": "pay-to-script-hash",
      "age": 0
    }
  ],
  "outputs": [
    {
      "value": 100000,
      "script": "76a9149f9a7abd600c0caa03983a77c8c3df8e062cb2fa88ac",
      "addresses": [
        "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
      ],
      "script_type": "pay-to-pubkey-hash"
    }
  ]
}
</code></pre>

CC BY-SA 4.0
2018-11-18T12:18:39.453Z
According to your link there is "no transaction found with the hash 42af7..."
RedGrittyBrick
CC BY-SA 4.0
2018-11-18T13:13:24.840Z
@RedGrittyBrick Since the transaction didn't get mined it has been removed after a couple of hours
SMA.D
<script><testnet><multi-signature>
MULTISIG Verified transaction don't get mined on testnet
SMA.D
# MULTISIG Verified transaction don't get mined on testnet

(Asked by: username_0 on 2018-11-17)

I'm trying to check the following simple MULTISIG P2SH script on bitcoin testnet (using `python-bitcoinlib`):

```
Redeem = CScript([2, J1_public_key, J2_public_key, J3_public_key, 3, OP_CHECKMULTISIG])
ex31a_txout_scriptPubKey = Redeem.to_p2sh_scriptPubKey()

```

My first transaction got mined. Here is the [link](https://live.blockcypher.com/btc-testnet/tx/74637832f2a7a830444494570b95880b158171859046427e26c97cba1fb4121e/). It is verified by the python library `python-bitcoinlib` that the following `scriptSig` can redeem the coin.

```
J2_signature = create_OP_CHECKSIG_signature(txin, txout, Redeem,
                                          J2_private_key)
J3_signature = create_OP_CHECKSIG_signature(txin, txout, Redeem,
                                          J3_private_key)

dummy = 123
txin_scriptSig = CScript([dummy, J2_signature, J3_signature, Redeem])   

```

> However my redeeming transaction don't get mined on the testnet. I don't know why!

---

## Edit

A minimal example is replaced instead of the previous one.

The new script uses P2SH.

Here is the API code of the transaction:

```
{
  "block_height": -1,
  "block_index": -1,
  "hash": "6371461a476ae87dd31b89e7deb9ff59b9679306b23ff86036dc3d7851a76a3c",
  "hex": "01000000019d8e6c705ba87c12f785542ea6253478585a24d871624036c3cfa30b1c0bfbe400000000fddb01017b483045022100dc369db54ceaa7b182969f23a176ae21d14272dff8d941360a5140d17f196e24022044ed2a8c05c5eff115fd5536478027b74a8aeea8f8e393377fcf7c8c232b352201483045022100c227a4fa63b5040bc85a5e7b15c0b081aadd4c538223fa9d8c90cadbc04e649702205a72760687a8c9e74202bfd11b6661f44f093e51a7a4eb4d89876303a9bc94d8014730440220586615cbc74089d7ab4aaf96dc857c0d523df77260159dced512f72c9d3d88b30220177c6f3eb5622ed263c28052ffcda89062a1bda74fdf8e398fba76dd85942bbd014cfd6e51210245aef9640296f238a04b0ee9af1e8dc62a6fe51214af7d3c5bfe518a9cd5afaf2103482de8ad8bf744318b97063544d2fc59322f63baad3d1054ea57609cdb059b6452af6e52210245aef9640296f238a04b0ee9af1e8dc62a6fe51214af7d3c5bfe518a9cd5afaf2103482de8ad8bf744318b97063544d2fc59322f63baad3d1054ea57609cdb059b6452ae635167522102e1183cefc9b3fb15e15bfc53703a6d2e626ccf42cc017f84ec41486114d8cefe210200139f5a548a7cebce4be1308a0262fbb04ec2ea6fc5b38bb3c4ac140ccb5d852102259a3b4527adf82a32e06fb177f27e0606c10f329a22ba7b206ea3eef0e5aa2853ae68ffffffff01a0860100000000001976a9149f9a7abd600c0caa03983a77c8c3df8e062cb2fa88ac00000000",
  "addresses": [
    "2Mz66CzbFYADatUbwXWqHxayRrMHoTCAqXn",
    "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
  ],
  "total": 100000,
  "fees": 400000,
  "size": 562,
  "preference": "high",
  "relayed_by": "194.225.46.158",
  "received": "2018-11-18T21:19:22.298Z",
  "ver": 1,
  "double_spend": false,
  "vin_sz": 1,
  "vout_sz": 1,
  "confirmations": 0,
  "inputs": [
    {
      "prev_hash": "e4fb0b1c0ba3cfc336406271d8245a58783425a62e5485f7127ca85b706c8e9d",
      "output_index": 0,
      "script": "017b483045022100dc369db54ceaa7b182969f23a176ae21d14272dff8d941360a5140d17f196e24022044ed2a8c05c5eff115fd5536478027b74a8aeea8f8e393377fcf7c8c232b352201483045022100c227a4fa63b5040bc85a5e7b15c0b081aadd4c538223fa9d8c90cadbc04e649702205a72760687a8c9e74202bfd11b6661f44f093e51a7a4eb4d89876303a9bc94d8014730440220586615cbc74089d7ab4aaf96dc857c0d523df77260159dced512f72c9d3d88b30220177c6f3eb5622ed263c28052ffcda89062a1bda74fdf8e398fba76dd85942bbd014cfd6e51210245aef9640296f238a04b0ee9af1e8dc62a6fe51214af7d3c5bfe518a9cd5afaf2103482de8ad8bf744318b97063544d2fc59322f63baad3d1054ea57609cdb059b6452af6e52210245aef9640296f238a04b0ee9af1e8dc62a6fe51214af7d3c5bfe518a9cd5afaf2103482de8ad8bf744318b97063544d2fc59322f63baad3d1054ea57609cdb059b6452ae635167522102e1183cefc9b3fb15e15bfc53703a6d2e626ccf42cc017f84ec41486114d8cefe210200139f5a548a7cebce4be1308a0262fbb04ec2ea6fc5b38bb3c4ac140ccb5d852102259a3b4527adf82a32e06fb177f27e0606c10f329a22ba7b206ea3eef0e5aa2853ae68",
      "output_value": 500000,
      "sequence": 4294967295,
      "addresses": [
        "2Mz66CzbFYADatUbwXWqHxayRrMHoTCAqXn"
      ],
      "script_type": "pay-to-script-hash",
      "age": 0
    }
  ],
  "outputs": [
    {
      "value": 100000,
      "script": "76a9149f9a7abd600c0caa03983a77c8c3df8e062cb2fa88ac",
      "addresses": [
        "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"
      ],
      "script_type": "pay-to-pubkey-hash"
    }
  ]
}

```

**Tags:** script, testnet, multi-signature

> **Comments:**
> **username_1**: According to your link there is "no transaction found with the hash 42af7..."  
> **username_0**: @username_1 Since the transaction didn't get mined it has been removed after a couple of hours  

---

## 1 answers

### Answer by username_0 on 2018-12-05. Score: 0 | Accepted answer

It seems that the problem is related to the testnet itself. Since the fees in the testnet aren't real the minors don't have the incentive to mine complicated scripts. Hence scripts such as MULTISIG might not get mined (for me with a high probability approaching one!).

To see this you may add a big number at the beginning of the scriptSig.

For the case of MULTISIG it is enough not to use P2SH method. i.e.

```
 ex32a_txout_scriptPubKey = CScript([2, J1_public_key, J2_public_key, J3_public_key, 3, OP_CHECKMULTISIG])

```

and the scriptSig can be:

```
CScript([dummy, dummy, J2_signature, J3_signature])

```

This transaction gets recognized as `pay-to-multi-pubkey-hash` and get [mined](https://live.blockcypher.com/btc-testnet/tx/2176fcb87e46144f0694c00c22333c1358695979c3cb3715f85d7ae1f866cb65/).

However this will not resolve the problem with more complicated scripts on testnet.


---

