Skip to content

test_invalid_tx_max_fee_per_blob_gas_state()

Documentation for tests/cancun/eip4844_blobs/test_blob_txs.py::test_invalid_tx_max_fee_per_blob_gas_state@83970623.

Generate fixtures for these test cases for Prague with:

fill -v tests/cancun/eip4844_blobs/test_blob_txs.py::test_invalid_tx_max_fee_per_blob_gas_state --fork Prague

Reject an invalid blob transaction.

  • tx max_fee_per_blob_gas is barely not enough
  • tx max_fee_per_blob_gas is zero
Source code in tests/cancun/eip4844_blobs/test_blob_txs.py
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
@pytest.mark.parametrize_by_fork(
    "parent_excess_blobs,parent_blobs,tx_max_fee_per_blob_gas,tx_error",
    generate_invalid_tx_max_fee_per_blob_gas_tests,
)
@pytest.mark.valid_from("Cancun")
def test_invalid_tx_max_fee_per_blob_gas_state(
    state_test_only: StateTestFiller,
    state_env: Environment,
    pre: Alloc,
    txs: List[Transaction],
):
    """
    Reject an invalid blob transaction.

    - tx max_fee_per_blob_gas is barely not enough
    - tx max_fee_per_blob_gas is zero
    """
    assert len(txs) == 1
    state_test_only(
        pre=pre,
        post={},
        tx=txs[0],
        env=state_env,
    )

Parametrized Test Cases

This test case is only parametrized by fork.

Test ID (Abbreviated) parent_excess_blobs parent_blobs tx_max_fee_per_blob_gas tx_error
...fork_Cancun-insufficient_max_fee_per_blob_gas-state_test 17 4 1 TransactionException.INSUFFICIENT_MAX_FEE_PER_BLOB_GAS
...fork_Cancun-invalid_max_fee_per_blob_gas-state_test 0 0 0 TransactionException.INSUFFICIENT_MAX_FEE_PER_BLOB_GAS
...fork_Prague-insufficient_max_fee_per_blob_gas-state_test 26 7 1 TransactionException.INSUFFICIENT_MAX_FEE_PER_BLOB_GAS
...fork_Prague-invalid_max_fee_per_blob_gas-state_test 0 0 0 TransactionException.INSUFFICIENT_MAX_FEE_PER_BLOB_GAS
...fork_Osaka-insufficient_max_fee_per_blob_gas-state_test 26 7 1 TransactionException.INSUFFICIENT_MAX_FEE_PER_BLOB_GAS
...fork_Osaka-invalid_max_fee_per_blob_gas-state_test 0 0 0 TransactionException.INSUFFICIENT_MAX_FEE_PER_BLOB_GAS