Skip to content

Commit 46eb628

Browse files
committed
tested new opcodes (JUMPDEST,CALLCODE) and created test for CALL/CREATE depth
1 parent ed6eba7 commit 46eb628

File tree

2 files changed

+293
-35
lines changed

2 files changed

+293
-35
lines changed

vmtests/vmIOandFlowOperationsTest.json

Lines changed: 130 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
2121
"value" : "1000000000000000000"
2222
},
23-
"gas" : "9997",
23+
"gas" : "9998",
2424
"out" : "0x",
2525
"post" : {
2626
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
@@ -211,6 +211,91 @@
211211
}
212212
}
213213
},
214+
"jump0_jumpdest0" : {
215+
"callcreates" : [
216+
],
217+
"env" : {
218+
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
219+
"currentDifficulty" : "256",
220+
"currentGasLimit" : "1000000",
221+
"currentNumber" : "0",
222+
"currentTimestamp" : "1",
223+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
224+
},
225+
"exec" : {
226+
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
227+
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
228+
"code" : "0x602360085860015d600257",
229+
"data" : "0x",
230+
"gas" : "10000",
231+
"gasPrice" : "100000000000000",
232+
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
233+
"value" : "1000000000000000000"
234+
},
235+
"gas" : "9796",
236+
"out" : "0x",
237+
"post" : {
238+
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
239+
"balance" : "1000000000000000000",
240+
"code" : "0x602360085860015d600257",
241+
"nonce" : "0",
242+
"storage" : {
243+
"0x02" : "0x23"
244+
}
245+
}
246+
},
247+
"pre" : {
248+
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
249+
"balance" : "1000000000000000000",
250+
"code" : "0x602360085860015d600257",
251+
"nonce" : "0",
252+
"storage" : {
253+
}
254+
}
255+
}
256+
},
257+
"jump0_jumpdest1" : {
258+
"callcreates" : [
259+
],
260+
"env" : {
261+
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
262+
"currentDifficulty" : "256",
263+
"currentGasLimit" : "1000000",
264+
"currentNumber" : "0",
265+
"currentTimestamp" : "1",
266+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
267+
},
268+
"exec" : {
269+
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
270+
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
271+
"code" : "0x602360075860015d600257",
272+
"data" : "0x",
273+
"gas" : "10000",
274+
"gasPrice" : "100000000000000",
275+
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
276+
"value" : "1000000000000000000"
277+
},
278+
"gas" : "9997",
279+
"out" : "0x",
280+
"post" : {
281+
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
282+
"balance" : "1000000000000000000",
283+
"code" : "0x602360075860015d600257",
284+
"nonce" : "0",
285+
"storage" : {
286+
}
287+
}
288+
},
289+
"pre" : {
290+
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
291+
"balance" : "1000000000000000000",
292+
"code" : "0x602360075860015d600257",
293+
"nonce" : "0",
294+
"storage" : {
295+
}
296+
}
297+
}
298+
},
214299
"jumpi0" : {
215300
"callcreates" : [
216301
],
@@ -296,6 +381,49 @@
296381
}
297382
}
298383
},
384+
"jumpi1_jumpdest" : {
385+
"callcreates" : [
386+
],
387+
"env" : {
388+
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
389+
"currentDifficulty" : "256",
390+
"currentGasLimit" : "1000000",
391+
"currentNumber" : "0",
392+
"currentTimestamp" : "1",
393+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
394+
},
395+
"exec" : {
396+
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
397+
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
398+
"code" : "0x60236001600a5960015d600257",
399+
"data" : "0x",
400+
"gas" : "10000",
401+
"gasPrice" : "100000000000000",
402+
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
403+
"value" : "1000000000000000000"
404+
},
405+
"gas" : "9795",
406+
"out" : "0x",
407+
"post" : {
408+
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
409+
"balance" : "1000000000000000000",
410+
"code" : "0x60236001600a5960015d600257",
411+
"nonce" : "0",
412+
"storage" : {
413+
"0x02" : "0x23"
414+
}
415+
}
416+
},
417+
"pre" : {
418+
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
419+
"balance" : "1000000000000000000",
420+
"code" : "0x60236001600a5960015d600257",
421+
"nonce" : "0",
422+
"storage" : {
423+
}
424+
}
425+
}
426+
},
299427
"mloadError0" : {
300428
"callcreates" : [
301429
],
@@ -1220,7 +1348,7 @@
12201348
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
12211349
"value" : "1000000000000000000"
12221350
},
1223-
"gas" : "9997",
1351+
"gas" : "9998",
12241352
"out" : "0x",
12251353
"post" : {
12261354
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {

0 commit comments

Comments
 (0)