How to aggregate multiple proofs into one proof by recursion? Am I right or completely wrong? #1455
Replies: 1 comment 1 reply
-
In your case, you are recursively verifying different circuits (LeafCircuit and RecursionAggregate). In principle, gnark allows recursively verifying different circuits, but the shape of the circuits needs to be the same - namely the number of public witness and number of commitments used. In current case, this doesn't hold:
Now, when you want to recursively either verify In principle, it would be possible to make the circuits to have artificially the same shape by manually enforcing the commitments and using hash of the non-native inputs as public input, but it is somewhat complicated. Instead, if you would like to aggregate large number of proofs, I would rather recommend using different curves which are better compatible with each other. In your case it would mean that the LeafCircuit would be defined Let me know if the proposed approach would work. Theoretically it would be possible to make your approach also work, but I unfortunately don't have that much spare time to make the working example. |
Beta Was this translation helpful? Give feedback.
-
I try to aggregate multiple proofs into one by using the recursion package
I read the example code at https://pkg.go.dev/github.com/consensys/[email protected]/std/recursion/groth16
I try to aggregate 8 proof into 1 like a binary tree. This is my code :
It works fine when aggregate the leaf proofs, when it runs the
RecursionAggregateLeafProofs([]int{0, 2, 4, 6}, 1)
,the error is:Now I am confused, Is it possible that my logic in trying to aggregate multiple proofs like this is completely wrong, and that my understanding of recursion is faulty. Or is it simply that my code is written incorrectly?
the
WriteCCS
andReadCCS
function is :Beta Was this translation helpful? Give feedback.
All reactions