Skip to content

test_reserve_price_at_transition()

Documentation for tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py::test_reserve_price_at_transition@88e9fb8f.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py::test_reserve_price_at_transition --fork Osaka

Test reserve price mechanism across various block base fee and excess blob gas scenarios.

Source code in tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
@pytest.mark.parametrize_by_fork(
    [
        "parent_base_fee_per_gas",
        "parent_excess_blob_gas",
        "parent_blob_count",
        "transition_block_base_fee_per_gas",
        "transition_block_blob_count",
        "transition_block_expected_excess_blob_gas",
    ],
    get_fork_scenarios,
)
@pytest.mark.valid_at_transition_to("Osaka", subsequent_forks=True)
@pytest.mark.valid_for_bpo_forks()
def test_reserve_price_at_transition(
    blockchain_test: BlockchainTestFiller,
    pre: Alloc,
    parent_block: Block,
    transition_block: Block,
    env: Environment,
) -> None:
    """
    Test reserve price mechanism across various block base fee and excess blob
    gas scenarios.
    """
    blockchain_test(
        pre=pre,
        post={},
        blocks=[parent_block, transition_block],
        genesis_environment=env,
    )

Parametrized Test Cases

This test case is only parametrized by fork.

Test ID (Abbreviated) parent_base_fee_per_gas parent_excess_blob_gas parent_blob_count transition_block_base_fee_per_gas transition_block_blob_count transition_block_expected_excess_blob_gas
...fork_PragueToOsakaAtTime15k-at_reserve_base_fee_threshold-parent_excess_blobs_0-parent_blobs_6-blockchain_test 17 0 6 16 6 None
...fork_PragueToOsakaAtTime15k-at_reserve_base_fee_threshold-parent_excess_blobs_1-parent_blobs_6-blockchain_test 17 131072 6 16 6 None
...fork_PragueToOsakaAtTime15k-at_reserve_base_fee_threshold-parent_excess_blobs_10-parent_blobs_0-blockchain_test 17 1310720 0 16 6 None
...fork_PragueToOsakaAtTime15k-at_reserve_base_fee_threshold-parent_excess_blobs_10-parent_blobs_6-blockchain_test 17 1310720 6 16 6 None
...fork_PragueToOsakaAtTime15k-at_reserve_base_fee_threshold-parent_excess_blobs_100-parent_blobs_0-blockchain_test 209 13107200 0 208 6 None
...fork_PragueToOsakaAtTime15k-at_reserve_base_fee_threshold-parent_excess_blobs_100-parent_blobs_6-blockchain_test 209 13107200 6 208 6 None