Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to branch v0.13, and fix chunk prove test #343

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 88 additions & 67 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ serde_json = "1.0"
tokio = { version = "1.32", features = ["full"] }

halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v1.1" }
prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "develop", default-features = false, features = ["parallel_syn", "scroll"] }
prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "v0.13", default-features = false, features = ["parallel_syn", "scroll"] }
integration = { path = "integration" }

[patch.crates-io]
Expand Down
10 changes: 8 additions & 2 deletions integration/src/prove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,23 @@ pub fn prove_and_verify_chunk(
let mut prover = ChunkProver::from_params_and_assets(params_map, assets_path);
log::info!("Constructed chunk prover");

let chunk_identifier =
chunk_identifier.map_or_else(|| chunk.identifier(), |name| name.to_string());

let now = Instant::now();
let chunk_proof = prover
.gen_chunk_proof(chunk, chunk_identifier, None, Some(output_dir))
.gen_chunk_proof(chunk, Some(&chunk_identifier), None, Some(output_dir))
.expect("cannot generate chunk snark");
log::info!(
"finish generating chunk snark, elapsed: {:?}",
now.elapsed()
);

// output_dir is used to load chunk vk
env::set_var("CHUNK_VK_FILENAME", "vk_chunk_0.vkey");
env::set_var(
"CHUNK_VK_FILENAME",
&format!("vk_chunk_{chunk_identifier}.vkey"),
);
let verifier = new_chunk_verifier(params_map, output_dir);
assert!(verifier.verify_snark(chunk_proof.to_snark()));
log::info!("Verified chunk proof");
Expand Down
Loading