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

Commit

Permalink
Merge pull request 0xPolygonZero#59 from 0xPolygonZero/fast_witness
Browse files Browse the repository at this point in the history
Use faster witness-only testing method
  • Loading branch information
Nashtare authored Mar 1, 2024
2 parents 18e426d + ca069ae commit 916b682
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@ categories = ["cryptography"]
anyhow = { version = "1.0.71", features = ["backtrace"] }
clap = {version = "4.2.7", features = ["derive"] }
ethereum-types = "0.14.1"
mpt_trie = "0.1.0"
flexi_logger = { version = "0.25.4", features = ["async"] }
futures = "0.3.28"
keccak-hash = "0.10.0"
log = "0.4.17"
plonky2 = "0.2.0"
evm_arithmetization = "0.1.0"
serde = "1.0.163"
serde_cbor = "0.11.2"
tokio = { version = "1.28.1" }

# zk-evm dependencies
plonky2 = "0.2.0"
mpt_trie = "0.1.1"
evm_arithmetization = "0.1.1"

[profile.release]
opt-level = 3
lto = "fat"
Expand Down
11 changes: 4 additions & 7 deletions evm_test_runner/src/plonky2_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ use std::{
use common::types::TestVariantRunInfo;
use ethereum_types::U256;
use evm_arithmetization::{
generation::generate_traces, prover::prove, verifier::verify_proof, AllStark, StarkConfig,
prover::{prove, testing::simulate_execution},
verifier::verify_proof,
AllStark, StarkConfig,
};
use futures::executor::block_on;
use indicatif::{ProgressBar, ProgressStyle};
Expand Down Expand Up @@ -260,12 +262,7 @@ fn run_test_and_get_test_result(test: TestVariantRunInfo, witness_only: bool) ->

match witness_only {
true => {
let res = generate_traces::<GoldilocksField, 2>(
&AllStark::default(),
test.gen_inputs,
&StarkConfig::standard_fast_config(),
&mut TimingTree::default(),
);
let res = simulate_execution::<GoldilocksField>(test.gen_inputs);

if let Err(evm_err) = res {
return handle_evm_err(evm_err, false, "witness generation");
Expand Down
2 changes: 1 addition & 1 deletion evm_test_runner/src/report_generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl PassedInfo {
}
}

///
/// Print the test report to the terminal.
pub(crate) fn output_test_report_for_terminal(
res: &[TestGroupRunResults],
test_filter_str: Option<String>,
Expand Down

0 comments on commit 916b682

Please sign in to comment.