diff --git a/.github/actions/shared/action.yml b/.github/actions/shared/action.yml index e16a586205..0d73ccffc0 100644 --- a/.github/actions/shared/action.yml +++ b/.github/actions/shared/action.yml @@ -178,7 +178,11 @@ runs: if: inputs.eest-cache == 'true' uses: actions/cache@v4 with: - path: tests/fixtures/eest + path: | + tests/fixtures/eest_static + tests/fixtures/eest_stable + tests/fixtures/eest_develop + tests/fixtures/eest_devnet # EEST release version contained in eest_ci_cache.sh. # Each time we bump EEST version, it should invalidate the cache too. key: eest-${{ hashFiles('scripts/eest_ci_cache.sh') }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd63993be0..62999da197 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,7 @@ jobs: # give us more space # find . -type d -name ".git" -exec rm -rf {} + find . -type d -name "nimcache" -exec rm -rf {} + - mingw32-make ${DEFAULT_MAKE_FLAGS} test t8n_test eest_engine_test + mingw32-make ${DEFAULT_MAKE_FLAGS} test t8n_test eest_full_test - name: Run nimbus-eth1 tests (Linux) if: runner.os == 'Linux' @@ -94,7 +94,7 @@ jobs: # ./scripts/launch_local_testnet.sh --nodes=3 --stop-at-epoch=7 \ # --disable-htop --reuse-binaries --run-nimbus-el --dl-eth2 --verbose --kill-old-processes # popd - env CC=gcc GOARCH=${GOARCH} CXX=g++ CGO_ENABLED=1 make ${DEFAULT_MAKE_FLAGS} test t8n_test eest_engine_test + env CC=gcc GOARCH=${GOARCH} CXX=g++ CGO_ENABLED=1 make ${DEFAULT_MAKE_FLAGS} test t8n_test eest_full_test - name: Run nimbus-eth1 tests (Macos) if: runner.os == 'Macos' @@ -109,7 +109,7 @@ jobs: # ./scripts/launch_local_testnet.sh --nodes=3 --stop-at-epoch=7 \ # --disable-htop --reuse-binaries --run-nimbus-el --dl-eth2 --verbose --kill-old-processes # popd - make ${DEFAULT_MAKE_FLAGS} test t8n_test eest_engine_test + make ${DEFAULT_MAKE_FLAGS} test t8n_test eest_full_test lint: name: "Lint" diff --git a/.gitignore b/.gitignore index a1d32b54b1..1b4710c292 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,7 @@ nimbus-build-system.paths .vscode # EEST test vectors -tests/fixtures/eest +tests/fixtures/eest_static +tests/fixtures/eest_stable +tests/fixtures/eest_develop +tests/fixtures/eest_devnet diff --git a/GeneralStateTestsDevelop.md b/GeneralStateTestsDevelop.md new file mode 100644 index 0000000000..56fe9a75b2 --- /dev/null +++ b/GeneralStateTestsDevelop.md @@ -0,0 +1,461 @@ +GeneralStateTestsDevelop +=== +## acl +```diff ++ access_list.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## all_opcodes +```diff ++ all_opcodes.json OK ++ cover_revert.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## basic_tload +```diff ++ basic_tload_after_store.json OK ++ basic_tload_gasprice.json OK ++ basic_tload_other_after_tstore.json OK ++ basic_tload_transaction_begin.json OK ++ basic_tload_works.json OK +``` +OK: 5/5 Fail: 0/5 Skip: 0/5 +## blake2 +```diff ++ blake2b.json OK ++ blake2b_gas_limit.json OK ++ blake2b_invalid_gas.json OK ++ blake2b_large_gas_limit.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## blake2_delegatecall +```diff ++ blake2_precompile_delegatecall.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## blob_txs +```diff ++ blob_gas_subtraction_tx.json OK ++ blob_tx_attribute_calldata_opcodes.json OK ++ blob_tx_attribute_gasprice_opcode.json OK ++ blob_tx_attribute_opcodes.json OK ++ blob_tx_attribute_value_opcode.json OK ++ blob_type_tx_pre_fork.json OK ++ insufficient_balance_blob_tx.json OK ++ invalid_blob_hash_versioning_single_tx.json OK ++ invalid_normal_gas.json OK ++ invalid_tx_blob_count.json OK ++ invalid_tx_max_fee_per_blob_gas_state.json OK ++ sufficient_balance_blob_tx.json OK +``` +OK: 12/12 Fail: 0/12 Skip: 0/12 +## blobgasfee_opcode +```diff ++ blobbasefee_before_fork.json OK ++ blobbasefee_out_of_gas.json OK ++ blobbasefee_stack_overflow.json OK +``` +OK: 3/3 Fail: 0/3 Skip: 0/3 +## blobhash_opcode +```diff ++ blobhash_gas_cost.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## bls12_g1add +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_g1msm +```diff ++ call_types.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 3/3 Fail: 0/3 Skip: 0/3 +## bls12_g1mul +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_g2add +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_g2msm +```diff ++ call_types.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 3/3 Fail: 0/3 Skip: 0/3 +## bls12_g2mul +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_map_fp2_to_g2 +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_map_fp_to_g1 +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ isogeny_kernel_values.json OK ++ valid.json OK +``` +OK: 5/5 Fail: 0/5 Skip: 0/5 +## bls12_pairing +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_precompiles_before_fork +```diff ++ precompile_before_fork.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## bls12_variable_length_input_contracts +```diff ++ invalid_gas_g1msm.json OK ++ invalid_gas_g2msm.json OK ++ invalid_gas_pairing.json OK ++ invalid_length_g1msm.json OK ++ invalid_length_g2msm.json OK ++ invalid_length_pairing.json OK ++ valid_gas_g1msm.json OK ++ valid_gas_g2msm.json OK ++ valid_gas_pairing.json OK +``` +OK: 9/9 Fail: 0/9 Skip: 0/9 +## call_and_callcode_gas_calculation +```diff ++ value_transfer_gas_calculation.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calldatacopy +```diff ++ calldatacopy.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calldataload +```diff ++ calldataload.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calldatasize +```diff ++ calldatasize.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calls +```diff ++ delegate_call_targets.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## chainid +```diff ++ chainid.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## coverage +```diff ++ coverage.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## create_returndata +```diff ++ create2_return_data.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## dup +```diff ++ dup.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## dynamic_create2_selfdestruct_collision +```diff ++ dynamic_create2_selfdestruct_collision.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## execution_gas +```diff ++ full_gas_consumption.json OK ++ gas_consumption_below_data_floor.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## gas +```diff ++ account_warming.json OK ++ call_to_pre_authorized_oog.json OK ++ gas_cost.json OK ++ intrinsic_gas_cost.json OK ++ self_set_code_cost.json OK +``` +OK: 5/5 Fail: 0/5 Skip: 0/5 +## initcode +```diff ++ contract_creating_tx.json OK ++ create_opcode_initcode.json OK ++ gas_usage.json OK +``` +OK: 3/3 Fail: 0/3 Skip: 0/3 +## mcopy +```diff ++ mcopy_on_empty_memory.json OK ++ valid_mcopy_operations.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## mcopy_contexts +```diff ++ no_memory_corruption_on_upper_call_stack_levels.json OK ++ no_memory_corruption_on_upper_create_stack_levels.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## mcopy_memory_expansion +```diff ++ mcopy_huge_memory_expansion.json OK ++ mcopy_memory_expansion.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## modexp +```diff ++ modexp.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## point_evaluation_precompile +```diff ++ call_opcode_types.json OK ++ external_vectors.json OK ++ invalid_inputs.json OK ++ precompile_before_fork.json OK ++ tx_entry_point.json OK ++ valid_inputs.json OK +``` +OK: 6/6 Fail: 0/6 Skip: 0/6 +## point_evaluation_precompile_gas +```diff ++ point_evaluation_precompile_gas_usage.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## precompile_absence +```diff ++ precompile_absence.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## precompiles +```diff ++ precompiles.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## push +```diff ++ push.json OK ++ stack_overflow.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## push0 +```diff ++ push0_contract_during_call_contexts.json OK ++ push0_contracts.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## reentrancy_selfdestruct_revert +```diff ++ reentrancy_selfdestruct_revert.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## refunds +```diff ++ gas_refunds_from_data_floor.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## selfdestruct +```diff ++ calling_from_new_contract_to_pre_existing_contract.json OK ++ calling_from_pre_existing_contract_to_new_contract.json OK ++ create_selfdestruct_same_tx.json OK ++ create_selfdestruct_same_tx_increased_nonce.json OK ++ self_destructing_initcode.json OK ++ self_destructing_initcode_create_tx.json OK ++ selfdestruct_pre_existing.json OK +``` +OK: 7/7 Fail: 0/7 Skip: 0/7 +## selfdestruct_revert +```diff ++ selfdestruct_created_in_same_tx_with_revert.json OK ++ selfdestruct_not_created_in_same_tx_with_revert.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## set_code_txs +```diff ++ address_from_set_code.json OK ++ call_into_chain_delegating_set_code.json OK ++ call_into_self_delegating_set_code.json OK ++ contract_create.json OK ++ creating_delegation_designation_contract.json OK ++ delegation_clearing.json OK ++ delegation_clearing_and_set.json OK ++ delegation_clearing_failing_tx.json OK ++ delegation_clearing_tx_to.json OK ++ deploying_delegation_designation_contract.json OK ++ empty_authorization_list.json OK ++ ext_code_on_chain_delegating_set_code.json OK ++ ext_code_on_self_delegating_set_code.json OK ++ ext_code_on_self_set_code.json OK ++ ext_code_on_set_code.json OK ++ many_delegations.json OK ++ nonce_overflow_after_first_authorization.json OK ++ nonce_validity.json OK ++ self_code_on_set_code.json OK ++ self_sponsored_set_code.json OK ++ set_code_address_and_authority_warm_state.json OK ++ set_code_address_and_authority_warm_state_call_types.json OK ++ set_code_all_invalid_authorization_tuples.json OK ++ set_code_call_set_code.json OK ++ set_code_from_account_with_non_delegating_code.json OK ++ set_code_max_depth_call_stack.json OK ++ set_code_multiple_first_valid_authorization_tuples_same_signer. OK ++ set_code_multiple_valid_authorization_tuples_first_invalid_same OK ++ set_code_multiple_valid_authorization_tuples_same_signer_increa OK ++ set_code_multiple_valid_authorization_tuples_same_signer_increa OK ++ set_code_to_account_deployed_in_same_tx.json OK ++ set_code_to_contract_creator.json OK ++ set_code_to_log.json OK ++ set_code_to_non_empty_storage_non_zero_nonce.json OK ++ set_code_to_precompile.json OK ++ set_code_to_precompile_not_enough_gas_for_precompile_execution. OK ++ set_code_to_self_caller.json OK ++ set_code_to_self_destruct.json OK ++ set_code_to_self_destructing_account_deployed_in_same_tx.json OK ++ set_code_to_sstore.json OK ++ set_code_to_tstore_available_at_correct_address.json OK ++ set_code_to_tstore_reentry.json OK ++ set_code_transaction_fee_validations.json OK ++ set_code_using_chain_specific_id.json OK ++ set_code_using_valid_synthetic_signatures.json OK ++ signature_s_out_of_range.json OK ++ tx_into_chain_delegating_set_code.json OK ++ tx_into_self_delegating_set_code.json OK ++ valid_tx_invalid_auth_signature.json OK ++ valid_tx_invalid_chain_id.json OK +``` +OK: 50/50 Fail: 0/50 Skip: 0/50 +## set_code_txs_2 +```diff ++ call_pointer_to_created_from_create_after_oog_call_again.json OK ++ call_to_precompile_in_pointer_context.json OK ++ contract_storage_to_pointer_with_storage.json OK ++ double_auth.json OK ++ eoa_init_as_pointer.json OK ++ pointer_call_followed_by_direct_call.json OK ++ pointer_contract_pointer_loop.json OK ++ pointer_reentry.json OK ++ pointer_reverts.json OK ++ pointer_to_pointer.json OK ++ pointer_to_precompile.json OK ++ pointer_to_static.json OK ++ pointer_to_static_reentry.json OK ++ set_code_type_tx_pre_fork.json OK ++ static_to_pointer.json OK +``` +OK: 15/15 Fail: 0/15 Skip: 0/15 +## tload_calls +```diff ++ tload_calls.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tload_reentrancy +```diff ++ tload_reentrancy.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## transaction_validity +```diff ++ transaction_validity_type_0.json OK ++ transaction_validity_type_1_type_2.json OK ++ transaction_validity_type_3.json OK ++ transaction_validity_type_4.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## tstorage +```diff ++ gas_usage.json OK ++ run_until_out_of_gas.json OK ++ tload_after_sstore.json OK ++ tload_after_tstore.json OK ++ tload_after_tstore_is_zero.json OK ++ transient_storage_unset_values.json OK +``` +OK: 6/6 Fail: 0/6 Skip: 0/6 +## tstorage_create_contexts +```diff ++ contract_creation.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage_execution_contexts +```diff ++ subcall.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage_reentrancy_contexts +```diff ++ reentrant_call.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage_selfdestruct +```diff ++ reentrant_selfdestructing_call.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstore_reentrancy +```diff ++ tstore_reentrancy.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tx_intrinsic_gas +```diff ++ tx_intrinsic_gas.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## warm_coinbase +```diff ++ warm_coinbase_call_out_of_gas.json OK ++ warm_coinbase_gas_usage.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## with_eof +```diff ++ legacy_create_edge_code_size.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## yul_example +```diff ++ yul.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 + +---TOTAL--- +OK: 212/212 Fail: 0/212 Skip: 0/212 diff --git a/GeneralStateTestsDevnet.md b/GeneralStateTestsDevnet.md new file mode 100644 index 0000000000..2dab7ebc18 --- /dev/null +++ b/GeneralStateTestsDevnet.md @@ -0,0 +1,557 @@ +GeneralStateTestsDevnet +=== +## acl +```diff ++ account_storage_warm_cold_state.json OK ++ transaction_intrinsic_gas_cost.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## all_opcodes +```diff ++ all_opcodes.json OK ++ cover_revert.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## basic_tload +```diff ++ basic_tload_after_store.json OK ++ basic_tload_gasprice.json OK ++ basic_tload_other_after_tstore.json OK ++ basic_tload_transaction_begin.json OK ++ basic_tload_works.json OK +``` +OK: 5/5 Fail: 0/5 Skip: 0/5 +## blake2 +```diff ++ blake2b.json OK ++ blake2b_gas_limit.json OK ++ blake2b_invalid_gas.json OK ++ blake2b_large_gas_limit.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## blake2_delegatecall +```diff ++ blake2_precompile_delegatecall.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## blob_txs +```diff ++ blob_gas_subtraction_tx.json OK ++ blob_tx_attribute_calldata_opcodes.json OK ++ blob_tx_attribute_gasprice_opcode.json OK ++ blob_tx_attribute_opcodes.json OK ++ blob_tx_attribute_value_opcode.json OK ++ insufficient_balance_blob_tx.json OK ++ invalid_blob_hash_versioning_single_tx.json OK ++ invalid_normal_gas.json OK ++ invalid_tx_blob_count.json OK ++ invalid_tx_max_fee_per_blob_gas_state.json OK ++ sufficient_balance_blob_tx.json OK +``` +OK: 11/11 Fail: 0/11 Skip: 0/11 +## blobgasfee_opcode +```diff ++ blobbasefee_out_of_gas.json OK ++ blobbasefee_stack_overflow.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## blobhash_opcode +```diff ++ blobhash_gas_cost.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## blobhash_opcode_contexts +```diff ++ blobhash_opcode_contexts.json OK ++ blobhash_opcode_contexts_tx_types.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## bls12_g1add +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_g1msm +```diff ++ call_types.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 3/3 Fail: 0/3 Skip: 0/3 +## bls12_g1mul +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_g2add +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_g2msm +```diff ++ call_types.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 3/3 Fail: 0/3 Skip: 0/3 +## bls12_g2mul +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_map_fp2_to_g2 +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ valid.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## bls12_map_fp_to_g1 +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ isogeny_kernel_values.json OK ++ valid.json OK +``` +OK: 5/5 Fail: 0/5 Skip: 0/5 +## bls12_pairing +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ invalid_multi_inf.json OK ++ valid.json OK ++ valid_multi_inf.json OK +``` +OK: 6/6 Fail: 0/6 Skip: 0/6 +## bls12_precompiles_before_fork +```diff ++ precompile_before_fork.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## bls12_variable_length_input_contracts +```diff ++ invalid_gas_g1msm.json OK ++ invalid_gas_g2msm.json OK ++ invalid_gas_pairing.json OK ++ invalid_length_g1msm.json OK ++ invalid_length_g2msm.json OK ++ invalid_length_pairing.json OK ++ invalid_zero_gas_g1msm.json OK ++ invalid_zero_gas_g2msm.json OK ++ invalid_zero_gas_pairing.json OK ++ invalid_zero_length_g1msm.json OK ++ invalid_zero_length_g2msm.json OK ++ invalid_zero_length_pairing.json OK ++ valid_gas_g1msm.json OK ++ valid_gas_g2msm.json OK ++ valid_gas_pairing.json OK +``` +OK: 15/15 Fail: 0/15 Skip: 0/15 +## call +```diff ++ call_large_offset_mstore.json OK ++ call_memory_expands_on_early_revert.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## calldatacopy +```diff ++ calldatacopy.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calldataload +```diff ++ calldataload.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calldatasize +```diff ++ calldatasize.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calls +```diff ++ delegate_call_targets.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## chainid +```diff ++ chainid.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## count_leading_zeros +```diff ++ clz_call_operation.json OK ++ clz_code_copy_operation.json OK ++ clz_from_set_code.json OK ++ clz_gas_cost.json OK ++ clz_gas_cost_boundary.json OK ++ clz_initcode_context.json OK ++ clz_initcode_create.json OK ++ clz_jump_operation.json OK ++ clz_opcode_scenarios.json OK ++ clz_push_operation_same_value.json OK ++ clz_stack_not_overflow.json OK ++ clz_stack_underflow.json OK ++ clz_with_memory_operation.json OK +``` +OK: 13/13 Fail: 0/13 Skip: 0/13 +## coverage +```diff ++ coverage.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## create_one_byte +```diff ++ create_one_byte.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## create_returndata +```diff ++ create2_return_data.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## dup +```diff ++ dup.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## dynamic_create2_selfdestruct_collision +```diff ++ dynamic_create2_selfdestruct_collision.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## execution_gas +```diff ++ full_gas_consumption.json OK ++ gas_consumption_below_data_floor.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## gas +```diff ++ account_warming.json OK ++ call_to_pre_authorized_oog.json OK ++ gas_cost.json OK ++ intrinsic_gas_cost.json OK ++ self_set_code_cost.json OK +``` +OK: 5/5 Fail: 0/5 Skip: 0/5 +## identity +```diff ++ call_identity_precompile.json OK ++ call_identity_precompile_large_params.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## identity_returndatasize +```diff ++ identity_precompile_returndata.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## initcode +```diff ++ contract_creating_tx.json OK ++ create_opcode_initcode.json OK ++ gas_usage.json OK +``` +OK: 3/3 Fail: 0/3 Skip: 0/3 +## max_blob_per_tx +```diff ++ invalid_max_blobs_per_tx.json OK ++ valid_max_blobs_per_tx.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## mcopy +```diff ++ mcopy_on_empty_memory.json OK ++ valid_mcopy_operations.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## mcopy_contexts +```diff ++ no_memory_corruption_on_upper_call_stack_levels.json OK ++ no_memory_corruption_on_upper_create_stack_levels.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## mcopy_memory_expansion +```diff ++ mcopy_huge_memory_expansion.json OK ++ mcopy_memory_expansion.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## modexp +```diff ++ modexp.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## modexp_thresholds +```diff ++ modexp_boundary_inputs.json OK ++ modexp_call_operations.json OK ++ modexp_gas_usage_contract_wrapper.json OK ++ modexp_invalid_inputs.json OK ++ modexp_used_in_transaction_entry_points.json OK ++ modexp_variable_gas_cost.json OK ++ vectors_from_eip.json OK ++ vectors_from_legacy_tests.json OK +``` +OK: 8/8 Fail: 0/8 Skip: 0/8 +## modexp_upper_bounds +```diff ++ modexp_upper_bounds.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## p256verify +```diff ++ call_types.json OK ++ gas.json OK ++ invalid.json OK ++ modular_comparison.json OK ++ precompile_as_tx_entry_point.json OK ++ valid.json OK +``` +OK: 6/6 Fail: 0/6 Skip: 0/6 +## p256verify_before_fork +```diff ++ precompile_before_fork.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## point_evaluation_precompile +```diff ++ call_opcode_types.json OK ++ external_vectors.json OK ++ invalid_inputs.json OK ++ tx_entry_point.json OK ++ valid_inputs.json OK +``` +OK: 5/5 Fail: 0/5 Skip: 0/5 +## point_evaluation_precompile_gas +```diff ++ point_evaluation_precompile_gas_usage.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## precompile_absence +```diff ++ precompile_absence.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## precompiles +```diff ++ precompiles.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## push +```diff ++ push.json OK ++ stack_overflow.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## push0 +```diff ++ push0_contract_during_call_contexts.json OK ++ push0_contracts.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## reentrancy_selfdestruct_revert +```diff ++ reentrancy_selfdestruct_revert.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## refunds +```diff ++ gas_refunds_from_data_floor.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## selfdestruct +```diff ++ calling_from_new_contract_to_pre_existing_contract.json OK ++ calling_from_pre_existing_contract_to_new_contract.json OK ++ create_selfdestruct_same_tx.json OK ++ create_selfdestruct_same_tx_increased_nonce.json OK ++ self_destructing_initcode.json OK ++ self_destructing_initcode_create_tx.json OK ++ selfdestruct_pre_existing.json OK +``` +OK: 7/7 Fail: 0/7 Skip: 0/7 +## selfdestruct_revert +```diff ++ selfdestruct_created_in_same_tx_with_revert.json OK ++ selfdestruct_not_created_in_same_tx_with_revert.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## set_code_txs +```diff ++ address_from_set_code.json OK ++ call_into_chain_delegating_set_code.json OK ++ call_into_self_delegating_set_code.json OK ++ contract_create.json OK ++ creating_delegation_designation_contract.json OK ++ delegation_clearing.json OK ++ delegation_clearing_and_set.json OK ++ delegation_clearing_failing_tx.json OK ++ delegation_clearing_tx_to.json OK ++ deploying_delegation_designation_contract.json OK ++ empty_authorization_list.json OK ++ ext_code_on_chain_delegating_set_code.json OK ++ ext_code_on_self_delegating_set_code.json OK ++ ext_code_on_self_set_code.json OK ++ ext_code_on_set_code.json OK ++ many_delegations.json OK ++ nonce_overflow_after_first_authorization.json OK ++ nonce_validity.json OK ++ self_code_on_set_code.json OK ++ self_sponsored_set_code.json OK ++ set_code_address_and_authority_warm_state.json OK ++ set_code_address_and_authority_warm_state_call_types.json OK ++ set_code_all_invalid_authorization_tuples.json OK ++ set_code_call_set_code.json OK ++ set_code_from_account_with_non_delegating_code.json OK ++ set_code_max_depth_call_stack.json OK ++ set_code_multiple_first_valid_authorization_tuples_same_signer. OK ++ set_code_multiple_valid_authorization_tuples_first_invalid_same OK ++ set_code_multiple_valid_authorization_tuples_same_signer_increa OK ++ set_code_multiple_valid_authorization_tuples_same_signer_increa OK ++ set_code_to_account_deployed_in_same_tx.json OK ++ set_code_to_contract_creator.json OK ++ set_code_to_log.json OK ++ set_code_to_non_empty_storage_non_zero_nonce.json OK ++ set_code_to_precompile.json OK ++ set_code_to_precompile_not_enough_gas_for_precompile_execution. OK ++ set_code_to_self_caller.json OK ++ set_code_to_self_destruct.json OK ++ set_code_to_self_destructing_account_deployed_in_same_tx.json OK ++ set_code_to_sstore.json OK ++ set_code_to_tstore_available_at_correct_address.json OK ++ set_code_to_tstore_reentry.json OK ++ set_code_transaction_fee_validations.json OK ++ set_code_using_chain_specific_id.json OK ++ set_code_using_valid_synthetic_signatures.json OK ++ signature_s_out_of_range.json OK ++ tx_into_chain_delegating_set_code.json OK ++ tx_into_self_delegating_set_code.json OK ++ valid_tx_invalid_auth_signature.json OK ++ valid_tx_invalid_chain_id.json OK +``` +OK: 50/50 Fail: 0/50 Skip: 0/50 +## set_code_txs_2 +```diff ++ call_pointer_to_created_from_create_after_oog_call_again.json OK ++ call_to_precompile_in_pointer_context.json OK ++ contract_storage_to_pointer_with_storage.json OK ++ delegation_replacement_call_previous_contract.json OK ++ double_auth.json OK ++ eoa_init_as_pointer.json OK ++ pointer_call_followed_by_direct_call.json OK ++ pointer_contract_pointer_loop.json OK ++ pointer_reentry.json OK ++ pointer_reverts.json OK ++ pointer_to_pointer.json OK ++ pointer_to_precompile.json OK ++ pointer_to_static.json OK ++ pointer_to_static_reentry.json OK ++ set_code_type_tx_pre_fork.json OK ++ static_to_pointer.json OK +``` +OK: 16/16 Fail: 0/16 Skip: 0/16 +## shift_combinations +```diff ++ combinations.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tload_calls +```diff ++ tload_calls.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tload_reentrancy +```diff ++ tload_reentrancy.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## transaction_validity +```diff ++ transaction_validity_type_0.json OK ++ transaction_validity_type_1_type_2.json OK ++ transaction_validity_type_3.json OK ++ transaction_validity_type_4.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## tstorage +```diff ++ gas_usage.json OK ++ run_until_out_of_gas.json OK ++ tload_after_sstore.json OK ++ tload_after_tstore.json OK ++ tload_after_tstore_is_zero.json OK ++ transient_storage_unset_values.json OK +``` +OK: 6/6 Fail: 0/6 Skip: 0/6 +## tstorage_create_contexts +```diff ++ contract_creation.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage_execution_contexts +```diff ++ subcall.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage_reentrancy_contexts +```diff ++ reentrant_call.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage_selfdestruct +```diff ++ reentrant_selfdestructing_call.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstore_reentrancy +```diff ++ tstore_reentrancy.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tx_gas_limit +```diff ++ transaction_gas_limit_cap.json OK ++ tx_gas_limit_cap_access_list_with_diff_addr.json OK ++ tx_gas_limit_cap_access_list_with_diff_keys.json OK ++ tx_gas_limit_cap_authorized_tx.json OK ++ tx_gas_limit_cap_contract_creation.json OK ++ tx_gas_limit_cap_full_calldata.json OK ++ tx_gas_limit_cap_subcall_context.json OK +``` +OK: 7/7 Fail: 0/7 Skip: 0/7 +## tx_intrinsic_gas +```diff ++ tx_intrinsic_gas.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## warm_coinbase +```diff ++ warm_coinbase_call_out_of_gas.json OK ++ warm_coinbase_gas_usage.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## with_eof +```diff ++ legacy_create_edge_code_size.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 + +---TOTAL--- +OK: 264/264 Fail: 0/264 Skip: 0/264 diff --git a/GeneralStateTestsStable.md b/GeneralStateTestsStable.md new file mode 100644 index 0000000000..5c66cfecbf --- /dev/null +++ b/GeneralStateTestsStable.md @@ -0,0 +1,266 @@ +GeneralStateTestsStable +=== +## acl +```diff ++ access_list.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## all_opcodes +```diff ++ all_opcodes.json OK ++ cover_revert.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## basic_tload +```diff ++ basic_tload_after_store.json OK ++ basic_tload_gasprice.json OK ++ basic_tload_other_after_tstore.json OK ++ basic_tload_transaction_begin.json OK ++ basic_tload_works.json OK +``` +OK: 5/5 Fail: 0/5 Skip: 0/5 +## blake2 +```diff ++ blake2b.json OK ++ blake2b_gas_limit.json OK ++ blake2b_invalid_gas.json OK ++ blake2b_large_gas_limit.json OK +``` +OK: 4/4 Fail: 0/4 Skip: 0/4 +## blake2_delegatecall +```diff ++ blake2_precompile_delegatecall.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## blob_txs +```diff ++ blob_gas_subtraction_tx.json OK ++ blob_tx_attribute_calldata_opcodes.json OK ++ blob_tx_attribute_gasprice_opcode.json OK ++ blob_tx_attribute_opcodes.json OK ++ blob_tx_attribute_value_opcode.json OK ++ blob_type_tx_pre_fork.json OK ++ insufficient_balance_blob_tx.json OK ++ invalid_blob_hash_versioning_single_tx.json OK ++ invalid_normal_gas.json OK ++ invalid_tx_blob_count.json OK ++ invalid_tx_max_fee_per_blob_gas_state.json OK ++ sufficient_balance_blob_tx.json OK +``` +OK: 12/12 Fail: 0/12 Skip: 0/12 +## blobgasfee_opcode +```diff ++ blobbasefee_before_fork.json OK ++ blobbasefee_out_of_gas.json OK ++ blobbasefee_stack_overflow.json OK +``` +OK: 3/3 Fail: 0/3 Skip: 0/3 +## blobhash_opcode +```diff ++ blobhash_gas_cost.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## call_and_callcode_gas_calculation +```diff ++ value_transfer_gas_calculation.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calldatacopy +```diff ++ calldatacopy.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calldataload +```diff ++ calldataload.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## calldatasize +```diff ++ calldatasize.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## chainid +```diff ++ chainid.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## coverage +```diff ++ coverage.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## create_returndata +```diff ++ create2_return_data.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## dup +```diff ++ dup.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## dynamic_create2_selfdestruct_collision +```diff ++ dynamic_create2_selfdestruct_collision.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## initcode +```diff ++ contract_creating_tx.json OK ++ create_opcode_initcode.json OK ++ gas_usage.json OK +``` +OK: 3/3 Fail: 0/3 Skip: 0/3 +## mcopy +```diff ++ mcopy_on_empty_memory.json OK ++ valid_mcopy_operations.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## mcopy_contexts +```diff ++ no_memory_corruption_on_upper_call_stack_levels.json OK ++ no_memory_corruption_on_upper_create_stack_levels.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## mcopy_memory_expansion +```diff ++ mcopy_huge_memory_expansion.json OK ++ mcopy_memory_expansion.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## modexp +```diff ++ modexp.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## point_evaluation_precompile +```diff ++ call_opcode_types.json OK ++ external_vectors.json OK ++ invalid_inputs.json OK ++ precompile_before_fork.json OK ++ tx_entry_point.json OK ++ valid_inputs.json OK +``` +OK: 6/6 Fail: 0/6 Skip: 0/6 +## point_evaluation_precompile_gas +```diff ++ point_evaluation_precompile_gas_usage.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## precompile_absence +```diff ++ precompile_absence.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## precompiles +```diff ++ precompiles.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## push +```diff ++ push.json OK ++ stack_overflow.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## push0 +```diff ++ push0_contract_during_call_contexts.json OK ++ push0_contracts.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## reentrancy_selfdestruct_revert +```diff ++ reentrancy_selfdestruct_revert.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## selfdestruct +```diff ++ calling_from_new_contract_to_pre_existing_contract.json OK ++ calling_from_pre_existing_contract_to_new_contract.json OK ++ create_selfdestruct_same_tx.json OK ++ create_selfdestruct_same_tx_increased_nonce.json OK ++ self_destructing_initcode.json OK ++ self_destructing_initcode_create_tx.json OK ++ selfdestruct_pre_existing.json OK +``` +OK: 7/7 Fail: 0/7 Skip: 0/7 +## selfdestruct_revert +```diff ++ selfdestruct_created_in_same_tx_with_revert.json OK ++ selfdestruct_not_created_in_same_tx_with_revert.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## tload_calls +```diff ++ tload_calls.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tload_reentrancy +```diff ++ tload_reentrancy.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage +```diff ++ gas_usage.json OK ++ run_until_out_of_gas.json OK ++ tload_after_sstore.json OK ++ tload_after_tstore.json OK ++ tload_after_tstore_is_zero.json OK ++ transient_storage_unset_values.json OK +``` +OK: 6/6 Fail: 0/6 Skip: 0/6 +## tstorage_create_contexts +```diff ++ contract_creation.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage_execution_contexts +```diff ++ subcall.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage_reentrancy_contexts +```diff ++ reentrant_call.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstorage_selfdestruct +```diff ++ reentrant_selfdestructing_call.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tstore_reentrancy +```diff ++ tstore_reentrancy.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## tx_intrinsic_gas +```diff ++ tx_intrinsic_gas.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## warm_coinbase +```diff ++ warm_coinbase_call_out_of_gas.json OK ++ warm_coinbase_gas_usage.json OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## with_eof +```diff ++ legacy_create_edge_code_size.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## yul_example +```diff ++ yul.json OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 + +---TOTAL--- +OK: 89/89 Fail: 0/89 Skip: 0/89 diff --git a/GeneralStateTests.md b/GeneralStateTestsStatic.md similarity index 95% rename from GeneralStateTests.md rename to GeneralStateTestsStatic.md index 191ba9e244..0c34ea32b1 100644 --- a/GeneralStateTests.md +++ b/GeneralStateTestsStatic.md @@ -1,4 +1,4 @@ -GeneralStateTests +GeneralStateTestsStatic === ## stArgsZeroOneBalance ```diff @@ -52,10 +52,10 @@ GeneralStateTests OK: 46/46 Fail: 0/46 Skip: 0/46 ## stAttackTest ```diff - ContractCreationSpam.json Skip ++ ContractCreationSpam.json OK + CrashingTransaction.json OK ``` -OK: 1/2 Fail: 0/2 Skip: 1/2 +OK: 2/2 Fail: 0/2 Skip: 0/2 ## stBadOpcode ```diff + eip2315NotRemoved.json OK @@ -94,7 +94,7 @@ OK: 4/4 Fail: 0/4 Skip: 0/4 + callcallcallcode_001_OOGMBefore.json OK + callcallcallcode_001_SuicideEnd.json OK + callcallcallcode_001_SuicideMiddle.json OK - callcallcallcode_ABCB_RECURSIVE.json Skip ++ callcallcallcode_ABCB_RECURSIVE.json OK + callcallcode_01.json OK + callcallcode_01_OOGE.json OK + callcallcode_01_SuicideEnd.json OK @@ -104,14 +104,14 @@ OK: 4/4 Fail: 0/4 Skip: 0/4 + callcallcodecall_010_OOGMBefore.json OK + callcallcodecall_010_SuicideEnd.json OK + callcallcodecall_010_SuicideMiddle.json OK - callcallcodecall_ABCB_RECURSIVE.json Skip ++ callcallcodecall_ABCB_RECURSIVE.json OK + callcallcodecallcode_011.json OK + callcallcodecallcode_011_OOGE.json OK + callcallcodecallcode_011_OOGMAfter.json OK + callcallcodecallcode_011_OOGMBefore.json OK + callcallcodecallcode_011_SuicideEnd.json OK + callcallcodecallcode_011_SuicideMiddle.json OK - callcallcodecallcode_ABCB_RECURSIVE.json Skip ++ callcallcodecallcode_ABCB_RECURSIVE.json OK + callcodeDynamicCode.json OK + callcodeDynamicCode2SelfCall.json OK + callcodeEmptycontract.json OK @@ -129,14 +129,14 @@ OK: 4/4 Fail: 0/4 Skip: 0/4 + callcodecallcall_100_OOGMBefore.json OK + callcodecallcall_100_SuicideEnd.json OK + callcodecallcall_100_SuicideMiddle.json OK - callcodecallcall_ABCB_RECURSIVE.json Skip ++ callcodecallcall_ABCB_RECURSIVE.json OK + callcodecallcallcode_101.json OK + callcodecallcallcode_101_OOGE.json OK + callcodecallcallcode_101_OOGMAfter.json OK + callcodecallcallcode_101_OOGMBefore.json OK + callcodecallcallcode_101_SuicideEnd.json OK + callcodecallcallcode_101_SuicideMiddle.json OK - callcodecallcallcode_ABCB_RECURSIVE.json Skip ++ callcodecallcallcode_ABCB_RECURSIVE.json OK + callcodecallcode_11.json OK + callcodecallcode_11_OOGE.json OK + callcodecallcode_11_SuicideEnd.json OK @@ -146,25 +146,25 @@ OK: 4/4 Fail: 0/4 Skip: 0/4 + callcodecallcodecall_110_OOGMBefore.json OK + callcodecallcodecall_110_SuicideEnd.json OK + callcodecallcodecall_110_SuicideMiddle.json OK - callcodecallcodecall_ABCB_RECURSIVE.json Skip ++ callcodecallcodecall_ABCB_RECURSIVE.json OK + callcodecallcodecallcode_111.json OK + callcodecallcodecallcode_111_OOGE.json OK + callcodecallcodecallcode_111_OOGMAfter.json OK + callcodecallcodecallcode_111_OOGMBefore.json OK + callcodecallcodecallcode_111_SuicideEnd.json OK + callcodecallcodecallcode_111_SuicideMiddle.json OK - callcodecallcodecallcode_ABCB_RECURSIVE.json Skip ++ callcodecallcodecallcode_ABCB_RECURSIVE.json OK ``` -OK: 72/79 Fail: 0/79 Skip: 7/79 +OK: 79/79 Fail: 0/79 Skip: 0/79 ## stCallCreateCallCodeTest ```diff - Call1024BalanceTooLow.json Skip - Call1024OOG.json Skip - Call1024PreCalls.json Skip ++ Call1024BalanceTooLow.json OK ++ Call1024OOG.json OK ++ Call1024PreCalls.json OK + CallLoseGasOOG.json OK - CallRecursiveBombPreCall.json Skip - Callcode1024BalanceTooLow.json Skip - Callcode1024OOG.json Skip ++ CallRecursiveBombPreCall.json OK ++ Callcode1024BalanceTooLow.json OK ++ Callcode1024OOG.json OK + CallcodeLoseGasOOG.json OK + callOutput1.json OK + callOutput2.json OK @@ -202,7 +202,7 @@ OK: 72/79 Fail: 0/79 Skip: 7/79 + createNameRegistratorPreStore1NotEnoughGas.json OK + createNameRegistratorendowmentTooHigh.json OK ``` -OK: 37/43 Fail: 0/43 Skip: 6/43 +OK: 43/43 Fail: 0/43 Skip: 0/43 ## stCallDelegateCodesCallCodeHomestead ```diff + callcallcallcode_001.json OK @@ -211,7 +211,7 @@ OK: 37/43 Fail: 0/43 Skip: 6/43 + callcallcallcode_001_OOGMBefore.json OK + callcallcallcode_001_SuicideEnd.json OK + callcallcallcode_001_SuicideMiddle.json OK - callcallcallcode_ABCB_RECURSIVE.json Skip ++ callcallcallcode_ABCB_RECURSIVE.json OK + callcallcode_01.json OK + callcallcode_01_OOGE.json OK + callcallcode_01_SuicideEnd.json OK @@ -221,14 +221,14 @@ OK: 37/43 Fail: 0/43 Skip: 6/43 + callcallcodecall_010_OOGMBefore.json OK + callcallcodecall_010_SuicideEnd.json OK + callcallcodecall_010_SuicideMiddle.json OK - callcallcodecall_ABCB_RECURSIVE.json Skip ++ callcallcodecall_ABCB_RECURSIVE.json OK + callcallcodecallcode_011.json OK + callcallcodecallcode_011_OOGE.json OK + callcallcodecallcode_011_OOGMAfter.json OK + callcallcodecallcode_011_OOGMBefore.json OK + callcallcodecallcode_011_SuicideEnd.json OK + callcallcodecallcode_011_SuicideMiddle.json OK - callcallcodecallcode_ABCB_RECURSIVE.json Skip ++ callcallcodecallcode_ABCB_RECURSIVE.json OK + callcodecall_10.json OK + callcodecall_10_OOGE.json OK + callcodecall_10_SuicideEnd.json OK @@ -238,14 +238,14 @@ OK: 37/43 Fail: 0/43 Skip: 6/43 + callcodecallcall_100_OOGMBefore.json OK + callcodecallcall_100_SuicideEnd.json OK + callcodecallcall_100_SuicideMiddle.json OK - callcodecallcall_ABCB_RECURSIVE.json Skip ++ callcodecallcall_ABCB_RECURSIVE.json OK + callcodecallcallcode_101.json OK + callcodecallcallcode_101_OOGE.json OK + callcodecallcallcode_101_OOGMAfter.json OK + callcodecallcallcode_101_OOGMBefore.json OK + callcodecallcallcode_101_SuicideEnd.json OK + callcodecallcallcode_101_SuicideMiddle.json OK - callcodecallcallcode_ABCB_RECURSIVE.json Skip ++ callcodecallcallcode_ABCB_RECURSIVE.json OK + callcodecallcode_11.json OK + callcodecallcode_11_OOGE.json OK + callcodecallcode_11_SuicideEnd.json OK @@ -255,16 +255,16 @@ OK: 37/43 Fail: 0/43 Skip: 6/43 + callcodecallcodecall_110_OOGMBefore.json OK + callcodecallcodecall_110_SuicideEnd.json OK + callcodecallcodecall_110_SuicideMiddle.json OK - callcodecallcodecall_ABCB_RECURSIVE.json Skip ++ callcodecallcodecall_ABCB_RECURSIVE.json OK + callcodecallcodecallcode_111.json OK + callcodecallcodecallcode_111_OOGE.json OK + callcodecallcodecallcode_111_OOGMAfter.json OK + callcodecallcodecallcode_111_OOGMBefore.json OK + callcodecallcodecallcode_111_SuicideEnd.json OK + callcodecallcodecallcode_111_SuicideMiddle.json OK - callcodecallcodecallcode_ABCB_RECURSIVE.json Skip ++ callcodecallcodecallcode_ABCB_RECURSIVE.json OK ``` -OK: 51/58 Fail: 0/58 Skip: 7/58 +OK: 58/58 Fail: 0/58 Skip: 0/58 ## stCallDelegateCodesHomestead ```diff + callcallcallcode_001.json OK @@ -273,7 +273,7 @@ OK: 51/58 Fail: 0/58 Skip: 7/58 + callcallcallcode_001_OOGMBefore.json OK + callcallcallcode_001_SuicideEnd.json OK + callcallcallcode_001_SuicideMiddle.json OK - callcallcallcode_ABCB_RECURSIVE.json Skip ++ callcallcallcode_ABCB_RECURSIVE.json OK + callcallcode_01.json OK + callcallcode_01_OOGE.json OK + callcallcode_01_SuicideEnd.json OK @@ -283,14 +283,14 @@ OK: 51/58 Fail: 0/58 Skip: 7/58 + callcallcodecall_010_OOGMBefore.json OK + callcallcodecall_010_SuicideEnd.json OK + callcallcodecall_010_SuicideMiddle.json OK - callcallcodecall_ABCB_RECURSIVE.json Skip ++ callcallcodecall_ABCB_RECURSIVE.json OK + callcallcodecallcode_011.json OK + callcallcodecallcode_011_OOGE.json OK + callcallcodecallcode_011_OOGMAfter.json OK + callcallcodecallcode_011_OOGMBefore.json OK + callcallcodecallcode_011_SuicideEnd.json OK + callcallcodecallcode_011_SuicideMiddle.json OK - callcallcodecallcode_ABCB_RECURSIVE.json Skip ++ callcallcodecallcode_ABCB_RECURSIVE.json OK + callcodecall_10.json OK + callcodecall_10_OOGE.json OK + callcodecall_10_SuicideEnd.json OK @@ -300,14 +300,14 @@ OK: 51/58 Fail: 0/58 Skip: 7/58 + callcodecallcall_100_OOGMBefore.json OK + callcodecallcall_100_SuicideEnd.json OK + callcodecallcall_100_SuicideMiddle.json OK - callcodecallcall_ABCB_RECURSIVE.json Skip ++ callcodecallcall_ABCB_RECURSIVE.json OK + callcodecallcallcode_101.json OK + callcodecallcallcode_101_OOGE.json OK + callcodecallcallcode_101_OOGMAfter.json OK + callcodecallcallcode_101_OOGMBefore.json OK + callcodecallcallcode_101_SuicideEnd.json OK + callcodecallcallcode_101_SuicideMiddle.json OK - callcodecallcallcode_ABCB_RECURSIVE.json Skip ++ callcodecallcallcode_ABCB_RECURSIVE.json OK + callcodecallcode_11.json OK + callcodecallcode_11_OOGE.json OK + callcodecallcode_11_SuicideEnd.json OK @@ -317,16 +317,16 @@ OK: 51/58 Fail: 0/58 Skip: 7/58 + callcodecallcodecall_110_OOGMBefore.json OK + callcodecallcodecall_110_SuicideEnd.json OK + callcodecallcodecall_110_SuicideMiddle.json OK - callcodecallcodecall_ABCB_RECURSIVE.json Skip ++ callcodecallcodecall_ABCB_RECURSIVE.json OK + callcodecallcodecallcode_111.json OK + callcodecallcodecallcode_111_OOGE.json OK + callcodecallcodecallcode_111_OOGMAfter.json OK + callcodecallcodecallcode_111_OOGMBefore.json OK + callcodecallcodecallcode_111_SuicideEnd.json OK + callcodecallcodecallcode_111_SuicideMiddle.json OK - callcodecallcodecallcode_ABCB_RECURSIVE.json Skip ++ callcodecallcodecallcode_ABCB_RECURSIVE.json OK ``` -OK: 51/58 Fail: 0/58 Skip: 7/58 +OK: 58/58 Fail: 0/58 Skip: 0/58 ## stChainId ```diff + chainId.json OK @@ -369,7 +369,7 @@ OK: 5/5 Fail: 0/5 Skip: 0/5 + Create2OOGafterInitCodeRevert2.json OK + Create2OnDepth1023.json OK + Create2OnDepth1024.json OK - Create2Recursive.json Skip ++ Create2Recursive.json OK + CreateMessageReverted.json OK + CreateMessageRevertedOOGInInit2.json OK + RevertDepthCreate2OOG.json OK @@ -402,7 +402,7 @@ OK: 5/5 Fail: 0/5 Skip: 0/5 + returndatacopy_following_successful_create.json OK + returndatasize_following_successful_create.json OK ``` -OK: 50/51 Fail: 0/51 Skip: 1/51 +OK: 51/51 Fail: 0/51 Skip: 0/51 ## stCreateTest ```diff + CREATE2_CallData.json OK @@ -456,14 +456,14 @@ OK: 50/51 Fail: 0/51 Skip: 1/51 OK: 47/47 Fail: 0/47 Skip: 0/47 ## stDelegatecallTestHomestead ```diff - Call1024BalanceTooLow.json Skip - Call1024OOG.json Skip - Call1024PreCalls.json Skip ++ Call1024BalanceTooLow.json OK ++ Call1024OOG.json OK ++ Call1024PreCalls.json OK + CallLoseGasOOG.json OK - CallRecursiveBombPreCall.json Skip ++ CallRecursiveBombPreCall.json OK + CallcodeLoseGasOOG.json OK - Delegatecall1024.json Skip - Delegatecall1024OOG.json Skip ++ Delegatecall1024.json OK ++ Delegatecall1024OOG.json OK + callOutput1.json OK + callOutput2.json OK + callOutput3.json OK @@ -485,7 +485,7 @@ OK: 47/47 Fail: 0/47 Skip: 0/47 + delegatecodeDynamicCode.json OK + delegatecodeDynamicCode2SelfCall.json OK ``` -OK: 22/28 Fail: 0/28 Skip: 6/28 +OK: 28/28 Fail: 0/28 Skip: 0/28 ## stEIP1153_transientStorage ```diff + 10_revertUndoesStoreAfterReturn.json OK @@ -795,20 +795,20 @@ OK: 46/46 Fail: 0/46 Skip: 0/46 OK: 9/9 Fail: 0/9 Skip: 0/9 ## stMemoryStressTest ```diff - CALLCODE_Bounds.json Skip - CALLCODE_Bounds2.json Skip - CALLCODE_Bounds3.json Skip - CALLCODE_Bounds4.json Skip - CALL_Bounds.json Skip - CALL_Bounds2.json Skip - CALL_Bounds2a.json Skip - CALL_Bounds3.json Skip ++ CALLCODE_Bounds.json OK ++ CALLCODE_Bounds2.json OK ++ CALLCODE_Bounds3.json OK ++ CALLCODE_Bounds4.json OK ++ CALL_Bounds.json OK ++ CALL_Bounds2.json OK ++ CALL_Bounds2a.json OK ++ CALL_Bounds3.json OK + CREATE_Bounds.json OK + CREATE_Bounds2.json OK + CREATE_Bounds3.json OK - DELEGATECALL_Bounds.json Skip - DELEGATECALL_Bounds2.json Skip - DELEGATECALL_Bounds3.json Skip ++ DELEGATECALL_Bounds.json OK ++ DELEGATECALL_Bounds2.json OK ++ DELEGATECALL_Bounds3.json OK + DUP_Bounds.json OK + FillStack.json OK + JUMPI_Bounds.json OK @@ -834,7 +834,7 @@ OK: 9/9 Fail: 0/9 Skip: 0/9 + static_CALL_Bounds2a.json OK + static_CALL_Bounds3.json OK ``` -OK: 27/38 Fail: 0/38 Skip: 11/38 +OK: 38/38 Fail: 0/38 Skip: 0/38 ## stMemoryTest ```diff + buffer.json OK @@ -1054,29 +1054,29 @@ OK: 6/6 Fail: 0/6 Skip: 0/6 OK: 100/100 Fail: 0/100 Skip: 0/100 ## stQuadraticComplexityTest ```diff - Call1MB1024Calldepth.json Skip - Call20KbytesContract50_1.json Skip - Call20KbytesContract50_2.json Skip - Call20KbytesContract50_3.json Skip - Call50000.json Skip - Call50000_ecrec.json Skip - Call50000_identity.json Skip - Call50000_identity2.json Skip - Call50000_rip160.json Skip - Call50000_sha256.json Skip - Callcode50000.json Skip - Create1000.json Skip - Create1000Byzantium.json Skip - Create1000Shnghai.json Skip - QuadraticComplexitySolidity_CallDataCopy.json Skip - Return50000.json Skip - Return50000_2.json Skip -``` -OK: 0/17 Fail: 0/17 Skip: 17/17 ++ Call1MB1024Calldepth.json OK ++ Call20KbytesContract50_1.json OK ++ Call20KbytesContract50_2.json OK ++ Call20KbytesContract50_3.json OK ++ Call50000.json OK ++ Call50000_ecrec.json OK ++ Call50000_identity.json OK ++ Call50000_identity2.json OK ++ Call50000_rip160.json OK ++ Call50000_sha256.json OK ++ Callcode50000.json OK ++ Create1000.json OK ++ Create1000Byzantium.json OK ++ Create1000Shnghai.json OK ++ QuadraticComplexitySolidity_CallDataCopy.json OK ++ Return50000.json OK ++ Return50000_2.json OK +``` +OK: 17/17 Fail: 0/17 Skip: 0/17 ## stRandom ```diff + randomStatetest0.json OK - randomStatetest1.json Skip ++ randomStatetest1.json OK + randomStatetest10.json OK + randomStatetest100.json OK + randomStatetest102.json OK @@ -1301,12 +1301,12 @@ OK: 0/17 Fail: 0/17 Skip: 17/17 + randomStatetest343.json OK + randomStatetest345.json OK + randomStatetest346.json OK - randomStatetest347.json Skip ++ randomStatetest347.json OK + randomStatetest348.json OK + randomStatetest349.json OK + randomStatetest350.json OK + randomStatetest351.json OK - randomStatetest352.json Skip ++ randomStatetest352.json OK + randomStatetest353.json OK + randomStatetest354.json OK + randomStatetest355.json OK @@ -1386,7 +1386,7 @@ OK: 0/17 Fail: 0/17 Skip: 17/17 + randomStatetest97.json OK + randomStatetest98.json OK ``` -OK: 307/310 Fail: 0/310 Skip: 3/310 +OK: 310/310 Fail: 0/310 Skip: 0/310 ## stRandom2 ```diff + randomStatetest.json OK @@ -1396,7 +1396,7 @@ OK: 307/310 Fail: 0/310 Skip: 3/310 + randomStatetest387.json OK + randomStatetest388.json OK + randomStatetest389.json OK - randomStatetest393.json Skip ++ randomStatetest393.json OK + randomStatetest395.json OK + randomStatetest396.json OK + randomStatetest397.json OK @@ -1586,7 +1586,7 @@ OK: 307/310 Fail: 0/310 Skip: 3/310 + randomStatetest621.json OK + randomStatetest624.json OK + randomStatetest625.json OK - randomStatetest626.json Skip ++ randomStatetest626.json OK + randomStatetest627.json OK + randomStatetest628.json OK + randomStatetest629.json OK @@ -1610,13 +1610,13 @@ OK: 307/310 Fail: 0/310 Skip: 3/310 + randomStatetest649.json OK + randomStatetest650.json OK ``` -OK: 218/220 Fail: 0/220 Skip: 2/220 +OK: 220/220 Fail: 0/220 Skip: 0/220 ## stRecursiveCreate ```diff + recursiveCreate.json OK - recursiveCreateReturnValue.json Skip ++ recursiveCreateReturnValue.json OK ``` -OK: 1/2 Fail: 0/2 Skip: 1/2 +OK: 2/2 Fail: 0/2 Skip: 0/2 ## stRefundTest ```diff + refund50_1.json OK @@ -1690,11 +1690,11 @@ OK: 22/22 Fail: 0/22 Skip: 0/22 OK: 41/41 Fail: 0/41 Skip: 0/41 ## stRevertTest ```diff - LoopCallsDepthThenRevert.json Skip - LoopCallsDepthThenRevert2.json Skip - LoopCallsDepthThenRevert3.json Skip - LoopCallsThenRevert.json Skip - LoopDelegateCallsDepthThenRevert.json Skip ++ LoopCallsDepthThenRevert.json OK ++ LoopCallsDepthThenRevert2.json OK ++ LoopCallsDepthThenRevert3.json OK ++ LoopCallsThenRevert.json OK ++ LoopDelegateCallsDepthThenRevert.json OK + NashatyrevSuicideRevert.json OK + PythonRevertTestTue201814-1430.json OK + RevertDepth2.json OK @@ -1736,7 +1736,7 @@ OK: 41/41 Fail: 0/41 Skip: 0/41 + costRevert.json OK + stateRevert.json OK ``` -OK: 40/45 Fail: 0/45 Skip: 5/45 +OK: 45/45 Fail: 0/45 Skip: 0/45 ## stSLoadTest ```diff + sloadGasCost.json OK @@ -1854,8 +1854,8 @@ OK: 17/17 Fail: 0/17 Skip: 0/17 ## stSpecialTest ```diff + FailedCreateRevertsDeletionParis.json OK - JUMPDEST_Attack.json Skip - JUMPDEST_AttackwithJump.json Skip ++ JUMPDEST_Attack.json OK ++ JUMPDEST_AttackwithJump.json OK + OverflowGasMakeMoney.json OK + StackDepthLimitSEC.json OK + block504980.json OK @@ -1869,7 +1869,7 @@ OK: 17/17 Fail: 0/17 Skip: 0/17 + sha3_deja.json OK + tx_e1c174e2.json OK ``` -OK: 13/15 Fail: 0/15 Skip: 2/15 +OK: 15/15 Fail: 0/15 Skip: 0/15 ## stStackTests ```diff + shallowStack.json OK @@ -1903,18 +1903,18 @@ OK: 10/10 Fail: 0/10 Skip: 0/10 + static_CREATE_EmptyContractAndCallIt_0wei.json OK + static_CREATE_EmptyContractWithStorageAndCallIt_0wei.json OK + static_Call10.json OK - static_Call1024BalanceTooLow.json Skip - static_Call1024BalanceTooLow2.json Skip - static_Call1024OOG.json Skip - static_Call1024PreCalls.json Skip - static_Call1024PreCalls2.json Skip - static_Call1024PreCalls3.json Skip - static_Call1MB1024Calldepth.json Skip - static_Call50000.json Skip - static_Call50000_ecrec.json Skip - static_Call50000_identity.json Skip - static_Call50000_identity2.json Skip - static_Call50000_rip160.json Skip ++ static_Call1024BalanceTooLow.json OK ++ static_Call1024BalanceTooLow2.json OK ++ static_Call1024OOG.json OK ++ static_Call1024PreCalls.json OK ++ static_Call1024PreCalls2.json OK ++ static_Call1024PreCalls3.json OK ++ static_Call1MB1024Calldepth.json OK ++ static_Call50000.json OK ++ static_Call50000_ecrec.json OK ++ static_Call50000_identity.json OK ++ static_Call50000_identity2.json OK ++ static_Call50000_rip160.json OK + static_Call50000bytesContract50_1.json OK + static_Call50000bytesContract50_2.json OK + static_Call50000bytesContract50_3.json OK @@ -2173,7 +2173,7 @@ OK: 10/10 Fail: 0/10 Skip: 0/10 + static_refund_CallToSuicideNoStorage.json OK + static_refund_CallToSuicideTwice.json OK ``` -OK: 274/286 Fail: 0/286 Skip: 12/286 +OK: 286/286 Fail: 0/286 Skip: 0/286 ## stStaticFlagEnabled ```diff + CallWithNOTZeroValueToPrecompileFromCalledContract.json OK @@ -2194,27 +2194,27 @@ OK: 13/13 Fail: 0/13 Skip: 0/13 ## stSystemOperationsTest ```diff + ABAcalls0.json OK - ABAcalls1.json Skip - ABAcalls2.json Skip ++ ABAcalls1.json OK ++ ABAcalls2.json OK + ABAcalls3.json OK + ABAcallsSuicide0.json OK + ABAcallsSuicide1.json OK + Call10.json OK - CallRecursiveBomb0.json Skip - CallRecursiveBomb0_OOG_atMaxCallDepth.json Skip - CallRecursiveBomb1.json Skip - CallRecursiveBomb2.json Skip ++ CallRecursiveBomb0.json OK ++ CallRecursiveBomb0_OOG_atMaxCallDepth.json OK ++ CallRecursiveBomb1.json OK ++ CallRecursiveBomb2.json OK + CallRecursiveBomb3.json OK - CallRecursiveBombLog.json Skip - CallRecursiveBombLog2.json Skip ++ CallRecursiveBombLog.json OK ++ CallRecursiveBombLog2.json OK + CallToNameRegistrator0.json OK + CallToNameRegistratorAddressTooBigLeft.json OK + CallToNameRegistratorAddressTooBigRight.json OK - CallToNameRegistratorMemOOGAndInsufficientBalance.json Skip ++ CallToNameRegistratorMemOOGAndInsufficientBalance.json OK + CallToNameRegistratorNotMuchMemory0.json OK + CallToNameRegistratorNotMuchMemory1.json OK + CallToNameRegistratorOutOfGas.json OK - CallToNameRegistratorTooMuchMemory0.json Skip ++ CallToNameRegistratorTooMuchMemory0.json OK + CallToNameRegistratorTooMuchMemory1.json OK + CallToNameRegistratorTooMuchMemory2.json OK + CallToNameRegistratorZeorSizeMemExpansion.json OK @@ -2261,25 +2261,25 @@ OK: 13/13 Fail: 0/13 Skip: 0/13 + suicideSendEtherToMe.json OK + testRandomTest.json OK ``` -OK: 57/67 Fail: 0/67 Skip: 10/67 +OK: 67/67 Fail: 0/67 Skip: 0/67 ## stTimeConsuming ```diff CALLBlake2f_MaxRounds.json Skip -+ sstore_combinations_initial00_2_Paris.json OK -+ sstore_combinations_initial00_Paris.json OK -+ sstore_combinations_initial01_2_Paris.json OK -+ sstore_combinations_initial01_Paris.json OK -+ sstore_combinations_initial10_2_Paris.json OK -+ sstore_combinations_initial10_Paris.json OK -+ sstore_combinations_initial11_2_Paris.json OK -+ sstore_combinations_initial11_Paris.json OK -+ sstore_combinations_initial20_2_Paris.json OK -+ sstore_combinations_initial20_Paris.json OK -+ sstore_combinations_initial21_2_Paris.json OK -+ sstore_combinations_initial21_Paris.json OK + sstore_combinations_initial00_2_Paris.json Skip + sstore_combinations_initial00_Paris.json Skip + sstore_combinations_initial01_2_Paris.json Skip + sstore_combinations_initial01_Paris.json Skip + sstore_combinations_initial10_2_Paris.json Skip + sstore_combinations_initial10_Paris.json Skip + sstore_combinations_initial11_2_Paris.json Skip + sstore_combinations_initial11_Paris.json Skip + sstore_combinations_initial20_2_Paris.json Skip + sstore_combinations_initial20_Paris.json Skip + sstore_combinations_initial21_2_Paris.json Skip + sstore_combinations_initial21_Paris.json Skip static_Call50000_sha256.json Skip ``` -OK: 12/14 Fail: 0/14 Skip: 2/14 +OK: 0/14 Fail: 0/14 Skip: 14/14 ## stTransactionTest ```diff + ContractStoreClearsOOG.json OK @@ -2772,4 +2772,4 @@ OK: 5/5 Fail: 0/5 Skip: 0/5 OK: 6/6 Fail: 0/6 Skip: 0/6 ---TOTAL--- -OK: 2402/2502 Fail: 0/2502 Skip: 100/2502 +OK: 2488/2502 Fail: 0/2502 Skip: 14/2502 diff --git a/Makefile b/Makefile index 55a6a13e22..6628f81280 100644 --- a/Makefile +++ b/Makefile @@ -353,10 +353,20 @@ libverifproxy: | build deps echo -e $(BUILD_END_MSG) "build/$@" eest_engine: | build deps - $(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_enabled:off "tests/eest_engine/$@.nim" + $(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim" eest_engine_test: | build deps eest_engine - $(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_enabled:off "tests/eest_engine/$@.nim" + $(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim" + +eest_blockchain: | build deps + $(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim" + +eest_blockchain_test: | build deps eest_blockchain + $(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim" + +eest_full_test: | build deps eest_blockchain eest_engine + $(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/eest_blockchain_test.nim" + $(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/eest_engine_test.nim" # builds transition tool t8n: | build deps diff --git a/execution_chain/common/common.nim b/execution_chain/common/common.nim index 65504685f0..be6f4a24ae 100644 --- a/execution_chain/common/common.nim +++ b/execution_chain/common/common.nim @@ -317,7 +317,7 @@ func nextFork*(com: CommonRef, currentFork: HardFork): Opt[HardFork] = return Opt.none(HardFork) func lastFork*(com: CommonRef, currentFork: HardFork): Opt[HardFork] = - ## Returns the last hard fork before the given one + ## Returns the last hard fork after the current one for fork in countdown(HardFork.high, currentFork): if fork > currentFork and com.forkTransitionTable.timeThresholds[fork].isSome: return Opt.some(HardFork(fork)) diff --git a/execution_chain/core/validate.nim b/execution_chain/core/validate.nim index 95f3e42e61..0b0f92fe25 100644 --- a/execution_chain/core/validate.nim +++ b/execution_chain/core/validate.nim @@ -288,6 +288,9 @@ func validateTxBasic*( &"get={bv.data[0].int}, expect={VERSIONED_HASH_VERSION_KZG.int}") if tx.txType == TxEip7702: + if tx.to.isNone: + return err("invalid tx: destination must be not empty") + if tx.authorizationList.len == 0: return err("invalid tx: authorization list must not empty") diff --git a/scripts/eest_ci_cache.sh b/scripts/eest_ci_cache.sh index fc9be5cfae..9152a9284a 100755 --- a/scripts/eest_ci_cache.sh +++ b/scripts/eest_ci_cache.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash -# Copyright (c) 2025 Status Research & Development GmbH. Licensed under -# either of: +# Copyright (c) 2025 Status Research & Development GmbH. +# Licensed under either of: # - Apache License, version 2.0 # - MIT license -# at your option. This file may not be copied, modified, or distributed except -# according to those terms. +# at your option. set -e @@ -13,45 +12,82 @@ cd "$(dirname "${BASH_SOURCE[0]}")"/.. REPO_DIR="${PWD}" FIXTURES_DIR="${REPO_DIR}/tests/fixtures" -EEST_DIR="${FIXTURES_DIR}/eest" -EEST_VERSION="v4.5.0" -EEST_ARCHIVE="fixtures_static.tar.gz" -EEST_ARCHIVE_FILE="${FIXTURES_DIR}/${EEST_ARCHIVE}" -EEST_URL="https://github.com/ethereum/execution-spec-tests/releases/download/${EEST_VERSION}/${EEST_ARCHIVE}" - -if [[ ! -d "$EEST_DIR" ]]; then - mkdir -p ${EEST_DIR} -fi - -if [[ -f "${EEST_DIR}/version.txt" ]]; then - EEST_VERSION_BEFORE=$(cat "${EEST_DIR}/version.txt") - - if [[ ${EEST_VERSION_BEFORE} == ${EEST_VERSION} ]]; then - echo "EEST fixtures already downloaded. Skipping download." - exit 0 + +# --- Current Release Static --- +EEST_STATIC_NAME="Mainnet Static" +EEST_STATIC_VERSION="v4.5.0" +EEST_STATIC_DIR="${FIXTURES_DIR}/eest_static" +EEST_STATIC_ARCHIVE="fixtures_static.tar.gz" +EEST_STATIC_URL="https://github.com/ethereum/execution-spec-tests/releases/download/${EEST_STATIC_VERSION}/${EEST_STATIC_ARCHIVE}" + +# --- Current Release Stable --- +EEST_STABLE_NAME="Mainnet Stable" +EEST_STABLE_VERSION="v4.5.0" +EEST_STABLE_DIR="${FIXTURES_DIR}/eest_stable" +EEST_STABLE_ARCHIVE="fixtures_stable.tar.gz" +EEST_STABLE_URL="https://github.com/ethereum/execution-spec-tests/releases/download/${EEST_STABLE_VERSION}/${EEST_STABLE_ARCHIVE}" + +# --- Current Release Develop --- +EEST_DEVELOP_NAME="Mainnet Develop" +EEST_DEVELOP_VERSION="v4.5.0" +EEST_DEVELOP_DIR="${FIXTURES_DIR}/eest_develop" +EEST_DEVELOP_ARCHIVE="fixtures_develop.tar.gz" +EEST_DEVELOP_URL="https://github.com/ethereum/execution-spec-tests/releases/download/${EEST_DEVELOP_VERSION}/${EEST_DEVELOP_ARCHIVE}" + +# --- Devnet Release --- +EEST_DEVNET_NAME="fusaka-devnet-5" +EEST_DEVNET_VERSION="v1.1.0" +EEST_DEVNET_DIR="${FIXTURES_DIR}/eest_devnet" +EEST_DEVNET_ARCHIVE="fixtures_fusaka-devnet-5.tar.gz" +EEST_DEVNET_URL="https://github.com/ethereum/execution-spec-tests/releases/download/${EEST_DEVNET_NAME}%40${EEST_DEVNET_VERSION}/${EEST_DEVNET_ARCHIVE}" + +download_and_extract() { + local url="$1" + local dest_dir="$2" + local name="$3" + local version="$4" + local archive="$5" + + if [[ ! -d "$dest_dir" ]]; then + mkdir -p "$dest_dir" + fi + + if [[ -f "${dest_dir}/version.txt" ]]; then + local existing_version + existing_version=$(cat "${dest_dir}/version.txt") + + if [[ ${existing_version} == "${version}" ]]; then + echo "EEST fixtures for ${name} ${version} already downloaded in ${dest_dir}. Skipping." + return + fi fi -fi + echo "Downloading and extracting EEST test vectors for ${name} ${version}" -echo "Downloading and extracting EEST test vectors" + cd "${FIXTURES_DIR}" + curl -L "${url}" -o "${archive}" + tar -xzf "${archive}" -C "${dest_dir}" --strip-components=1 -cd "${FIXTURES_DIR}" -curl -L "${EEST_URL}" -o "${EEST_ARCHIVE}" -tar -xzf ${EEST_ARCHIVE} -C eest --strip-components=1 + rm -rf "${dest_dir}/.meta" + mv "${dest_dir}/blockchain_tests/static/state_tests/"* "${dest_dir}/blockchain_tests" 2>/dev/null || true + rm -rf "${dest_dir}/blockchain_tests/static" -rm -rf eest/.meta -mv eest/blockchain_tests/static/state_tests/* eest/blockchain_tests -rm -rf eest/blockchain_tests/static + mkdir -p "${dest_dir}/engine_tests" + mv "${dest_dir}/blockchain_tests_engine/static/state_tests/"* "${dest_dir}/engine_tests" 2>/dev/null || true + rm -rf "${dest_dir}/blockchain_tests_engine" -mkdir -p eest/engine_tests -mv eest/blockchain_tests_engine/static/state_tests/* eest/engine_tests -rm -rf eest/blockchain_tests_engine + mv "${dest_dir}/state_tests/static/state_tests/"* "${dest_dir}/state_tests" 2>/dev/null || true + rm -rf "${dest_dir}/state_tests/static" -mv eest/state_tests/static/state_tests/* eest/state_tests -rm -rf eest/state_tests/static + rm -f "${archive}" -rm -f "${EEST_ARCHIVE}" + echo "${version}" > "${dest_dir}/version.txt" -echo "${EEST_VERSION}" > eest/version.txt + cd "${REPO_DIR}" +} -cd "${REPO_DIR}" +# Download stable and develop versions +download_and_extract "${EEST_STATIC_URL}" "${EEST_STATIC_DIR}" "${EEST_STATIC_NAME}" "${EEST_STATIC_VERSION}" "${EEST_STATIC_ARCHIVE}" +download_and_extract "${EEST_STABLE_URL}" "${EEST_STABLE_DIR}" "${EEST_STABLE_NAME}" "${EEST_STABLE_VERSION}" "${EEST_STABLE_ARCHIVE}" +download_and_extract "${EEST_DEVELOP_URL}" "${EEST_DEVELOP_DIR}" "${EEST_DEVELOP_NAME}" "${EEST_DEVELOP_VERSION}" "${EEST_DEVELOP_ARCHIVE}" +download_and_extract "${EEST_DEVNET_URL}" "${EEST_DEVNET_DIR}" "${EEST_DEVNET_NAME}" "${EEST_DEVNET_VERSION}" "${EEST_DEVNET_ARCHIVE}" diff --git a/tests/all_tests.nim b/tests/all_tests.nim index c84d79e617..d70abf2896 100644 --- a/tests/all_tests.nim +++ b/tests/all_tests.nim @@ -42,6 +42,5 @@ import test_stateless_witness_types, test_stateless_witness_generation, # These two suites are much slower than all the rest, so run them last - test_blockchain_json, test_generalstate_json, ] diff --git a/tests/eest_engine/chain_config_wrapper.nim b/tests/eest/chain_config_wrapper.nim similarity index 95% rename from tests/eest_engine/chain_config_wrapper.nim rename to tests/eest/chain_config_wrapper.nim index e36e7c51ed..fd0c8f3ed7 100644 --- a/tests/eest_engine/chain_config_wrapper.nim +++ b/tests/eest/chain_config_wrapper.nim @@ -13,4 +13,4 @@ import ../../execution_chain/common/chain_config {.all.} export - blobScheduleParser + blobScheduleParser \ No newline at end of file diff --git a/tests/eest/eest_blockchain.nim b/tests/eest/eest_blockchain.nim new file mode 100644 index 0000000000..35f08957a9 --- /dev/null +++ b/tests/eest/eest_blockchain.nim @@ -0,0 +1,103 @@ +# Nimbus +# Copyright (c) 2025 Status Research & Development GmbH +# Licensed under either of +# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +# * MIT license ([LICENSE-MIT](LICENSE-MIT)) +# at your option. +# This file may not be copied, modified, or distributed except according to +# those terms. + +import + std/[json, cmdline, os], + unittest2, + eth/common/headers_rlp, + web3/eth_api_types, + web3/engine_api_types, + web3/primitives, + web3/conversions, + web3/execution_types, + json_rpc/rpcclient, + json_rpc/rpcserver, + ../../execution_chain/db/ledger, + ../../execution_chain/core/chain/forked_chain, + ../../execution_chain/beacon/beacon_engine, + ../../execution_chain/common/common, + ../../hive_integration/nodocker/engine/engine_client, + ./eest_helpers, + stew/byteutils, + chronos, + ../../execution_chain/db/ledger, + ../../execution_chain/core/chain/forked_chain, + ../../execution_chain/common/common + +proc parseBlocks*(node: JsonNode): seq[BlockDesc] = + for x in node: + try: + let blockRLP = hexToSeqByte(x["rlp"].getStr) + let blk = rlp.decode(blockRLP, EthBlock) + result.add BlockDesc( + blk: blk, + badBlock: "expectException" in x, + ) + except RlpError: + # invalid rlp will not participate in block validation + # e.g. invalid rlp received from network + discard + +proc rootExists(db: CoreDbTxRef; root: Hash32): bool = + let state = db.getStateRoot().valueOr: + return false + state == root + +proc runTest(env: TestEnv, unit: BlockchainUnitEnv): Future[Result[void, string]] {.async.} = + let blocks = parseBlocks(unit.blocks) + var lastStateRoot = unit.genesisBlockHeader.stateRoot + + for blk in blocks: + let res = await env.chain.importBlock(blk.blk) + if res.isOk: + if unit.lastblockhash == blk.blk.header.computeBlockHash: + lastStateRoot = blk.blk.header.stateRoot + if blk.badBlock: + return err("A bug? bad block imported") + else: + if not blk.badBlock: + return err("A bug? good block rejected: " & res.error) + + (await env.chain.forkChoice(unit.lastblockhash, unit.lastblockhash)).isOkOr: + return err("A bug? fork choice failed") + + let headHash = env.chain.latestHash + if headHash != unit.lastblockhash: + return err("lastestBlockHash mismatch, get: " & $headHash & + " expect: " & $unit.lastblockhash) + + if not env.chain.txFrame(headHash).rootExists(lastStateRoot): + return err("Last stateRoot not exists") + + ok() + +proc processFile*(fileName: string): bool = + let + fixture = parseFixture(fileName, BlockchainFixture) + + var testPass = true + for unit in fixture.units: + let header = unit.unit.genesisBlockHeader.to(Header) + doAssert(unit.unit.genesisBlockHeader.hash == header.computeRlpHash) + let env = prepareEnv(unit.unit, header) + (waitFor env.runTest(unit.unit)).isOkOr: + echo "\nTestName: ", unit.name, " RunTest error: ", error, "\n" + testPass = false + env.close() + + return testPass + +when isMainModule: + if paramCount() == 0: + let testFile = getAppFilename().splitPath().tail + echo "Usage: " & testFile & " vector.json" + quit(QuitFailure) + + check processFile(paramStr(1)) + diff --git a/tests/eest/eest_blockchain_test.nim b/tests/eest/eest_blockchain_test.nim new file mode 100644 index 0000000000..24784a85bc --- /dev/null +++ b/tests/eest/eest_blockchain_test.nim @@ -0,0 +1,35 @@ +# Nimbus +# Copyright (c) 2025 Status Research & Development GmbH +# Licensed under either of +# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +# * MIT license ([LICENSE-MIT](LICENSE-MIT)) +# at your option. +# This file may not be copied, modified, or distributed except according to +# those terms. + +import + std/[os, osproc], + unittest2, + ./eest_helpers, + ./eest_blockchain + +const + baseFolder = "tests/fixtures" + eestType = "blockchain_tests" + eestReleases = [ + "eest_develop", + "eest_static", + "eest_stable", + "eest_devnet" + ] + +const skipFiles = [ + "" +] + +runEESTSuite( + eestReleases, + skipFiles, + baseFolder, + eestType +) \ No newline at end of file diff --git a/tests/eest/eest_engine.nim b/tests/eest/eest_engine.nim new file mode 100644 index 0000000000..b21238d571 --- /dev/null +++ b/tests/eest/eest_engine.nim @@ -0,0 +1,115 @@ +# Nimbus +# Copyright (c) 2025 Status Research & Development GmbH +# Licensed under either of +# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +# * MIT license ([LICENSE-MIT](LICENSE-MIT)) +# at your option. +# This file may not be copied, modified, or distributed except according to +# those terms. + +{.push raises: [].} + +import + std/[cmdline, os], + unittest2, + eth/common/headers_rlp, + web3/eth_api_types, + web3/engine_api_types, + web3/primitives, + web3/conversions, + web3/execution_types, + json_rpc/rpcclient, + json_rpc/rpcserver, + ../../execution_chain/db/ledger, + ../../execution_chain/core/chain/forked_chain, + ../../execution_chain/core/tx_pool, + ../../execution_chain/beacon/beacon_engine, + ../../execution_chain/common/common, + ../../hive_integration/nodocker/engine/engine_client, + ./eest_helpers + +proc sendNewPayload(env: TestEnv, version: uint64, param: PayloadParam): Result[PayloadStatusV1, string] = + if not env.client.isSome: + return err("Client is not initialized") + + if version == 3: + env.client.get().newPayloadV3( + param.payload, + param.versionedHashes, + param.parentBeaconBlockRoot) + elif version == 4: + env.client.get().newPayloadV4( + param.payload, + param.versionedHashes, + param.parentBeaconBlockRoot, + param.excutionRequests) + else: + err("Unsupported NewPayload version: " & $version) + +proc sendFCU(env: TestEnv, version: uint64, param: PayloadParam): Result[ForkchoiceUpdatedResponse, string] = + let update = ForkchoiceStateV1( + headblockHash: param.payload.blockHash, + finalizedblockHash: param.payload.blockHash + ) + + if version == 3 and env.client.isSome: + env.client.get().forkchoiceUpdatedV3(update) + else: + err("Unsupported FCU version: " & $version) + +proc runTest(env: TestEnv, unit: EngineUnitEnv): Result[void, string] = + if not env.client.isSome: + return err("Client is not initialized") + + for enp in unit.engineNewPayloads: + var status = env.sendNewPayload(enp.newPayloadVersion.uint64, enp.params).valueOr: + return err(error) + + discard status + when false: + # Skip validation error check, use `unit.lastblockhash` to + # determine if the test is pass. + if status.validationError.isSome: + return err(status.validationError.value) + + let y = env.sendFCU(enp.forkchoiceUpdatedVersion.uint64, enp.params).valueOr: + return err(error) + + discard y + when false: + # ditto + status = y.payloadStatus + if status.validationError.isSome: + return err(status.validationError.value) + + let header = env.client.get().latestHeader().valueOr: + return err(error) + + if unit.lastblockhash != header.computeRlpHash: + return err("last block hash mismatch") + + ok() + +proc processFile*(fileName: string): bool = + let + fixture = parseFixture(fileName, EngineFixture) + + var testPass = true + for unit in fixture.units: + let header = unit.unit.genesisBlockHeader.to(Header) + doAssert(unit.unit.genesisBlockHeader.hash == header.computeRlpHash) + let env = prepareEnv(unit.unit, header, true) + env.runTest(unit.unit).isOkOr: + echo "\nTestName: ", unit.name, " RunTest error: ", error, "\n" + testPass = false + env.close() + + return testPass + +when isMainModule: + if paramCount() == 0: + let testFile = getAppFilename().splitPath().tail + echo "Usage: " & testFile & " vector.json" + quit(QuitFailure) + + check processFile(paramStr(1)) \ No newline at end of file diff --git a/tests/eest/eest_engine_test.nim b/tests/eest/eest_engine_test.nim new file mode 100644 index 0000000000..e5d838cfed --- /dev/null +++ b/tests/eest/eest_engine_test.nim @@ -0,0 +1,37 @@ +# Nimbus +# Copyright (c) 2025 Status Research & Development GmbH +# Licensed under either of +# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +# * MIT license ([LICENSE-MIT](LICENSE-MIT)) +# at your option. +# This file may not be copied, modified, or distributed except according to +# those terms. + +{.push raises: [].} + +import + std/[os, osproc], + unittest2, + ./eest_helpers, + ./eest_engine + +const + baseFolder = "tests/fixtures" + eestType = "engine_tests" + eestReleases = [ + "eest_develop", + "eest_static", + "eest_stable", + "eest_devnet" + ] + +const skipFiles = [ + "CALLBlake2f_MaxRounds.json", # Doesn't work in github CI +] + +runEESTSuite( + eestReleases, + skipFiles, + baseFolder, + eestType +) \ No newline at end of file diff --git a/tests/eest/eest_helpers.nim b/tests/eest/eest_helpers.nim new file mode 100644 index 0000000000..6cc0df77a7 --- /dev/null +++ b/tests/eest/eest_helpers.nim @@ -0,0 +1,313 @@ +# Nimbus +# Copyright (c) 2025 Status Research & Development GmbH +# Licensed under either of +# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +# * MIT license ([LICENSE-MIT](LICENSE-MIT)) +# at your option. +# This file may not be copied, modified, or distributed except according to +# those terms. + +{.push raises: [].} + +import + std/[json, strutils], + eth/common/headers_rlp, + web3/eth_api_types, + web3/engine_api_types, + web3/primitives, + web3/conversions, + web3/execution_types, + json_rpc/rpcclient, + json_rpc/rpcserver, + ./chain_config_wrapper, + ../../execution_chain/rpc, + ../../execution_chain/common/hardforks, + ../../execution_chain/db/ledger, + ../../execution_chain/core/chain/forked_chain, + ../../execution_chain/core/tx_pool, + ../../execution_chain/beacon/beacon_engine, + ../../execution_chain/common/common, + ../../hive_integration/nodocker/engine/engine_client + +import ../../tools/common/helpers as chp except HardFork +import ../../tools/evmstate/helpers except HardFork + +# Common Type Definitions +type + GenesisHeader* = object + parentHash: Hash32 + uncleHash: Hash32 + coinbase: Address + stateRoot*: Hash32 + transactionsTrie: Hash32 + receiptTrie: Hash32 + bloom: Bytes256 + difficulty: UInt256 + number: Quantity + gasLimit: Quantity + gasUsed: Quantity + timestamp: Quantity + extraData: HistoricExtraData + mixHash: Bytes32 + nonce: Bytes8 + baseFeePerGas: Opt[UInt256] + withdrawalsRoot: Opt[Hash32] + blobGasUsed: Opt[Quantity] + excessBlobGas: Opt[Quantity] + parentBeaconBlockRoot: Opt[Hash32] + requestsHash: Opt[Hash32] + hash*: Hash32 + + BlockDesc* = object + blk*: EthBlock + badBlock*: bool + + Numero* = distinct uint64 + + PayloadParam* = object + payload*: ExecutionPayload + versionedHashes*: Opt[seq[Hash32]] + parentBeaconBlockRoot*: Opt[Hash32] + excutionRequests*: Opt[seq[seq[byte]]] + + PayloadItem* = object + params*: PayloadParam + newPayloadVersion*: Numero + forkchoiceUpdatedVersion*: Numero + + EnvConfig* = object + network*: string + chainid*: UInt256 + blobSchedule*: array[HardFork.Cancun .. HardFork.high, Opt[BlobSchedule]] + + UnitEnv* = object of RootObj + network*: string + genesisBlockHeader*: GenesisHeader + pre*: JsonNode + postState*: JsonNode + lastblockhash*: Hash32 + config*: EnvConfig + + TestEnv* = ref object + chain*: ForkedChainRef + server*: Opt[RpcHttpServer] + client*: Opt[RpcHttpClient] + + ## Blockchain Test Types + BlockchainUnitEnv* = object of UnitEnv + blocks*: JsonNode + + BlockchainUnitDesc* = object + name*: string + unit*: BlockchainUnitEnv + + BlockchainFixture* = object + units*: seq[BlockchainUnitDesc] + + ## Engine Test Types + EngineUnitEnv* = object of UnitEnv + engineNewPayloads*: seq[PayloadItem] + + EngineUnitDesc* = object + name*: string + unit*: EngineUnitEnv + + EngineFixture* = object + units*: seq[EngineUnitDesc] + +GenesisHeader.useDefaultReaderIn JrpcConv +PayloadItem.useDefaultReaderIn JrpcConv +EngineUnitEnv.useDefaultReaderIn JrpcConv +BlockchainUnitEnv.useDefaultReaderIn JrpcConv +EnvConfig.useDefaultReaderIn JrpcConv +BlobSchedule.useDefaultReaderIn JrpcConv + +template wrapValueError(body: untyped) = + try: + body + except ValueError as exc: + r.raiseUnexpectedValue(exc.msg) + +proc readValue*( + r: var JsonReader[JrpcConv], val: var Numero +) {.gcsafe, raises: [IOError, SerializationError].} = + wrapValueError: + val = fromHex[uint64](r.readValue(string)).Numero + +proc readValue*( + r: var JsonReader[JrpcConv], + value: var array[HardFork.Cancun .. HardFork.high, Opt[BlobSchedule]], +) {.gcsafe, raises: [SerializationError, IOError].} = + wrapValueError: + for key in r.readObjectFields: + blobScheduleParser(r, key, value) + +proc readValue*( + r: var JsonReader[JrpcConv], val: var PayloadParam +) {.gcsafe, raises: [IOError, SerializationError].} = + wrapValueError: + r.parseArray(i): + case i + of 0: + r.readValue(val.payload) + of 1: + r.readValue(val.versionedHashes) + of 2: + r.readValue(val.parentBeaconBlockRoot) + of 3: + r.readValue(val.excutionRequests) + else: + r.raiseUnexpectedValue("Unexpected element") + +proc readValue*( + r: var JsonReader[JrpcConv], val: var EngineFixture +) {.gcsafe, raises: [IOError, SerializationError].} = + wrapValueError: + parseObject(r, key): + val.units.add EngineUnitDesc(name: key, unit: r.readValue(EngineUnitEnv)) + +proc readValue*( + r: var JsonReader[JrpcConv], val: var BlockchainFixture +) {.gcsafe, raises: [IOError, SerializationError].} = + wrapValueError: + parseObject(r, key): + val.units.add BlockchainUnitDesc(name: key, unit: r.readValue(BlockchainUnitEnv)) + +func to*(x: Opt[Quantity], _: type Opt[uint64]): Opt[uint64] = + if x.isSome: + Opt.some(x.value.uint64) + else: + Opt.none(uint64) + +func to*(g: GenesisHeader, _: type Header): Header = + Header( + parentHash: g.parentHash, + ommersHash: g.uncleHash, + coinbase: g.coinbase, + stateRoot: g.stateRoot, + transactionsRoot: g.transactionsTrie, + receiptsRoot: g.receiptTrie, + logsBloom: g.bloom, + difficulty: g.difficulty, + number: g.number.uint64, + gasLimit: g.gasLimit.GasInt, + gasUsed: g.gasUsed.GasInt, + timestamp: g.timestamp.EthTime, + extraData: g.extraData.data, + mixHash: g.mixHash, + nonce: g.nonce, + baseFeePerGas: g.baseFeePerGas, + withdrawalsRoot: g.withdrawalsRoot, + blobGasUsed: g.blobGasUsed.to(Opt[uint64]), + excessBlobGas: g.excessBlobGas.to(Opt[uint64]), + parentBeaconBlockRoot: g.parentBeaconBlockRoot, + requestsHash: g.requestsHash, + ) + +proc setupClient*(port: Port): RpcHttpClient = + try: + let client = newRpcHttpClient() + waitFor client.connect("127.0.0.1", port, false) + return client + except CatchableError as exc: + debugEcho "CONNECT ERROR: ", exc.msg + quit(QuitFailure) + +proc prepareEnv*(unit: UnitEnv, genesis: Header, rpcEnabled: bool = false): TestEnv = + try: + let + memDB = newCoreDbRef DefaultDbMemory + ledger = LedgerRef.init(memDB.baseTxFrame()) + config = getChainConfig(unit.network) + + config.chainId = unit.config.chainid + config.blobSchedule = unit.config.blobSchedule + + setupLedger(unit.pre, ledger) + ledger.persist() + + ledger.txFrame.persistHeaderAndSetHead(genesis).isOkOr: + debugEcho "Failed to put genesis header into database: ", error + return + + var testEnv = TestEnv() + + let + com = CommonRef.new(memDB, nil, config) + chain = ForkedChainRef.init(com, enableQueue = true, persistBatchSize = 0) + + testEnv.chain = chain + testEnv.client = Opt.none(RpcHttpClient) + testEnv.server = Opt.none(RpcHttpServer) + + if rpcEnabled: + let + txPool = TxPoolRef.new(chain) + server = newRpcHttpServerWithParams("127.0.0.1:7717").valueOr: + echo "Failed to create rpc server: ", error + quit(QuitFailure) + beaconEngine = BeaconEngineRef.new(txPool) + serverApi = newServerAPI(txPool) + + setupServerAPI(serverApi, server, newEthContext()) + setupEngineAPI(beaconEngine, server) + + server.start() + + let client = setupClient(server.localAddress[0].port) + + testEnv.client = Opt.some(client) + testEnv.server = Opt.some(server) + + return testEnv + except ValueError as exc: + debugEcho "Prepare env error: ", exc.msg + quit(QuitFailure) + +proc close*(env: TestEnv) = + try: + if env.client.isSome: + waitFor env.client.get().close() + if env.server.isSome: + waitFor env.server.get().closeWait() + waitFor env.chain.stopProcessingQueue() + except CatchableError as exc: + debugEcho "Close error: ", exc.msg + quit(QuitFailure) + +template parseAnyFixture(fileName: string, T: typedesc) = + try: + result = JrpcConv.loadFile(fileName, T) + except JsonReaderError as exc: + debugEcho exc.formatMsg(fileName) + quit(QuitFailure) + except IOError as exc: + debugEcho "IO ERROR: ", exc.msg + quit(QuitFailure) + except SerializationError as exc: + debugEcho "Serialization error: ", exc.msg + quit(QuitFailure) + +proc parseFixture*(fileName: string, _: type EngineFixture): EngineFixture = + parseAnyFixture(fileName, EngineFixture) + +proc parseFixture*(fileName: string, _: type BlockchainFixture): BlockchainFixture = + parseAnyFixture(fileName, BlockchainFixture) + +template runEESTSuite*( + eestReleases: openArray[string], + skipFiles: openArray[string], + baseFolder: string, + eestType: string, +) = + for eest in eestReleases: + suite eest & ": " & eestType: + for fileName in walkDirRec(baseFolder / eest / eestType): + let last = fileName.splitPath().tail + if last in skipFiles: + continue + test last: + let res = processFile(fileName) + if not res: + debugEcho fileName.splitPath().tail + check res diff --git a/tests/eest_engine/eest_engine.nim b/tests/eest_engine/eest_engine.nim deleted file mode 100644 index 565e9d6dea..0000000000 --- a/tests/eest_engine/eest_engine.nim +++ /dev/null @@ -1,322 +0,0 @@ -# Nimbus -# Copyright (c) 2025 Status Research & Development GmbH -# Licensed under either of -# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) -# * MIT license ([LICENSE-MIT](LICENSE-MIT)) -# at your option. -# This file may not be copied, modified, or distributed except according to -# those terms. - -{.push raises: [].} - -import - std/[json, strutils, cmdline], - eth/common/headers_rlp, - web3/eth_api_types, - web3/engine_api_types, - web3/primitives, - web3/conversions, - web3/execution_types, - json_rpc/rpcclient, - json_rpc/rpcserver, - ./chain_config_wrapper, - ../../execution_chain/rpc, - ../../execution_chain/common/hardforks, - ../../execution_chain/db/ledger, - ../../execution_chain/core/chain/forked_chain, - ../../execution_chain/core/tx_pool, - ../../execution_chain/beacon/beacon_engine, - ../../execution_chain/common/common, - ../../hive_integration/nodocker/engine/engine_client - -import ../../tools/common/helpers as chp except HardFork -import ../../tools/evmstate/helpers except HardFork - -type - GenesisHeader = object - parentHash: Hash32 - uncleHash: Hash32 - coinbase: Address - stateRoot: Hash32 - transactionsTrie: Hash32 - receiptTrie: Hash32 - bloom: Bytes256 - difficulty: UInt256 - number: Quantity - gasLimit: Quantity - gasUsed: Quantity - timestamp: Quantity - extraData: HistoricExtraData - mixHash: Bytes32 - nonce: Bytes8 - baseFeePerGas: Opt[UInt256] - withdrawalsRoot: Opt[Hash32] - blobGasUsed: Opt[Quantity] - excessBlobGas: Opt[Quantity] - parentBeaconBlockRoot: Opt[Hash32] - requestsHash: Opt[Hash32] - hash: Hash32 - - Numero = distinct uint64 - - PayloadParam = object - payload: ExecutionPayload - versionedHashes: Opt[seq[Hash32]] - parentBeaconBlockRoot: Opt[Hash32] - excutionRequests: Opt[seq[seq[byte]]] - - PayloadItem = object - params: PayloadParam - newPayloadVersion: Numero - forkchoiceUpdatedVersion: Numero - - EnvConfig = object - network: string - chainid: UInt256 - blobSchedule: array[HardFork.Cancun..HardFork.high, Opt[BlobSchedule]] - - UnitEnv = object - network: string - genesisBlockHeader: GenesisHeader - pre: JsonNode - postState: JsonNode - lastblockhash: Hash32 - config: EnvConfig - engineNewPayloads: seq[PayloadItem] - - UnitDesc = object - name: string - unit: UnitEnv - - Fixture = object - units: seq[UnitDesc] - - TestEnv = ref object - chain : ForkedChainRef - server: RpcHttpServer - client: RpcHttpClient - -GenesisHeader.useDefaultReaderIn JrpcConv -PayloadItem.useDefaultReaderIn JrpcConv -UnitEnv.useDefaultReaderIn JrpcConv -EnvConfig.useDefaultReaderIn JrpcConv -BlobSchedule.useDefaultReaderIn JrpcConv - -template wrapValueError(body: untyped) = - try: - body - except ValueError as exc: - r.raiseUnexpectedValue(exc.msg) - -proc readValue*(r: var JsonReader[JrpcConv], val: var Numero) - {.gcsafe, raises: [IOError, SerializationError].} = - wrapValueError: - val = fromHex[uint64](r.readValue(string)).Numero - -proc readValue*(r: var JsonReader[JrpcConv], value: var array[HardFork.Cancun..HardFork.high, Opt[BlobSchedule]]) - {.gcsafe, raises: [SerializationError, IOError].} = - wrapValueError: - for key in r.readObjectFields: - blobScheduleParser(r, key, value) - -proc readValue*(r: var JsonReader[JrpcConv], val: var PayloadParam) - {.gcsafe, raises: [IOError, SerializationError].} = - wrapValueError: - r.parseArray(i): - case i - of 0: r.readValue(val.payload) - of 1: r.readValue(val.versionedHashes) - of 2: r.readValue(val.parentBeaconBlockRoot) - of 3: r.readValue(val.excutionRequests) - else: - r.raiseUnexpectedValue("Unexpected element") - -proc readValue*(r: var JsonReader[JrpcConv], val: var Fixture) - {.gcsafe, raises: [IOError, SerializationError].} = - wrapValueError: - parseObject(r, key): - val.units.add UnitDesc( - name: key, - unit: r.readValue(UnitEnv) - ) - -func to(x: Opt[Quantity], _: type Opt[uint64]): Opt[uint64] = - if x.isSome: - Opt.some(x.value.uint64) - else: - Opt.none(uint64) - -func to(g: GenesisHeader, _: type Header): Header = - Header( - parentHash: g.parentHash, - ommersHash: g.uncleHash, - coinbase: g.coinbase, - stateRoot: g.stateRoot, - transactionsRoot: g.transactionsTrie, - receiptsRoot: g.receiptTrie, - logsBloom: g.bloom, - difficulty: g.difficulty, - number: g.number.uint64, - gasLimit: g.gasLimit.GasInt, - gasUsed: g.gasUsed.GasInt, - timestamp: g.timestamp.EthTime, - extraData: g.extraData.data, - mixHash: g.mixHash, - nonce: g.nonce, - baseFeePerGas: g.baseFeePerGas, - withdrawalsRoot: g.withdrawalsRoot, - blobGasUsed: g.blobGasUsed.to(Opt[uint64]), - excessBlobGas: g.excessBlobGas.to(Opt[uint64]), - parentBeaconBlockRoot: g.parentBeaconBlockRoot, - requestsHash: g.requestsHash - ) - -proc setupClient(port: Port): RpcHttpClient = - try: - let client = newRpcHttpClient() - waitFor client.connect("127.0.0.1", port, false) - return client - except CatchableError as exc: - debugEcho "CONNECT ERROR: ", exc.msg - quit(QuitFailure) - -proc prepareEnv(unit: UnitEnv, genesis: Header): TestEnv = - try: - let - memDB = newCoreDbRef DefaultDbMemory - ledger = LedgerRef.init(memDB.baseTxFrame()) - config = getChainConfig(unit.network) - - config.chainId = unit.config.chainid - config.blobSchedule = unit.config.blobSchedule - - setupLedger(unit.pre, ledger) - ledger.persist() - - ledger.txFrame.persistHeaderAndSetHead(genesis).isOkOr: - debugEcho "Failed to put genesis header into database: ", error - return - - let - com = CommonRef.new(memDB, nil, config) - chain = ForkedChainRef.init(com, enableQueue = true) - txPool = TxPoolRef.new(chain) - server = newRpcHttpServerWithParams("127.0.0.1:7717").valueOr: - echo "Failed to create rpc server: ", error - quit(QuitFailure) - beaconEngine = BeaconEngineRef.new(txPool) - serverApi = newServerAPI(txPool) - - setupServerAPI(serverApi, server, newEthContext()) - setupEngineAPI(beaconEngine, server) - - server.start() - - let - client = setupClient(server.localAddress[0].port) - - return TestEnv( - server: server, - client: client, - chain : chain - ) - except ValueError as exc: - debugEcho "Prepare env error: ", exc.msg - quit(QuitFailure) - -proc close(env: TestEnv) = - try: - waitFor env.client.close() - waitFor env.server.closeWait() - waitFor env.chain.stopProcessingQueue() - except CatchableError as exc: - debugEcho "Close error: ", exc.msg - quit(QuitFailure) - -proc parseFixture(fileName: string): Fixture = - try: - result = JrpcConv.loadFile(fileName, Fixture) - except JsonReaderError as exc: - debugEcho exc.formatMsg(fileName) - quit(QuitFailure) - except IOError as exc: - debugEcho "IO ERROR: ", exc.msg - quit(QuitFailure) - except SerializationError as exc: - debugEcho "Serialization error: ", exc.msg - quit(QuitFailure) - -proc sendNewPayload(env: TestEnv, version: uint64, param: PayloadParam): Result[PayloadStatusV1, string] = - if version == 3: - env.client.newPayloadV3( - param.payload, - param.versionedHashes, - param.parentBeaconBlockRoot) - elif version == 4: - env.client.newPayloadV4( - param.payload, - param.versionedHashes, - param.parentBeaconBlockRoot, - param.excutionRequests) - else: - err("Unsupported NewPayload version: " & $version) - -proc sendFCU(env: TestEnv, version: uint64, param: PayloadParam): Result[ForkchoiceUpdatedResponse, string] = - let update = ForkchoiceStateV1( - headblockHash: param.payload.blockHash, - finalizedblockHash: param.payload.blockHash - ) - - if version == 3: - env.client.forkchoiceUpdatedV3(update) - else: - err("Unsupported FCU version: " & $version) - -proc runTest(env: TestEnv, unit: UnitEnv): Result[void, string] = - for enp in unit.engineNewPayloads: - var status = env.sendNewPayload(enp.newPayloadVersion.uint64, enp.params).valueOr: - return err(error) - - discard status - when false: - # Skip validation error check, use `unit.lastblockhash` to - # determine if the test is pass. - if status.validationError.isSome: - return err(status.validationError.value) - - let y = env.sendFCU(enp.forkchoiceUpdatedVersion.uint64, enp.params).valueOr: - return err(error) - - discard y - when false: - # ditto - status = y.payloadStatus - if status.validationError.isSome: - return err(status.validationError.value) - - let header = env.client.latestHeader().valueOr: - return err(error) - - if unit.lastblockhash != header.computeRlpHash: - return err("last block hash mismatch") - - ok() - -proc processFile(fileName: string) = - let - fixture = parseFixture(fileName) - - for unit in fixture.units: - let header = unit.unit.genesisBlockHeader.to(Header) - doAssert(unit.unit.genesisBlockHeader.hash == header.computeRlpHash) - let env = prepareEnv(unit.unit, header) - env.runTest(unit.unit).isOkOr: - debugEcho "RunTest error: ", error - quit(QuitFailure) - env.close() - -if paramCount() == 0: - debugEcho "Usage: eest_engine vector.json" - quit(QuitFailure) - -processFile(paramStr(1)) diff --git a/tests/eest_engine/eest_engine_test.nim b/tests/eest_engine/eest_engine_test.nim deleted file mode 100644 index 4c7c44c836..0000000000 --- a/tests/eest_engine/eest_engine_test.nim +++ /dev/null @@ -1,43 +0,0 @@ -# Nimbus -# Copyright (c) 2025 Status Research & Development GmbH -# Licensed under either of -# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) -# * MIT license ([LICENSE-MIT](LICENSE-MIT)) -# at your option. -# This file may not be copied, modified, or distributed except according to -# those terms. - -{.push raises: [].} - -import - std/[os, osproc], - unittest2 - -const - baseFolder = "tests/fixtures/eest/engine_tests" - -proc runTest(appDir: string, spec: string): bool = - try: - let - cmd = appDir / "eest_engine " & spec - exitCode = execCmd(cmd) - - exitCode == QuitSuccess - except OSError as exc: - debugEcho "Something went wrong: ", exc.msg - false - -const skipFiles = [ - "CALLBlake2f_MaxRounds.json", - ] - -let appDir = getAppDir() -for fileName in walkDirRec(baseFolder): - let last = fileName.splitPath().tail - if last in skipFiles: - continue - test last: - let res = runTest(appDir, fileName) - if not res: - debugEcho fileName.splitPath().tail - check res diff --git a/tests/test_allowed_to_fail.nim b/tests/test_allowed_to_fail.nim index 6b6f3316ed..86d32b6b2f 100644 --- a/tests/test_allowed_to_fail.nim +++ b/tests/test_allowed_to_fail.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2018-2024 Status Research & Development GmbH +# Copyright (c) 2018-2025 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) # * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) @@ -12,120 +12,5 @@ # table once, but notion's that it should shrink reasonable quickly and disappear, # being mostly used for short-term regression prevention. -import strutils - -func slowGSTTests(folder: string, name: string): bool = - result = folder == "stQuadraticComplexityTest" or - name in @["randomStatetest352.json", "randomStatetest1.json", - "randomStatetest32.json", "randomStatetest347.json", - "randomStatetest393.json", "randomStatetest626.json", - "CALLCODE_Bounds.json", "DELEGATECALL_Bounds3.json", - "CALLCODE_Bounds4.json", "CALL_Bounds.json", - "DELEGATECALL_Bounds2.json", "CALL_Bounds3.json", - "CALLCODE_Bounds2.json", "CALLCODE_Bounds3.json", - "DELEGATECALL_Bounds.json", "CALL_Bounds2a.json", - "CALL_Bounds2.json", - "CallToNameRegistratorMemOOGAndInsufficientBalance.json", - "CallToNameRegistratorTooMuchMemory0.json", - - # all these tests below actually pass - # but they are very slow - - # constantinople slow tests - "Create2Recursive.json", - - # byzantium slow tests - "LoopCallsDepthThenRevert3.json", - "LoopCallsDepthThenRevert2.json", - "LoopCallsDepthThenRevert.json", - "static_Call50000.json", - "static_Call50000_ecrec.json", - "static_Call50000_identity.json", - "static_Call50000_identity2.json", - "static_Call50000_rip160.json", - "static_Call50000_sha256.json", - "LoopCallsThenRevert.json", - "LoopDelegateCallsDepthThenRevert.json", - "recursiveCreateReturnValue.json", - "static_Call1024PreCalls2.json", - "Callcode1024BalanceTooLow.json", - "static_Call1024BalanceTooLow.json", - "static_Call1024BalanceTooLow2.json", - "static_Call1024OOG.json", - "static_Call1024PreCalls3.json", - "static_Call1024PreCalls.json", - "static_Call1MB1024Calldepth.json", - - # Homestead recursives - "ContractCreationSpam.json", - "Call1024OOG.json", - "Call1024PreCalls.json", - "CallRecursiveBombPreCall.json", - "Delegatecall1024.json", - "Delegatecall1024OOG.json", - "JUMPDEST_Attack.json", - "JUMPDEST_AttackwithJump.json", - "ABAcalls1.json", - "ABAcalls2.json", - "CallRecursiveBomb0.json", - "CallRecursiveBomb0_OOG_atMaxCallDepth.json", - "CallRecursiveBomb1.json", - "CallRecursiveBomb2.json", - "CallRecursiveBombLog.json", - "CallRecursiveBombLog2.json", - "Call1024BalanceTooLow.json", - - # Frontier recursives - "Callcode1024OOG.json", - "callcallcodecall_ABCB_RECURSIVE.json", - "callcallcodecallcode_ABCB_RECURSIVE.json", - "callcodecallcall_ABCB_RECURSIVE.json", - "callcodecallcallcode_ABCB_RECURSIVE.json", - "callcodecallcodecall_ABCB_RECURSIVE.json", - "callcodecallcodecallcode_ABCB_RECURSIVE.json", - "callcallcallcode_ABCB_RECURSIVE.json", - - # Istanbul slow tests - "CALLBlake2f_MaxRounds.json", - "loopMul.json", - "loopExp.json", - - ] - -func skipGSTTests*(folder: string, name: string): bool = - # we skip tests that are slow or expected to fail for now - if slowGSTTests(folder, name): - return true - -func skipNewGSTTests*(folder: string, name: string): bool = - # share the same slow and failing tests - if skipGSTTests(folder, name): - return true - -func skipVMTests*(folder: string, name: string): bool = - result = (folder == "vmPerformance" and "loop" in name) - -func skipBCTests*(folder: string, name: string): bool = - name in @[ - # BlockChain slow tests - "SuicideIssue.json", - - # BC huge memory consumption - "randomStatetest94.json", - "DelegateCallSpam.json", - ] - -func skipNewBCTests*(folder: string, name: string): bool = - if folder in ["vmPerformance"]: - return true - - # the new BC tests also contains these slow tests - # for Istanbul fork - if slowGSTTests(folder, name): - return true - - name in @[ - # BC huge memory consumption - "randomStatetest94.json", - "DelegateCallSpam.json", - ] +func slowGSTTests*(folder: string, name: string): bool = + result = folder == "stTimeConsuming" diff --git a/tests/test_blockchain_json.nim b/tests/test_blockchain_json.nim deleted file mode 100644 index 2806ea37b4..0000000000 --- a/tests/test_blockchain_json.nim +++ /dev/null @@ -1,139 +0,0 @@ -# Nimbus -# Copyright (c) 2018-2025 Status Research & Development GmbH -# Licensed under either of -# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or -# http://www.apache.org/licenses/LICENSE-2.0) -# * MIT license ([LICENSE-MIT](LICENSE-MIT) or -# http://opensource.org/licenses/MIT) -# at your option. This file may not be copied, modified, or distributed except -# according to those terms. - -import - std/json, - unittest2, - stew/byteutils, - chronos, - ./test_helpers, - ./test_allowed_to_fail, - ../execution_chain/db/ledger, - ../execution_chain/core/chain/forked_chain, - ../tools/common/helpers as chp, - ../tools/evmstate/helpers, - ../execution_chain/common/common - -const - debugMode = false - -type - BlockDesc = object - blk: EthBlock - badBlock: bool - - TestEnv = object - blocks: seq[BlockDesc] - genesisHeader: Header - lastBlockHash: Hash32 - network: string - pre: JsonNode - -proc parseBlocks(node: JsonNode): seq[BlockDesc] = - for x in node: - try: - let blockRLP = hexToSeqByte(x["rlp"].getStr) - let blk = rlp.decode(blockRLP, EthBlock) - result.add BlockDesc( - blk: blk, - badBlock: "expectException" in x, - ) - except RlpError: - # invalid rlp will not participate in block validation - # e.g. invalid rlp received from network - discard - -proc parseEnv(node: JsonNode): TestEnv = - result.blocks = parseBlocks(node["blocks"]) - let genesisRLP = hexToSeqByte(node["genesisRLP"].getStr) - result.genesisHeader = rlp.decode(genesisRLP, EthBlock).header - result.lastBlockHash = Hash32(hexToByteArray[32](node["lastblockhash"].getStr)) - result.network = node["network"].getStr - result.pre = node["pre"] - -proc rootExists(db: CoreDbTxRef; root: Hash32): bool = - let state = db.getStateRoot().valueOr: - return false - state == root - -proc executeCase(node: JsonNode): Future[bool] {.async.} = - let - env = parseEnv(node) - memDB = newCoreDbRef DefaultDbMemory - ledger = LedgerRef.init(memDB.baseTxFrame()) - config = getChainConfig(env.network) - com = CommonRef.new(memDB, nil, config) - - setupLedger(env.pre, ledger) - ledger.persist() - - ledger.txFrame.persistHeaderAndSetHead(env.genesisHeader).isOkOr: - debugEcho "Failed to put genesis header into database: ", error - return false - - var c = ForkedChainRef.init(com, persistBatchSize = 0) - if c.latestHash != env.genesisHeader.computeBlockHash: - debugEcho "Genesis block hash in database is different with expected genesis block hash" - return false - - var lastStateRoot = env.genesisHeader.stateRoot - for blk in env.blocks: - let res = await c.importBlock(blk.blk) - if res.isOk: - if env.lastBlockHash == blk.blk.header.computeBlockHash: - lastStateRoot = blk.blk.header.stateRoot - if blk.badBlock: - debugEcho "A bug? bad block imported" - return false - else: - if not blk.badBlock: - debugEcho "A bug? good block rejected: ", res.error - return false - - (await c.forkChoice(env.lastBlockHash, env.lastBlockHash)).isOkOr: - debugEcho error - return false - - let headHash = c.latestHash - if headHash != env.lastBlockHash: - debugEcho "lastestBlockHash mismatch, get: ", headHash, - " expect: ", env.lastBlockHash - return false - - if not c.txFrame(headHash).rootExists(lastStateRoot): - debugEcho "Last stateRoot not exists" - return false - - true - -proc executeFile(node: JsonNode, testStatusIMPL: var TestStatus) = - for name, bctCase in node: - when debugMode: - debugEcho "TEST NAME: ", name - check (waitFor executeCase(bctCase)) - -proc blockchainJsonMain*() = - const - newFolder = "eest/blockchain_tests" - - suite "new block chain json tests": - jsonTest(newFolder, "BlockchainTests", executeFile, skipNewBCTests) - -when debugMode: - proc executeFile(name: string) = - var testStatusIMPL: TestStatus - let node = json.parseFile(name) - executeFile(node, testStatusIMPL) - if testStatusIMPL == FAILED: - quit(QuitFailure) - - executeFile("tests/fixtures/eest/blockchain_tests/stBugs/staticcall_createfails.json") -else: - blockchainJsonMain() diff --git a/tests/test_generalstate_json.nim b/tests/test_generalstate_json.nim index cb6f12884c..9b659b8971 100644 --- a/tests/test_generalstate_json.nim +++ b/tests/test_generalstate_json.nim @@ -197,19 +197,29 @@ proc testFixture(fixtures: JsonNode, testStatusIMPL: var TestStatus, proc generalStateJsonMain*(debugMode = false) = const - newFolder = "eest/state_tests" + newFolder = "eest_static/state_tests" let config = getConfiguration() if config.testSubject == "" or not debugMode: # run all test fixtures - suite "new generalstate json tests": - jsonTest(newFolder, "GeneralStateTests", testFixture, skipNewGSTTests) + suite "new generalstate json tests: eest_static": + jsonTest(newFolder, "GeneralStateTestsStatic", testFixture, slowGSTTests) + + suite "new generalstate json tests: eest_stable": + jsonTest("eest_stable/state_tests", "GeneralStateTestsStable", testFixture) + + suite "new generalstate json tests: eest_develop": + jsonTest("eest_develop/state_tests", "GeneralStateTestsDevelop", testFixture) + + suite "new generalstate json tests: eest_devnet": + jsonTest("eest_devnet/state_tests", "GeneralStateTestsDevnet", testFixture) + else: # execute single test in debug mode if config.testSubject.len == 0: echo "missing test subject" quit(QuitFailure) - + let path = "tests" / "fixtures" / newFolder let n = json.parseFile(path / config.testSubject) var testStatusIMPL: TestStatus diff --git a/tools/common/helpers.nim b/tools/common/helpers.nim index 28f5be689d..c253b3be95 100644 --- a/tools/common/helpers.nim +++ b/tools/common/helpers.nim @@ -133,6 +133,28 @@ func getChainConfig*(network: string, c: ChainConfig) = c.assignTime(HardFork.Prague, EthTime(15000)) of $TestFork.Osaka: c.assignTime(HardFork.Osaka, TimeZero) + of $TestFork.PragueToOsakaAtTime15k: + c.assignTime(HardFork.Osaka, EthTime(15000)) + of $TestFork.BPO1: + c.assignTime(HardFork.Bpo1, TimeZero) + of $TestFork.OsakaToBPO1AtTime15k: + c.assignTime(HardFork.Bpo1, EthTime(15000)) + of $TestFork.BPO2: + c.assignTime(HardFork.Bpo2, TimeZero) + of $TestFork.BPO1ToBPO2AtTime15k: + c.assignTime(HardFork.Bpo2, EthTime(15000)) + of $TestFork.BPO3: + c.assignTime(HardFork.Bpo3, TimeZero) + of $TestFork.BPO2ToBPO3AtTime15k: + c.assignTime(HardFork.Bpo3, EthTime(15000)) + of $TestFork.BPO4: + c.assignTime(HardFork.Bpo4, TimeZero) + of $TestFork.BPO3ToBPO4AtTime15k: + c.assignTime(HardFork.Bpo4, EthTime(15000)) + of $TestFork.BPO5: + c.assignTime(HardFork.Bpo5, TimeZero) + of $TestFork.BPO4ToBPO5AtTime15k: + c.assignTime(HardFork.Bpo5, EthTime(15000)) else: raise newException(ValueError, "unsupported network " & network) diff --git a/tools/common/types.nim b/tools/common/types.nim index 2231083113..1b4f9e0b23 100644 --- a/tools/common/types.nim +++ b/tools/common/types.nim @@ -40,6 +40,17 @@ type Prague CancunToPragueAtTime15k Osaka + PragueToOsakaAtTime15k + BPO1 + OsakaToBPO1AtTime15k + BPO2 + BPO1ToBPO2AtTime15k + BPO3 + BPO2ToBPO3AtTime15k + BPO4 + BPO3ToBPO4AtTime15k + BPO5 + BPO4ToBPO5AtTime15k LogLevel* = enum Silent diff --git a/tools/evmstate/evmstate_test.nim b/tools/evmstate/evmstate_test.nim index a0557b7d1d..0007eb6c8e 100644 --- a/tools/evmstate/evmstate_test.nim +++ b/tools/evmstate/evmstate_test.nim @@ -35,7 +35,7 @@ proc runTest(filename: string): bool = true template skipTest(folder, name: untyped): bool = - skipNewGSTTests(folder, name) + slowGSTTests(folder, name) proc collectFileNames(inputPath: string, map: var StatusMap, fileNames: var seq[TestFile]) = for fileName in walkDirRec(inputPath):