You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my circuit public input is very big. as my estimation, one public input will lead to one point multiplication and one addition, which is around 6k gas consumption. is there any way to optimize the MSM, e.g. pippenger algorithm or bos coster algorithm. what if the MSM is calculate off chain? people could verify the MSM computation is correct?
The text was updated successfully, but these errors were encountered:
Hey, @cliff0412, I've tried to rewrite the verifier contracts to use alternative point multiplication algorithms and it turns out that the current approach is the cheapest.
Pippenger and other algorithms usually optimize the number of additions in double-and-add approach. However, Solidity verifiers use precompiled contracts to carry out the job. Substituting these precompile calls with the actual multiplication algorithm degrades the gas cost significantly.
Unfortunately, I haven't been able to find a better approach.
One way this may work is if you make current public signals private and pass a hash of these signals as a public one (calculate it in a smart contract). Then you may verify the correctness of the hash within the proof.
Not absolutely sure about legitimacy of this approach, but you may give it a shot :)
my circuit public input is very big. as my estimation, one public input will lead to one point multiplication and one addition, which is around 6k gas consumption. is there any way to optimize the MSM, e.g. pippenger algorithm or bos coster algorithm. what if the MSM is calculate off chain? people could verify the MSM computation is correct?
The text was updated successfully, but these errors were encountered: