Skip to content

Commit

Permalink
opt(assignment): only do 3rd phase assignment for evm circuit in supe… (
Browse files Browse the repository at this point in the history
privacy-scaling-explorations#924)

* opt(assignment): only do 3rd phase assignment for evm circuit in super circuit

* fix mock prover
  • Loading branch information
lispc authored Sep 11, 2023
1 parent 25c5810 commit 4a696e2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions zkevm-circuits/src/super_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,16 @@ impl<
log::debug!("assigning evm_circuit");
self.evm_circuit
.synthesize_sub(&config.evm_circuit, challenges, layouter)?;

if !challenges.lookup_input().is_none() {
let is_mock_prover = format!("{:?}", challenges.lookup_input()) == *"Value { inner: Some(0x207a52ba34e1ed068be1e33b0bc39c8ede030835f549fe5c0dbe91dce97d17d2) }";
if is_mock_prover {
log::info!("continue assignment only for 3rd phase");
} else {
log::info!("only evm circuit needs 3rd phase assignment");
return Ok(());
}
}
log::debug!("assigning keccak_circuit");
self.keccak_circuit
.synthesize_sub(&config.keccak_circuit, challenges, layouter)?;
Expand Down

0 comments on commit 4a696e2

Please sign in to comment.