Skip to content

test_external_vectors()

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

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
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
@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.