mirror of https://github.com/zcash/halo2.git
tests: Migrate `plonk_api` test to use `impl Neg for Expression`
No change to the pinned verification key, because `Neg` is implemented the same way `plonk_api` was manually performing it.
This commit is contained in:
parent
2e960317ae
commit
d6bd7bb393
|
@ -306,13 +306,7 @@ fn plonk_api() {
|
|||
let sc = meta.query_fixed(sc, Rotation::cur());
|
||||
let sm = meta.query_fixed(sm, Rotation::cur());
|
||||
|
||||
vec![
|
||||
a.clone() * sa
|
||||
+ b.clone() * sb
|
||||
+ a * b * sm
|
||||
+ (c * sc * (-F::one()))
|
||||
+ sf * (d * e),
|
||||
]
|
||||
vec![a.clone() * sa + b.clone() * sb + a * b * sm - (c * sc) + sf * (d * e)]
|
||||
});
|
||||
|
||||
meta.create_gate("Public input", |meta| {
|
||||
|
@ -320,7 +314,7 @@ fn plonk_api() {
|
|||
let p = meta.query_instance(p, Rotation::cur());
|
||||
let sp = meta.query_fixed(sp, Rotation::cur());
|
||||
|
||||
vec![sp * (a + p * (-F::one()))]
|
||||
vec![sp * (a - p)]
|
||||
});
|
||||
|
||||
meta.enable_equality(sf.into());
|
||||
|
|
Loading…
Reference in New Issue