Skip to content

Commit

Permalink
switch to branch v0.13, and fix chunk prove test (#343)
Browse files Browse the repository at this point in the history
* fix v0.13

* fix
  • Loading branch information
lispc authored Sep 23, 2024
1 parent 69f764b commit 4733ae7
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 70 deletions.
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

0 comments on commit 4733ae7

Please sign in to comment.