Skip to content

test_valid_max_blobs_per_tx()

Documentation for tests/osaka/eip7594_peerdas/test_max_blob_per_tx.py::test_valid_max_blobs_per_tx@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/osaka/eip7594_peerdas/test_max_blob_per_tx.py::test_valid_max_blobs_per_tx --fork Amsterdam

Test that transactions with blob count from 1 to MAX_BLOBS_PER_TX are accepted. Verifies that individual transactions can contain up to the maximum allowed number of blobs per transaction.

Source code in tests/osaka/eip7594_peerdas/test_max_blob_per_tx.py
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
@pytest.mark.parametrize_by_fork(
    "blob_count",
    lambda fork: list(range(1, fork.max_blobs_per_tx() + 1)),
)
@pytest.mark.valid_from("Osaka")
def test_valid_max_blobs_per_tx(
    state_test: StateTestFiller,
    pre: Alloc,
    env: Environment,
    tx: Transaction,
) -> None:
    """
    Test that transactions with blob count from 1 to MAX_BLOBS_PER_TX are
    accepted. Verifies that individual transactions can contain up to the
    maximum allowed number of blobs per transaction.
    """
    state_test(
        env=env,
        pre=pre,
        tx=tx,
        post={},
    )

Parametrized Test Cases

This test generates 6 parametrized test cases across 2 forks.