Skip to content

test_correct_decreasing_blob_gas_costs()

Documentation for tests/cancun/eip4844_blobs/test_excess_blob_gas.py::test_correct_decreasing_blob_gas_costs@verkle@v0.0.6.

Generate fixtures for these test cases for Cancun with:

Cancun only:

fill -v tests/cancun/eip4844_blobs/test_excess_blob_gas.py::test_correct_decreasing_blob_gas_costs --fork=Cancun --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Cancun:

fill -v tests/cancun/eip4844_blobs/test_excess_blob_gas.py::test_correct_decreasing_blob_gas_costs --until=Cancun

Test calculation of the excessBlobGas and blob gas tx costs at value points where the cost decreases to interesting amounts.

See test_correct_increasing_blob_gas_costs.

Source code in tests/cancun/eip4844_blobs/test_excess_blob_gas.py
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
@pytest.mark.parametrize(
    "parent_excess_blobs",
    [g for g in BLOB_GAS_COST_INCREASES],
)
@pytest.mark.parametrize("parent_blobs", [SpecHelpers.target_blobs_per_block() - 1])
@pytest.mark.parametrize("new_blobs", [1])
def test_correct_decreasing_blob_gas_costs(
    blockchain_test: BlockchainTestFiller,
    env: Environment,
    pre: Mapping[Address, Account],
    blocks: List[Block],
    post: Mapping[Address, Account],
    correct_excess_blob_gas: int,
):
    """
    Test calculation of the `excessBlobGas` and blob gas tx costs at
    value points where the cost decreases to interesting amounts.

    See test_correct_increasing_blob_gas_costs.
    """
    blockchain_test(
        pre=pre,
        post=post,
        blocks=blocks,
        genesis_environment=env,
        tag=f"expected_excess_blob_gas:{hex(correct_excess_blob_gas)}",
    )

Parametrized Test Cases

The interactive table below is also available as a standalone page.

Skipped Parameters

For more concise readability, the table below does not list the following parameter values: fork, blockchain_test, state_test, state_test_only, eof_test, eof_state_test.

Test ID new_blobs parent_blobs parent_excess_blobs
new_blobs_1-parent_blobs_2-parent_excess_blobs_18 1 2 18
new_blobs_1-parent_blobs_2-parent_excess_blobs_265 1 2 265
new_blobs_1-parent_blobs_2-parent_excess_blobs_565 1 2 565
new_blobs_1-parent_blobs_2-parent_excess_blobs_830 1 2 830
new_blobs_1-parent_blobs_2-parent_excess_blobs_1130 1 2 1130
new_blobs_1-parent_blobs_2-parent_excess_blobs_1230 1 2 1230