test_extcodecopy_empty_account_composes_additively()¶
Documentation for tests/amsterdam/eip8038_state_access_gas_cost_increase/test_ext_code_opcodes_gas.py::test_extcodecopy_empty_account_composes_additively@2867859a.
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_extcodecopy_empty_account_composes_additively --fork Amsterdam
Compose the surcharge additively when copying from an empty account.
EXTCODECOPY of a non-existent source copies zero bytes into memory,
yet still charges the account-access cost, the EIP-8038 code-read
WARM_ACCESS surcharge, the EIP-150 per-word copy cost
(OPCODE_COPY_PER_WORD per word, driven by the requested size, not
the source length), and the memory-expansion cost. The measured gas
must equal the sum of all four components, confirming the surcharge
composes additively even when there is no code to read.
Source code in tests/amsterdam/eip8038_state_access_gas_cost_increase/test_ext_code_opcodes_gas.py
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | |
Parametrized Test Cases¶
This test generates 4 parametrized test cases across 1 fork.