From 6e1623900ed8c6ed84be7114b37da9d95c2ac720 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:09:39 +0200 Subject: [PATCH 01/10] minor optimizations to _test --- kevm-pyk/src/tests/utils.py | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/kevm-pyk/src/tests/utils.py b/kevm-pyk/src/tests/utils.py index 2602a18a1e..5bb698c1cf 100644 --- a/kevm-pyk/src/tests/utils.py +++ b/kevm-pyk/src/tests/utils.py @@ -79,17 +79,20 @@ def _test( if '*' in skipped_gst_tests: pytest.skip() - failing_tests: list[str] = [] gst_file_relative_path: Final[str] = str(gst_file.relative_to(test_dir)) with gst_file.open() as f: gst_data = json.load(f) - for test_name, test in gst_data.items(): + # Filter upfront instead of checking each iteration + tests_to_run = {k: v for k, v in gst_data.items() if k not in skipped_gst_tests} + failing_tests: list[str] = [] + + chain_id = compute_chain_id(str(gst_file.relative_to(test_dir))) + + for test_name, test in tests_to_run.items(): _LOGGER.info(f'Running test: {gst_file} - {test_name}') - if test_name in skipped_gst_tests: - continue - chain_id = compute_chain_id(gst_file_relative_path) + res = interpret({test_name: test}, schedule, mode, chain_id, usegas, check=False) try: @@ -99,14 +102,14 @@ def _test( raise failing_tests.append(test_name) - if not failing_tests: + if len(failing_tests) == 0: return - if save_failing: - with failing_tests_file.open('a', newline='') as ff: - writer = csv.writer(ff) - if len(failing_tests) == len(gst_data): - writer.writerow([gst_file_relative_path, '*']) - else: - for test_name in sorted(failing_tests): - writer.writerow([gst_file_relative_path, test_name]) + + with failing_tests_file.open('a', newline='') as ff: + writer = csv.writer(ff) + if len(failing_tests) == len(gst_data): + writer.writerow([gst_file_relative_path, '*']) + else: + for test_name in sorted(failing_tests): + writer.writerow([gst_file_relative_path, test_name]) raise AssertionError(f'Found failing tests in GST file {gst_file_relative_path}: {failing_tests}') From 26aea4b028cd922b4ed10a1a62f3278d694259c8 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:15:19 +0200 Subject: [PATCH 02/10] add fallback rlp decoding rule --- kevm-pyk/src/kevm_pyk/kproj/evm-semantics/state-utils.md | 4 ++++ tests/bchain.0.chainId | 6 ------ tests/execution-spec-tests/failing.llvm | 9 +++------ tests/failing.llvm | 8 -------- 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/kevm-pyk/src/kevm_pyk/kproj/evm-semantics/state-utils.md b/kevm-pyk/src/kevm_pyk/kproj/evm-semantics/state-utils.md index c50606be91..3a5c872e24 100644 --- a/kevm-pyk/src/kevm_pyk/kproj/evm-semantics/state-utils.md +++ b/kevm-pyk/src/kevm_pyk/kproj/evm-semantics/state-utils.md @@ -262,6 +262,10 @@ The `"rlp"` key loads the block information. _ => #asWord(RR) + // fallback rule to catch invalid rlp encodings + rule load "rlp" : _ => .K ... + _ => EVMC_INVALID_BLOCK [owise] + rule load "genesisRLP": [ [ HP, HO, HC, HR, HT, HE, HB, HD, HI, HL, HG, HS, HX, HM, HN, HF, WR, UB, EB, BR, RR, .JSONs ], _, _, _, .JSONs ] => .K ... .List => ListItem(#blockHeaderHash(HP, HO, HC, HR, HT, HE, HB, HD, HI, HL, HG, HS, HX, HM, HN, HF, WR, UB, EB, BR, RR)) ListItem(#asWord(HP)) 0 => #asWord(EB) diff --git a/tests/bchain.0.chainId b/tests/bchain.0.chainId index 0055987496..f65c521602 100644 --- a/tests/bchain.0.chainId +++ b/tests/bchain.0.chainId @@ -1,14 +1,8 @@ -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/create_selfdestruct_same_tx.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/delegatecall_from_new_contract_to_pre_existing_contract.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/delegatecall_from_pre_existing_contract_to_new_contract.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision_multi_tx.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision_two_different_transactions.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision.json -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/recreate_self_destructed_contract_different_txs.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/reentrancy_selfdestruct_revert.json -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/self_destructing_initcode_create_tx.json -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/self_destructing_initcode.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_created_in_same_tx_with_revert.json -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_created_same_block_different_tx.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_not_created_in_same_tx_with_revert.json -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_pre_existing.json \ No newline at end of file diff --git a/tests/execution-spec-tests/failing.llvm b/tests/execution-spec-tests/failing.llvm index c7f232f241..2ff90659cc 100644 --- a/tests/execution-spec-tests/failing.llvm +++ b/tests/execution-spec-tests/failing.llvm @@ -1,28 +1,25 @@ blockchain_tests/cancun/eip4788_beacon_root/beacon_root_contract/beacon_root_transition.json,* -blockchain_tests/cancun/eip4844_blobs/blob_txs_full/reject_valid_full_blob_in_block_rlp.json,* blockchain_tests/cancun/eip4844_blobs/blob_txs/blob_type_tx_pre_fork.json,tests/cancun/eip4844_blobs/test_blob_txs.py::test_blob_type_tx_pre_fork[fork_ShanghaiToCancunAtTime15k-blockchain_test_from_state_test-one_blob_tx] +blockchain_tests/cancun/eip4844_blobs/blob_txs_full/reject_valid_full_blob_in_block_rlp.json,* blockchain_tests/cancun/eip4844_blobs/excess_blob_gas_fork_transition/fork_transition_excess_blob_gas_at_blob_genesis.json,* blockchain_tests/cancun/eip4844_blobs/excess_blob_gas_fork_transition/fork_transition_excess_blob_gas_post_blob_genesis.json,* -blockchain_tests/cancun/eip4844_blobs/excess_blob_gas_fork_transition/invalid_post_fork_block_without_blob_fields.json,* -blockchain_tests/cancun/eip4844_blobs/excess_blob_gas_fork_transition/invalid_pre_fork_block_with_blob_fields.json,* blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_blob_gas_used_in_header.json,* blockchain_tests/cancun/eip4844_blobs/point_evaluation_precompile/precompile_before_fork.json,* blockchain_tests/cancun/eip4844_blobs/point_evaluation_precompile/precompile_during_fork.json,* +blockchain_tests/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision/dynamic_create2_selfdestruct_collision.json,* blockchain_tests/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision/dynamic_create2_selfdestruct_collision_multi_tx.json,* blockchain_tests/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision/dynamic_create2_selfdestruct_collision_two_different_transactions.json,* -blockchain_tests/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision/dynamic_create2_selfdestruct_collision.json,* blockchain_tests/cancun/eip7516_blobgasfee/blobgasfee_opcode/blobbasefee_before_fork.json,* blockchain_tests/cancun/eip7516_blobgasfee/blobgasfee_opcode/blobbasefee_during_fork.json,* blockchain_tests/prague/eip2537_bls_12_381_precompiles/bls12_precompiles_before_fork/precompile_before_fork.json,* blockchain_tests/prague/eip2935_historical_block_hashes_from_state/block_hashes/block_hashes_history_at_transition.json,* -blockchain_tests/prague/eip2935_historical_block_hashes_from_state/block_hashes/block_hashes_history.json,* blockchain_tests/prague/eip2935_historical_block_hashes_from_state/contract_deployment/system_contract_deployment.json,tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py::test_system_contract_deployment[fork_CancunToPragueAtTime15k-blockchain_test-deploy_after_fork-nonzero_balance] blockchain_tests/prague/eip2935_historical_block_hashes_from_state/contract_deployment/system_contract_deployment.json,tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py::test_system_contract_deployment[fork_CancunToPragueAtTime15k-blockchain_test-deploy_before_fork-nonzero_balance] blockchain_tests/prague/eip7002_el_triggerable_withdrawals/contract_deployment/system_contract_deployment.json,* blockchain_tests/prague/eip7002_el_triggerable_withdrawals/withdrawal_requests_during_fork/withdrawal_requests_during_fork.json,* blockchain_tests/prague/eip7002_el_triggerable_withdrawals/withdrawal_requests/withdrawal_requests.json,tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests.py::test_withdrawal_requests[fork_Prague-blockchain_test-multiple_block_fee_increments] blockchain_tests/prague/eip7002_el_triggerable_withdrawals/withdrawal_requests/withdrawal_requests.json,tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests.py::test_withdrawal_requests[fork_Prague-blockchain_test-single_block_multiple_withdrawal_request_last_oog] -blockchain_tests/prague/eip7251_consolidations/consolidations_during_fork/consolidation_requests_during_fork.json,* blockchain_tests/prague/eip7251_consolidations/consolidations/consolidation_requests.json,tests/prague/eip7251_consolidations/test_consolidations.py::test_consolidation_requests[fork_Prague-blockchain_test-multiple_block_fee_increments] blockchain_tests/prague/eip7251_consolidations/consolidations/consolidation_requests.json,tests/prague/eip7251_consolidations/test_consolidations.py::test_consolidation_requests[fork_Prague-blockchain_test-single_block_multiple_consolidation_request_last_oog] +blockchain_tests/prague/eip7251_consolidations/consolidations_during_fork/consolidation_requests_during_fork.json,* blockchain_tests/prague/eip7251_consolidations/contract_deployment/system_contract_deployment.json,* diff --git a/tests/failing.llvm b/tests/failing.llvm index fdd390007e..7a18195128 100644 --- a/tests/failing.llvm +++ b/tests/failing.llvm @@ -2,16 +2,8 @@ BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4788_beacon_root/beacon_root BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4844_blobs/blob_type_tx_pre_fork.json,src/GeneralStateTestsFiller/Pyspecs/cancun/eip4844_blobs/test_blob_txs.py::test_blob_type_tx_pre_fork[fork_ShanghaiToCancunAtTime15k-blockchain_test-one_blob_tx] BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4844_blobs/fork_transition_excess_blob_gas.json,* BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4844_blobs/invalid_blob_gas_used_in_header.json,* -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4844_blobs/invalid_post_fork_block_without_blob_fields.json,* -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4844_blobs/invalid_pre_fork_block_with_blob_fields.json,* BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4844_blobs/precompile_before_fork.json,* BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4844_blobs/precompile_during_fork.json,* BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip4844_blobs/reject_valid_full_blob_in_block_rlp.json,* -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/create_selfdestruct_same_tx.json,* -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/recreate_self_destructed_contract_different_txs.json,* -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_created_same_block_different_tx.json,* -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/self_destructing_initcode_create_tx.json,* -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/self_destructing_initcode.json,* -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_pre_existing.json,* BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip7516_blobgasfee/blobbasefee_before_fork.json,* BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip7516_blobgasfee/blobbasefee_during_fork.json,* From 801f00b090216cf85ffd1745db2a02876093e7aa Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:40:50 +0200 Subject: [PATCH 03/10] update Makefile --- Makefile | 4 ++-- tests/execution-spec-tests/failing.llvm | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 63bcc90f83..76ddf41390 100644 --- a/Makefile +++ b/Makefile @@ -49,11 +49,11 @@ download-json-fixtures: cd tests/execution-spec-tests && bash get_execution_spec_tests.sh test-fixtures: download-json-fixtures - $(MAKE) -C kevm-pyk/ test-integration PYTEST_ARGS+="-k test_execution_spec_tests.py -k test_bchain" + $(MAKE) -C kevm-pyk/ test-integration PYTEST_ARGS+="-k 'test_execution_spec_tests.py and test_bchain'" fixtures-failing-list: download-json-fixtures cat /dev/null > tests/execution-spec-tests/failing.llvm - - $(MAKE) -C kevm-pyk/ test-integration PYTEST_ARGS+="-k test_execution_spec_tests.py -k test_bchain --save-failing --maxfail=10000" + - $(MAKE) -C kevm-pyk/ test-integration PYTEST_ARGS+="-k 'test_execution_spec_tests.py and test_bchain' --save-failing --maxfail=10000 --numprocesses=28" LC_ALL=en_US.UTF-8 sort -f -d -o tests/execution-spec-tests/failing.llvm tests/execution-spec-tests/failing.llvm if [ "$(shell uname)" = "Darwin" ]; then \ sed -i '' '1{/^[[:space:]]*$$/d;}' tests/execution-spec-tests/failing.llvm ;\ diff --git a/tests/execution-spec-tests/failing.llvm b/tests/execution-spec-tests/failing.llvm index 2ff90659cc..ed0597ca56 100644 --- a/tests/execution-spec-tests/failing.llvm +++ b/tests/execution-spec-tests/failing.llvm @@ -1,17 +1,18 @@ blockchain_tests/cancun/eip4788_beacon_root/beacon_root_contract/beacon_root_transition.json,* -blockchain_tests/cancun/eip4844_blobs/blob_txs/blob_type_tx_pre_fork.json,tests/cancun/eip4844_blobs/test_blob_txs.py::test_blob_type_tx_pre_fork[fork_ShanghaiToCancunAtTime15k-blockchain_test_from_state_test-one_blob_tx] blockchain_tests/cancun/eip4844_blobs/blob_txs_full/reject_valid_full_blob_in_block_rlp.json,* +blockchain_tests/cancun/eip4844_blobs/blob_txs/blob_type_tx_pre_fork.json,tests/cancun/eip4844_blobs/test_blob_txs.py::test_blob_type_tx_pre_fork[fork_ShanghaiToCancunAtTime15k-blockchain_test_from_state_test-one_blob_tx] blockchain_tests/cancun/eip4844_blobs/excess_blob_gas_fork_transition/fork_transition_excess_blob_gas_at_blob_genesis.json,* blockchain_tests/cancun/eip4844_blobs/excess_blob_gas_fork_transition/fork_transition_excess_blob_gas_post_blob_genesis.json,* blockchain_tests/cancun/eip4844_blobs/excess_blob_gas/invalid_blob_gas_used_in_header.json,* blockchain_tests/cancun/eip4844_blobs/point_evaluation_precompile/precompile_before_fork.json,* blockchain_tests/cancun/eip4844_blobs/point_evaluation_precompile/precompile_during_fork.json,* -blockchain_tests/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision/dynamic_create2_selfdestruct_collision.json,* blockchain_tests/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision/dynamic_create2_selfdestruct_collision_multi_tx.json,* blockchain_tests/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision/dynamic_create2_selfdestruct_collision_two_different_transactions.json,* +blockchain_tests/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision/dynamic_create2_selfdestruct_collision.json,* blockchain_tests/cancun/eip7516_blobgasfee/blobgasfee_opcode/blobbasefee_before_fork.json,* blockchain_tests/cancun/eip7516_blobgasfee/blobgasfee_opcode/blobbasefee_during_fork.json,* blockchain_tests/prague/eip2537_bls_12_381_precompiles/bls12_precompiles_before_fork/precompile_before_fork.json,* +blockchain_tests/prague/eip2935_historical_block_hashes_from_state/block_hashes/block_hashes_history_at_transition.json blockchain_tests/prague/eip2935_historical_block_hashes_from_state/block_hashes/block_hashes_history_at_transition.json,* blockchain_tests/prague/eip2935_historical_block_hashes_from_state/contract_deployment/system_contract_deployment.json,tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py::test_system_contract_deployment[fork_CancunToPragueAtTime15k-blockchain_test-deploy_after_fork-nonzero_balance] blockchain_tests/prague/eip2935_historical_block_hashes_from_state/contract_deployment/system_contract_deployment.json,tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py::test_system_contract_deployment[fork_CancunToPragueAtTime15k-blockchain_test-deploy_before_fork-nonzero_balance] @@ -19,7 +20,7 @@ blockchain_tests/prague/eip7002_el_triggerable_withdrawals/contract_deployment/s blockchain_tests/prague/eip7002_el_triggerable_withdrawals/withdrawal_requests_during_fork/withdrawal_requests_during_fork.json,* blockchain_tests/prague/eip7002_el_triggerable_withdrawals/withdrawal_requests/withdrawal_requests.json,tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests.py::test_withdrawal_requests[fork_Prague-blockchain_test-multiple_block_fee_increments] blockchain_tests/prague/eip7002_el_triggerable_withdrawals/withdrawal_requests/withdrawal_requests.json,tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests.py::test_withdrawal_requests[fork_Prague-blockchain_test-single_block_multiple_withdrawal_request_last_oog] +blockchain_tests/prague/eip7251_consolidations/consolidations_during_fork/consolidation_requests_during_fork.json,* blockchain_tests/prague/eip7251_consolidations/consolidations/consolidation_requests.json,tests/prague/eip7251_consolidations/test_consolidations.py::test_consolidation_requests[fork_Prague-blockchain_test-multiple_block_fee_increments] blockchain_tests/prague/eip7251_consolidations/consolidations/consolidation_requests.json,tests/prague/eip7251_consolidations/test_consolidations.py::test_consolidation_requests[fork_Prague-blockchain_test-single_block_multiple_consolidation_request_last_oog] -blockchain_tests/prague/eip7251_consolidations/consolidations_during_fork/consolidation_requests_during_fork.json,* -blockchain_tests/prague/eip7251_consolidations/contract_deployment/system_contract_deployment.json,* +blockchain_tests/prague/eip7251_consolidations/contract_deployment/system_contract_deployment.json,* \ No newline at end of file From fe51bdf3a606ad02ad6bc900b62dba25c1531183 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:53:11 +0200 Subject: [PATCH 04/10] remove comments --- Makefile | 2 +- kevm-pyk/src/tests/utils.py | 1 - tests/execution-spec-tests/failing.llvm | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 76ddf41390..9af1c29233 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ test-fixtures: download-json-fixtures fixtures-failing-list: download-json-fixtures cat /dev/null > tests/execution-spec-tests/failing.llvm - - $(MAKE) -C kevm-pyk/ test-integration PYTEST_ARGS+="-k 'test_execution_spec_tests.py and test_bchain' --save-failing --maxfail=10000 --numprocesses=28" + - $(MAKE) -C kevm-pyk/ test-integration PYTEST_ARGS+="-k 'test_execution_spec_tests.py and test_bchain' --save-failing --maxfail=10000" LC_ALL=en_US.UTF-8 sort -f -d -o tests/execution-spec-tests/failing.llvm tests/execution-spec-tests/failing.llvm if [ "$(shell uname)" = "Darwin" ]; then \ sed -i '' '1{/^[[:space:]]*$$/d;}' tests/execution-spec-tests/failing.llvm ;\ diff --git a/kevm-pyk/src/tests/utils.py b/kevm-pyk/src/tests/utils.py index 5bb698c1cf..510024b80e 100644 --- a/kevm-pyk/src/tests/utils.py +++ b/kevm-pyk/src/tests/utils.py @@ -84,7 +84,6 @@ def _test( with gst_file.open() as f: gst_data = json.load(f) - # Filter upfront instead of checking each iteration tests_to_run = {k: v for k, v in gst_data.items() if k not in skipped_gst_tests} failing_tests: list[str] = [] diff --git a/tests/execution-spec-tests/failing.llvm b/tests/execution-spec-tests/failing.llvm index ed0597ca56..ae9f7dd99b 100644 --- a/tests/execution-spec-tests/failing.llvm +++ b/tests/execution-spec-tests/failing.llvm @@ -12,8 +12,8 @@ blockchain_tests/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collis blockchain_tests/cancun/eip7516_blobgasfee/blobgasfee_opcode/blobbasefee_before_fork.json,* blockchain_tests/cancun/eip7516_blobgasfee/blobgasfee_opcode/blobbasefee_during_fork.json,* blockchain_tests/prague/eip2537_bls_12_381_precompiles/bls12_precompiles_before_fork/precompile_before_fork.json,* -blockchain_tests/prague/eip2935_historical_block_hashes_from_state/block_hashes/block_hashes_history_at_transition.json blockchain_tests/prague/eip2935_historical_block_hashes_from_state/block_hashes/block_hashes_history_at_transition.json,* +blockchain_tests/prague/eip2935_historical_block_hashes_from_state/block_hashes/block_hashes_history.json,* blockchain_tests/prague/eip2935_historical_block_hashes_from_state/contract_deployment/system_contract_deployment.json,tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py::test_system_contract_deployment[fork_CancunToPragueAtTime15k-blockchain_test-deploy_after_fork-nonzero_balance] blockchain_tests/prague/eip2935_historical_block_hashes_from_state/contract_deployment/system_contract_deployment.json,tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py::test_system_contract_deployment[fork_CancunToPragueAtTime15k-blockchain_test-deploy_before_fork-nonzero_balance] blockchain_tests/prague/eip7002_el_triggerable_withdrawals/contract_deployment/system_contract_deployment.json,* From 4df4d9a51724528ee4b87809b934fb7f8052c959 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:53:51 +0200 Subject: [PATCH 05/10] add endl --- tests/execution-spec-tests/failing.llvm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/execution-spec-tests/failing.llvm b/tests/execution-spec-tests/failing.llvm index ae9f7dd99b..41e851fa4c 100644 --- a/tests/execution-spec-tests/failing.llvm +++ b/tests/execution-spec-tests/failing.llvm @@ -23,4 +23,4 @@ blockchain_tests/prague/eip7002_el_triggerable_withdrawals/withdrawal_requests/w blockchain_tests/prague/eip7251_consolidations/consolidations_during_fork/consolidation_requests_during_fork.json,* blockchain_tests/prague/eip7251_consolidations/consolidations/consolidation_requests.json,tests/prague/eip7251_consolidations/test_consolidations.py::test_consolidation_requests[fork_Prague-blockchain_test-multiple_block_fee_increments] blockchain_tests/prague/eip7251_consolidations/consolidations/consolidation_requests.json,tests/prague/eip7251_consolidations/test_consolidations.py::test_consolidation_requests[fork_Prague-blockchain_test-single_block_multiple_consolidation_request_last_oog] -blockchain_tests/prague/eip7251_consolidations/contract_deployment/system_contract_deployment.json,* \ No newline at end of file +blockchain_tests/prague/eip7251_consolidations/contract_deployment/system_contract_deployment.json,* From fbc990f684aada419efb3fe0fab7b1ea1b3e7978 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:55:03 +0200 Subject: [PATCH 06/10] add endl --- tests/bchain.0.chainId | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/bchain.0.chainId b/tests/bchain.0.chainId index f65c521602..1c354bc882 100644 --- a/tests/bchain.0.chainId +++ b/tests/bchain.0.chainId @@ -6,3 +6,4 @@ BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/dynamic_cr BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/reentrancy_selfdestruct_revert.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_created_in_same_tx_with_revert.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_not_created_in_same_tx_with_revert.json + From 220f4e396d23702dc68705a3c57f0825f7be36e5 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Fri, 5 Dec 2025 13:55:43 +0200 Subject: [PATCH 07/10] format bchain.0.chainid --- tests/bchain.0.chainId | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/bchain.0.chainId b/tests/bchain.0.chainId index 1c354bc882..3ffaf7077d 100644 --- a/tests/bchain.0.chainId +++ b/tests/bchain.0.chainId @@ -5,5 +5,4 @@ BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/dynamic_cr BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/dynamic_create2_selfdestruct_collision.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/reentrancy_selfdestruct_revert.json BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_created_in_same_tx_with_revert.json -BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_not_created_in_same_tx_with_revert.json - +BlockchainTests/GeneralStateTests/Pyspecs/cancun/eip6780_selfdestruct/selfdestruct_not_created_in_same_tx_with_revert.json \ No newline at end of file From ab64e4e9e5968893c341fdf9b4fa3e8439e67f95 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Sat, 6 Dec 2025 11:24:09 +0200 Subject: [PATCH 08/10] update skipped_tests to use frozenset instead of lists --- kevm-pyk/src/tests/utils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kevm-pyk/src/tests/utils.py b/kevm-pyk/src/tests/utils.py index 510024b80e..ea88ab3e1f 100644 --- a/kevm-pyk/src/tests/utils.py +++ b/kevm-pyk/src/tests/utils.py @@ -43,18 +43,18 @@ def _assert_exit_code_zero(pattern: Pattern) -> None: assert pretty == GOLDEN -def _skipped_tests(test_dir: Path, slow_tests_file: Path, failing_tests_file: Path) -> dict[Path, list[str]]: +def _skipped_tests(test_dir: Path, slow_tests_file: Path, failing_tests_file: Path) -> dict[Path, frozenset[str]]: try: slow_tests = read_csv_file(slow_tests_file) except FileNotFoundError as e: _LOGGER.warning(e) slow_tests = () failing_tests = read_csv_file(failing_tests_file) - skipped: dict[Path, list[str]] = {} + skipped: dict[Path, set[str]] = {} for test_file, test in slow_tests + failing_tests: test_file = test_dir / test_file - skipped.setdefault(test_file, []).append(test) - return skipped + skipped.setdefault(test_file, set()).add(test) + return {k: frozenset(v) for k, v in skipped.items()} def read_csv_file(csv_file: Path) -> tuple[tuple[Path, str], ...]: @@ -71,11 +71,11 @@ def _test( usegas: bool, save_failing: bool, compute_chain_id: Callable[[str], int], - skipped_tests: dict[Path, list[str]], + skipped_tests: dict[Path, frozenset[str]], test_dir: Path, failing_tests_file: Path, ) -> None: - skipped_gst_tests = skipped_tests.get(gst_file, []) + skipped_gst_tests = skipped_tests.get(gst_file, frozenset()) if '*' in skipped_gst_tests: pytest.skip() From 42a0c5db06e7a7f975b80f585425cc57eaaa24d5 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Sat, 6 Dec 2025 11:28:09 +0200 Subject: [PATCH 09/10] check if test is skipped in loop --- kevm-pyk/src/tests/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kevm-pyk/src/tests/utils.py b/kevm-pyk/src/tests/utils.py index ea88ab3e1f..9ac7f03eff 100644 --- a/kevm-pyk/src/tests/utils.py +++ b/kevm-pyk/src/tests/utils.py @@ -84,14 +84,14 @@ def _test( with gst_file.open() as f: gst_data = json.load(f) - tests_to_run = {k: v for k, v in gst_data.items() if k not in skipped_gst_tests} failing_tests: list[str] = [] chain_id = compute_chain_id(str(gst_file.relative_to(test_dir))) - for test_name, test in tests_to_run.items(): + for test_name, test in gst_data.items(): _LOGGER.info(f'Running test: {gst_file} - {test_name}') - + if test_name in skipped_gst_tests: + continue res = interpret({test_name: test}, schedule, mode, chain_id, usegas, check=False) try: From a5ba2bb693e5ae3a7a34bb13192b216f0e41eb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20V=C4=83caru?= <16517508+anvacaru@users.noreply.github.com> Date: Mon, 8 Dec 2025 14:03:47 +0200 Subject: [PATCH 10/10] Refactor chain_id computation for clarity --- kevm-pyk/src/tests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kevm-pyk/src/tests/utils.py b/kevm-pyk/src/tests/utils.py index 9ac7f03eff..9a83fc5d7f 100644 --- a/kevm-pyk/src/tests/utils.py +++ b/kevm-pyk/src/tests/utils.py @@ -86,7 +86,7 @@ def _test( failing_tests: list[str] = [] - chain_id = compute_chain_id(str(gst_file.relative_to(test_dir))) + chain_id = compute_chain_id(gst_file_relative_path) for test_name, test in gst_data.items(): _LOGGER.info(f'Running test: {gst_file} - {test_name}')