Skip to content

Test State Gas Multi Block

Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_multi_block.py@c74f1a67.

Generate fixtures for these test cases for Amsterdam with:

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

Multi-block tests for EIP-8037 state gas receipt accounting and coinbase fee accumulation.

Verify that receipt_gas_used is computed correctly across multiple blocks under two-dimensional gas accounting. These tests exercise:

  • Receipt gas accounting over multi-block sequences with diverse state gas paths (reservoir, spill+revert, spill+halt)
  • Observable coinbase balance between state-creating transactions

Any disagreement in receipt_gas_used between clients causes the coinbase balance to diverge, producing a different state root.

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_exact_coinbase_fee_simple_sstore blockchain_test 1 Assert exact coinbase balance from a single SSTORE transaction.
test_multi_block_mixed_state_operations blockchain_test 1 Verify coinbase fee across blocks with diverse state operations.
test_multi_block_observed_coinbase_balance blockchain_test 1 Observe coinbase balance between state-creating transactions.