Skip to content

test_insufficient_balance_blob_tx_combinations()

Documentation for tests/cancun/eip4844_blobs/test_blob_txs.py::test_insufficient_balance_blob_tx_combinations@26332146.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/cancun/eip4844_blobs/test_blob_txs.py::test_insufficient_balance_blob_tx_combinations --fork Amsterdam

Reject all valid blob transaction combinations in a block, but block is invalid.

  • The amount of blobs is correct but the user cannot afford the transaction total cost
Source code in tests/cancun/eip4844_blobs/test_blob_txs.py
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
@pytest.mark.inclusion_test
@pytest.mark.parametrize_by_fork(
    "blobs_per_tx",
    SpecHelpers.all_valid_blob_combinations,
)
@pytest.mark.parametrize(
    "account_balance_modifier", [-1], ids=["exact_balance_minus_1"]
)
@pytest.mark.parametrize(
    "tx_error", [TransactionException.INSUFFICIENT_ACCOUNT_FUNDS], ids=[""]
)
@pytest.mark.exception_test
@pytest.mark.valid_from("Cancun")
def test_insufficient_balance_blob_tx_combinations(
    blockchain_test: BlockchainTestFiller,
    pre: Alloc,
    env: Environment,
    block: Block,
) -> None:
    """
    Reject all valid blob transaction combinations in a block, but block is
    invalid.

    - The amount of blobs is correct but the user cannot afford the transaction
       total cost
    """
    blockchain_test(
        pre=pre,
        post={},
        blocks=[block],
        genesis_environment=env,
    )

Parametrized Test Cases

This test generates 108 parametrized test cases across 4 forks.