Skip to content

Conversation

@anvacaru
Copy link
Contributor

@anvacaru anvacaru commented Dec 4, 2025

Refactoring the logic that handles the exceptions in conformance tests and moving it from driver.md to the kevm-pyk test harness.

changes in driver.md:

  • removing the exception production from EthereumCommand sort and its associated rules from driver.md.
  • removing unused status production from driver.md
  • removing a typo in #allPostKeys set

changes to the GST iterator in kevm-pyk/src/kevm_pyk/interpreter.py:

  • added a _resolve_exception function that reads the expectException and hasBigInt fields from the GST test json.

  • the iterator now returns if the test is expected to fail.

  • changes in kevm-pyk/src/tests/utils.py:

  • optimizing the _test function:

    • removing some redundant if-statements
    • computing the list of tests in a GST file ahead of the execution loop.
  • adding new functions to fetch the cell value.

  • updating the _assert_exit_code_zero function to check if the test should throw an exception when the interpreter returns a non-zero exit code.

Removing the expectException from a test that is supposed to fail is caught.

INFO     tests.utils:utils.py:119 Running test: /home/anvacaru/dev/evm-semantics/master/tests/ethereum-tests/BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4844_blobs/insufficient_balance_blob_tx.json - src/GeneralStateTestsFiller/Pyspecs/cancun/eip4844_blobs/test_blob_txs.py::test_insufficient_balance_blob_tx[fork_Cancun-blockchain_test--exact_balance_minus_1-tx_max_fee_per_blob_gas_1-no_calldata-tx_value_0-tx_max_priority_fee_per_gas_0-tx_max_fee_per_gas_14-access_list]
INFO     pyk.utils:utils.py:556 [PID=739809][exec] kore-print /dev/stdin --definition /home/anvacaru/.cache/kdist-8d0e547/evm-semantics/llvm --output pretty
INFO     pyk.utils:utils.py:603 [PID=739809][stdo] <kevm>
INFO     pyk.utils:utils.py:603 [PID=739809][stdo]   <k>
INFO     pyk.utils:utils.py:603 [PID=739809][stdo]     check "blockHeader" : { "blobGasUsed" : 131072 , .JSONs } ~> check "blockHeader" : { "bloom" : "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
INFO     pyk.utils:utils.py:603 [PID=739809][stdo]   </k>
INFO     pyk.utils:utils.py:603 [PID=739809][stdo]   <exit-code>

@anvacaru anvacaru marked this pull request as ready for review December 12, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants