NilFoundation / zkLLVM

Zero-Knowledge Proof Systems Circuit Compiler
https://docs.nil.foundation/zkllvm
278 stars 48 forks source link

[Feature request]: __builtin_assigner_exit_check_eq #511

Closed ETatuzova closed 6 months ago

ETatuzova commented 7 months ago

Is your feature request related to a problem? Please describe. When we want to be sure that two variables are equal, no additional components or rows are need.We just need one copy constraint. Current instrument for this __builtin_assigner_exit_check(a == b) uses special component and two table rows

Describe the solution or interface you'd like Create a function __builtin_assigner_exit_check_eq(a, b) that won't call any blueprint component and just will add one copy constraint to constraint system

Additional context We widely use this construction in recursive verifier and it costs nearly 200 rows for arithmetics example recursive verifier. It will be significatly more rows for greater lambda and r parameters.