Add GHA test checks & clippy

This commit is contained in:
2022-10-19 21:52:58 +02:00
parent 80d97d69b5
commit 945c414283
5 changed files with 32 additions and 3 deletions

View File

@@ -89,6 +89,7 @@ where
// let s = val.borrow().s;
let mut s = Vec::<UInt8<ConstraintF<C>>>::new();
let s_bytes = to_bytes![val.borrow().s].unwrap();
#[allow(clippy::needless_range_loop)]
for i in 0..s_bytes.len() {
s.push(UInt8::<ConstraintF<C>>::new_variable(
cs.clone(),
@@ -236,6 +237,7 @@ where
SignatureVar::<C, GC>::new_witness(ark_relations::ns!(cs, "signature"), || {
self.signature.ok_or(SynthesisError::AssignmentMissing)
})?;
#[allow(clippy::redundant_clone)]
let poseidon_hash = PoseidonGadget::<ConstraintF<C>>::from_native(
&mut cs.clone(),
self.poseidon_hash_native,

View File

@@ -136,8 +136,9 @@ where
<C as ProjectiveCurve>::ScalarField: From<BigInteger256>,
{
let u = Self::new_blind_params(parameters, rng, signer_r);
// get X coordinate, as in new_blind_params we already checked that R.x is inside Fr and
// will not give None
// will not overflow (giving None)
let r = EdwardsAffine::from(u.r); // WIP
let x_fr = C::ScalarField::from(r.x.into_repr());