diff --git a/zkevm-circuits/src/root_circuit/aggregation.rs b/zkevm-circuits/src/root_circuit/aggregation.rs index 2c078013e32..bb9162a88b4 100644 --- a/zkevm-circuits/src/root_circuit/aggregation.rs +++ b/zkevm-circuits/src/root_circuit/aggregation.rs @@ -252,6 +252,8 @@ impl AggregationConfig { // Verify the cheap part and get accumulator (left-hand and right-hand side of // pairing) of individual proof. + // TODO need to retrieved loaded ec point for rw_table column witness + // which will be used to compute poseidon script let (instances, accumulators) = snarks .iter() .map(|snark| { @@ -272,7 +274,24 @@ impl AggregationConfig { }) .collect_vec() .into_iter() - .unzip::<_, _, Vec<_>, Vec<_>>(); + .unzip::<_, _, Vec<_>, Vec<_>>(); // TODO remove `unzip` to keep the raw instances structure from different snark + // proof + + // TODO 1. process raw instances from all snarks into 2 collections: {public input + // instances} and {chunk consistency instances} 1st snark {public + // input instance} and last snark {public input instance} should be concat into + // final instances, whereas {chunk consistency instances} will be + // converted to witness, and constraints it equality between i and i+1 snark. + // since they are loaded field, consistency can encoded into circuit by simply + // taking 2 loaded field a, b and then `a - b = 0`, which will be + // reflected into the plonk circuit + + // TODO 2. get all column commitment loaded ec points (witness of rw_table from all + // snark proof, then absorb them into fresh transcript to squeeze to + // get challenge alpha', following by absorb alpha' and squeeze to get challenge + // gamma'. At the end, constraint alpha', gamma' field value equal to alpha, + // gamma appear at public input instances by simply invoke loaded field value + // equality: `alpha' - alpha = 0` and `gamma' - gamma = 0` // Verify proof for accumulation of all accumulators into new one. let accumulator = {