-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two-to-one aggregation circuits #216
Conversation
Bring back v0.3.0 into main + follow-up `trace_decoder` bump
// Preprocess all circuits. | ||
let all_circuits = AllRecursiveCircuits::<F, C, D>::new( | ||
&all_stark, | ||
&[8..17, 8..15, 8..18, 8..15, 8..10, 8..13, 8..20], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: let's at least use the start ranges of the empty_txn_list
example so that it doesn't require a huge amount of RAM when trying it locally :)
&[8..17, 8..15, 8..18, 8..15, 8..10, 8..13, 8..20], | |
&[16..17, 9..15, 12..18, 14..15, 9..10, 12..13, 17..20], |
pub two_to_one_aggregation: TwoToOneAggCircuitData<F, C, D>, | ||
/// The block circuit, which verifies an aggregation root proof and an | ||
/// optional previous block proof. | ||
pub block: BlockCircuitData<F, C, D>, | ||
/// The two-to-one block aggregation circuit, which verifies two unrelated | ||
/// block proofs. | ||
pub two_to_one_block: TwoToOneAggCircuitData<F, C, D>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused about the two_to_one_aggregation
.
I see the use of aggregating two final block proofs together, but why aggregating intermediary layers that don't share anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could be useful in some cases. A "block proof" is just an "aggregation proof" along with a recursively verified previous block proof. But in some cases, the previous batch is already verified elsewhere (e.g. on L1), so the recursive proof is redundant.
I might be missing something though.
pub two_to_one_aggregation: TwoToOneAggCircuitData<F, C, D>, | ||
/// The block circuit, which verifies an aggregation root proof and an | ||
/// optional previous block proof. | ||
pub block: BlockCircuitData<F, C, D>, | ||
/// The two-to-one block aggregation circuit, which verifies two unrelated | ||
/// block proofs. | ||
pub two_to_one_block: TwoToOneAggCircuitData<F, C, D>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly is the goal behind? This will only support one additional layer of aggregation, not an arbitrary one, which I would have thought was the desired goal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so too. I think this is just a temporary solution. @muursh ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aye it is just a place holder for now. We will have Einar make some modifications to the current approach.
For the record, I am actually developing on this branch: https://github.com/0xPolygonZero/zk_evm/tree/two_to_one_aggregation_local_friendly |
Closing as agreed with @wborgeaud and @Nashtare. Superseded by #318. |
Add two circuits to
AllRecursiveCircuits
:two_to_one_aggregation
that aggregates two unrelated aggregation proofs.two_to_one_block
that aggregates two unrelated block proofs.