Skip to content

test_extra_builder_deposits()

Documentation for tests/amsterdam/eip8282_builder_execution_requests/test_modified_builder_contract.py::test_extra_builder_deposits@343274cc.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/amsterdam/eip8282_builder_execution_requests/test_modified_builder_contract.py::test_extra_builder_deposits --fork Amsterdam

Test how clients were to behave when more than the per-block maximum of builder deposit requests would be returned by the predeploy.

Source code in tests/amsterdam/eip8282_builder_execution_requests/test_modified_builder_contract.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@pytest.mark.parametrize(
    "requests_list",
    [
        pytest.param([], id="empty_request_list"),
        pytest.param(
            builder_deposit_list_with_custom_fee(1),
            id="1_builder_deposit_request",
        ),
        pytest.param(
            builder_deposit_list_with_custom_fee(
                Spec.MAX_DEPOSIT_REQUESTS_PER_BLOCK - 1
            ),
            id="max_minus_1_builder_deposit_requests",
        ),
        pytest.param(
            builder_deposit_list_with_custom_fee(
                Spec.MAX_DEPOSIT_REQUESTS_PER_BLOCK
            ),
            id="max_builder_deposit_requests",
        ),
        pytest.param(
            builder_deposit_list_with_custom_fee(
                Spec.MAX_DEPOSIT_REQUESTS_PER_BLOCK + 1
            ),
            id="max_plus_1_builder_deposit_requests",
        ),
        pytest.param(
            builder_deposit_list_with_custom_fee(
                Spec.MAX_DEPOSIT_REQUESTS_PER_BLOCK + 2
            ),
            id="max_plus_2_builder_deposit_requests",
        ),
    ],
)
def test_extra_builder_deposits(
    blockchain_test: BlockchainTestFiller,
    pre: Alloc,
    requests_list: List[BuilderDepositRequest],
) -> None:
    """
    Test how clients were to behave when more than the per-block maximum of
    builder deposit requests would be returned by the predeploy.
    """
    run_modified_requests_test(
        blockchain_test,
        pre,
        predeploy_address=Spec.BUILDER_DEPOSIT_CONTRACT_ADDRESS,
        requests_list=requests_list,
    )

Parametrized Test Cases

This test generates 6 parametrized test cases across 1 fork.