Skip to content

Test Excess Blob Gas

Documentation for tests/cancun/eip4844_blobs/[email protected].

Generate fixtures for these test cases for Osaka with:

fill -v tests/cancun/eip4844_blobs/test_excess_blob_gas.py --fork Osaka
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 can be parametrized to generate new combinations and test cases:

  • new_blobs: Number of blobs in the block (automatically split across transactions as needed)

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

Test Functions Overview

Name Type Cases (Osaka) Description
test_correct_excess_blob_gas_calculation blockchain_test 70 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 20 Test rejection of blocks where the excessBlobGas in the header drops to
test_invalid_blob_gas_used_in_header blockchain_test 100 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 18 Test rejection of blocks where the excessBlobGas remains unchanged
test_invalid_excess_blob_gas_target_blobs_increase_from_zero blockchain_test 56 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 120 Test rejection of blocks where the excessBlobGas changes to an invalid
test_invalid_negative_excess_blob_gas blockchain_test 216 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