Skip to content

Commit

Permalink
update to new pi
Browse files Browse the repository at this point in the history
  • Loading branch information
smtmfft committed Feb 24, 2023
1 parent 7fd0e2e commit f005d7e
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions prover/src/circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,46 @@ use zkevm_circuits::copy_circuit::CopyCircuit;
use zkevm_circuits::evm_circuit::EvmCircuit;
use zkevm_circuits::exp_circuit::ExpCircuit;
use zkevm_circuits::keccak_circuit::keccak_packed_multi::KeccakCircuit;
use zkevm_circuits::pi_circuit::PiCircuit;
use zkevm_circuits::pi_circuit::PiTestCircuit;
use zkevm_circuits::pi_circuit2::PiCircuit;
use zkevm_circuits::pi_circuit2::PiTestCircuit;
use zkevm_circuits::state_circuit::StateCircuit;
use zkevm_circuits::super_circuit::SuperCircuit;
use zkevm_circuits::tx_circuit::TxCircuit;
use zkevm_circuits::util::SubCircuit;

/// Returns a instance of the `SuperCircuit`.
pub fn gen_super_circuit<
const MAX_TXS: usize,
const MAX_CALLDATA: usize,
const MAX_RWS: usize,
RNG: Rng,
>(
witness: &CircuitWitness,
mut _rng: RNG,
) -> Result<SuperCircuit<Fr, MAX_TXS, MAX_CALLDATA, MAX_RWS>, String> {
let block = witness.evm_witness();
// pub fn gen_super_circuit<
// const MAX_TXS: usize,
// const MAX_CALLDATA: usize,
// const MAX_RWS: usize,
// RNG: Rng,
// >(
// witness: &CircuitWitness,
// mut _rng: RNG,
// ) -> Result<SuperCircuit<Fr, MAX_TXS, MAX_CALLDATA, MAX_RWS>, String> {
// let block = witness.evm_witness();

let evm_circuit = EvmCircuit::new_from_block(&block);
let state_circuit = StateCircuit::new_from_block(&block);
let tx_circuit = TxCircuit::new_from_block(&block);
let pi_circuit = PiCircuit::new_from_block(&block);
let bytecode_circuit = BytecodeCircuit::new_from_block(&block);
let copy_circuit = CopyCircuit::new_from_block(&block);
let exp_circuit = ExpCircuit::new_from_block(&block);
let keccak_circuit = KeccakCircuit::new_from_block(&block);
let circuit = SuperCircuit::<_, MAX_TXS, MAX_CALLDATA, MAX_RWS> {
evm_circuit,
state_circuit,
tx_circuit,
pi_circuit,
bytecode_circuit,
copy_circuit,
exp_circuit,
keccak_circuit,
};
// let evm_circuit = EvmCircuit::new_from_block(&block);
// let state_circuit = StateCircuit::new_from_block(&block);
// let tx_circuit = TxCircuit::new_from_block(&block);
// let pi_circuit = PiCircuit::new_from_block(&block);
// let bytecode_circuit = BytecodeCircuit::new_from_block(&block);
// let copy_circuit = CopyCircuit::new_from_block(&block);
// let exp_circuit = ExpCircuit::new_from_block(&block);
// let keccak_circuit = KeccakCircuit::new_from_block(&block);
// let circuit = SuperCircuit::<_, MAX_TXS, MAX_CALLDATA, MAX_RWS> {
// evm_circuit,
// state_circuit,
// tx_circuit,
// pi_circuit,
// bytecode_circuit,
// copy_circuit,
// exp_circuit,
// keccak_circuit,
// };

Ok(circuit)
}
// Ok(circuit)
// }

/// Returns a instance of the `PiTestCircuit`.
pub fn gen_pi_circuit<
Expand Down

0 comments on commit f005d7e

Please sign in to comment.