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@892e6d1e.

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
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
@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.