Skip to content

test_block_rlp_size_at_limit_with_all_typed_transactions()

Documentation for tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py::test_block_rlp_size_at_limit_with_all_typed_transactions@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py::test_block_rlp_size_at_limit_with_all_typed_transactions --fork Amsterdam

Test the block RLP size limit with all transaction types.

Source code in tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
@EIPChecklist.BlockLevelConstraint.Test.Content.TransactionTypes()
@pytest.mark.with_all_typed_transactions
@pytest.mark.verify_sync
@pytest.mark.valid_from("Osaka")
@pytest.mark.eels_base_coverage
def test_block_rlp_size_at_limit_with_all_typed_transactions(
    blockchain_test: BlockchainTestFiller,
    pre: Alloc,
    post: Alloc,
    fork: Fork,
    sender: EOA,
    block_size_limit: int,
    env: Environment,
    typed_transaction: Transaction,
) -> None:
    """Test the block RLP size limit with all transaction types."""
    transactions, extra_data_len = exact_size_transactions(
        sender,
        fork,
        pre,
        env.gas_limit,
        specific_transaction_to_include=typed_transaction,
    )

    block = Block(txs=transactions)
    block.extra_data = Bytes(b"\x00" * extra_data_len)
    block.timestamp = ZeroPaddedHexNumber(HEADER_TIMESTAMP)

    blockchain_test(
        genesis_environment=env,
        pre=pre,
        post=post,
        blocks=[block],
    )

Parametrized Test Cases

This test generates 5 parametrized test cases across 2 forks.