test_extcodesize_empty_account_returns_zero()¶
Documentation for tests/amsterdam/eip8038_state_access_gas_cost_increase/test_ext_code_opcodes_gas.py::test_extcodesize_empty_account_returns_zero@26332146.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8038_state_access_gas_cost_increase/test_ext_code_opcodes_gas.py::test_extcodesize_empty_account_returns_zero --fork Amsterdam
Pay the surcharge on an empty target while EXTCODESIZE returns 0.
The size returned for an empty/non-existent account is 0, which
confirms the target genuinely has no code: the measured
COLD_ACCOUNT_ACCESS + WARM_ACCESS (cold) / 2 * WARM_ACCESS
(warm) cost is therefore unambiguously the surcharge applied to an
empty account, not an artifact of the target accidentally holding code.
Source code in tests/amsterdam/eip8038_state_access_gas_cost_increase/test_ext_code_opcodes_gas.py
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.