-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #543 from hugo-dc/extcodehash-h2
EXTCODEHASH: test for deleted account
- Loading branch information
Showing
10 changed files
with
1,009 additions
and
0 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"extCodeHashDeletedAccount" : { | ||
"_info" : { | ||
"comment" : "Get account A (aaaaaaaa00000000000000000000000000000000) code hash, code size, and code\nCalls Account A's code which causes self destruction of A\nGet account A codehash, code size and code\nIt is still getting the same values because selfdestruct is performed\nat the end of transaction during state finalization stage.\n", | ||
"filledwith" : "testeth 1.5.0-alpha.6-49+commit.4897b8bb", | ||
"lllcversion" : "Version: 0.5.0-develop.2018.11.8+commit.20481055.Linux.g++", | ||
"source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml", | ||
"sourceHash" : "fa10ed88ae97006f6b03ca0b4ffc8ae5168d2004bfbbd9cb8221cc179b76e7f3" | ||
}, | ||
"env" : { | ||
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", | ||
"currentDifficulty" : "0x20000", | ||
"currentGasLimit" : "0x0f4240", | ||
"currentNumber" : "0x01", | ||
"currentTimestamp" : "0x03e8", | ||
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" | ||
}, | ||
"post" : { | ||
"Constantinople" : [ | ||
{ | ||
"hash" : "0x8621bc3fcc688bc0507ac16cd2025292c360a3356e5bf779bf8dfccd32377bf6", | ||
"indexes" : { | ||
"data" : 0, | ||
"gas" : 0, | ||
"value" : 0 | ||
}, | ||
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" | ||
} | ||
] | ||
}, | ||
"pre" : { | ||
"0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x6020600060006000600073deadbeef00000000000000000000000000000000620249f0f1506020600060003e6000516000556020600060006000600073deadbeef00000000000000000000000000000001620249f0f1506020600060003e6000516001556020600060006000600073deadbeef00000000000000000000000000000002620249f0f1506020600060003e6000516002556020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f1506020600060006000600073deadbeef00000000000000000000000000000000620249f0f1506020600060003e6000516003556020600060006000600073deadbeef00000000000000000000000000000001620249f0f1506020600060003e6000516004556020600060006000600073deadbeef00000000000000000000000000000002620249f0f1506020600060003e600051600555", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x00", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xaaaaaaaa00000000000000000000000000000000" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x73deadbeef00000000000000000000000000000000ff", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xdeadbeef00000000000000000000000000000000" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x73aaaaaaaa000000000000000000000000000000003f60005260206000f3", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xdeadbeef00000000000000000000000000000001" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x73aaaaaaaa000000000000000000000000000000003b60005260206000f3", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xdeadbeef00000000000000000000000000000002" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x73aaaaaaaa000000000000000000000000000000003b6000600073aaaaaaaa000000000000000000000000000000003c60206000f3", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
} | ||
}, | ||
"transaction" : { | ||
"data" : [ | ||
"0x" | ||
], | ||
"gasLimit" : [ | ||
"0x061a80" | ||
], | ||
"gasPrice" : "0x01", | ||
"nonce" : "0x00", | ||
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", | ||
"to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", | ||
"value" : [ | ||
"0x01" | ||
] | ||
} | ||
} | ||
} |
77 changes: 77 additions & 0 deletions
77
GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"extCodeHashDeletedAccount1" : { | ||
"_info" : { | ||
"comment" : "1) Account A already exists in the state and contains code\nCall to Account B do the following:\n- stores Account A code hash to 1\n- stores Account A code size to 2\n- stores Account A code to 3\n- Run selfdestruct on A\n- stores Account A code hash to 4\n- stores Account A code size to 5\n- stores Account A code to 6\n", | ||
"filledwith" : "testeth 1.5.0-alpha.6-49+commit.4897b8bb", | ||
"lllcversion" : "Version: 0.5.0-develop.2018.11.8+commit.20481055.Linux.g++", | ||
"source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml", | ||
"sourceHash" : "ce870dddcddc514d6bf9d0232cd1926e4ec1e875a330b80d8f7cc2aabbd6f0d0" | ||
}, | ||
"env" : { | ||
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", | ||
"currentDifficulty" : "0x20000", | ||
"currentGasLimit" : "0x0f4240", | ||
"currentNumber" : "0x01", | ||
"currentTimestamp" : "0x03e8", | ||
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" | ||
}, | ||
"post" : { | ||
"Constantinople" : [ | ||
{ | ||
"hash" : "0xa3351a168ff2dcecf68704dcb541a7ee5597d205453834d265dfc7300e38e563", | ||
"indexes" : { | ||
"data" : 0, | ||
"gas" : 0, | ||
"value" : 0 | ||
}, | ||
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" | ||
} | ||
] | ||
}, | ||
"pre" : { | ||
"0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x6020600060006000600073bbbbbbbb0000000000000000000000000000000062027100f1", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x00", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xaaaaaaaa00000000000000000000000000000000" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x73deadbeef0000000000000000000000000000000031ff", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xbbbbbbbb00000000000000000000000000000000" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x73aaaaaaaa000000000000000000000000000000003f60015573aaaaaaaa000000000000000000000000000000003b6002556002546000600073aaaaaaaa000000000000000000000000000000003c6000516003556020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15073aaaaaaaa000000000000000000000000000000003f60045573aaaaaaaa000000000000000000000000000000003b6005556005546000602073aaaaaaaa000000000000000000000000000000003c602051600655", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
} | ||
}, | ||
"transaction" : { | ||
"data" : [ | ||
"0x" | ||
], | ||
"gasLimit" : [ | ||
"0x061a80" | ||
], | ||
"gasPrice" : "0x01", | ||
"nonce" : "0x00", | ||
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", | ||
"to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", | ||
"value" : [ | ||
"0x01" | ||
] | ||
} | ||
} | ||
} |
77 changes: 77 additions & 0 deletions
77
GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"extCodeHashDeletedAccount2" : { | ||
"_info" : { | ||
"comment" : "2) Account A already exists in the state and contains code\nCall to Account B stores Account A code hash to 1, code size to 2, code to 3\nCall to Account C runs self destruct on A\nCall to Account B stores Account A code hash to 4, code size to 5, code to 6\n", | ||
"filledwith" : "testeth 1.5.0-alpha.6-49+commit.4897b8bb", | ||
"lllcversion" : "Version: 0.5.0-develop.2018.11.8+commit.20481055.Linux.g++", | ||
"source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml", | ||
"sourceHash" : "c84ffe96f1f5d4cb8bedb7995fe16953f22f0836dd958a48fcdbe2c3e96e7540" | ||
}, | ||
"env" : { | ||
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", | ||
"currentDifficulty" : "0x20000", | ||
"currentGasLimit" : "0x0f4240", | ||
"currentNumber" : "0x01", | ||
"currentTimestamp" : "0x03e8", | ||
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" | ||
}, | ||
"post" : { | ||
"Constantinople" : [ | ||
{ | ||
"hash" : "0x32a594bdf43e5c24677eaa10c569b9aebfb4f548c14363c8908171d0fe674c68", | ||
"indexes" : { | ||
"data" : 0, | ||
"gas" : 0, | ||
"value" : 0 | ||
}, | ||
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" | ||
} | ||
] | ||
}, | ||
"pre" : { | ||
"0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x60016000526020600060206000600073bbbbbbbb00000000000000000000000000000000620249f0f1506020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15060046020526020600060206020600073bbbbbbbb00000000000000000000000000000000620249f0f1", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x00", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xaaaaaaaa00000000000000000000000000000000" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x73deadbeef0000000000000000000000000000000031ff", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xbbbbbbbb00000000000000000000000000000000" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x6020600060003773aaaaaaaa000000000000000000000000000000003f6000515573aaaaaaaa000000000000000000000000000000003b602052600160005101600052602051600051556001600051016000526020516000604073aaaaaaaa000000000000000000000000000000003c60405160005155", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
} | ||
}, | ||
"transaction" : { | ||
"data" : [ | ||
"0x" | ||
], | ||
"gasLimit" : [ | ||
"0x061a80" | ||
], | ||
"gasPrice" : "0x01", | ||
"nonce" : "0x00", | ||
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", | ||
"to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", | ||
"value" : [ | ||
"0x01" | ||
] | ||
} | ||
} | ||
} |
77 changes: 77 additions & 0 deletions
77
GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"extCodeHashDeletedAccount3" : { | ||
"_info" : { | ||
"comment" : "3) Call creates Account A (0x95ab1c33798981918da6d27056f70376674878d2)\nCall to Account B do the following:\n- stores Account A code hash to 1\n- stores Account A code size to 2\n- stores Account A code to 3\n- Run selfdestruct on A\n- stores Account A code hash to 4\n- stores Account A code size to 5\n- stores Account A code to 6\n", | ||
"filledwith" : "testeth 1.5.0-alpha.6-49+commit.4897b8bb", | ||
"lllcversion" : "Version: 0.5.0-develop.2018.11.8+commit.20481055.Linux.g++", | ||
"source" : "src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml", | ||
"sourceHash" : "60606f099bc3a37294c492f227e7899637f922f04763dbfabdbeb216ba9d8857" | ||
}, | ||
"env" : { | ||
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", | ||
"currentDifficulty" : "0x20000", | ||
"currentGasLimit" : "0x0f4240", | ||
"currentNumber" : "0x01", | ||
"currentTimestamp" : "0x03e8", | ||
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" | ||
}, | ||
"post" : { | ||
"Constantinople" : [ | ||
{ | ||
"hash" : "0xf5fbc7006e2fcda26c72bbf7379a2a503719d062a1793813497aba13c7c40fdc", | ||
"indexes" : { | ||
"data" : 0, | ||
"gas" : 0, | ||
"value" : 0 | ||
}, | ||
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" | ||
} | ||
] | ||
}, | ||
"pre" : { | ||
"0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x6000603c80603f60003960006000f56000526000516000556020600060006000600073bbbbbbbb00000000000000000000000000000000620249f0f15000fe73cccccccc000000000000000000000000000000003b6000526000516000602073cccccccc000000000000000000000000000000003c6000516020f3", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x00", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xbbbbbbbb00000000000000000000000000000000" : { | ||
"balance" : "0x0de0b6b3a7640000", | ||
"code" : "0x7395ab1c33798981918da6d27056f70376674878d23f6001557395ab1c33798981918da6d27056f70376674878d23b600255600254600060007395ab1c33798981918da6d27056f70376674878d23c600051600355602060006000600060007395ab1c33798981918da6d27056f70376674878d2620249f0f1507395ab1c33798981918da6d27056f70376674878d23f6004557395ab1c33798981918da6d27056f70376674878d23b600555600554600060207395ab1c33798981918da6d27056f70376674878d23c602051600655", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
}, | ||
"0xcccccccc00000000000000000000000000000000" : { | ||
"balance" : "0x00", | ||
"code" : "0x73bbbbbbbb00000000000000000000000000000000ff", | ||
"nonce" : "0x00", | ||
"storage" : { | ||
} | ||
} | ||
}, | ||
"transaction" : { | ||
"data" : [ | ||
"0x" | ||
], | ||
"gasLimit" : [ | ||
"0x061a80" | ||
], | ||
"gasPrice" : "0x01", | ||
"nonce" : "0x00", | ||
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", | ||
"to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", | ||
"value" : [ | ||
"0x01" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.