<p>I did some digging with a parser I wrote and found 6 transactions that test a lot of the op codes:</p>

<pre><code>efdf1b981d7bba9c941295c0dfc654c4b5e40d7b9744819dd4f78b8e149898e1
9aa3a5a6d9b7d1ac9555be8e42596d06686cc5f76d259b06c560a207d310d5f5
c5d4b73af6eed28798473b05d2b227edd4f285069629843e899b52c2d1c165b7
74ea059a63c7ebddaee6805e1560b15c937d99a9ee9745412cbc6d2a0a5f5305
e335562f7e297aadeed88e5954bc4eeb8dc00b31d829eedb232e39d672b0c009
dc3aad51b4b9ea1ef40755a38b0b4d6e08c72d2ac5e95b8bebe9bd319b6aed7e
</code></pre>

<p>These are all on testnet and test a very large number of the OP_CODES I requested. Here are still ones I'm looking for:</p>

<pre><code>op_reserved
op_reserved1
op_reserved2
op_ver
op_verif
op_vernotif
op_2rot
op_2swap
op_1add
op_codeseparator
</code></pre>

CC BY-SA 4.0
2018-10-23T01:13:08.000Z
That'll be hard. OP_RESERVED, OP_RESERVED1, OP_RESERVED2, OP_VER, OP_VERIF, OP_VERNOTIF all immediately cause the script to fail, so they can't occur (unless in an unexecuted IF branch) in a valid spend. OP_VERIF and OP_VERNOTIF even cause failure when in an unexecuted IF branch.
Pieter Wuille
CC BY-SA 4.0
2018-10-23T01:21:34.480Z
Thanks @PieterWuille, I was confused about that. So it's a lot like OP_RETURN but for IF branches? I guess I just need the last 4, then.
Jimmy Song
CC BY-SA 4.0
2018-10-23T00:57:40.917Z
2018-10-23T00:57:40.917Z
Jimmy Song
<p>I'm trying to implement a script evaluator and would like to get some real testing data from the blockchain (testnet or mainnet). Are there transactions whose input scriptSigs combined with the previous transaction's scriptPubKey use any/all of these op_codes? I'd like to compile a collection of such transactions as test vectors.</p>

<pre><code>98: op_ver,
101: op_verif,
102: op_vernotif,
107: op_toaltstack,
108: op_fromaltstack,
109: op_2drop,
111: op_3dup,
112: op_2over,
113: op_2rot,
114: op_2swap,
115: op_ifdup,
116: op_depth,
119: op_nip,
120: op_over,
121: op_pick,
122: op_roll,
123: op_rot,
125: op_tuck,
139: op_1add,
140: op_1sub,
143: op_negate,
144: op_abs,
146: op_0notequal,
147: op_add,
148: op_sub,
154: op_booland,
155: op_boolor,
156: op_numequal,
157: op_numequalverify,
158: op_numnotequal,
159: op_lessthan,
160: op_greaterthan,
161: op_lessthanorequal,
162: op_greaterthanorequal,
163: op_min,
164: op_max,
165: op_within,
168: op_sha256,
170: op_hash256,
171: op_codeseparator,
</code></pre>

CC BY-SA 4.0
2018-10-22T04:45:27.880Z
Just to make sure I'm understanding, you'd like a compiled list of transactions which have these OP_ codes in their scriptPubKey? Would you prefer a spreadsheet and what info do you exactly need? TXID and ASM?
Mason Ticehurst
CC BY-SA 4.0
2018-10-22T14:19:17.450Z
I would like transactions which *spend* utxos with these op codes either in the scriptPubKey or redeemScript.
Jimmy Song
CC BY-SA 4.0
2018-10-22T14:40:10.820Z
I believe the early blocks of testnet contain a bunch of unusual transactions as a sort of test suite.  So that might be one place to start looking.
Nate Eldredge
CC BY-SA 4.0
2018-10-22T21:30:19.047Z
@JimmySong I wrote [this small PHP script](https://hastebin.com/amozavumeh.php) which I believe should work, but after running this overnight for 12+ hours I quickly realized this is quite inefficient and will likely take too long. Perhaps someone with SQL knowledge can utilize [this](http://blockchainsql.io/) to obtain the required info?
Mason Ticehurst
CC BY-SA 4.0
2018-10-22T21:59:53.687Z
@NateEldredge, I checked the first 400 or so blocks of testnet and did not find anything that uses any of these script codes.
Jimmy Song
CC BY-SA 4.0
2018-10-22T22:04:13.173Z
@JimmySong: Okay, sorry about the wild goose chase.  Of course, you ought to be able to manually create and spend some transactions like this on testnet, which may be more expedient than writing the code to search for existing ones.
Nate Eldredge
CC BY-SA 4.0
2018-10-23T00:52:38.873Z
A slightly bigger search yielded some interesting tx's on testnet. I'll post them as my own answer.
Jimmy Song
<script><non-standard-transaction>
Finding Transactions with seldom used opcodes for testing
Jimmy Song
# Finding Transactions with seldom used opcodes for testing

(Asked by: username_0 on 2018-10-22)

I'm trying to implement a script evaluator and would like to get some real testing data from the blockchain (testnet or mainnet). Are there transactions whose input scriptSigs combined with the previous transaction's scriptPubKey use any/all of these op\_codes? I'd like to compile a collection of such transactions as test vectors.

```
98: op_ver,
101: op_verif,
102: op_vernotif,
107: op_toaltstack,
108: op_fromaltstack,
109: op_2drop,
111: op_3dup,
112: op_2over,
113: op_2rot,
114: op_2swap,
115: op_ifdup,
116: op_depth,
119: op_nip,
120: op_over,
121: op_pick,
122: op_roll,
123: op_rot,
125: op_tuck,
139: op_1add,
140: op_1sub,
143: op_negate,
144: op_abs,
146: op_0notequal,
147: op_add,
148: op_sub,
154: op_booland,
155: op_boolor,
156: op_numequal,
157: op_numequalverify,
158: op_numnotequal,
159: op_lessthan,
160: op_greaterthan,
161: op_lessthanorequal,
162: op_greaterthanorequal,
163: op_min,
164: op_max,
165: op_within,
168: op_sha256,
170: op_hash256,
171: op_codeseparator,

```

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

> **Comments:**
> **username_1**: Just to make sure I'm understanding, you'd like a compiled list of transactions which have these OP_ codes in their scriptPubKey? Would you prefer a spreadsheet and what info do you exactly need? TXID and ASM?  
> **username_0**: I would like transactions which *spend* utxos with these op codes either in the scriptPubKey or redeemScript.  
> **username_2**: I believe the early blocks of testnet contain a bunch of unusual transactions as a sort of test suite.  So that might be one place to start looking.  
> **username_1**: @username_0 I wrote [this small PHP script](https://hastebin.com/amozavumeh.php) which I believe should work, but after running this overnight for 12+ hours I quickly realized this is quite inefficient and will likely take too long. Perhaps someone with SQL knowledge can utilize [this](http://blockchainsql.io/) to obtain the required info?  
> **username_0**: @username_2, I checked the first 400 or so blocks of testnet and did not find anything that uses any of these script codes.  
> **username_2**: @username_0: Okay, sorry about the wild goose chase.  Of course, you ought to be able to manually create and spend some transactions like this on testnet, which may be more expedient than writing the code to search for existing ones.  
> **username_0**: A slightly bigger search yielded some interesting tx's on testnet. I'll post them as my own answer.  

---

## 1 answers

### Answer by username_0 on 2018-10-23. Score: 1 | Accepted answer

I did some digging with a parser I wrote and found 6 transactions that test a lot of the op codes:

```
efdf1b981d7bba9c941295c0dfc654c4b5e40d7b9744819dd4f78b8e149898e1
9aa3a5a6d9b7d1ac9555be8e42596d06686cc5f76d259b06c560a207d310d5f5
c5d4b73af6eed28798473b05d2b227edd4f285069629843e899b52c2d1c165b7
74ea059a63c7ebddaee6805e1560b15c937d99a9ee9745412cbc6d2a0a5f5305
e335562f7e297aadeed88e5954bc4eeb8dc00b31d829eedb232e39d672b0c009
dc3aad51b4b9ea1ef40755a38b0b4d6e08c72d2ac5e95b8bebe9bd319b6aed7e

```

These are all on testnet and test a very large number of the OP\_CODES I requested. Here are still ones I'm looking for:

```
op_reserved
op_reserved1
op_reserved2
op_ver
op_verif
op_vernotif
op_2rot
op_2swap
op_1add
op_codeseparator

```

> **Comments:**
> **username_3**: That'll be hard. OP_RESERVED, OP_RESERVED1, OP_RESERVED2, OP_VER, OP_VERIF, OP_VERNOTIF all immediately cause the script to fail, so they can't occur (unless in an unexecuted IF branch) in a valid spend. OP_VERIF and OP_VERNOTIF even cause failure when in an unexecuted IF branch.  
> **username_0**: Thanks @username_3, I was confused about that. So it's a lot like OP_RETURN but for IF branches? I guess I just need the last 4, then.  

---

