aztec-2.0
aztec-2.0 copied to clipboard
ACIR: Implicit assumptions about form of Circuit::Expression
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 Expression
s 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).