test_bal_invalid_phantom_read_on_selfdestruct()¶
Documentation for tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py::test_bal_invalid_phantom_read_on_selfdestruct@26332146.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py::test_bal_invalid_phantom_read_on_selfdestruct --fork Amsterdam
Test that clients reject a BAL with a phantom storage read for an account created and destroyed within the same transaction.
A contract-creation transaction's init code immediately SELFDESTRUCTs, sending its endowment to beneficiary, without ever returning runtime code. Per EIP-6780 the created account is created and destroyed within the same transaction, so it has zero net BAL changes (its balance and code never persist), but the account still legitimately appears in the BAL as an entry with empty changes. The BAL is corrupted by injecting a phantom storage read for a slot the account never touched.
Source code in tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py
2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.