Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EXTCODEHASH tests #544

Merged
merged 6 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions GeneralStateTests/stExtCodeHash/extCodeHashDynamicArgument.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"extCodeHashDynamicArgument" : {
"_info" : {
"comment" : "EXTCODEHASH/EXTCODESIZE with address from a dynamic argument",
"filledwith" : "testeth 1.5.0-alpha.6-1+commit.19ad7d95.dirty",
"lllcversion" : "Version: 0.5.0-develop.2018.9.29+commit.c4b5101b.Darwin.appleclang",
"source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDynamicArgumentFiller.json",
"sourceHash" : "e2709b0f48dd2fe2d301ab2ec8be79e17c9670070d313fe974bcd0ecdd711c70"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "0x0f4240",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Byzantium" : [
{
"hash" : "0x2ffec9d4b7c1064dc9e9180bdcfe021b7f59cd0fee6c00767146407121f118e0",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"Constantinople" : [
{
"hash" : "0xa62cbeb822ef70fd8572382d509fa76186025e04643a288121f40294f377f504",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"EIP150" : [
{
"hash" : "0x2ffec9d4b7c1064dc9e9180bdcfe021b7f59cd0fee6c00767146407121f118e0",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"EIP158" : [
{
"hash" : "0x2ffec9d4b7c1064dc9e9180bdcfe021b7f59cd0fee6c00767146407121f118e0",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"Frontier" : [
{
"hash" : "0x2ffec9d4b7c1064dc9e9180bdcfe021b7f59cd0fee6c00767146407121f118e0",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"Homestead" : [
{
"hash" : "0x2ffec9d4b7c1064dc9e9180bdcfe021b7f59cd0fee6c00767146407121f118e0",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
},
"0xdeadbeef00000000000000000000000000000000" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x6000353f6000556000353b600155",
"nonce" : "0x00",
"storage" : {
"0x00" : "0xdeadbeef"
}
},
"0xdeadbeef00000000000000000000000000000001" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x1234",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x000000000000000000000000deadbeef00000000000000000000000000000001"
],
"gasLimit" : [
"0x061a80"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "0xdeadbeef00000000000000000000000000000000",
"value" : [
"0x01"
]
}
}
}
119 changes: 119 additions & 0 deletions GeneralStateTests/stExtCodeHash/extCodeHashSelf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"extCodeHashSelf" : {
"_info" : {
"comment" : "EXTCODEHASH/EXTCODESIZE of the currently executing account",
"filledwith" : "testeth 1.5.0-alpha.6-1+commit.19ad7d95.dirty",
"lllcversion" : "Version: 0.5.0-develop.2018.9.29+commit.c4b5101b.Darwin.appleclang",
"source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashSelfFiller.json",
"sourceHash" : "6f8936f6732cbdf55ba1febcb101219015fd9432992545cdaff04df7697948b4"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "0x0f4240",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Byzantium" : [
{
"hash" : "0xd3e539dea7d810d48422f5ab25f48a79c05982907bf9f73b8efbee42c19531b1",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"Constantinople" : [
{
"hash" : "0xf4d9afb014cddaab6c38911576da8445ad61aa19ccfd9cc8255bf3f99de7950e",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"EIP150" : [
{
"hash" : "0xd3e539dea7d810d48422f5ab25f48a79c05982907bf9f73b8efbee42c19531b1",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"EIP158" : [
{
"hash" : "0xd3e539dea7d810d48422f5ab25f48a79c05982907bf9f73b8efbee42c19531b1",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"Frontier" : [
{
"hash" : "0xd3e539dea7d810d48422f5ab25f48a79c05982907bf9f73b8efbee42c19531b1",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
],
"Homestead" : [
{
"hash" : "0xd3e539dea7d810d48422f5ab25f48a79c05982907bf9f73b8efbee42c19531b1",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
},
"0xdeadbeef00000000000000000000000000000000" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x73deadbeef000000000000000000000000000000003f60005573deadbeef000000000000000000000000000000003b600155",
"nonce" : "0x00",
"storage" : {
"0x00" : "0xdeadbeef"
}
}
},
"transaction" : {
"data" : [
"0x"
],
"gasLimit" : [
"0x061a80"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "0xdeadbeef00000000000000000000000000000000",
"value" : [
"0x01"
]
}
}
}
64 changes: 64 additions & 0 deletions GeneralStateTests/stExtCodeHash/extCodeHashSelfInInit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"extCodeHashSelfInInit" : {
"_info" : {
"comment" : "EXTCODEHASH/EXTCODESIZE of the account currently being created",
"filledwith" : "testeth 1.5.0-alpha.6-1+commit.19ad7d95.dirty",
"lllcversion" : "Version: 0.5.0-develop.2018.9.29+commit.c4b5101b.Darwin.appleclang",
"source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashSelfInInitFiller.json",
"sourceHash" : "a17e4fb7a0a4a6ac92dc1b2b696f92340f5ff3e7b85320b8157ec8265c087c8b"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "0x0f4240",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Constantinople" : [
{
"hash" : "0x318ee70503cfb93bf40ff733c0c32ba3e1a513f0a9869dfc905734a7e7932bf3",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
},
"0xdeadbeef00000000000000000000000000000000" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x6010600f80601260003960006000f55000fe303f600055303b60015560006000f3",
"nonce" : "0x00",
"storage" : {
"0x00" : "0xdeadbeef"
}
}
},
"transaction" : {
"data" : [
"0x"
],
"gasLimit" : [
"0x061a80"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "0xdeadbeef00000000000000000000000000000000",
"value" : [
"0x01"
]
}
}
}
Loading