Skip to content

rollup example with actual zk-snark implementation #938

Answered by Engeloid
Engeloid asked this question in Q&A
Discussion options

You must be logged in to vote

After lots of trying out, I found the problem.

I wasn't allocating the slices before calling the frontend.Define() function. Unfortunately, it is not well documented, but I found it in this discussion post:

Also in the test file, if you know what you are doing, you can see in e.g. in the test in line 122 func TestCircuitFull(t *testing.T), that the slices also get allocated separately there as well before assert.ProverSucceeded() is called.

Solution

Allocate the slices before calling the frontend.Define() function. Either by making circuit.allocateSlicesMerkleProofs() and also its respective variables public, i.e., changing (Uppercase) the function and variable names (e.g.: AllocateSlices…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Engeloid
Comment options

Comment options

You must be logged in to vote
2 replies
@Engeloid
Comment options

Answer selected by Engeloid
@ivokub
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants