Best possible prover config for mobile devices and ability to cache constraint system solver results #972
Unanswered
Scratch-net
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hey -- (side note that alt-bn128 and bn254 often refer to the same curve; it is not deemed insecure). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a circuit which is built using gnark and gadgets(thanks for them!) and which is around 152k constraints for 640 bytes of proved data and 75k constraints for 64 bytes of data.
The circuit processes data (bytes) in 64 byte blocks, kind of block cipher. So the more times I'll be able to call "Prove()" the more data blocks I can process, simple as that.
I need to do proofs on mobile devices, so they must be as fast and as efficient as possible.
Right now I managed to build a shared library for Android using CGO and build a simple app that uses it. Everything works, but I wonder if I can do better in terms of speed.
Circuit is built using Groth16 and BN254.
So, each time I call Prove() it happens in two stages:
Constraint system solver
Prover
On my android phone circuit which processes 64 bytes takes ~900ms to prove and the one that proofs 640 bytes takes a bit more than 2 secs.
I'd use the one with 640 bytes but on lower end devices it runs out of memory
Is is possible to cache solver results or they are purely witness dependent? Is it possible to squeeze any more performance out of the proving process?
We used BN128 with SnarkJS before but it was still 5-10 times slower on mobile devices then Gnark. With Gnark bn128 is out of the question, it's insecure anyway.
Beta Was this translation helpful? Give feedback.
All reactions