Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Remove false-positives
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Jul 25, 2023
1 parent f878759 commit 411e871
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions evm_test_runner/src/plonky2_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,25 +296,29 @@ 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 TryInto::<u32>::try_into(test.gen_inputs.block_metadata.block_gaslimit).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>(
&AllStark::default(),
&StarkConfig::standard_fast_config(),
test.gen_inputs,
test.gen_inputs.clone(),
&mut TimingTree::default(),
);

timing.filter(Duration::from_millis(100)).print();

let (proof_run_output, generation_outputs) = match proof_run_res {
Ok(v) => v,
Err(evm_err) => return TestStatus::EvmErr(evm_err.to_string()),
Err(evm_err) => {
if evm_err.to_string().contains("GasLimitError")
&& TryInto::<u32>::try_into(test.gen_inputs.block_metadata.block_gaslimit).is_err()
{
// Gas limit of more than 32 bits is not supported by the zkEVM.
return TestStatus::Ignored;
} else {
return TestStatus::EvmErr(evm_err.to_string());
};
}
};

let actual_state_trie_hash = proof_run_output.public_values.trie_roots_after.state_root;
Expand Down

0 comments on commit 411e871

Please sign in to comment.