<p>This is easier said than done, IMO. There are plenty of little fact sheet web pages (e.g. <a href="https://www.cryptocompare.com/coins/guides/what-are-the-bitcoin-transaction-types/" rel="noreferrer">https://www.cryptocompare.com/coins/guides/what-are-the-bitcoin-transaction-types/</a>) lying around that give a list of the "Standard" Bitcoin Transaction types, but nothing super authoritative. </p>

<p>However, I think the most authoritative source as of this very moment is the Bitcoin core source code. </p>

<p>I did my own search, recently, to prep for Andreas Antonopoulos' meetup tomorrow: </p>

<p><a href="https://duckduckgo.com/?q=how+can+I+find+out+if+a+bitcoin+transaction+type+is+considered+standard%3F&amp;t=ha&amp;ia=web" rel="noreferrer">https://duckduckgo.com/?q=how+can+I+find+out+if+a+bitcoin+transaction+type+is+considered+standard%3F&amp;t=ha&amp;ia=web</a></p>

<p>The Mastering Bitcoin book refers to it in three different chapters: </p>

<p><a href="https://github.com/bitcoinbook/bitcoinbook/search?utf8=%E2%9C%93&amp;q=%22standard+transactions%22&amp;type=" rel="noreferrer">https://github.com/bitcoinbook/bitcoinbook/search?utf8=%E2%9C%93&amp;q=%22standard+transactions%22&amp;type=</a></p>

<p><a href="https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch07.asciidoc#multi-signature" rel="noreferrer">https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch07.asciidoc#multi-signature</a></p>

<p>I also found a good link to a comprehensive list of them here: </p>

<p><a href="https://books.google.com/books?id=YHfCBwAAQBAJ&amp;pg=PA92&amp;lpg=PA92&amp;dq=how+can+I+find+out+if+a+bitcoin+transaction+type+is+considered+standard?&amp;source=bl&amp;ots=GK4gh-mjoL&amp;sig=BHl4csT7dQZUPwT61W6-QT1qrR0&amp;hl=en&amp;sa=X&amp;ved=0ahUKEwjD5JCD-obTAhUJ0mMKHdyeCBQQ6AEIQDAF#v=onepage&amp;q=how%20can%20I%20find%20out%20if%20a%20bitcoin%20transaction%20type%20is%20considered%20standard%3F&amp;f=false" rel="noreferrer">https://books.google.com/books?id=YHfCBwAAQBAJ&amp;pg=PA92&amp;lpg=PA92&amp;dq=how+can+I+find+out+if+a+bitcoin+transaction+type+is+considered+standard?&amp;source=bl&amp;ots=GK4gh-mjoL&amp;sig=BHl4csT7dQZUPwT61W6-QT1qrR0&amp;hl=en&amp;sa=X&amp;ved=0ahUKEwjD5JCD-obTAhUJ0mMKHdyeCBQQ6AEIQDAF#v=onepage&amp;q=how%20can%20I%20find%20out%20if%20a%20bitcoin%20transaction%20type%20is%20considered%20standard%3F&amp;f=false</a></p>

<p><a href="https://i.sstatic.net/VYX1i.png" rel="noreferrer"><img src="https://i.sstatic.net/VYX1i.png" alt="Google Books result for a Cursory Search"></a></p>

<p>And the 5 types, pubkey, pubkey_hash, multisig, script_hash, op_return, have some neato stats here: <a href="https://webbtc.com/stats" rel="noreferrer">https://webbtc.com/stats</a></p>

<p>Long story short, I think you're just going to have to byte the bullet and get a friend who knows C++ to explain the contents of the <code>policy.cpp</code> file to you: </p>

<p><a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L44" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L44</a></p>

<p>That friend will be me, shortly...</p>

<p>(some time later)</p>

<p>It looks like there are two functions that tell whether a transaction is 'Standard' by Bitcoin Core's logic: <code>IsStandard()</code> and <code>IsStandardTx()</code>.</p>

<p>Header: <a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.h#L75" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.h#L75</a></p>

<p>Source code: </p>

<p><code>IsStandard()</code>: <a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L34" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L34</a></p>

<ol>
<li><code>IsStandard()</code> first checks the transaction against the Solver.
<a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L37" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L37</a></li>
<li>Next, <code>IsStandard()</code> checks whether the transaction is an N of 3 multisig: 
<a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L40" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L40</a></li>
<li>Lastly, if witness transactions are enabled, <code>IsStandard()</code> checks that the transaction is one of the two standard types of <code>witness</code> transactions.
<a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L53" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L53</a></li>
</ol>

<p><code>IsStandardTx()</code>: <a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L59" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L59</a></p>

<ol>
<li>A standard transaction must have a sufficiently low application version. <a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L61" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L61</a></li>
<li>The transaction has to have a sufficiently low weight.
<a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L66" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L66</a></li>
<li>If a given Bitcoin Transaction is a Pay to Script Hash transaction, it must have a small scriptSig value. According to the arithmetic in the comments, that works out to about 15 M of N signers (that is, 15 "co-signers" for a transaction) maximum. AND it has to be push-only. Not sure what "push-only" means, but apparently it's important.
<a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L76" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L76</a>
<a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L89" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L89</a></li>
<li>Next, it seems that it's checking the <code>scriptPubKey</code> against the <code>IsStandard()</code> function. 
<a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L97" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L97</a></li>
<li>Null transactions are considered standard, as are transactions that have only one <code>OP_RETURN</code> output. But not empty multisig or dust transactions.
<a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L103" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L103</a>
<a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L114" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L114</a></li>
</ol>

<p>I'd guess this is a pretty reasonable standard to which to hold "Standard" transactions.</p>

<p>The comments explain some of it.</p>

<p>If you want to have a look at what inputs and witnesses are considered standard, you can just have a look further down the page, or ask another question on this site. </p>

CC BY-SA 3.0
2017-04-03T02:34:36.487Z
Not super comfortable answering this, but I think it's enough to give someone unfamiliar a glimpse into the code base for the first time. If you want to edit it for clarity or correctness, please do so!
Nathan Basanese
CC BY-SA 3.0
2017-04-03T00:24:57.893Z
2017-06-02T08:25:08.367Z
2017-06-02T08:25:08.367Z
Nathan Basanese
<p>This is useful in Andreas Antonopoulos' book, Mastering Bitcoin: </p>

<p><a href="https://github.com/bitcoinbook/bitcoinbook/blob/7c552ea5cfbc19448635b36407761b377ff5cbe9/ch05.asciidoc#standard-transactions" rel="noreferrer">https://github.com/bitcoinbook/bitcoinbook/blob/7c552ea5cfbc19448635b36407761b377ff5cbe9/ch05.asciidoc#standard-transactions</a></p>

<p>"In the first few years of bitcoin’s development, the developers introduced some limitations in the types of scripts that could be processed by the reference client. These limitations are encoded in a function called isStandard(), which defines five types of "standard" transactions."</p>

<p>Where are the five types listed in the Bitcoin Core codebase?</p>

CC BY-SA 3.0
2017-04-03T00:25:47.560Z
The five types of standard transactions appear to be listed in the Bitcoin Developer Guide here: https://bitcoin.org/en/developer-guide#standard-transactions
Greg Hewgill
CC BY-SA 3.0
2017-04-03T18:59:48.830Z
// , It doesn't seem to be in the Protocol documentation, although I found a note about rejection codes here: https://en.bitcoin.it/wiki/Protocol_documentation#reject
Nathan Basanese
CC BY-SA 3.0
2017-04-03T19:19:57.033Z
// , @GregHewgill, good link. Further down the page, it gets more comprehensive, too: https://bitcoin.org/en/developer-guide#non-standard-transactions
Nathan Basanese
<script><non-standard-transaction>
How is a "standard" Bitcoin transaction defined?
Michael Folkson
# How is a "standard" Bitcoin transaction defined?

(Asked by: username_0 on 2017-04-03)

This is useful in Andreas Antonopoulos' book, Mastering Bitcoin:

<https://github.com/bitcoinbook/bitcoinbook/blob/7c552ea5cfbc19448635b36407761b377ff5cbe9/ch05.asciidoc#standard-transactions>

"In the first few years of bitcoin’s development, the developers introduced some limitations in the types of scripts that could be processed by the reference client. These limitations are encoded in a function called isStandard(), which defines five types of "standard" transactions."

Where are the five types listed in the Bitcoin Core codebase?

**Tags:** script, non-standard-transaction

> **Comments:**
> **username_1**: The five types of standard transactions appear to be listed in the Bitcoin Developer Guide here: https://bitcoin.org/en/developer-guide#standard-transactions  
> **username_2**: // , It doesn't seem to be in the Protocol documentation, although I found a note about rejection codes here: https://en.bitcoin.it/wiki/Protocol_documentation#reject  
> **username_2**: // , @GregHewgill, good link. Further down the page, it gets more comprehensive, too: https://bitcoin.org/en/developer-guide#non-standard-transactions  

---

## 1 answers

### Answer by username_2 on 2017-04-03. Score: 10 | Accepted answer

This is easier said than done, IMO. There are plenty of little fact sheet web pages (e.g. <https://www.cryptocompare.com/coins/guides/what-are-the-bitcoin-transaction-types/>) lying around that give a list of the "Standard" Bitcoin Transaction types, but nothing super authoritative.

However, I think the most authoritative source as of this very moment is the Bitcoin core source code.

I did my own search, recently, to prep for Andreas Antonopoulos' meetup tomorrow:

<https://duckduckgo.com/?q=how+can+I+find+out+if+a+bitcoin+transaction+type+is+considered+standard%3F&t=ha&ia=web>

The Mastering Bitcoin book refers to it in three different chapters:

<https://github.com/bitcoinbook/bitcoinbook/search?utf8=%E2%9C%93&q=%22standard+transactions%22&type=>

<https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch07.asciidoc#multi-signature>

I also found a good link to a comprehensive list of them here:

<https://books.google.com/books?id=YHfCBwAAQBAJ&pg=PA92&lpg=PA92&dq=how+can+I+find+out+if+a+bitcoin+transaction+type+is+considered+standard?&source=bl&ots=GK4gh-mjoL&sig=BHl4csT7dQZUPwT61W6-QT1qrR0&hl=en&sa=X&ved=0ahUKEwjD5JCD-obTAhUJ0mMKHdyeCBQQ6AEIQDAF#v=onepage&q=how%20can%20I%20find%20out%20if%20a%20bitcoin%20transaction%20type%20is%20considered%20standard%3F&f=false>

[![Google Books result for a Cursory Search](https://i.sstatic.net/VYX1i.png)](https://i.sstatic.net/VYX1i.png)

And the 5 types, pubkey, pubkey\_hash, multisig, script\_hash, op\_return, have some neato stats here: <https://webbtc.com/stats>

Long story short, I think you're just going to have to byte the bullet and get a friend who knows C++ to explain the contents of the `policy.cpp` file to you:

<https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L44>

That friend will be me, shortly...

(some time later)

It looks like there are two functions that tell whether a transaction is 'Standard' by Bitcoin Core's logic: `IsStandard()` and `IsStandardTx()`.

Header: <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.h#L75>

Source code:

`IsStandard()`: <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L34>

1. `IsStandard()` first checks the transaction against the Solver.
   <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L37>
2. Next, `IsStandard()` checks whether the transaction is an N of 3 multisig:
   <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L40>
3. Lastly, if witness transactions are enabled, `IsStandard()` checks that the transaction is one of the two standard types of `witness` transactions.
   <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L53>

`IsStandardTx()`: <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L59>

1. A standard transaction must have a sufficiently low application version. <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L61>
2. The transaction has to have a sufficiently low weight.
   <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L66>
3. If a given Bitcoin Transaction is a Pay to Script Hash transaction, it must have a small scriptSig value. According to the arithmetic in the comments, that works out to about 15 M of N signers (that is, 15 "co-signers" for a transaction) maximum. AND it has to be push-only. Not sure what "push-only" means, but apparently it's important.
   <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L76>
   <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L89>
4. Next, it seems that it's checking the `scriptPubKey` against the `IsStandard()` function.
   <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L97>
5. Null transactions are considered standard, as are transactions that have only one `OP_RETURN` output. But not empty multisig or dust transactions.
   <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L103>
   <https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp#L114>

I'd guess this is a pretty reasonable standard to which to hold "Standard" transactions.

The comments explain some of it.

If you want to have a look at what inputs and witnesses are considered standard, you can just have a look further down the page, or ask another question on this site.

> **Comments:**
> **username_2**: Not super comfortable answering this, but I think it's enough to give someone unfamiliar a glimpse into the code base for the first time. If you want to edit it for clarity or correctness, please do so!  

---

