Skip to content

test_transaction_validity_type_3()

Documentation for tests/prague/eip7623_increase_calldata_cost/test_transaction_validity.py::test_transaction_validity_type_3@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/prague/eip7623_increase_calldata_cost/test_transaction_validity.py::test_transaction_validity_type_3 --fork Amsterdam

Test transaction validity for transactions with access lists, blobs, but no contract creation.

Source code in tests/prague/eip7623_increase_calldata_cost/test_transaction_validity.py
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
@pytest.mark.parametrize(
    "access_list",
    [
        pytest.param(
            None,
            id="no_access_list",
        ),
        pytest.param(
            [AccessList(address=Address(1), storage_keys=[])],
            id="single_access_list_no_storage_keys",
        ),
        pytest.param(
            [AccessList(address=Address(1), storage_keys=[Hash(0)])],
            id="single_access_list_single_storage_key",
        ),
        pytest.param(
            [
                AccessList(
                    address=Address(1),
                    storage_keys=[Hash(k) for k in range(10)],
                )
            ],
            id="single_access_list_multiple_storage_keys",
        ),
        pytest.param(
            [
                AccessList(address=Address(a), storage_keys=[])
                for a in range(10)
            ],
            id="multiple_access_lists_no_storage_keys",
        ),
        pytest.param(
            [
                AccessList(address=Address(a), storage_keys=[Hash(0)])
                for a in range(10)
            ],
            id="multiple_access_lists_single_storage_key",
        ),
        pytest.param(
            [
                AccessList(
                    address=Address(a),
                    storage_keys=[Hash(k) for k in range(10)],
                )
                for a in range(10)
            ],
            id="multiple_access_lists_multiple_storage_keys",
        ),
    ],
)
@pytest.mark.parametrize(
    # Blobs don't really have an effect because the blob gas does is not
    # considered in the intrinsic gas calculation, but we still test it to make
    # sure that the transaction is correctly processed.
    "blob_versioned_hashes",
    [
        pytest.param(
            add_kzg_version(
                [Hash(x) for x in range(1)],
                EIP_4844_Spec.BLOB_COMMITMENT_VERSION_KZG,
            ),
            id="single_blob",
        ),
        pytest.param(
            add_kzg_version(
                [Hash(x) for x in range(6)],
                EIP_4844_Spec.BLOB_COMMITMENT_VERSION_KZG,
            ),
            id="multiple_blobs",
        ),
    ],
)
@pytest.mark.parametrize(
    "ty",
    [pytest.param(3, id="type_3")],
)
def test_transaction_validity_type_3(
    state_test: StateTestFiller,
    pre: Alloc,
    tx: Transaction,
) -> None:
    """
    Test transaction validity for transactions with access lists, blobs, but no
    contract creation.
    """
    state_test(
        pre=pre,
        post={},
        tx=tx,
    )

Parametrized Test Cases

This test generates 84 parametrized test cases across 3 forks.