test_bal_cross_block_ripemd160_state_leak()¶
Documentation for tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py::test_bal_cross_block_ripemd160_state_leak@c74f1a67.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py::test_bal_cross_block_ripemd160_state_leak --fork Amsterdam
Ensure internal EVM state for RIMPEMD-160 precompile handling does not leak between blocks.
The EVM may track internal state related to the Parity Touch Bug (EIP-161) when calling RIPEMD-160 (0x03) with zero value. If this state is not properly reset between blocks, it can cause incorrect BAL entries in subsequent blocks.
Prerequisites for triggering the bug: 1. RIPEMD-160 (0x03) must already exist in state before the call. 2. Block 1 must call RIPEMD-160 with zero value and complete successfully. 3. Block 2 must have a TX that triggers an exception (not REVERT).
Expected behavior: - Block 1: RIPEMD-160 in BAL (legitimate access) - Block 2: RIPEMD-160 NOT in BAL (never touched in this block)
Bug behavior: - Block 2 incorrectly has RIPEMD-160 in its BAL due to leaked internal state.
Source code in tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py
3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.