diff --git a/proving/igneum-prove/fin/src/bls.rs b/proving/igneum-prove/fin/src/bls.rs index 3c2716789..18313b991 100644 --- a/proving/igneum-prove/fin/src/bls.rs +++ b/proving/igneum-prove/fin/src/bls.rs @@ -23,8 +23,7 @@ impl Bls for ZkBls { fn verify_aggregate(&self, pubkeys: &[[u8; PUBKEY_LEN]], msg: &[u8], dst: &[u8], sig: &[u8; SIG_LEN]) -> bool { use bls12_381::hash_to_curve::{ExpandMsgXmd, HashToCurve}; use bls12_381::{multi_miller_loop, G1Affine, G1Projective, G2Affine, G2Prepared, G2Projective, Gt}; - use group::prime::PrimeCurveAffine; - use group::{Curve, Group}; + use group::Curve; if pubkeys.is_empty() { return false; } @@ -45,7 +44,7 @@ impl Bls for ZkBls { return false; } let s = s.unwrap(); - let hm: G2Projective = >>::hash_to_curve(msg, dst); + let hm: G2Projective = >>::hash_to_curve(&[msg], dst); let agg_affine = agg.to_affine(); let neg_g1 = -G1Affine::generator(); let r = multi_miller_loop(&[(&agg_affine, &G2Prepared::from(hm.to_affine())), (&neg_g1, &G2Prepared::from(s))]).final_exponentiation(); diff --git a/proving/igneum-prove/fin/src/mmr.rs b/proving/igneum-prove/fin/src/mmr.rs index 7789747b9..936a5d8b4 100644 --- a/proving/igneum-prove/fin/src/mmr.rs +++ b/proving/igneum-prove/fin/src/mmr.rs @@ -74,10 +74,10 @@ impl MmrProof { let mut count = 0u64; let mut last: Option = None; for &(h, _) in &self.peaks { - if let Some(l) = last - && l <= h - { - return false; + if let Some(l) = last { + if l <= h { + return false; + } } last = Some(h); count += 1u64 << h;