aztec-2.0 icon indicating copy to clipboard operation
aztec-2.0 copied to clipboard

ACIR: Implicit assumptions about form of Circuit::Expression

Open ledwards2225 opened this issue 1 year ago • 2 comments

In noir/acir, Expression is a struct that holds an arbitrary number of simple quadratic and linear terms. On the bberg-acir side, it has the same form but there is an implicit assumption that it will contain a max of 1 quadratic term and 3 linear terms since this is all that can be accommodated by poly_tuple (i.e. the input to a width-3 arithmetic gate). In practice, noir seems to exclusively produce Expressions of this form but its not clear that there is any structural barrier that prevents other sizes. It may just be another "leakage" of bberg structure into noir. (Indeed, we could already accommodate 1 quadratic and 4 linear terms using the Ultra (width-4) arithmetic gate, but this is not done).

ledwards2225 avatar Jan 10 '24 20:01 ledwards2225