Skip to content

Test State Gas Calldata Floor

Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_calldata_floor.py@622620d8.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_calldata_floor.py --fork Amsterdam

Test EIP-7623 calldata floor interaction with EIP-8037 state gas.

The calldata floor applies to the execution gas dimension only. It does not affect state gas. Block gas accounting applies the floor to the execution dimension (max(pre_refund_gas - state_gas, floor)), so a transaction contributes at least the floor to the block's execution gas while state gas is tracked separately.

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_calldata_floor_binds_regardless_of_funding state_test 3 Bind the calldata floor however the state charge is funded.
test_calldata_floor_binds_with_reservoir state_test 1 Bind the calldata floor while an over-cap reservoir funds state gas.
test_calldata_floor_charged_to_sender blockchain_test 1 Verify the calldata floor is what the sender pays for.
test_calldata_floor_counts_toward_block_gas state_test 1 Verify the calldata floor is charged to the block's execution gas.
test_calldata_floor_exceeding_tx_gas_limit_cap state_test 2 Reject a transaction whose calldata floor exceeds the cap, isolating
test_calldata_floor_higher_than_execution_with_state_ops state_test 1 Test state gas is tracked separately when calldata floor dominates.
test_calldata_floor_independent_of_state_gas state_test 1 Test calldata floor applies only to execution gas dimension.
test_calldata_floor_not_discounted_by_state_gas state_test 1 Verify state gas spending does not discount the block-level floor.
test_calldata_floor_survives_state_refund state_test 1 Verify a refund cannot push the sender's bill under the floor.
test_calldata_floor_with_sstore state_test 2 Test calldata floor does not affect state gas charging.