Skip to content

Commit f6cf872

Browse files
authored
feat: bump eof validation tests (#1963)
1 parent 12a790f commit f6cf872

File tree

631 files changed

+24130
-144212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

631 files changed

+24130
-144212
lines changed

.github/workflows/ethereum-tests.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ jobs:
5252
tests/eof_suite/eest/state_tests \
5353
tests/eof_suite/evmone/state_tests \
5454
# tests/prague_suite/state_tests
55-
# - name: Run EOF validation tests
56-
# run: |
57-
# cross run --target ${{matrix.target}} --profile ${{ matrix.profile }} -p revme -- eof-validation \
58-
# ethtests/EOFTests \
59-
# tests/eof_suite/eest/eof_tests/prague \
60-
# tests/eof_suite/evmone/eof_tests
55+
- name: Run EOF validation tests
56+
run: |
57+
cross run --target ${{matrix.target}} --profile ${{ matrix.profile }} -p revme -- eof-validation \
58+
ethtests/EOFTests \
59+
tests/eof_suite/eest/eof_tests/prague
6160

bins/revme/src/cmd/eofvalidation.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod test_suite;
22

3-
pub use test_suite::{PragueTestResult, TestResult, TestSuite, TestUnit, TestVector};
3+
pub use test_suite::{TestResult, TestSuite, TestUnit, TestVector};
44

55
use crate::{cmd::Error, dir_utils::find_all_json_tests};
66
use clap::Parser;
@@ -81,14 +81,16 @@ pub fn run_test(path: &Path) -> Result<(), Error> {
8181
} else {
8282
Some(CodeType::ReturnOrStop)
8383
};
84+
let test_result = test_vector.results.get("Osaka");
8485
let res = validate_raw_eof_inner(test_vector.code.clone(), kind);
85-
if res.is_ok() != test_vector.results.prague.result {
86+
if test_result.map(|r| r.result).unwrap_or(res.is_ok()) != res.is_ok() {
8687
println!(
87-
"\nTest failed: {} - {}\nresult:{:?}\nrevm err_result:{:#?}\nbytes:{:?}\n",
88+
"\nTest failed: {} - {}\nresult:{:?}\nrevm err_result:{:#?}\nExpected exception:{:?}\nbytes:{:?}\n",
8889
name,
8990
vector_name,
90-
test_vector.results.prague,
91+
test_result.unwrap().result,
9192
res.as_ref().err(),
93+
test_result.unwrap().exception,
9294
test_vector.code
9395
);
9496
*types_of_error

bins/revme/src/cmd/eofvalidation/test_suite.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,7 @@ pub struct TestUnit {
1919
pub struct TestVector {
2020
pub code: Bytes,
2121
pub container_kind: Option<String>,
22-
pub results: PragueTestResult,
23-
}
24-
25-
#[derive(Debug, PartialEq, Eq, Deserialize)]
26-
#[serde(deny_unknown_fields)]
27-
pub struct PragueTestResult {
28-
#[serde(rename = "Prague")]
29-
pub prague: TestResult,
22+
pub results: BTreeMap<String, TestResult>,
3023
}
3124

3225
#[derive(Debug, PartialEq, Eq, Deserialize)]

bins/revme/src/cmd/statetest/runner.rs

-11
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,6 @@ fn skip_test(path: &Path) -> bool {
134134
| "static_Call50000_sha256.json"
135135
| "loopMul.json"
136136
| "CALLBlake2f_MaxRounds.json"
137-
138-
// `evmone` statetest
139-
| "initcode_transaction_before_prague.json"
140-
| "invalid_tx_non_existing_sender.json"
141-
| "tx_non_existing_sender.json"
142-
| "block_apply_withdrawal.json"
143-
| "block_apply_ommers_reward.json"
144-
| "known_block_hash.json"
145-
| "eip7516_blob_base_fee.json"
146-
| "create_tx_collision_storage.json"
147-
| "create_collision_storage.json"
148137
)
149138
}
150139

tests/eof_suite/eest/.meta/assets/style.css

-319
This file was deleted.

0 commit comments

Comments
 (0)