From 280b23b4f70f287e74954729528ffa1b6b24e047 Mon Sep 17 00:00:00 2001 From: Robin Salen Date: Sun, 16 Jul 2023 11:57:59 -0400 Subject: [PATCH] Ignore failing tests from bad gas limit config --- evm_test_runner/src/persistent_run_state.rs | 4 +++- evm_test_runner/src/plonky2_runner.rs | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/evm_test_runner/src/persistent_run_state.rs b/evm_test_runner/src/persistent_run_state.rs index 1af0e6b..1b52129 100644 --- a/evm_test_runner/src/persistent_run_state.rs +++ b/evm_test_runner/src/persistent_run_state.rs @@ -91,6 +91,7 @@ impl From> for TestRunEntries { #[derive(Copy, Clone, Debug, Deserialize, Default, Serialize)] pub(crate) enum PassState { Passed, + Ignored, Failed, #[default] NotRun, @@ -100,7 +101,8 @@ impl From for PassState { fn from(v: TestStatus) -> Self { match v { TestStatus::Passed => PassState::Passed, - TestStatus::EvmErr(_) + TestStatus::Ignored => PassState::Ignored, + TestStatus::EvmErr(s) | TestStatus::IncorrectAccountFinalState(_) | TestStatus::TimedOut => PassState::Failed, } diff --git a/evm_test_runner/src/plonky2_runner.rs b/evm_test_runner/src/plonky2_runner.rs index 71fe989..0070d9a 100644 --- a/evm_test_runner/src/plonky2_runner.rs +++ b/evm_test_runner/src/plonky2_runner.rs @@ -74,6 +74,7 @@ impl TestProgressIndicator for FancyProgressIndicator { #[derive(Clone, Debug)] pub(crate) enum TestStatus { Passed, + Ignored, EvmErr(String), IncorrectAccountFinalState(TrieFinalStateDiff), TimedOut, @@ -83,6 +84,7 @@ impl Display for TestStatus { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { TestStatus::Passed => write!(f, "Passed"), + TestStatus::Ignored => write!(f, "Ignored"), TestStatus::EvmErr(err) => write!(f, "Evm error: {}", err), TestStatus::IncorrectAccountFinalState(diff) => { write!(f, "Expected trie hash mismatch: {}", diff) @@ -294,6 +296,17 @@ fn run_test_or_fail_on_timeout( /// Run a test against `plonky2` and output a result based on what happens. fn run_test_and_get_test_result(test: TestVariantRunInfo) -> TestStatus { + if test + .gen_inputs + .block_metadata + .block_gaslimit + .try_into::() + .is_err() + { + // Gas limit of more than 32 bits is not supported by the zkEVM. + return TestStatus::Ignored; + } + let timing = TimingTree::new("prove", log::Level::Debug); let proof_run_res = prove_with_outputs::(