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:
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: