Skip to content

test_valid_inputs()

Documentation for tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_valid_inputs@verkle@v0.0.6.

Generate fixtures for these test cases for Cancun with:

Cancun only:

fill -v tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_valid_inputs --fork=Cancun --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Cancun:

fill -v tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_valid_inputs --until=Cancun

Test valid sanity precompile calls that are expected to succeed.

  • kzg_commitment and kzg_proof are set to values such that p(z)==0 for all values of z, hence y is tested to be zero, and call to be successful.
Source code in tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
@pytest.mark.parametrize(
    "z,y,kzg_commitment,kzg_proof,versioned_hash",
    [
        pytest.param(Spec.BLS_MODULUS - 1, 0, INF_POINT, INF_POINT, None, id="in_bounds_z"),
    ],
)
@pytest.mark.parametrize("result", [Result.SUCCESS])
@pytest.mark.valid_from("Cancun")
def test_valid_inputs(
    state_test: StateTestFiller,
    pre: Alloc,
    tx: Transaction,
    post: Dict,
):
    """
    Test valid sanity precompile calls that are expected to succeed.

    - `kzg_commitment` and `kzg_proof` are set to values such that `p(z)==0` for all values of `z`,
    hence `y` is tested to be zero, and call to be successful.
    """
    state_test(
        env=Environment(),
        pre=pre,
        post=post,
        tx=tx,
    )

Parametrized Test Cases

The interactive table below is also available as a standalone page.

Skipped Parameters

For more concise readability, the table below does not list the following parameter values: fork, blockchain_test, state_test, state_test_only, eof_test, eof_state_test.

Test ID result z y kzg_commitment kzg_proof versioned_hash
result_Result.SUCCESS-in_bounds_z Result.SUCCESS 52435875175126190479447740508185965837690552500527637822603658699938581184512 0 c0000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 c0000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 None
result_Result.SUCCESS-in_bounds_z Result.SUCCESS 52435875175126190479447740508185965837690552500527637822603658699938581184512 0 c0000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 c0000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 None