Skip to content

Commit

Permalink
feat: bump eof validation tests (#1963)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita authored Jan 3, 2025
1 parent 12a790f commit f6cf872
Show file tree
Hide file tree
Showing 631 changed files with 24,130 additions and 144,212 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ethereum-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ jobs:
tests/eof_suite/eest/state_tests \
tests/eof_suite/evmone/state_tests \
# tests/prague_suite/state_tests
# - name: Run EOF validation tests
# run: |
# cross run --target ${{matrix.target}} --profile ${{ matrix.profile }} -p revme -- eof-validation \
# ethtests/EOFTests \
# tests/eof_suite/eest/eof_tests/prague \
# tests/eof_suite/evmone/eof_tests
- name: Run EOF validation tests
run: |
cross run --target ${{matrix.target}} --profile ${{ matrix.profile }} -p revme -- eof-validation \
ethtests/EOFTests \
tests/eof_suite/eest/eof_tests/prague
10 changes: 6 additions & 4 deletions bins/revme/src/cmd/eofvalidation.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod test_suite;

pub use test_suite::{PragueTestResult, TestResult, TestSuite, TestUnit, TestVector};
pub use test_suite::{TestResult, TestSuite, TestUnit, TestVector};

use crate::{cmd::Error, dir_utils::find_all_json_tests};
use clap::Parser;
Expand Down Expand Up @@ -81,14 +81,16 @@ pub fn run_test(path: &Path) -> Result<(), Error> {
} else {
Some(CodeType::ReturnOrStop)
};
let test_result = test_vector.results.get("Osaka");
let res = validate_raw_eof_inner(test_vector.code.clone(), kind);
if res.is_ok() != test_vector.results.prague.result {
if test_result.map(|r| r.result).unwrap_or(res.is_ok()) != res.is_ok() {
println!(
"\nTest failed: {} - {}\nresult:{:?}\nrevm err_result:{:#?}\nbytes:{:?}\n",
"\nTest failed: {} - {}\nresult:{:?}\nrevm err_result:{:#?}\nExpected exception:{:?}\nbytes:{:?}\n",
name,
vector_name,
test_vector.results.prague,
test_result.unwrap().result,
res.as_ref().err(),
test_result.unwrap().exception,
test_vector.code
);
*types_of_error
Expand Down
9 changes: 1 addition & 8 deletions bins/revme/src/cmd/eofvalidation/test_suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@ pub struct TestUnit {
pub struct TestVector {
pub code: Bytes,
pub container_kind: Option<String>,
pub results: PragueTestResult,
}

#[derive(Debug, PartialEq, Eq, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct PragueTestResult {
#[serde(rename = "Prague")]
pub prague: TestResult,
pub results: BTreeMap<String, TestResult>,
}

#[derive(Debug, PartialEq, Eq, Deserialize)]
Expand Down
11 changes: 0 additions & 11 deletions bins/revme/src/cmd/statetest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,6 @@ fn skip_test(path: &Path) -> bool {
| "static_Call50000_sha256.json"
| "loopMul.json"
| "CALLBlake2f_MaxRounds.json"

// `evmone` statetest
| "initcode_transaction_before_prague.json"
| "invalid_tx_non_existing_sender.json"
| "tx_non_existing_sender.json"
| "block_apply_withdrawal.json"
| "block_apply_ommers_reward.json"
| "known_block_hash.json"
| "eip7516_blob_base_fee.json"
| "create_tx_collision_storage.json"
| "create_collision_storage.json"
)
}

Expand Down
319 changes: 0 additions & 319 deletions tests/eof_suite/eest/.meta/assets/style.css

This file was deleted.

Loading

0 comments on commit f6cf872

Please sign in to comment.