<p>The error for nonstandard transaction is simply because they are not yet supported by mainline client.  Remember as writing Bitcoin is only version 0.4 so significat portions of the protocol have not been implemented yet.  </p>

<p>You will notice the error being thrown is "non standard transaction" which is indicating the client doesn't have support for creating or validating non-standard transactions.</p>

<p>Standard transactions are those with scriptPubKey of:</p>

<ul>
<li> OP_CHECKSIG  - transfer to IP Address OP_DUP OP_HASH160</li>
<li> OP_EQUALVERIFY OP_CHECKSIG - transfer to Bitcoin Address
(hash of public key)</li>
</ul>

<p>The only other transaction type supported is generation transaction which doesn't have a scriptPubKey to identify it.  It is easily identified because every valid block must always have one and only one coinbase transaction.</p>

<p>Contracts are non-standard transactions and not supported by the client yet.  The code snippet is simply to prevent client from attempting to process, broacast or validate non-standard transactions.</p>

CC BY-SA 3.0
2011-10-31T19:36:39.203Z
2011-10-31T20:28:51.430Z
2011-10-31T20:28:51.430Z
DeathAndTaxes
<p>As transaction size, the number of signature checks per transaction can affect client performance and the inclusion of many O_CHECKSIG opcodes could be used as a tool for denial-of-service attacks.</p>

<p>I found in CTransaction::AcceptToMemoryPool() the following check:</p>

<p>// Rather not work on nonstandard transactions
    if (GetSigOpCount() > 2 || ::GetSerializeSize(*this, SER_NETWORK) &lt; 100)
        return error("AcceptToMemoryPool() : nonstandard transaction");</p>

<p>Then I suppose the OP_CHECKSIG limit is 2, which is fine for security but this limit prevents users from using the <a href="https://en.bitcoin.it/wiki/Contracts#Example_4%3a_Using_external_state">advanced contracts</a> Bitcoin is suppose to allow. </p>

<p>Also there is the limit imposed by MAX_BLOCK_SIGOPS, but the limit applies to whole blocks, and only indirectly limit the sigops of a single transaction.</p>

<transactions><attack>
What is the maximum number of signature check operations a transaction script can request?
SDL
# What is the maximum number of signature check operations a transaction script can request?

(Asked by: username_0 on 2011-10-31)

As transaction size, the number of signature checks per transaction can affect client performance and the inclusion of many O\_CHECKSIG opcodes could be used as a tool for denial-of-service attacks.

I found in CTransaction::AcceptToMemoryPool() the following check:

// Rather not work on nonstandard transactions
if (GetSigOpCount() > 2 || ::GetSerializeSize(\*this, SER\_NETWORK) < 100)
return error("AcceptToMemoryPool() : nonstandard transaction");

Then I suppose the OP\_CHECKSIG limit is 2, which is fine for security but this limit prevents users from using the [advanced contracts](https://en.bitcoin.it/wiki/Contracts#Example_4%3a_Using_external_state) Bitcoin is suppose to allow.

Also there is the limit imposed by MAX\_BLOCK\_SIGOPS, but the limit applies to whole blocks, and only indirectly limit the sigops of a single transaction.

**Tags:** transactions, attack


---

## 1 answers

### Answer by username_1 on 2011-10-31. Score: 1

The error for nonstandard transaction is simply because they are not yet supported by mainline client. Remember as writing Bitcoin is only version 0.4 so significat portions of the protocol have not been implemented yet.

You will notice the error being thrown is "non standard transaction" which is indicating the client doesn't have support for creating or validating non-standard transactions.

Standard transactions are those with scriptPubKey of:

* OP\_CHECKSIG - transfer to IP Address OP\_DUP OP\_HASH160
* OP\_EQUALVERIFY OP\_CHECKSIG - transfer to Bitcoin Address
  (hash of public key)

The only other transaction type supported is generation transaction which doesn't have a scriptPubKey to identify it. It is easily identified because every valid block must always have one and only one coinbase transaction.

Contracts are non-standard transactions and not supported by the client yet. The code snippet is simply to prevent client from attempting to process, broacast or validate non-standard transactions.


---

