<p>Blockchain Info has a list of <a href="http://blockchain.info/strange-transactions" rel="nofollow">strange transactions</a> that its nodes received but were unable to verify.</p>

CC BY-SA 3.0
2014-01-01T12:58:20.930Z
They all look like p2pool transactions.
q9f
CC BY-SA 3.0
2012-12-20T21:23:17.897Z
2012-12-20T21:23:17.897Z
Stephen Gornick
<p>I have been looking into the same thing lately to build a "Bitcoin Bestiary" with strange transactions. I have downloaded bitcoin tools (
<a href="https://github.com/gavinandresen/bitcointools" rel="nofollow">https://github.com/gavinandresen/bitcointools</a> ). It has an option to trace non-standard transactions:
  dbdump.py --search-blocks=NONSTANDARD_CSCRIPTS</p>

<p>I have built on that a python program to study my local blk000x.dat files with the blockchain info. BCDataStream and deserialize come from bitcoin tools.</p>

<pre><code>#!/usr/bin/env python 

from BCDataStream import *
import deserialize

def extract_script(d):

 for t in d['transactions']:


     for txOut in t['txOut']:
          print  "Prev hash: "+(d['hashPrev'][::-1]).encode('hex')+" Script: "+deserialize.decode_script(txOut['scriptPubKey'])+'\n'   


 return None


def findlock(filename):

    f = open(filename, 'r')

    magic=f.read(4)
    magicref='f9beb4d9'.decode('hex')

    while magic:
        size=f.read(4)[::-1].encode('hex')
        N=int(size,16)

        blk = deserialize.BCDataStream()
        blk.write(f.read(N))
        d=deserialize.parse_Block(blk)
        extract_script(d)

        magic=f.read(4)

    f.close()
    return None

def test():
     findlock('blk0001.dat')
     findlock('blk0002.dat')
     findlock('blk0003.dat')


if __name__ == '__main__':
    test()
</code></pre>

<p>The program dumps the Script in all transactions with the previous block number (I have to improve that, but you can later find the right block). The whole file is about 3 GB.</p>

<p>In my Linux terminal I redirect the output to a scripts.txt file and then use grep to find commands, like:</p>

<p>grep 'IF ' scripts.txt > IF.txt </p>

<p>MIN, IF, DROP, SWAP, for instance, show interesting things. Some of them are errors (see <a href="https://bitcointalk.org/index.php?topic=67158.0" rel="nofollow">https://bitcointalk.org/index.php?topic=67158.0</a>), some I don't know.</p>

CC BY-SA 3.0
2012-12-21T16:49:48.870Z
2012-12-21T17:52:07.610Z
2012-12-21T17:52:07.610Z
halftimepad
<p>Lacking any other resource to track notable transaction, the following answer is made CW so that anyone can edit it and update as needed.</p>

<ul>
<li><a href="http://blockexplorer.com/block/00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a" rel="nofollow">Block 728:</a>  The most common payment type is pubkey-hash which first appeared here. <a href="http://bitcoinmedia.com/the-truth-behind-bip-16-and-17/" rel="nofollow">[source]</a></li>
</ul>

CC BY-SA 3.0
2012-12-22T15:04:49.137Z
2012-12-22T15:04:49.137Z
makerofthings7
<p><strong>Local script to find them + preprocessed data</strong></p>
<p><a href="https://bitcoin.stackexchange.com/a/5890/21282">https://bitcoin.stackexchange.com/a/5890/21282</a> published a local script, and <a href="https://bitcoin.stackexchange.com/a/5886/21282">https://bitcoin.stackexchange.com/a/5886/21282</a> published a list, but here is both together:</p>
<ul>
<li>list: <a href="https://github.com/cirosantilli/bitcoin-strings-with-txids/blob/master/data/known_op_signatures.json" rel="nofollow noreferrer">https://github.com/cirosantilli/bitcoin-strings-with-txids/blob/master/data/known_op_signatures.json</a></li>
<li>documentation: <a href="https://github.com/cirosantilli/bitcoin-strings-with-txids#known_op_signatures" rel="nofollow noreferrer">https://github.com/cirosantilli/bitcoin-strings-with-txids#known_op_signatures</a></li>
<li>art of the code that stores the transaction: <a href="https://github.com/cirosantilli/bitcoin-strings-with-txids/blob/48ed96fd85d8b5d75b8bb1c529a5c6a8a7099059/main.py#L315" rel="nofollow noreferrer">https://github.com/cirosantilli/bitcoin-strings-with-txids/blob/48ed96fd85d8b5d75b8bb1c529a5c6a8a7099059/main.py#L315</a> p</li>
</ul>
<p>The script is based on the nice <a href="https://github.com/alecalve/python-bitcoin-blockchain-parser" rel="nofollow noreferrer">https://github.com/alecalve/python-bitcoin-blockchain-parser</a> Python library which parses blk files without the need for a server.</p>
<p>Then at <a href="https://github.com/cirosantilli/bitcoin-strings-with-txids/blob/master/data/known_op_signatures.json" rel="nofollow noreferrer"><code>known_op_signatures.json</code></a> the output data is organized as follows:</p>
<pre><code>[
  {
    &quot;count&quot;: 1122142242,
    &quot;ioidx&quot;: 0,
    &quot;sample&quot;: &quot;74c1a6dd6e88f73035143f8fc7420b5c395d28300a70bb35b943f7f2eddc656d&quot;,
    &quot;sig&quot;: [
      null,
      null
    ]
  },
  {
    &quot;count&quot;: 1103133457,
    &quot;ioidx&quot;: 0,
    &quot;sample&quot;: &quot;6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516&quot;,
    &quot;sig&quot;: [
      &quot;OP_DUP&quot;,
      &quot;OP_HASH160&quot;,
      null,
      &quot;OP_EQUALVERIFY&quot;,
      &quot;OP_CHECKSIG&quot;
    ]
  },
</code></pre>
<p>So you can see we have at toplevel a list of transaction types, sorted by occurrence count.</p>
<p>In the transaction signature <code>sig</code>, <code>null</code> indicates a literal number constant. This way, only operands matter, and the script groups all transactions of a given type by operand alone to keep the data size manageable.</p>
<p>For example, the most common transaction type, with 1122142242 occurrences was:</p>
<pre><code>    &quot;sig&quot;: [
      null,
      null
    ]
</code></pre>
<p>i.e. two literals, which is the input script of a P2PKH transaction.</p>
<p>The second most common one was:</p>
<pre><code>&quot;sig&quot;: [
  &quot;OP_DUP&quot;,
  &quot;OP_HASH160&quot;,
  null,
  &quot;OP_EQUALVERIFY&quot;,
  &quot;OP_CHECKSIG&quot;
]
</code></pre>
<p>which is the output scrip of a P2PKH transaction.</p>
<p>By quickly scrolling through the list, you will quickly see that, unsurprisingly, there are extremely few non-standard transactions.</p>
<p><strong>Overviews of the non-standard scripts</strong></p>
<p><a href="https://www.quantabytes.com/articles/a-survey-of-bitcoin-transaction-types" rel="nofollow noreferrer">https://www.quantabytes.com/articles/a-survey-of-bitcoin-transaction-types</a> provides a nice summary. Other sources:</p>
<ul>
<li><a href="https://bitcoin.stackexchange.com/questions/547/useful-alternative-bitcoin-transaction-scripts">Useful alternative Bitcoin transaction scripts</a></li>
<li><a href="https://bitcoin.stackexchange.com/questions/21123/which-scripts-are-currently-considered-standard-and-therefore-actually-propagate">Which scripts are currently considered standard and therefore actually propagated?</a></li>
<li><a href="https://bitcoin.stackexchange.com/questions/35956/non-standard-tx-with-obscure-op-codes-examples/36037#36037">Non standard Tx with obscure OP codes: examples</a></li>
</ul>

CC BY-SA 4.0
2021-04-14T10:12:36.717Z
2021-04-14T10:12:36.717Z
Ciro Santilli OurBigBook.com
<p>I'm studying scripts and am looking for strange or unusual scripts that have appeared in any of the *coin networks..(<a href="https://en.bitcoin.it/wiki/Transaction" rel="noreferrer">outside the standard ones listed on this page</a>)</p>

<ul>
<li>Is any one person, or website listing non-standard transactions that are not generated by the default client?</li>
</ul>

<p>Ideally there would be an analysis of the script and what's going on, but I'm not picky.  I'd even settle for a command line method to extract this data and discover it myself.</p>

<p>My goal is to learn what contracts are occurring in each network and determine the frequency of each. (How popular is multi-sig tx over time)</p>

<p>Alternatively, I can use this as a tool to learn how people are using the scripting language.</p>

CC BY-SA 3.0
2014-01-25T11:08:32.513Z
Quite the opposite: [Which scripts are currently considered standard and therefore actually propagated?](https://bitcoin.stackexchange.com/questions/21123/which-scripts-are-currently-considered-standard-and-therefore-actually-propagate)
Tobias Kienzler
CC BY-SA 3.0
2014-07-17T21:08:13.660Z
also see https://bitcoin.stackexchange.com/questions/28181/what-new-transactions-are-possible-with-15-operations
kolinko
<transactions><script><multi-signature><contracts>
Is there a listing of strange or unusual scripts found in transactions?
makerofthings7
# Is there a listing of strange or unusual scripts found in transactions?

(Asked by: username_0 on 2012-12-20)

I'm studying scripts and am looking for strange or unusual scripts that have appeared in any of the \*coin networks..([outside the standard ones listed on this page](https://en.bitcoin.it/wiki/Transaction))

* Is any one person, or website listing non-standard transactions that are not generated by the default client?

Ideally there would be an analysis of the script and what's going on, but I'm not picky. I'd even settle for a command line method to extract this data and discover it myself.

My goal is to learn what contracts are occurring in each network and determine the frequency of each. (How popular is multi-sig tx over time)

Alternatively, I can use this as a tool to learn how people are using the scripting language.

**Tags:** transactions, script, multi-signature, contracts

> **Comments:**
> **username_1**: Quite the opposite: [Which scripts are currently considered standard and therefore actually propagated?](https://bitcoin.stackexchange.com/questions/21123/which-scripts-are-currently-considered-standard-and-therefore-actually-propagate)  
> **username_2**: also see https://bitcoin.stackexchange.com/questions/28181/what-new-transactions-are-possible-with-15-operations  

---

## 4 answers

### Answer by username_3 on 2012-12-20. Score: 2

Blockchain Info has a list of [strange transactions](http://blockchain.info/strange-transactions) that its nodes received but were unable to verify.

> **Comments:**
> **username_4**: They all look like p2pool transactions.  

---

### Answer by username_5 on 2012-12-21. Score: 1

I have been looking into the same thing lately to build a "Bitcoin Bestiary" with strange transactions. I have downloaded bitcoin tools (
https://github.com/gavinandresen/bitcointools ). It has an option to trace non-standard transactions:
  dbdump.py --search-blocks=NONSTANDARD_CSCRIPTS
I have built on that a python program to study my local blk000x.dat files with the blockchain info. BCDataStream and deserialize come from bitcoin tools.
#!/usr/bin/env python 

from BCDataStream import *
import deserialize

def extract_script(d):

 for t in d['transactions']:


     for txOut in t['txOut']:
          print  "Prev hash: "+(d['hashPrev'][::-1]).encode('hex')+" Script: "+deserialize.decode_script(txOut['scriptPubKey'])+'\n'   


 return None


def findlock(filename):

    f = open(filename, 'r')

    magic=f.read(4)
    magicref='f9beb4d9'.decode('hex')

    while magic:
        size=f.read(4)[::-1].encode('hex')
        N=int(size,16)

        blk = deserialize.BCDataStream()
        blk.write(f.read(N))
        d=deserialize.parse_Block(blk)
        extract_script(d)

        magic=f.read(4)

    f.close()
    return None

def test():
     findlock('blk0001.dat')
     findlock('blk0002.dat')
     findlock('blk0003.dat')


if __name__ == '__main__':
    test()

The program dumps the Script in all transactions with the previous block number (I have to improve that, but you can later find the right block). The whole file is about 3 GB.
In my Linux terminal I redirect the output to a scripts.txt file and then use grep to find commands, like:
grep 'IF ' scripts.txt > IF.txt 
MIN, IF, DROP, SWAP, for instance, show interesting things. Some of them are errors (see https://bitcointalk.org/index.php?topic=67158.0), some I don't know.


---

### Answer by username_0 on 2012-12-22. Score: 0

Lacking any other resource to track notable transaction, the following answer is made CW so that anyone can edit it and update as needed.

* [Block 728:](http://blockexplorer.com/block/00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a) The most common payment type is pubkey-hash which first appeared here. [[source]](http://bitcoinmedia.com/the-truth-behind-bip-16-and-17/)


---

### Answer by username_6 on 2021-04-14. Score: 0

Local script to find them + preprocessed data
https://bitcoin.stackexchange.com/a/5890/21282 published a local script, and https://bitcoin.stackexchange.com/a/5886/21282 published a list, but here is both together:

list: https://github.com/cirosantilli/bitcoin-strings-with-txids/blob/master/data/known_op_signatures.json
documentation: https://github.com/cirosantilli/bitcoin-strings-with-txids#known_op_signatures
art of the code that stores the transaction: https://github.com/cirosantilli/bitcoin-strings-with-txids/blob/48ed96fd85d8b5d75b8bb1c529a5c6a8a7099059/main.py#L315 p

The script is based on the nice https://github.com/alecalve/python-bitcoin-blockchain-parser Python library which parses blk files without the need for a server.
Then at known_op_signatures.json the output data is organized as follows:
[
  {
    "count": 1122142242,
    "ioidx": 0,
    "sample": "74c1a6dd6e88f73035143f8fc7420b5c395d28300a70bb35b943f7f2eddc656d",
    "sig": [
      null,
      null
    ]
  },
  {
    "count": 1103133457,
    "ioidx": 0,
    "sample": "6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516",
    "sig": [
      "OP_DUP",
      "OP_HASH160",
      null,
      "OP_EQUALVERIFY",
      "OP_CHECKSIG"
    ]
  },

So you can see we have at toplevel a list of transaction types, sorted by occurrence count.
In the transaction signature sig, null indicates a literal number constant. This way, only operands matter, and the script groups all transactions of a given type by operand alone to keep the data size manageable.
For example, the most common transaction type, with 1122142242 occurrences was:
    "sig": [
      null,
      null
    ]

i.e. two literals, which is the input script of a P2PKH transaction.
The second most common one was:
"sig": [
  "OP_DUP",
  "OP_HASH160",
  null,
  "OP_EQUALVERIFY",
  "OP_CHECKSIG"
]

which is the output scrip of a P2PKH transaction.
By quickly scrolling through the list, you will quickly see that, unsurprisingly, there are extremely few non-standard transactions.
Overviews of the non-standard scripts
https://www.quantabytes.com/articles/a-survey-of-bitcoin-transaction-types provides a nice summary. Other sources:

Useful alternative Bitcoin transaction scripts
Which scripts are currently considered standard and therefore actually propagated?
Non standard Tx with obscure OP codes: examples


---

