Skip to content

Test Point Evaluation Precompile

Documentation for tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py@206854b5.

Generate fixtures for these test cases for Prague with:

fill -v tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py --fork Prague
Tests point evaluation precompile for EIP-4844: Shard Blob Transactions

Test point evaluation precompile for EIP-4844: Shard Blob Transactions.

Adding a new test

Add a function that is named test_<test_name> and takes at least the following arguments:

  • blockchain_test | state_test
  • pre
  • tx
  • post

The following arguments need to be parametrized or the test will not be generated:

  • versioned_hash
  • kzg_commitment
  • z
  • y
  • kzg_proof
  • result

These values correspond to a single call of the precompile, and result refers to whether the call should succeed or fail.

All other pytest.fixture fixtures can be parametrized to generate new combinations and test cases.

Test Functions Overview

Name Type Cases (Prague) Description
test_valid_inputs state_test 1 Test valid sanity precompile calls that are expected to succeed.
test_invalid_inputs state_test 12 Test invalid precompile calls:(📖🐛?)
test_external_vectors state_test 122 Test precompile calls using external test vectors compiled from different sources:(📖🐛?)
test_call_opcode_types state_test 12 Test calling the Point Evaluation Precompile with different call types, gas
test_tx_entry_point state_test 6 Test calling the Point Evaluation Precompile directly as
test_precompile_before_fork state_test 0 Test calling the Point Evaluation Precompile before the appropriate fork.
test_precompile_during_fork blockchain_test 0 Test calling the Point Evaluation Precompile before the appropriate fork.