Skip to content

Test Excess Blob Gas

Documentation for tests/cancun/eip4844_blobs/test_excess_blob_gas.py@206854b5.

Generate fixtures for these test cases for Prague with:

fill -v tests/cancun/eip4844_blobs/test_excess_blob_gas.py --fork Prague
Tests excessBlobGas and blobGasUsed block fields for EIP-4844: Shard Blob Transactions

Test excessBlobGas and blobGasUsed block fields for EIP-4844: Shard Blob Transactions.

Adding a new test

Add a function that is named test_<test_name> and takes at least the following arguments:

  • blockchain_test
  • env
  • pre
  • blocks
  • post
  • correct_excess_blob_gas

The following arguments need to be parametrized or the test will not be generated:

  • new_blobs

All other pytest.fixture fixtures can be parametrized to generate new combinations and test cases.

Test Functions Overview

Name Type Cases (Prague) Description
test_correct_excess_blob_gas_calculation blockchain_test 28 Test calculation of the excessBlobGas increase/decrease across
test_correct_increasing_blob_gas_costs blockchain_test 6 Test calculation of the excessBlobGas and blob gas tx costs at
test_correct_decreasing_blob_gas_costs blockchain_test 6 Test calculation of the excessBlobGas and blob gas tx costs at
test_invalid_zero_excess_blob_gas_in_header blockchain_test 14 Test rejection of blocks where the excessBlobGas in the header drops to
test_invalid_blob_gas_used_in_header blockchain_test 49 Test rejection of blocks where the blobGasUsed in the header is invalid:(📖🐛?)
test_invalid_excess_blob_gas_above_target_change blockchain_test 2 Test rejection of blocks where the excessBlobGas
test_invalid_static_excess_blob_gas blockchain_test 12 Test rejection of blocks where the excessBlobGas remains unchanged
test_invalid_excess_blob_gas_target_blobs_increase_from_zero blockchain_test 20 Test rejection of blocks where the excessBlobGas increases from zero,
test_invalid_static_excess_blob_gas_from_zero_on_blobs_above_target blockchain_test 3 Test rejection of blocks where the excessBlobGas does not increase from
test_invalid_excess_blob_gas_change blockchain_test 42 Test rejection of blocks where the excessBlobGas changes to an invalid
test_invalid_negative_excess_blob_gas blockchain_test 27 Test rejection of blocks where the excessBlobGas changes to the two's
test_invalid_non_multiple_excess_blob_gas blockchain_test 4 Test rejection of blocks where the excessBlobGas changes to a value that