Replies: 1 comment
-
It may be indeed, we have optimized some defaults so that the circuit compilation wouldn't take that much memory, but for large circuits you would need tens of GB of memory. Do you have an example circuit? What are the parameters of the machine you are compiling the circuits on? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
Hi!
I've noticed that with enough API calls, we receive a
Terminated
message at some point. I'm assuming this happens because in my circuit definition I have a couple of loops that have API calls in them, and as I increase the number of times the loop iterates, I get aTerminated
message.My Question
How can one go about "optimizing" their circuit in order to avoid the
Terminated
message?ChatGPT suggests I should create "subcircuits" so the API calls are distributed across more circuits, but I'm not sure if ChatGPT is correct here. In my previous question about a small modulo function #1362, the answer uses the test package (https://pkg.go.dev/github.com/consensys/gnark/test) to run small modulo as its own circuit, should I be doing this same thing inside my circuit using the WithValidAssignment option? But then how can I get the quotient and remainder as frontend.Variable, since I need them later? I have to assign the subcircuits on the fly and get a result from them. At the very least I should receive a Boolean from the subcircuit because at the end of the forloop I use the api.Select() function.
Thank you and I hope my question makes sense, I'm still getting used to the language of coding with zk-SNARK circuits.
Beta Was this translation helpful? Give feedback.
All reactions