2
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,
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? – KappaDev – 2018-10-22T04:45:27.880
1I would like transactions which spend utxos with these op codes either in the scriptPubKey or redeemScript. – Jimmy Song – 2018-10-22T14:19:17.450
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 – 2018-10-22T14:40:10.820
1
@JimmySong I wrote this small PHP script 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 to obtain the required info?
– KappaDev – 2018-10-22T21:30:19.0471@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 – 2018-10-22T21:59:53.687
@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 – 2018-10-22T22:04:13.173
A slightly bigger search yielded some interesting tx's on testnet. I'll post them as my own answer. – Jimmy Song – 2018-10-23T00:52:38.873