Skip to content

Commit

Permalink
simplify trait bound
Browse files Browse the repository at this point in the history
  • Loading branch information
hero78119 committed Feb 1, 2024
1 parent bba681c commit fda85da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions snark-verifier/src/pcs/kzg/decider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ mod evm {
impl<M, MOS> AccumulationDecider<M::G1Affine, Rc<EvmLoader>> for KzgAs<M, MOS>
where
M: MultiMillerLoop,
M::G1Affine: CurveAffine,
M::Fr: PrimeField<Repr = [u8; 0x20]>,
M::G1Affine: CurveAffine<ScalarExt = M::Fr>,
M::G2Affine: CurveAffine,
<M::G1Affine as CurveAffine>::ScalarExt: PrimeField<Repr = [u8; 0x20]>,
MOS: Clone + Debug,
{
type DecidingKey = KzgDecidingKey<M>;
Expand Down Expand Up @@ -183,11 +183,7 @@ mod evm {
loader.code_mut().runtime_append(code);
let challenge = loader.scalar(Value::Memory(challenge_ptr));

let powers_of_challenge =
LoadedScalar::<<M::G1Affine as CurveAffine>::ScalarExt>::powers(
&challenge,
lhs.len(),
);
let powers_of_challenge = LoadedScalar::<M::Fr>::powers(&challenge, lhs.len());
let [lhs, rhs] = [lhs, rhs].map(|msms| {
msms.iter()
.zip(powers_of_challenge.iter())
Expand Down
2 changes: 1 addition & 1 deletion snark-verifier/src/system/halo2/test/kzg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ where
pub fn main_gate_with_range_with_mock_kzg_accumulator<
C: CurveAffine,
M: MultiMillerLoop<G1Affine = C, Fr = C::ScalarExt, G1 = C::CurveExt>,
>() -> MainGateWithRange<<M::G1Affine as CurveAffine>::ScalarExt>
>() -> MainGateWithRange<M::Fr>
where
M::G2Affine: CurveAffine + SerdeObject,
M::G1Affine: CurveAffine + SerdeObject,
Expand Down

0 comments on commit fda85da

Please sign in to comment.