With this change, it would be possible to add &str definitions for each gate created which can be used for debugging purposes later on.
The idea is to end up with something much closer and that is better handled in other libs such as Halo2 which looks like:
meta.create_gate("R1CS constraint", |meta| {
let a = meta.query_advice(a, Rotation::cur());
let b = meta.query_advice(b, Rotation::cur());
let c = meta.query_advice(c, Rotation::cur());
let s = meta.query_selector(s);
// BUG: Should be a * b - c
Some(("buggy R1CS", s * (a * b + c)))
});
Which enables producing better err messages while debugging like:
With this change, it would be possible to add
&str
definitions for each gate created which can be used for debugging purposes later on.The idea is to end up with something much closer and that is better handled in other libs such as Halo2 which looks like:
Which enables producing better err messages while debugging like:
That overall should help to: