Test Block 2d Gas Accounting¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_block_2d_gas_accounting.py@2119b382.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_block_2d_gas_accounting.py --fork Amsterdam
Test block-level two-dimensional gas accounting under EIP-8037.
Verify that the block header gas_used equals max(block_regular_gas_used, block_state_gas_used) across single-block, multi-block, and mixed-transaction scenarios.
Tests for [EIP-8037: State Creation Gas Cost Increase] (https://eips.ethereum.org/EIPS/eip-8037).
Test Functions Overview¶
| Name | Type | Cases (Amsterdam) | Description |
|---|---|---|---|
test_base_fee_per_gas_follows_dominant_dimension |
blockchain_test | 4 | Verify the child block's base fee follows the bottleneck dimension. |
test_block_2d_gas_boundary_exact_fit |
blockchain_test | 4 | Verify a block is valid when state gas dominates regular gas. |
test_block_2d_gas_tx_gas_limit_exceeds_regular_remaining |
blockchain_test | 2 | Verify a block is valid when a later tx's gas_limit exceeds the |
test_block_gas_refund_eip7778_no_block_reduction |
blockchain_test | 1 | Verify block gas accounting for SSTORE 0→x→0 refund paths. |
test_block_gas_used_call_new_account |
blockchain_test | 1 | Verify block.gas_used includes state gas from CALL creating accounts. |
test_block_gas_used_create_tx |
blockchain_test | 1 | Verify block.gas_used includes intrinsic state gas from CREATE txs. |
test_block_gas_used_mixed_txs |
blockchain_test | 2 | Verify block.gas_used with mixed STOP and SSTORE transactions. |
test_block_gas_used_regular_dominates |
blockchain_test | 1 | Verify block.gas_used = block_regular_gas when state gas is zero. |
test_block_gas_used_state_dominates |
blockchain_test | 4 | Verify block.gas_used = block_state_gas when state > regular. |
test_cumulative_block_state_gas_boundary |
blockchain_test | 2 | Probe the block state-gas inclusion gate with spill-funded usage. |
test_multi_block_dimension_flip |
blockchain_test | 1 | Verify gas_used across blocks where dominant dimension flips. |
test_receipt_cumulative_differs_from_header_gas_used |
blockchain_test | 1 | Verify receipt cumulative_gas_used can diverge from header |
test_tx_gas_limit_block_boundary |
blockchain_test | 48 | Reject tx whose gas_limit exceeds the block gas_limit. |
test_tx_inclusion_at_regular_gas_block_limit_small |
blockchain_test | 2 | Probe the regular-gas inclusion boundary with a small-gas tx. |