Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
TODO planning
Browse files Browse the repository at this point in the history
  • Loading branch information
hero78119 committed Nov 29, 2023
1 parent 29189a6 commit a853d5b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion zkevm-circuits/src/root_circuit/aggregation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand All @@ -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 = {
Expand Down

0 comments on commit a853d5b

Please sign in to comment.