Skip to content

test_invalid_normal_gas()

Documentation for tests/cancun/eip4844_blobs/test_blob_txs.py::test_invalid_normal_gas@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

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

Reject an invalid blob transaction.

  • Sufficient max fee per blob gas, but insufficient max fee per gas
Source code in tests/cancun/eip4844_blobs/test_blob_txs.py
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
@pytest.mark.parametrize(
    "tx_max_fee_per_gas,tx_error",
    [
        # max blob gas is ok, but max fee per gas is less than base fee per gas
        (
            6,
            TransactionException.INSUFFICIENT_MAX_FEE_PER_GAS,
        ),
    ],
    ids=["insufficient_max_fee_per_gas"],
)
@pytest.mark.exception_test
@pytest.mark.valid_from("Cancun")
@pytest.mark.eels_base_coverage
def test_invalid_normal_gas(
    state_test: StateTestFiller,
    state_env: Environment,
    pre: Alloc,
    txs: List[Transaction],
    header_verify: Optional[Header],
    rlp_modifier: Optional[Header],
) -> None:
    """
    Reject an invalid blob transaction.

    - Sufficient max fee per blob gas, but insufficient max fee per gas
    """
    assert len(txs) == 1
    state_test(
        pre=pre,
        post={},
        tx=txs[0],
        env=state_env,
        blockchain_test_header_verify=header_verify,
        blockchain_test_rlp_modifier=rlp_modifier,
    )

Parametrized Test Cases

This test generates 1 parametrized test case across 4 forks.