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
Currently, fawkes-crypto decide, should it create new signals or not, by calling as_const method of Signal trait (see example here ) and build both witness and constraint system ([1], [2]).
Signals have complex structures (CNum definition), so, operations with them are not fast.
Also, the constraint system is circuit specific (it does not change at multiple calls), and witness depends on the values of internal signals.
For better performance, we need to split constraint system building and witness building. And prover should work with preloaded from the file constraint system and as_const calls cache.
The as_const calls cache could be stored inside the bit-vector. Also, this data and an additional flag for using the pre-computed constant system could be stored here.
In the case of using precomputed CS, all heavy constraint system-related things when we work on CNum, like LC operations, enforce and enforce_pub should be omitted.
In addition, it is better to store r1cs data in snarkjs-compatible format (look at zkutil for example).
The text was updated successfully, but these errors were encountered:
Currently, fawkes-crypto decide, should it create new signals or not, by calling
as_const
method ofSignal
trait (see example here ) and build both witness and constraint system ([1], [2]).Signals have complex structures (
CNum
definition), so, operations with them are not fast.Also, the constraint system is circuit specific (it does not change at multiple calls), and witness depends on the values of internal signals.
For better performance, we need to split constraint system building and witness building. And prover should work with preloaded from the file constraint system and
as_const
calls cache.The
as_const
calls cache could be stored inside the bit-vector. Also, this data and an additional flag for using the pre-computed constant system could be stored here.In the case of using precomputed CS, all heavy constraint system-related things when we work on
CNum
, likeLC
operations,enforce
andenforce_pub
should be omitted.In addition, it is better to store r1cs data in snarkjs-compatible format (look at zkutil for example).
The text was updated successfully, but these errors were encountered: