Skip to content

Commit

Permalink
Ignore failing tests from bad gas limit config
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Jul 16, 2023
1 parent 6db44f7 commit 280b23b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion evm_test_runner/src/persistent_run_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ impl From<Vec<SerializableRunEntry>> for TestRunEntries {
#[derive(Copy, Clone, Debug, Deserialize, Default, Serialize)]
pub(crate) enum PassState {
Passed,
Ignored,
Failed,
#[default]
NotRun,
Expand All @@ -100,7 +101,8 @@ impl From<TestStatus> 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,
}
Expand Down
13 changes: 13 additions & 0 deletions evm_test_runner/src/plonky2_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ impl TestProgressIndicator for FancyProgressIndicator {
#[derive(Clone, Debug)]
pub(crate) enum TestStatus {
Passed,
Ignored,
EvmErr(String),
IncorrectAccountFinalState(TrieFinalStateDiff),
TimedOut,
Expand All @@ -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)
Expand Down Expand Up @@ -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::<u32>()
.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::<GoldilocksField, KeccakGoldilocksConfig, 2>(
Expand Down

0 comments on commit 280b23b

Please sign in to comment.