Skip to content

test_external_vectors()

Documentation for tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_external_vectors@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py::test_external_vectors --fork Amsterdam

Test precompile calls using external test vectors compiled from different sources.

  • go_kzg_4844_verify_kzg_proof.json: test vectors from the go-kzg-4844 repository.
Source code in tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
@pytest.mark.parametrize(
    "z,y,kzg_commitment,kzg_proof,result",
    all_external_vectors(),
)
@pytest.mark.parametrize("versioned_hash", [None])
@pytest.mark.valid_from("Cancun")
@pytest.mark.slow()
def test_external_vectors(
    state_test: StateTestFiller,
    pre: Alloc,
    tx: Transaction,
    post: Dict,
) -> None:
    """
    Test precompile calls using external test vectors compiled from different
    sources.

    - `go_kzg_4844_verify_kzg_proof.json`: test vectors from the
    [go-kzg-4844](https://github.com/crate-crypto/go-kzg-4844) repository.
    """
    state_test(
        env=Environment(),
        pre=pre,
        post=post,
        tx=tx,
    )

Parametrized Test Cases

This test generates 110 parametrized test cases across 4 forks.