I was writing the following example (an example where there are no constraints with a public input):
fn main(pub aa: Field) {
let mut xx = aa + 1;
}
After running cargo run test --path examples/no_cons.no --public-inputs '{"aa": "3"}', I hit the following error:
Error: × Looks like something went wrong in constraint-finalization
╭─[<BUILTIN>:1:1]
1 │ <SEE NONAME CODE>
· ▲
· ╰── here
╰────
help: Unexpected error: there's a bug in the circuit_writer, some cellvar does not end up being a cellvar in the circuit!.
If I try the same example with a private input, the error is more descriptive:
Error: × Looks like something went wrong in constraint-finalization
╭─[examples/no_cons.no:1:1]
1 │ fn main(aa: Field) {
· ─┬
· ╰── here
2 │ let mut xx = aa + 1;
╰────
help: private input not used in the circuit
I thought it could help to give the same error in those cases as help: public input not used in the circuit
I was writing the following example (an example where there are no constraints with a public input):
After running
cargo run test --path examples/no_cons.no --public-inputs '{"aa": "3"}'
, I hit the following error:If I try the same example with a private input, the error is more descriptive:
I thought it could help to give the same error in those cases as
help: public input not used in the circuit