Skip to content

Commit

Permalink
Merge branch 'l1fee_curie' of https://github.com/scroll-tech/zkevm-ci…
Browse files Browse the repository at this point in the history
…rcuits into l1fee_curie
  • Loading branch information
DreamWuGit committed May 28, 2024
2 parents 830bb91 + a7062e4 commit 5a2048a
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 193 deletions.
17 changes: 8 additions & 9 deletions aggregator/src/aggregation/circuit.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::blob::BatchData;
use crate::{blob::BatchData, witgen::MultiBlockProcessResult};
use ark_std::{end_timer, start_timer};
use halo2_base::{Context, ContextParams};
use halo2_proofs::{
Expand Down Expand Up @@ -447,22 +447,22 @@ impl<const N_SNARKS: usize> Circuit<Fr> for AggregationCircuit<N_SNARKS> {

let batch_bytes = batch_data.get_batch_data_bytes();
let encoded_batch_bytes = batch_data.get_encoded_batch_data_bytes();
let (

let MultiBlockProcessResult {
witness_rows,
decoded_literals,
aux_data,
literal_bytes: decoded_literals,
fse_aux_tables,
block_info_arr,
sequence_info_arr,
address_table_arr,
sequence_exec_result,
) = crate::aggregation::decoder::witgen::process(
address_table_rows: address_table_arr,
sequence_exec_results,
} = crate::aggregation::decoder::witgen::process(
&encoded_batch_bytes,
challenges.keccak_input(),
);

// sanity check:
let (recovered_bytes, sequence_exec_info_arr) = sequence_exec_result.into_iter().fold(
let (recovered_bytes, sequence_exec_info_arr) = sequence_exec_results.into_iter().fold(
(Vec::new(), Vec::new()),
|(mut out_byte, mut out_exec), res| {
out_byte.extend(res.recovered_bytes);
Expand All @@ -481,7 +481,6 @@ impl<const N_SNARKS: usize> Circuit<Fr> for AggregationCircuit<N_SNARKS> {
&encoded_batch_bytes,
witness_rows,
decoded_literals,
aux_data,
fse_aux_tables,
block_info_arr,
sequence_info_arr,
Expand Down
17 changes: 7 additions & 10 deletions aggregator/src/aggregation/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4572,7 +4572,6 @@ impl<const L: usize, const R: usize> DecoderConfig<L, R> {
_compressed_bytes: &[u8],
witness_rows: Vec<ZstdWitnessRow<Fr>>,
literal_datas: Vec<Vec<u64>>,
_aux_data: Vec<u64>,
fse_aux_tables: Vec<FseAuxiliaryTableData>,
block_info_arr: Vec<BlockInfo>,
sequence_info_arr: Vec<SequenceInfo>,
Expand Down Expand Up @@ -5430,7 +5429,7 @@ impl<const L: usize, const R: usize> DecoderConfig<L, R> {
#[cfg(test)]
mod tests {
use crate::{
witgen::{init_zstd_encoder, process},
witgen::{init_zstd_encoder, process, MultiBlockProcessResult},
DecoderConfig, DecoderConfigArgs,
};
use halo2_proofs::{
Expand Down Expand Up @@ -5499,18 +5498,17 @@ mod tests {
let (config, u8_table, challenge) = config;
let challenges = challenge.values(&layouter);

let (
let MultiBlockProcessResult {
witness_rows,
decoded_literals,
aux_data,
literal_bytes: decoded_literals,
fse_aux_tables,
block_info_arr,
sequence_info_arr,
address_table_arr,
sequence_exec_result,
) = process(&self.compressed, challenges.keccak_input());
address_table_rows: address_table_arr,
sequence_exec_results,
} = process(&self.compressed, challenges.keccak_input());

let (recovered_bytes, sequence_exec_info_arr) = sequence_exec_result.into_iter().fold(
let (recovered_bytes, sequence_exec_info_arr) = sequence_exec_results.into_iter().fold(
(Vec::new(), Vec::new()),
|(mut out_byte, mut out_exec), res| {
out_byte.extend(res.recovered_bytes);
Expand All @@ -5531,7 +5529,6 @@ mod tests {
&self.compressed,
witness_rows,
decoded_literals,
aux_data,
fse_aux_tables,
block_info_arr,
sequence_info_arr,
Expand Down
Loading

0 comments on commit 5a2048a

Please sign in to comment.