aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json26
-rw-r--r--GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json8
-rw-r--r--GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json10
-rw-r--r--GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json8
-rw-r--r--GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount4.json8
-rw-r--r--src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml29
-rw-r--r--src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml21
-rw-r--r--src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml24
-rw-r--r--src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount4Filler.yml18
-rw-r--r--src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml87
10 files changed, 180 insertions, 59 deletions
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
index 8db6aa910..11f141767 100644
--- a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
@@ -1,11 +1,11 @@
{
"extCodeHashDeletedAccount" : {
"_info" : {
- "comment" : "Get account A (deadbeef00000000000000000000000000000000) code hash\nCalls Account A's code which causes self destruction of A\nGet account A codehash\nIt is still getting the same codehash because selfdestruct is performed\nat the end of transaction during state finalization stage.\n",
+ "comment" : "Get account A (aaaaaaaa00000000000000000000000000000000) code hash\nCalls Account A's code which causes self destruction of A\nGet account A codehash\nIt is still getting the same codehash 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" : "7e7b94fd1a8c3ab4e26a5cdb4a3bc73a0d97eb319c9884b24d26cfc8731607a2"
+ "sourceHash" : "2a7e8a8fac5a9132f1cc17d1f103bb8e7537717e82b4b827d98619b0c2ac0a3e"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
@@ -18,7 +18,7 @@
"post" : {
"Constantinople" : [
{
- "hash" : "0x1e31f5c7570f4fcf9694c3db8cc4b819d7bf16eb3c73f86e81a545bca1f14da1",
+ "hash" : "0x8621bc3fcc688bc0507ac16cd2025292c360a3356e5bf779bf8dfccd32377bf6",
"indexes" : {
"data" : 0,
"gas" : 0,
@@ -31,7 +31,7 @@
"pre" : {
"0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "0x0de0b6b3a7640000",
- "code" : "0x6020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f1506020600060003e6000516000556020600060006000600073deadbeef00000000000000000000000000000000620249f0f1506020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f1506020600060003e600051600155",
+ "code" : "0x6020600060006000600073deadbeef00000000000000000000000000000000620249f0f1506020600060003e6000516000556020600060006000600073deadbeef00000000000000000000000000000001620249f0f1506020600060003e6000516001556020600060006000600073deadbeef00000000000000000000000000000002620249f0f1506020600060003e6000516002556020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f1506020600060006000600073deadbeef00000000000000000000000000000000620249f0f1506020600060003e6000516003556020600060006000600073deadbeef00000000000000000000000000000001620249f0f1506020600060003e6000516004556020600060006000600073deadbeef00000000000000000000000000000002620249f0f1506020600060003e600051600555",
"nonce" : "0x00",
"storage" : {
}
@@ -45,14 +45,28 @@
},
"0xaaaaaaaa00000000000000000000000000000000" : {
"balance" : "0x0de0b6b3a7640000",
- "code" : "0x73deadbeef000000000000000000000000000000003f60005260206000f3",
+ "code" : "0x73deadbeef00000000000000000000000000000000ff",
"nonce" : "0x00",
"storage" : {
}
},
"0xdeadbeef00000000000000000000000000000000" : {
"balance" : "0x0de0b6b3a7640000",
- "code" : "0x73deadbeef0000000000000000000000000000000031ff",
+ "code" : "0x73aaaaaaaa000000000000000000000000000000003f60005260206000f3",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xdeadbeef00000000000000000000000000000001" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "0x73aaaaaaaa000000000000000000000000000000003b60005260206000f3",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xdeadbeef00000000000000000000000000000002" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "0x73aaaaaaaa000000000000000000000000000000003b6000600073aaaaaaaa000000000000000000000000000000003c60206000f3",
"nonce" : "0x00",
"storage" : {
}
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json
index 766204cc5..b5a43c20c 100644
--- a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json
@@ -1,11 +1,11 @@
{
"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 hash to 1\n- Run selfdestruct on A\n- stores Account A hash to 2.\n",
+ "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" : "72463d1d8e18459910285be058e643d43948d7ee590300c15201098d92bd101f"
+ "sourceHash" : "e78f6efbbaa04c5bd3a87d63d771252beee6dc83d506b7db562837b594ee9346"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
@@ -18,7 +18,7 @@
"post" : {
"Constantinople" : [
{
- "hash" : "0xb569620a56ecedea5a178f5699f38793819792851ba197f9159cd94042710af0",
+ "hash" : "0x26a950b1fd969e55a6e213283d3e216c8b9198af299682a089858849d3d55715",
"indexes" : {
"data" : 0,
"gas" : 0,
@@ -52,7 +52,7 @@
},
"0xbbbbbbbb00000000000000000000000000000000" : {
"balance" : "0x0de0b6b3a7640000",
- "code" : "0x73aaaaaaaa000000000000000000000000000000003f6000526000516001556020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15073aaaaaaaa000000000000000000000000000000003f602052602051600255",
+ "code" : "0x73aaaaaaaa000000000000000000000000000000003f60015573aaaaaaaa000000000000000000000000000000003b6002556002546000600073aaaaaaaa000000000000000000000000000000003c6000516003556020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15073aaaaaaaa000000000000000000000000000000003f60045573aaaaaaaa000000000000000000000000000000003b6005556005546000602073aaaaaaaa000000000000000000000000000000003c",
"nonce" : "0x00",
"storage" : {
}
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json
index 0d2f38437..d1325c6ed 100644
--- a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json
@@ -1,11 +1,11 @@
{
"extCodeHashDeletedAccount2" : {
"_info" : {
- "comment" : "2) Account A already exists in the state and contains code\nCall to Account B stores Account A hash to 1\nCall to Account C runs self destruct on A\nCall to Account B stores Account A hash to 2\n",
+ "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" : "1388059a01de87d0a075657fc4508d9acc4ce4129deb9257fc162166b66b38d6"
+ "sourceHash" : "c84ffe96f1f5d4cb8bedb7995fe16953f22f0836dd958a48fcdbe2c3e96e7540"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
@@ -18,7 +18,7 @@
"post" : {
"Constantinople" : [
{
- "hash" : "0x8e358d0c5cc69178264070688679cd9557571baeaa65e7796f2310fe1c9ea4af",
+ "hash" : "0x32a594bdf43e5c24677eaa10c569b9aebfb4f548c14363c8908171d0fe674c68",
"indexes" : {
"data" : 0,
"gas" : 0,
@@ -31,7 +31,7 @@
"pre" : {
"0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "0x0de0b6b3a7640000",
- "code" : "0x60016000526020600060206000600073bbbbbbbb00000000000000000000000000000000620249f0f1506020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15060026020526020600060206020600073bbbbbbbb00000000000000000000000000000000620249f0f1",
+ "code" : "0x60016000526020600060206000600073bbbbbbbb00000000000000000000000000000000620249f0f1506020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15060046020526020600060206020600073bbbbbbbb00000000000000000000000000000000620249f0f1",
"nonce" : "0x00",
"storage" : {
}
@@ -52,7 +52,7 @@
},
"0xbbbbbbbb00000000000000000000000000000000" : {
"balance" : "0x0de0b6b3a7640000",
- "code" : "0x6020600060003773aaaaaaaa000000000000000000000000000000003f60005155",
+ "code" : "0x6020600060003773aaaaaaaa000000000000000000000000000000003f6000515573aaaaaaaa000000000000000000000000000000003b602052600160005101600052602051600051556001600051016000526020516000604073aaaaaaaa000000000000000000000000000000003c60405160005155",
"nonce" : "0x00",
"storage" : {
}
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json
index 8798512be..adf83a7ab 100644
--- a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json
@@ -1,11 +1,11 @@
{
"extCodeHashDeletedAccount3" : {
"_info" : {
- "comment" : "3) Call creates Account A (0x95ab1c33798981918da6d27056f70376674878d2)\nCall to Account B do the following:\n- stores Account A hash to 1\n- Run selfdestruct on A\n- stores Account A hash to 2\n",
+ "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" : "0f465ca1787b4fffe81d8612e2cd5079a4ae824bb19cd099ed537c9dcc556de2"
+ "sourceHash" : "60606f099bc3a37294c492f227e7899637f922f04763dbfabdbeb216ba9d8857"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
@@ -18,7 +18,7 @@
"post" : {
"Constantinople" : [
{
- "hash" : "0x856f8e352ff31e93aee1829316295795d831b5cef1ab1153c0c07c6ae4337ee3",
+ "hash" : "0xf5fbc7006e2fcda26c72bbf7379a2a503719d062a1793813497aba13c7c40fdc",
"indexes" : {
"data" : 0,
"gas" : 0,
@@ -45,7 +45,7 @@
},
"0xbbbbbbbb00000000000000000000000000000000" : {
"balance" : "0x0de0b6b3a7640000",
- "code" : "0x7395ab1c33798981918da6d27056f70376674878d23f600155602060006000600060007395ab1c33798981918da6d27056f70376674878d2620249f0f1507395ab1c33798981918da6d27056f70376674878d23f600255",
+ "code" : "0x7395ab1c33798981918da6d27056f70376674878d23f6001557395ab1c33798981918da6d27056f70376674878d23b600255600254600060007395ab1c33798981918da6d27056f70376674878d23c600051600355602060006000600060007395ab1c33798981918da6d27056f70376674878d2620249f0f1507395ab1c33798981918da6d27056f70376674878d23f6004557395ab1c33798981918da6d27056f70376674878d23b600555600554600060207395ab1c33798981918da6d27056f70376674878d23c602051600655",
"nonce" : "0x00",
"storage" : {
}
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount4.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount4.json
index afa0c4ec9..c5a02acc2 100644
--- a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount4.json
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount4.json
@@ -5,7 +5,7 @@
"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/extCodeHashDeletedAccount4Filler.yml",
- "sourceHash" : "24625c2a6c24a105b23b4f409b04eceffa8ff0b4a54a06678a2326ea8119d68d"
+ "sourceHash" : "4ac76949182f9d30a1b62b30ea5a5e4a86f764a49b779494bf303f71f2f48bb2"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
@@ -18,7 +18,7 @@
"post" : {
"Constantinople" : [
{
- "hash" : "0x19690f40fea7615f844d758927da36f681fedc5a59984e42102bd1b0ddd0c409",
+ "hash" : "0x599cc0fcffdf19148006073244457e01beb7102dd483aa57f5a5c159573a3270",
"indexes" : {
"data" : 0,
"gas" : 0,
@@ -31,7 +31,7 @@
"pre" : {
"0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "0x0de0b6b3a7640000",
- "code" : "0x6000603c80609360003960006000f560005260005160005560016020526020600060206020600073bbbbbbbb00000000000000000000000000000000620249f0f1506020600060006000600073cccccccc00000000000000000000000000000000620249f0f15060026040526020600060206040600073bbbbbbbb00000000000000000000000000000000620249f0f15000fe73dddddddd000000000000000000000000000000003b6000526000516000602073dddddddd000000000000000000000000000000003c6000516020f3",
+ "code" : "0x6000603c80609360003960006000f560005260005160005560016020526020600060206020600073bbbbbbbb00000000000000000000000000000000620249f0f1506020600060006000600073cccccccc00000000000000000000000000000000620249f0f15060046040526020600060206040600073bbbbbbbb00000000000000000000000000000000620249f0f15000fe73dddddddd000000000000000000000000000000003b6000526000516000602073dddddddd000000000000000000000000000000003c6000516020f3",
"nonce" : "0x00",
"storage" : {
}
@@ -45,7 +45,7 @@
},
"0xbbbbbbbb00000000000000000000000000000000" : {
"balance" : "0x0de0b6b3a7640000",
- "code" : "0x6020600060003773e713449c212d891357cc2966816b1d528cfb59e03f60005155",
+ "code" : "0x6020600060003773e713449c212d891357cc2966816b1d528cfb59e03f6000515560016000510160005273e713449c212d891357cc2966816b1d528cfb59e03b60005155600051546000602073e713449c212d891357cc2966816b1d528cfb59e03c60016000510160005260205160005155",
"nonce" : "0x00",
"storage" : {
}
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml
index 61cec84fd..f506d8362 100644
--- a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml
@@ -5,9 +5,13 @@ extCodeHashDeletedAccount1:
comment: |
1) Account A already exists in the state and contains code
Call to Account B do the following:
- - stores Account A hash to 1
+ - stores Account A code hash to 1
+ - stores Account A code size to 2
+ - stores Account A code to 3
- Run selfdestruct on A
- - stores Account A hash to 2.
+ - stores Account A code hash to 4
+ - stores Account A code size to 5
+ - stores Account A code to 6
env:
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
currentDifficulty: '0x20000'
@@ -35,20 +39,24 @@ extCodeHashDeletedAccount1:
nonce: '0'
storage: {}
# Account B
- # Stores Account A hash to [1]
+ # Stores Account A code hash to 1, code size to 2, code to 3
# Run selfdestruct on A
- # Stores Account A hash to [2]
+ # Stores Account A code hash to 4, code size to 5, code to 6
bbbbbbbb00000000000000000000000000000000:
balance: '1000000000000000000'
code: |
{
- (MSTORE 0 (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000))
- [[1]] (MLOAD 0)
+ [[1]] (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000)
+ [[2]] (EXTCODESIZE 0xaaaaaaaa00000000000000000000000000000000)
+ (EXTCODECOPY 0xaaaaaaaa00000000000000000000000000000000 0 0 (SLOAD 2))
+ [[3]] (MLOAD 0)
(CALL 150000 0xaaaaaaaa00000000000000000000000000000000 0 0 0 0 32)
- (MSTORE 32 (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000))
- [[2]] (MLOAD 32)
+ [[4]] (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000)
+ [[5]] (EXTCODESIZE 0xaaaaaaaa00000000000000000000000000000000)
+ (EXTCODECOPY 0xaaaaaaaa00000000000000000000000000000000 32 0 (SLOAD 5))
+ ;;[[6]] (MLOAD 32) ;; <--- This is failing
}
nonce: '0'
storage: {}
@@ -76,7 +84,10 @@ extCodeHashDeletedAccount1:
balance: '1000000000000000000'
storage: {
1: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
- 2: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293'
+ 2: '0x17',
+ 3: '0x73deadbeef0000000000000000000000000000000031ff000000000000000000',
+ 4: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
+ 5: '0X17',
}
transaction:
data:
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml
index 35b102551..aa2a0d0a6 100644
--- a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml
@@ -4,9 +4,9 @@ extCodeHashDeletedAccount2:
_info:
comment: |
2) Account A already exists in the state and contains code
- Call to Account B stores Account A hash to 1
+ Call to Account B stores Account A code hash to 1, code size to 2, code to 3
Call to Account C runs self destruct on A
- Call to Account B stores Account A hash to 2
+ Call to Account B stores Account A code hash to 4, code size to 5, code to 6
env:
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
currentDifficulty: '0x20000'
@@ -24,7 +24,7 @@ extCodeHashDeletedAccount2:
(CALL 150000 0xaaaaaaaa00000000000000000000000000000000 0 0 0 0 32)
- (MSTORE 32 0x02)
+ (MSTORE 32 0x04)
(CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 32 32 0 32)
}
nonce: '0'
@@ -47,6 +47,15 @@ extCodeHashDeletedAccount2:
{
(CALLDATACOPY 0 0 32)
(SSTORE (MLOAD 0) (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000))
+
+ (MSTORE 32 (EXTCODESIZE 0xaaaaaaaa00000000000000000000000000000000))
+
+ (MSTORE 0 (ADD (MLOAD 0) 1))
+ (SSTORE (MLOAD 0) (MLOAD 32))
+
+ (MSTORE 0 (ADD (MLOAD 0) 1))
+ (EXTCODECOPY 0xaaaaaaaa00000000000000000000000000000000 64 0 (MLOAD 32))
+ (SSTORE (MLOAD 0) (MLOAD 64))
}
nonce: '0'
storage: {}
@@ -72,7 +81,11 @@ extCodeHashDeletedAccount2:
balance: '1000000000000000000'
storage: {
1: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
- 2: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293'
+ 2: '0x17',
+ 3: '0x73deadbeef0000000000000000000000000000000031ff000000000000000000',
+ 4: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
+ 5: '0x17',
+ 6: '0x73deadbeef0000000000000000000000000000000031ff000000000000000000'
}
transaction:
data:
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml
index 13c16efcb..2e1480d12 100644
--- a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml
@@ -5,9 +5,13 @@ extCodeHashDeletedAccount3:
comment: |
3) Call creates Account A (0x95ab1c33798981918da6d27056f70376674878d2)
Call to Account B do the following:
- - stores Account A hash to 1
+ - stores Account A code hash to 1
+ - stores Account A code size to 2
+ - stores Account A code to 3
- Run selfdestruct on A
- - stores Account A hash to 2
+ - stores Account A code hash to 4
+ - stores Account A code size to 5
+ - stores Account A code to 6
env:
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
currentDifficulty: '0x20000'
@@ -50,12 +54,18 @@ extCodeHashDeletedAccount3:
{
;; Stores Account A hash to 1
[[1]] (EXTCODEHASH 0x95ab1c33798981918da6d27056f70376674878d2)
-
+ [[2]] (EXTCODESIZE 0x95ab1c33798981918da6d27056f70376674878d2)
+
+ (EXTCODECOPY 0x95ab1c33798981918da6d27056f70376674878d2 0 0 (SLOAD 2))
+ [[3]] (MLOAD 0)
;; Run self destruct on Account A
(CALL 150000 0x95ab1c33798981918da6d27056f70376674878d2 0 0 0 0 32)
;; Stores Account A hash to 2
- [[2]] (EXTCODEHASH 0x95ab1c33798981918da6d27056f70376674878d2)
+ [[4]] (EXTCODEHASH 0x95ab1c33798981918da6d27056f70376674878d2)
+ [[5]] (EXTCODESIZE 0x95ab1c33798981918da6d27056f70376674878d2)
+ (EXTCODECOPY 0x95ab1c33798981918da6d27056f70376674878d2 32 0 (SLOAD 5))
+ [[6]] (MLOAD 32)
}
nonce: '0'
storage: {}
@@ -89,7 +99,11 @@ extCodeHashDeletedAccount3:
balance: '1000000000000000000'
storage: {
1: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf',
- 2: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf'
+ 2: '0x16',
+ 3: '0x73bbbbbbbb00000000000000000000000000000000ff00000000000000000000',
+ 4: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf',
+ 5: '0X16',
+ 6: '0x73bbbbbbbb00000000000000000000000000000000ff00000000000000000000',
}
95ab1c33798981918da6d27056f70376674878d2:
shouldnotexist: '1'
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount4Filler.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount4Filler.yml
index c9d420289..2ded64eef 100644
--- a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount4Filler.yml
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount4Filler.yml
@@ -38,7 +38,7 @@ extCodeHashDeletedAccount4:
[[0]] (MLOAD 0)
;; Call Account B:
- ;; Stores Account A hash to 1
+ ;; Stores Account A code hash to 1, code size to 2, code to 3
(MSTORE 32 0x01)
(CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 32 32 0 32)
@@ -47,8 +47,8 @@ extCodeHashDeletedAccount4:
(CALL 150000 0xcccccccc00000000000000000000000000000000 0 0 0 0 32)
;; Call Account B:
- ;; Stores Account B hash to 2
- (MSTORE 64 0x02)
+ ;; Stores Account B code hash to 4, code size to 5, code to 6
+ (MSTORE 64 0x04)
(CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 64 32 0 32)
(STOP)
@@ -64,7 +64,13 @@ extCodeHashDeletedAccount4:
;; store Account A code hash
[[(MLOAD 0)]] (EXTCODEHASH 0xe713449c212d891357cc2966816b1d528cfb59e0)
+
+ (MSTORE 0 (ADD (MLOAD 0) 1)) ;; increments storage key
+ [[(MLOAD 0)]] (EXTCODESIZE 0xe713449c212d891357cc2966816b1d528cfb59e0)
+ (EXTCODECOPY 0xe713449c212d891357cc2966816b1d528cfb59e0 32 0 (SLOAD (MLOAD 0)))
+ (MSTORE 0 (ADD (MLOAD 0) 1)) ;; increments storage key
+ [[(MLOAD 0)]] (MLOAD 32)
}
nonce: '0'
storage: {}
@@ -107,7 +113,11 @@ extCodeHashDeletedAccount4:
balance: '1000000000000000000'
storage: {
1: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf',
- 2: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf'
+ 2: '0x16',
+ 3: '0x73bbbbbbbb00000000000000000000000000000000ff00000000000000000000',
+ 4: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf',
+ 5: '0x16',
+ 6: '0x73bbbbbbbb00000000000000000000000000000000ff00000000000000000000'
}
e713449c212d891357cc2966816b1d528cfb59e0:
shouldnotexist: '1'
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml
index cd13cbb39..74e6f0f8e 100644
--- a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml
@@ -3,10 +3,10 @@
extCodeHashDeletedAccount:
_info:
comment: |
- Get account A (deadbeef00000000000000000000000000000000) code hash
+ Get account A (aaaaaaaa00000000000000000000000000000000) code hash, code size, and code
Calls Account A's code which causes self destruction of A
- Get account A codehash
- It is still getting the same codehash because selfdestruct is performed
+ Get account A codehash, code size and code
+ It is still getting the same values because selfdestruct is performed
at the end of transaction during state finalization stage.
env:
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
@@ -21,31 +21,84 @@ extCodeHashDeletedAccount:
balance: '1000000000000000000'
code: |
{
- (CALL 150000 0xaaaaaaaa00000000000000000000000000000000 0 0 0 0 32)
+ ;; Gets external code hash, stores it in [[0]]
+ (CALL 150000 0xdeadbeef00000000000000000000000000000000 0 0 0 0 32)
(RETURNDATACOPY 0 0 32)
[[0]] (MLOAD 0)
-
- (CALL 150000 0xdeadbeef00000000000000000000000000000000 0 0 0 0 32)
-
- (CALL 150000 0xaaaaaaaa00000000000000000000000000000000 0 0 0 0 32)
+
+ ;; Gets external code size, stores it in [[1]]
+ (CALL 150000 0xdeadbeef00000000000000000000000000000001 0 0 0 0 32)
(RETURNDATACOPY 0 0 32)
[[1]] (MLOAD 0)
+
+ ;; Gets external code, stores it in [[2]]
+ (CALL 150000 0xdeadbeef00000000000000000000000000000002 0 0 0 0 32)
+ (RETURNDATACOPY 0 0 32)
+ [[2]] (MLOAD 0)
+
+
+ ;; Call Account A (self destructs)
+ (CALL 150000 0xaaaaaaaa00000000000000000000000000000000 0 0 0 0 32)
+
+
+ ;; Gets external code hash, stores it in [[3]]
+ (CALL 150000 0xdeadbeef00000000000000000000000000000000 0 0 0 0 32)
+ (RETURNDATACOPY 0 0 32)
+ [[3]] (MLOAD 0)
+
+ ;; Gets external code size, stores it in [[4]]
+ (CALL 150000 0xdeadbeef00000000000000000000000000000001 0 0 0 0 32)
+ (RETURNDATACOPY 0 0 32)
+ [[4]] (MLOAD 0)
+
+ ;; Gets external code, stores it in [[5]]
+ (CALL 150000 0xdeadbeef00000000000000000000000000000002 0 0 0 0 32)
+ (RETURNDATACOPY 0 0 32)
+ [[5]] (MLOAD 0)
+
+ }
+ nonce: '0'
+ storage: {}
+ aaaaaaaa00000000000000000000000000000000:
+ balance: '1000000000000000000'
+ code: |
+ {
+ (SELFDESTRUCT 0xdeadbeef00000000000000000000000000000000)
}
nonce: '0'
storage: {}
+ # Returns External Code Hash
deadbeef00000000000000000000000000000000:
balance: '1000000000000000000'
code: |
{
- (SELFDESTRUCT (BALANCE 0xdeadbeef00000000000000000000000000000000))
+ (MSTORE 0 (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000))
+ (RETURN 0 32)
}
nonce: '0'
storage: {}
- aaaaaaaa00000000000000000000000000000000:
+ # Returns External Code Size
+ deadbeef00000000000000000000000000000001:
+ balance: '1000000000000000000'
+ code: |
+ {
+ (MSTORE 0 (EXTCODESIZE 0xaaaaaaaa00000000000000000000000000000000))
+ (RETURN 0 32)
+ }
+ nonce: '0'
+ storage: {}
+ # Returns the first 32 bytes of the External Code
+ deadbeef00000000000000000000000000000002:
balance: '1000000000000000000'
code: |
{
- (MSTORE 0 (EXTCODEHASH 0xdeadbeef00000000000000000000000000000000))
+ ;;(MSTORE 0 (EXTCODESIZE 0xaaaaaaaa00000000000000000000000000000000))
+ ;;(EXTCODECOPY 0xaaaaaaaa00000000000000000000000000000000
+
+ (EXTCODECOPY 0xaaaaaaaa00000000000000000000000000000000
+ 0
+ 0
+ (EXTCODESIZE 0xaaaaaaaa00000000000000000000000000000000))
(RETURN 0 32)
}
nonce: '0'
@@ -66,11 +119,17 @@ extCodeHashDeletedAccount:
095e7baea6a6c7c4c2dfeb977efac326af552d87:
balance: '1000000000000000001'
storage: {
- 0: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
- 1: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293'
+ 0: '0x4f8f2f49aec2d92b196659c9d1dc920d271503707a57472bd99eca81b9187f0f',
+ 1: '0x16',
+ 2: '0x73deadbeef00000000000000000000000000000000ff00000000000000000000',
+ 3: '0x4f8f2f49aec2d92b196659c9d1dc920d271503707a57472bd99eca81b9187f0f',
+ 4: '0x16',
+ 5: '0x73deadbeef00000000000000000000000000000000ff00000000000000000000'
}
- deadbeef00000000000000000000000000000000:
+ aaaaaaaa00000000000000000000000000000000:
shouldnotexist: '1'
+ deadbeef00000000000000000000000000000000:
+ balance: '2000000000000000000'
transaction:
data:
- ''