From 09cb220515da88000030871c4a0f34f9c2215c61 Mon Sep 17 00:00:00 2001 From: Cecilia Zhang Date: Mon, 4 Sep 2023 06:22:40 +0800 Subject: [PATCH] fix super --- zkevm-circuits/src/taiko_pi_circuit.rs | 2 +- zkevm-circuits/src/taiko_super_circuit.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zkevm-circuits/src/taiko_pi_circuit.rs b/zkevm-circuits/src/taiko_pi_circuit.rs index aa594e133c..d0da067da3 100644 --- a/zkevm-circuits/src/taiko_pi_circuit.rs +++ b/zkevm-circuits/src/taiko_pi_circuit.rs @@ -166,7 +166,7 @@ impl PublicData { } } - fn encode_raw(&self) -> Vec { + pub fn encode_raw(&self) -> Vec { encode(&[self.evidence.clone()]) } diff --git a/zkevm-circuits/src/taiko_super_circuit.rs b/zkevm-circuits/src/taiko_super_circuit.rs index 650700be56..ca57fd4665 100644 --- a/zkevm-circuits/src/taiko_super_circuit.rs +++ b/zkevm-circuits/src/taiko_super_circuit.rs @@ -7,7 +7,7 @@ pub mod test; use crate::{ anchor_tx_circuit::{AnchorTxCircuit, AnchorTxCircuitConfig, AnchorTxCircuitConfigArgs}, table::{byte_table::ByteTable, BlockTable, KeccakTable, PiTable, TxTable}, - taiko_pi_circuit::{TaikoPiCircuit, TaikoPiCircuitConfig, TaikoPiCircuitConfigArgs}, + taiko_pi_circuit::{TaikoPiCircuit, TaikoPiCircuitConfig, TaikoPiCircuitConfigArgs, PublicData}, util::{log2_ceil, Challenges, SubCircuit, SubCircuitConfig}, witness::{block_convert, Block, ProtocolInstance}, }; @@ -59,6 +59,7 @@ impl SubCircuitConfig for SuperCircuitConfig { let pi_circuit = TaikoPiCircuitConfig::new( meta, TaikoPiCircuitConfigArgs { + evidence: PublicData::default(), block_table: block_table.clone(), keccak_table: keccak_table.clone(), byte_table: byte_table.clone(), @@ -206,7 +207,7 @@ impl Circuit for SuperCircuit { .load(&mut layouter, &self.block.context, randomness)?; config.keccak_table.dev_load( &mut layouter, - vec![&self.pi_circuit.public_data.rpi_bytes()], + vec![&self.pi_circuit.evidence.encode_raw()], &challenges, )?; config.byte_table.load(&mut layouter)?;