From 9371878dcd1d03c9bc8741cab52ed508b90ae19c Mon Sep 17 00:00:00 2001
From: Jose Hugo De la cruz Romero <jhugodc@gmail.com>
Date: Fri, 9 Nov 2018 22:28:41 -0600
Subject: test for deleted account (failing)

---
 .../extCodeHashDeletedAccountFiller.yml            | 77 ++++++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml

diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml
new file mode 100644
index 000000000..2e63f88bd
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml
@@ -0,0 +1,77 @@
+# EXTCODEHASH to a deleted account
+---
+extCodeHashDeletedAccount:
+  env:
+    currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
+    currentDifficulty: '0x20000'
+    currentGasLimit: "1000000"
+    currentNumber: "1"
+    currentTimestamp: "1000"
+    previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
+  pre:
+    # get account A codehash, destructs account A, get account A codehash
+    095e7baea6a6c7c4c2dfeb977efac326af552d87:
+      balance: '1000000000000000000'
+      code: |   
+        {
+          (CALL 150000 0xaaaaaaaa00000000000000000000000000000000 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)
+          (RETURNDATACOPY 0 0 32)
+          [[1]] (MLOAD 0)
+        }
+      nonce: '0'
+      storage: {}
+    deadbeef00000000000000000000000000000000:
+      balance: '1000000000000000000'
+      code: |
+        {
+          (SELFDESTRUCT (BALANCE 0xdeadbeef00000000000000000000000000000000))
+        }
+      nonce: '0'
+      storage: {}
+    aaaaaaaa00000000000000000000000000000000:
+      balance: '1000000000000000000'
+      code: |
+        {
+          (MSTORE 0 (EXTCODEHASH 0xdeadbeef00000000000000000000000000000000))
+          (RETURN 0 32)
+        }
+      nonce: '0'
+      storage: {}
+    a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
+      balance: '1000000000000000000'
+      code: '0x00'
+      nonce: '0'
+      storage: {}
+  expect:
+    - indexes:
+        data: !!int -1
+        gas:  !!int -1
+        value: !!int -1
+      network:
+        - '>Byzantium'
+      result:
+        095e7baea6a6c7c4c2dfeb977efac326af552d87:
+          balance: '1000000000000000001'
+          storage: {
+            0: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
+            1: '0'
+          }
+        deadbeef00000000000000000000000000000000:
+          shouldnotexist: '1'
+  transaction:
+    data:
+    - ''
+    gasLimit:
+    - '400000'
+    gasPrice: '1'
+    nonce: '0'
+    secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
+    to: 095e7baea6a6c7c4c2dfeb977efac326af552d87
+    value:
+    - '1'
-- 
cgit v1.2.3


From a1ca775592b32201b82d3e95f37e2ad2aab01cb9 Mon Sep 17 00:00:00 2001
From: Jose Hugo De la cruz Romero <jhugodc@gmail.com>
Date: Thu, 22 Nov 2018 21:45:47 -0600
Subject: extcodehash for deleted account in state, extcodehash for deleted
 account created in same transaction

---
 .../stExtCodeHash/extCodeHashDeletedAccount.json   |  77 +++++++++++++
 .../stExtCodeHash/extCodeHashDeletedAccount1.json  |  77 +++++++++++++
 .../stExtCodeHash/extCodeHashDeletedAccount2.json  |  77 +++++++++++++
 .../stExtCodeHash/extCodeHashDeletedAccount3.json  |  77 +++++++++++++
 .../stExtCodeHash/extCodeHashDeletedAccount4.json  |  84 ++++++++++++++
 .../extCodeHashDeletedAccount1Filler.yml           |  91 +++++++++++++++
 .../extCodeHashDeletedAccount2Filler.yml           |  88 +++++++++++++++
 .../extCodeHashDeletedAccount3Filler.yml           | 107 ++++++++++++++++++
 .../extCodeHashDeletedAccount4Filler.yml           | 125 +++++++++++++++++++++
 .../extCodeHashDeletedAccountFiller.yml            |  13 ++-
 10 files changed, 813 insertions(+), 3 deletions(-)
 create mode 100644 GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
 create mode 100644 GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json
 create mode 100644 GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json
 create mode 100644 GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json
 create mode 100644 GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount4.json
 create mode 100644 src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml
 create mode 100644 src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml
 create mode 100644 src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml
 create mode 100644 src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount4Filler.yml

diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
new file mode 100644
index 000000000..8db6aa910
--- /dev/null
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
@@ -0,0 +1,77 @@
+{
+    "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",
+            "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"
+        },
+        "env" : {
+            "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+            "currentDifficulty" : "0x20000",
+            "currentGasLimit" : "0x0f4240",
+            "currentNumber" : "0x01",
+            "currentTimestamp" : "0x03e8",
+            "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+        },
+        "post" : {
+            "Constantinople" : [
+                {
+                    "hash" : "0x1e31f5c7570f4fcf9694c3db8cc4b819d7bf16eb3c73f86e81a545bca1f14da1",
+                    "indexes" : {
+                        "data" : 0,
+                        "gas" : 0,
+                        "value" : 0
+                    },
+                    "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+                }
+            ]
+        },
+        "pre" : {
+            "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x6020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f1506020600060003e6000516000556020600060006000600073deadbeef00000000000000000000000000000000620249f0f1506020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f1506020600060003e600051600155",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x00",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xaaaaaaaa00000000000000000000000000000000" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x73deadbeef000000000000000000000000000000003f60005260206000f3",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xdeadbeef00000000000000000000000000000000" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x73deadbeef0000000000000000000000000000000031ff",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            }
+        },
+        "transaction" : {
+            "data" : [
+                "0x"
+            ],
+            "gasLimit" : [
+                "0x061a80"
+            ],
+            "gasPrice" : "0x01",
+            "nonce" : "0x00",
+            "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+            "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
+            "value" : [
+                "0x01"
+            ]
+        }
+    }
+}
\ No newline at end of file
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json
new file mode 100644
index 000000000..766204cc5
--- /dev/null
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json
@@ -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 hash to 1\n- Run selfdestruct on A\n- stores Account A hash to 2.\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"
+        },
+        "env" : {
+            "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+            "currentDifficulty" : "0x20000",
+            "currentGasLimit" : "0x0f4240",
+            "currentNumber" : "0x01",
+            "currentTimestamp" : "0x03e8",
+            "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+        },
+        "post" : {
+            "Constantinople" : [
+                {
+                    "hash" : "0xb569620a56ecedea5a178f5699f38793819792851ba197f9159cd94042710af0",
+                    "indexes" : {
+                        "data" : 0,
+                        "gas" : 0,
+                        "value" : 0
+                    },
+                    "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+                }
+            ]
+        },
+        "pre" : {
+            "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x6020600060006000600073bbbbbbbb00000000000000000000000000000000620249f0f1",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x00",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xaaaaaaaa00000000000000000000000000000000" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x73deadbeef0000000000000000000000000000000031ff",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xbbbbbbbb00000000000000000000000000000000" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x73aaaaaaaa000000000000000000000000000000003f6000526000516001556020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15073aaaaaaaa000000000000000000000000000000003f602052602051600255",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            }
+        },
+        "transaction" : {
+            "data" : [
+                "0x"
+            ],
+            "gasLimit" : [
+                "0x061a80"
+            ],
+            "gasPrice" : "0x01",
+            "nonce" : "0x00",
+            "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+            "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
+            "value" : [
+                "0x01"
+            ]
+        }
+    }
+}
\ No newline at end of file
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json
new file mode 100644
index 000000000..0d2f38437
--- /dev/null
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount2.json
@@ -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 hash to 1\nCall to Account C runs self destruct on A\nCall to Account B stores Account A hash to 2\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"
+        },
+        "env" : {
+            "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+            "currentDifficulty" : "0x20000",
+            "currentGasLimit" : "0x0f4240",
+            "currentNumber" : "0x01",
+            "currentTimestamp" : "0x03e8",
+            "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+        },
+        "post" : {
+            "Constantinople" : [
+                {
+                    "hash" : "0x8e358d0c5cc69178264070688679cd9557571baeaa65e7796f2310fe1c9ea4af",
+                    "indexes" : {
+                        "data" : 0,
+                        "gas" : 0,
+                        "value" : 0
+                    },
+                    "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+                }
+            ]
+        },
+        "pre" : {
+            "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x60016000526020600060206000600073bbbbbbbb00000000000000000000000000000000620249f0f1506020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15060026020526020600060206020600073bbbbbbbb00000000000000000000000000000000620249f0f1",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x00",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xaaaaaaaa00000000000000000000000000000000" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x73deadbeef0000000000000000000000000000000031ff",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xbbbbbbbb00000000000000000000000000000000" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x6020600060003773aaaaaaaa000000000000000000000000000000003f60005155",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            }
+        },
+        "transaction" : {
+            "data" : [
+                "0x"
+            ],
+            "gasLimit" : [
+                "0x061a80"
+            ],
+            "gasPrice" : "0x01",
+            "nonce" : "0x00",
+            "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+            "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
+            "value" : [
+                "0x01"
+            ]
+        }
+    }
+}
\ No newline at end of file
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json
new file mode 100644
index 000000000..8798512be
--- /dev/null
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount3.json
@@ -0,0 +1,77 @@
+{
+    "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",
+            "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"
+        },
+        "env" : {
+            "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+            "currentDifficulty" : "0x20000",
+            "currentGasLimit" : "0x0f4240",
+            "currentNumber" : "0x01",
+            "currentTimestamp" : "0x03e8",
+            "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+        },
+        "post" : {
+            "Constantinople" : [
+                {
+                    "hash" : "0x856f8e352ff31e93aee1829316295795d831b5cef1ab1153c0c07c6ae4337ee3",
+                    "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" : "0x7395ab1c33798981918da6d27056f70376674878d23f600155602060006000600060007395ab1c33798981918da6d27056f70376674878d2620249f0f1507395ab1c33798981918da6d27056f70376674878d23f600255",
+                "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"
+            ]
+        }
+    }
+}
\ No newline at end of file
diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount4.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount4.json
new file mode 100644
index 000000000..afa0c4ec9
--- /dev/null
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount4.json
@@ -0,0 +1,84 @@
+{
+    "extCodeHashDeletedAccount4" : {
+        "_info" : {
+            "comment" : "4) Call creates Account A\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",
+            "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"
+        },
+        "env" : {
+            "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+            "currentDifficulty" : "0x20000",
+            "currentGasLimit" : "0x0f4240",
+            "currentNumber" : "0x01",
+            "currentTimestamp" : "0x03e8",
+            "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+        },
+        "post" : {
+            "Constantinople" : [
+                {
+                    "hash" : "0x19690f40fea7615f844d758927da36f681fedc5a59984e42102bd1b0ddd0c409",
+                    "indexes" : {
+                        "data" : 0,
+                        "gas" : 0,
+                        "value" : 0
+                    },
+                    "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+                }
+            ]
+        },
+        "pre" : {
+            "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x6000603c80609360003960006000f560005260005160005560016020526020600060206020600073bbbbbbbb00000000000000000000000000000000620249f0f1506020600060006000600073cccccccc00000000000000000000000000000000620249f0f15060026040526020600060206040600073bbbbbbbb00000000000000000000000000000000620249f0f15000fe73dddddddd000000000000000000000000000000003b6000526000516000602073dddddddd000000000000000000000000000000003c6000516020f3",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xbbbbbbbb00000000000000000000000000000000" : {
+                "balance" : "0x0de0b6b3a7640000",
+                "code" : "0x6020600060003773e713449c212d891357cc2966816b1d528cfb59e03f60005155",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xcccccccc00000000000000000000000000000000" : {
+                "balance" : "0x00",
+                "code" : "0x6020600060006000600073e713449c212d891357cc2966816b1d528cfb59e0620249f0f1",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            },
+            "0xdddddddd00000000000000000000000000000000" : {
+                "balance" : "0x00",
+                "code" : "0x73bbbbbbbb00000000000000000000000000000000ff",
+                "nonce" : "0x00",
+                "storage" : {
+                }
+            }
+        },
+        "transaction" : {
+            "data" : [
+                "0x"
+            ],
+            "gasLimit" : [
+                "0x061a80"
+            ],
+            "gasPrice" : "0x01",
+            "nonce" : "0x00",
+            "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+            "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
+            "value" : [
+                "0x01"
+            ]
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml
new file mode 100644
index 000000000..61cec84fd
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml
@@ -0,0 +1,91 @@
+# EXTCODEHASH to a deleted account
+---
+extCodeHashDeletedAccount1:
+  _info:
+    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
+      - Run selfdestruct on A
+      - stores Account A hash to 2.
+  env:
+    currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
+    currentDifficulty: '0x20000'
+    currentGasLimit: "1000000"
+    currentNumber: "1"
+    currentTimestamp: "1000"
+    previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
+  pre:
+    095e7baea6a6c7c4c2dfeb977efac326af552d87:
+      balance: '1000000000000000000'
+      code: |
+        {
+          (CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 0 0 0 32)
+        }
+      nonce: '0'
+      storage: {}
+    # Account A: already exists in the state
+    # contains selfdestruct code
+    aaaaaaaa00000000000000000000000000000000:
+      balance: '1000000000000000000'
+      code: |
+        {
+          (SELFDESTRUCT (BALANCE 0xdeadbeef00000000000000000000000000000000))
+        }
+      nonce: '0'
+      storage: {}
+    # Account B
+    # Stores Account A hash to [1]
+    # Run selfdestruct on A
+    # Stores Account A hash to [2]
+    bbbbbbbb00000000000000000000000000000000:
+      balance: '1000000000000000000'
+      code: |
+        {
+          (MSTORE 0 (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000))
+          [[1]] (MLOAD 0)
+          
+          (CALL 150000 0xaaaaaaaa00000000000000000000000000000000 0 0 0 0 32)
+
+          (MSTORE 32 (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000))
+          [[2]] (MLOAD 32)
+        }
+      nonce: '0'
+      storage: {}
+    a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
+      balance: '1000000000000000000'
+      code: '0x00'
+      nonce: '0'
+      storage: {}
+  expect:
+    - indexes:
+        data: !!int -1
+        gas:  !!int -1
+        value: !!int -1
+      network:
+        - '>=Constantinople'
+      result:
+        095e7baea6a6c7c4c2dfeb977efac326af552d87:
+          balance: '1000000000000000001'
+          storage: {
+         
+          }
+        aaaaaaaa00000000000000000000000000000000:
+          shouldnotexist: '1'
+        bbbbbbbb00000000000000000000000000000000:
+          balance: '1000000000000000000'
+          storage: {
+            1: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
+            2: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293'
+          }
+  transaction:
+    data:
+    - ''
+    gasLimit:
+    - '400000'
+    gasPrice: '1'
+    nonce: '0'
+    secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
+    to: 095e7baea6a6c7c4c2dfeb977efac326af552d87
+    value:
+    - '1'
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml
new file mode 100644
index 000000000..35b102551
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount2Filler.yml
@@ -0,0 +1,88 @@
+# EXTCODEHASH to a deleted account
+---
+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 C runs self destruct on A
+      Call to Account B stores Account A hash to 2
+  env:
+    currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
+    currentDifficulty: '0x20000'
+    currentGasLimit: "1000000"
+    currentNumber: "1"
+    currentTimestamp: "1000"
+    previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
+  pre:
+    095e7baea6a6c7c4c2dfeb977efac326af552d87:
+      balance: '1000000000000000000'
+      code: |
+        {
+          (MSTORE 0 0x01)
+          (CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 0 32 0 32)
+          
+          (CALL 150000 0xaaaaaaaa00000000000000000000000000000000 0 0 0  0 32)
+          
+          (MSTORE 32 0x02)
+          (CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 32 32 0 32)
+        }
+      nonce: '0'
+      storage: {}
+    # Acount A: already exists in the state
+    # contains selfdestruct code
+    aaaaaaaa00000000000000000000000000000000:
+      balance: '1000000000000000000'
+      code: |
+        {
+          (SELFDESTRUCT (BALANCE 0xdeadbeef00000000000000000000000000000000))
+        }
+      nonce: '0'
+      storage: {}
+    # Account B
+    # Receives storage key as call data
+    bbbbbbbb00000000000000000000000000000000:
+      balance: '1000000000000000000'
+      code: |
+        {
+          (CALLDATACOPY 0 0 32)
+          (SSTORE (MLOAD 0) (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000))
+        }
+      nonce: '0'
+      storage: {}
+    a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
+      balance: '1000000000000000000'
+      code: '0x00'
+      nonce: '0'
+      storage: {}
+  expect:
+    - indexes:
+        data: !!int -1
+        gas:  !!int -1
+        value: !!int -1
+      network:
+        - '>=Constantinople'
+      result:
+        095e7baea6a6c7c4c2dfeb977efac326af552d87:
+          balance: '1000000000000000001'
+          storage: {}
+        aaaaaaaa00000000000000000000000000000000:
+          shouldnotexist: '1'
+        bbbbbbbb00000000000000000000000000000000:
+          balance: '1000000000000000000'
+          storage: {
+            1: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
+            2: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293'
+          }
+  transaction:
+    data:
+    - ''
+    gasLimit:
+    - '400000'
+    gasPrice: '1'
+    nonce: '0'
+    secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
+    to: 095e7baea6a6c7c4c2dfeb977efac326af552d87
+    value:
+    - '1'
+
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml
new file mode 100644
index 000000000..13c16efcb
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount3Filler.yml
@@ -0,0 +1,107 @@
+# EXTCODEHASH to a deleted account
+---
+extCodeHashDeletedAccount3:
+  _info:
+    comment: |
+      3) Call creates Account A (0x95ab1c33798981918da6d27056f70376674878d2)
+      Call to Account B do the following:
+      - stores Account A hash to 1
+      - Run selfdestruct on A
+      - stores Account A hash to 2
+  env:
+    currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
+    currentDifficulty: '0x20000'
+    currentGasLimit: "1000000"
+    currentNumber: "1"
+    currentTimestamp: "1000"
+    previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
+  pre:
+    095e7baea6a6c7c4c2dfeb977efac326af552d87:
+      balance: '1000000000000000000'
+      code: |
+        {
+          ;; Creates Account A using code in existing account C
+          (MSTORE 0
+            (CREATE2 0 0
+              (lll
+              {
+                (MSTORE 0 (EXTCODESIZE 0xcccccccc00000000000000000000000000000000))
+                (EXTCODECOPY 0xcccccccc00000000000000000000000000000000
+                             32
+                             0
+                             (MLOAD 0))
+                (RETURN 32 (MLOAD 0))
+              }
+              0)
+            0))
+
+          ;; Stores new Account A address
+          [[0]] (MLOAD 0)
+
+          ;; Call Account B:
+          (CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 0 0 0 32)
+          (STOP)
+        }
+      nonce: '0'
+      storage: {}
+    bbbbbbbb00000000000000000000000000000000:
+      balance: '1000000000000000000'
+      code: |
+        {
+          ;; Stores Account A hash to 1
+          [[1]] (EXTCODEHASH 0x95ab1c33798981918da6d27056f70376674878d2)
+
+          ;; Run self destruct on Account A
+          (CALL 150000 0x95ab1c33798981918da6d27056f70376674878d2 0 0  0  0 32)
+
+          ;; Stores Account A hash to 2
+          [[2]] (EXTCODEHASH 0x95ab1c33798981918da6d27056f70376674878d2)
+        }
+      nonce: '0'
+      storage: {}
+    cccccccc00000000000000000000000000000000:
+      balance: '0'
+      code: |
+        {
+          (SELFDESTRUCT 0xbbbbbbbb00000000000000000000000000000000)
+        }
+      nonce: '0'
+      storage: {}
+    a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
+      balance: '1000000000000000000'
+      code: '0x00'
+      nonce: '0'
+      storage: {}
+  expect:
+    - indexes:
+        data: !!int -1
+        gas:  !!int -1
+        value: !!int -1
+      network:
+        - '>=Constantinople'
+      result:
+        095e7baea6a6c7c4c2dfeb977efac326af552d87:
+          balance: '1000000000000000001'
+          storage: {
+            0: '0x95ab1c33798981918da6d27056f70376674878d2'
+            }
+        bbbbbbbb00000000000000000000000000000000:
+          balance: '1000000000000000000'
+          storage: {
+            1: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf',
+            2: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf'
+          }
+        95ab1c33798981918da6d27056f70376674878d2:
+          shouldnotexist: '1'
+  transaction:
+    data:
+    - ''
+    gasLimit:
+    - '400000'
+    gasPrice: '1'
+    nonce: '0'
+    secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
+    to: 095e7baea6a6c7c4c2dfeb977efac326af552d87
+    value:
+    - '1'
+    
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount4Filler.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount4Filler.yml
new file mode 100644
index 000000000..c9d420289
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount4Filler.yml
@@ -0,0 +1,125 @@
+# EXTCODEHASH to a deleted account
+---
+extCodeHashDeletedAccount4:
+  _info:
+    comment: |
+      4) Call creates Account A
+      Call to Account B stores Account A hash to 1
+      Call to Account C runs self destruct on A
+      Call to Account B stores Account a hash to 2
+  env:
+    currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
+    currentDifficulty: '0x20000'
+    currentGasLimit: "1000000"
+    currentNumber: "1"
+    currentTimestamp: "1000"
+    previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
+  pre:
+    095e7baea6a6c7c4c2dfeb977efac326af552d87:
+      balance: '1000000000000000000'
+      code: |
+        {
+          ;; Creates Account A using code in existing account D
+          (MSTORE 0
+            (CREATE2 0 0
+              (lll
+              {
+                (MSTORE 0 (EXTCODESIZE 0xdddddddd00000000000000000000000000000000))
+                (EXTCODECOPY 0xdddddddd00000000000000000000000000000000
+                             32
+                             0
+                             (MLOAD 0))
+                (RETURN 32 (MLOAD 0))
+              }
+              0)
+            0))
+
+          ;; Stores new Account A address
+          [[0]] (MLOAD 0)
+
+          ;; Call Account B:
+          ;; Stores Account A hash to 1            
+          (MSTORE 32 0x01)
+          (CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 32 32 0 32)
+
+          ;; Call Account C:
+          ;; Runs self Destructs on Account A
+          (CALL 150000 0xcccccccc00000000000000000000000000000000 0 0  0  0 32)
+
+          ;; Call Account B:
+          ;; Stores Account B hash to 2
+          (MSTORE 64 0x02)
+          (CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 64 32 0 32)
+          
+          (STOP)
+        }
+      nonce: '0'
+      storage: {}
+    bbbbbbbb00000000000000000000000000000000:
+      balance: '1000000000000000000'
+      code: |
+        {
+          ;; get key from call data
+          (CALLDATACOPY 0 0 32)
+          
+          ;; store Account A code hash
+          [[(MLOAD 0)]] (EXTCODEHASH 0xe713449c212d891357cc2966816b1d528cfb59e0)
+
+        }
+      nonce: '0'
+      storage: {}
+    cccccccc00000000000000000000000000000000:
+      balance: '0'
+      code: |
+        {
+          ;; Run self destruct on Account A
+          (CALL 150000 0xe713449c212d891357cc2966816b1d528cfb59e0 0 0  0  0 32)
+        }
+      nonce: '0'
+      storage: {}
+    dddddddd00000000000000000000000000000000:
+      balance: '0'
+      code: |
+        {
+          (SELFDESTRUCT 0xbbbbbbbb00000000000000000000000000000000)
+        }
+      nonce: '0'
+      storage: {}
+    a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
+      balance: '1000000000000000000'
+      code: ''
+      nonce: '0'
+      storage: {}
+  expect:
+    - indexes:
+        data: !!int -1
+        gas:  !!int -1
+        value: !!int -1
+      network:
+        - '>=Constantinople'
+      result:
+        095e7baea6a6c7c4c2dfeb977efac326af552d87:
+          balance: '1000000000000000001'
+          storage: {
+            0: '0xe713449c212d891357cc2966816b1d528cfb59e0'
+            }
+        bbbbbbbb00000000000000000000000000000000:
+          balance: '1000000000000000000'
+          storage: {
+            1: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf',
+            2: '0xb05d47e0911e4f67786f4cdc582608ee5f731e845a1e95ddc99759e2b3da81bf'
+          }
+        e713449c212d891357cc2966816b1d528cfb59e0:
+          shouldnotexist: '1'
+  transaction:
+    data:
+    - ''
+    gasLimit:
+    - '400000'
+    gasPrice: '1'
+    nonce: '0'
+    secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
+    to: 095e7baea6a6c7c4c2dfeb977efac326af552d87
+    value:
+    - '1'
+    
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml
index 2e63f88bd..cd13cbb39 100644
--- a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccountFiller.yml
@@ -1,6 +1,13 @@
-# EXTCODEHASH to a deleted account
+# EXTCODEHASH to a deleted account same transaction
 ---
 extCodeHashDeletedAccount:
+  _info:
+    comment: |
+      Get account A (deadbeef00000000000000000000000000000000) code hash
+      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
+      at the end of transaction during state finalization stage.
   env:
     currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
     currentDifficulty: '0x20000'
@@ -54,13 +61,13 @@ extCodeHashDeletedAccount:
         gas:  !!int -1
         value: !!int -1
       network:
-        - '>Byzantium'
+        - '>=Constantinople'
       result:
         095e7baea6a6c7c4c2dfeb977efac326af552d87:
           balance: '1000000000000000001'
           storage: {
             0: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
-            1: '0'
+            1: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293'
           }
         deadbeef00000000000000000000000000000000:
           shouldnotexist: '1'
-- 
cgit v1.2.3


From b35aff9e52cd6d37f9d687a09a2d5aec77f06c3b Mon Sep 17 00:00:00 2001
From: Jose Hugo De la cruz Romero <jhugodc@gmail.com>
Date: Tue, 27 Nov 2018 17:35:20 -0600
Subject: add checks for extcodecopy and extcodesize

---
 .../stExtCodeHash/extCodeHashDeletedAccount.json   | 26 +++++--
 .../stExtCodeHash/extCodeHashDeletedAccount1.json  |  8 +-
 .../stExtCodeHash/extCodeHashDeletedAccount2.json  | 10 +--
 .../stExtCodeHash/extCodeHashDeletedAccount3.json  |  8 +-
 .../stExtCodeHash/extCodeHashDeletedAccount4.json  |  8 +-
 .../extCodeHashDeletedAccount1Filler.yml           | 29 +++++---
 .../extCodeHashDeletedAccount2Filler.yml           | 21 +++++-
 .../extCodeHashDeletedAccount3Filler.yml           | 24 ++++--
 .../extCodeHashDeletedAccount4Filler.yml           | 18 ++++-
 .../extCodeHashDeletedAccountFiller.yml            | 87 ++++++++++++++++++----
 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:
     - ''
-- 
cgit v1.2.3


From b4459de5295621828b8cfb494b3805ddf31fce64 Mon Sep 17 00:00:00 2001
From: Jose Hugo De la cruz Romero <jhugodc@gmail.com>
Date: Tue, 27 Nov 2018 17:43:20 -0600
Subject: refill test 0

---
 GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
index 11f141767..4e9214e51 100644
--- a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount.json
@@ -1,11 +1,11 @@
 {
     "extCodeHashDeletedAccount" : {
         "_info" : {
-            "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",
+            "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" : "2a7e8a8fac5a9132f1cc17d1f103bb8e7537717e82b4b827d98619b0c2ac0a3e"
+            "sourceHash" : "fa10ed88ae97006f6b03ca0b4ffc8ae5168d2004bfbbd9cb8221cc179b76e7f3"
         },
         "env" : {
             "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
-- 
cgit v1.2.3


From c7d76e58940dfff57a8ba6a80338e16e0fbc5571 Mon Sep 17 00:00:00 2001
From: Jose Hugo De la cruz Romero <jhugodc@gmail.com>
Date: Wed, 28 Nov 2018 21:37:59 -0600
Subject: fix OOG

---
 GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json   | 8 ++++----
 .../stExtCodeHash/extCodeHashDeletedAccount1Filler.yml            | 5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json
index b5a43c20c..76e41ffd8 100644
--- a/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.json
+++ b/GeneralStateTests/stExtCodeHash/extCodeHashDeletedAccount1.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/extCodeHashDeletedAccount1Filler.yml",
-            "sourceHash" : "e78f6efbbaa04c5bd3a87d63d771252beee6dc83d506b7db562837b594ee9346"
+            "sourceHash" : "ce870dddcddc514d6bf9d0232cd1926e4ec1e875a330b80d8f7cc2aabbd6f0d0"
         },
         "env" : {
             "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
@@ -18,7 +18,7 @@
         "post" : {
             "Constantinople" : [
                 {
-                    "hash" : "0x26a950b1fd969e55a6e213283d3e216c8b9198af299682a089858849d3d55715",
+                    "hash" : "0xa3351a168ff2dcecf68704dcb541a7ee5597d205453834d265dfc7300e38e563",
                     "indexes" : {
                         "data" : 0,
                         "gas" : 0,
@@ -31,7 +31,7 @@
         "pre" : {
             "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
                 "balance" : "0x0de0b6b3a7640000",
-                "code" : "0x6020600060006000600073bbbbbbbb00000000000000000000000000000000620249f0f1",
+                "code" : "0x6020600060006000600073bbbbbbbb0000000000000000000000000000000062027100f1",
                 "nonce" : "0x00",
                 "storage" : {
                 }
@@ -52,7 +52,7 @@
             },
             "0xbbbbbbbb00000000000000000000000000000000" : {
                 "balance" : "0x0de0b6b3a7640000",
-                "code" : "0x73aaaaaaaa000000000000000000000000000000003f60015573aaaaaaaa000000000000000000000000000000003b6002556002546000600073aaaaaaaa000000000000000000000000000000003c6000516003556020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15073aaaaaaaa000000000000000000000000000000003f60045573aaaaaaaa000000000000000000000000000000003b6005556005546000602073aaaaaaaa000000000000000000000000000000003c",
+                "code" : "0x73aaaaaaaa000000000000000000000000000000003f60015573aaaaaaaa000000000000000000000000000000003b6002556002546000600073aaaaaaaa000000000000000000000000000000003c6000516003556020600060006000600073aaaaaaaa00000000000000000000000000000000620249f0f15073aaaaaaaa000000000000000000000000000000003f60045573aaaaaaaa000000000000000000000000000000003b6005556005546000602073aaaaaaaa000000000000000000000000000000003c602051600655",
                 "nonce" : "0x00",
                 "storage" : {
                 }
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml
index f506d8362..cf5bc3abd 100644
--- a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDeletedAccount1Filler.yml
@@ -24,7 +24,7 @@ extCodeHashDeletedAccount1:
       balance: '1000000000000000000'
       code: |
         {
-          (CALL 150000 0xbbbbbbbb00000000000000000000000000000000 0 0 0 0 32)
+          (CALL 160000 0xbbbbbbbb00000000000000000000000000000000 0 0 0 0 32)
         }
       nonce: '0'
       storage: {}
@@ -56,7 +56,7 @@ extCodeHashDeletedAccount1:
           [[4]] (EXTCODEHASH 0xaaaaaaaa00000000000000000000000000000000)
           [[5]] (EXTCODESIZE 0xaaaaaaaa00000000000000000000000000000000)
           (EXTCODECOPY 0xaaaaaaaa00000000000000000000000000000000 32 0 (SLOAD 5))
-          ;;[[6]] (MLOAD 32)  ;; <--- This is failing
+          [[6]] (MLOAD 32)
         }
       nonce: '0'
       storage: {}
@@ -88,6 +88,7 @@ extCodeHashDeletedAccount1:
             3: '0x73deadbeef0000000000000000000000000000000031ff000000000000000000',
             4: '0x9dff858fbcae72e5644a465fa893f46deb3e03b9cd5a8b531109cd577f7fb293',
             5: '0X17',
+            6: '0x73deadbeef0000000000000000000000000000000031ff000000000000000000'
           }
   transaction:
     data:
-- 
cgit v1.2.3