diff --git a/halo2-ecc/src/bn254/bls_signature.rs b/halo2-ecc/src/bn254/bls_signature.rs index 0e10a090..f0b5570d 100644 --- a/halo2-ecc/src/bn254/bls_signature.rs +++ b/halo2-ecc/src/bn254/bls_signature.rs @@ -7,6 +7,7 @@ use crate::fields::FieldChip; use crate::fields::PrimeField; use crate::halo2_proofs::halo2curves::bn256::Fq12; use crate::halo2_proofs::halo2curves::bn256::{G1Affine, G2Affine}; +use ff::Field; use halo2_base::{AssignedValue, Context}; // To avoid issues with mutably borrowing twice (not allowed in Rust), we only store fp_chip and construct g2_chip and fp12_chip in scope when needed for temporary mutable borrows diff --git a/halo2-ecc/src/bn254/pairing.rs b/halo2-ecc/src/bn254/pairing.rs index 886985d4..c11d2a83 100644 --- a/halo2-ecc/src/bn254/pairing.rs +++ b/halo2-ecc/src/bn254/pairing.rs @@ -9,6 +9,7 @@ use crate::{ fields::fp12::mul_no_carry_w6, fields::{FieldChip, PrimeField}, }; +use ff::Field; use halo2_base::Context; const XI_0: i64 = 9; diff --git a/halo2-ecc/src/ecc/fixed_base.rs b/halo2-ecc/src/ecc/fixed_base.rs index 5dfba754..df48dcb1 100644 --- a/halo2-ecc/src/ecc/fixed_base.rs +++ b/halo2-ecc/src/ecc/fixed_base.rs @@ -2,6 +2,7 @@ use super::{ec_add_unequal, ec_select, ec_select_from_bits, EcPoint, EccChip}; use crate::ecc::{ec_sub_strict, load_random_point}; use crate::fields::{FieldChip, PrimeField, Selectable}; +use ff::Field; use group::Curve; use halo2_base::gates::builder::{parallelize_in, GateThreadBuilder}; use halo2_base::{gates::GateInstructions, utils::CurveAffineExt, AssignedValue, Context}; diff --git a/halo2-ecc/src/ecc/mod.rs b/halo2-ecc/src/ecc/mod.rs index a196e039..48aa24c9 100644 --- a/halo2-ecc/src/ecc/mod.rs +++ b/halo2-ecc/src/ecc/mod.rs @@ -1,6 +1,7 @@ #![allow(non_snake_case)] use crate::fields::{fp::FpChip, FieldChip, PrimeField, Selectable}; use crate::halo2_proofs::arithmetic::CurveAffine; +use ff::Field; use group::{Curve, Group}; use halo2_base::gates::builder::GateThreadBuilder; use halo2_base::utils::modulus; diff --git a/halo2-ecc/src/fields/fp12.rs b/halo2-ecc/src/fields/fp12.rs index 156ca452..3a8ce4af 100644 --- a/halo2-ecc/src/fields/fp12.rs +++ b/halo2-ecc/src/fields/fp12.rs @@ -1,5 +1,6 @@ use std::marker::PhantomData; +use ff::PrimeField as _; use halo2_base::{utils::modulus, AssignedValue, Context}; use num_bigint::BigUint; diff --git a/halo2-ecc/src/fields/fp2.rs b/halo2-ecc/src/fields/fp2.rs index 55e3243a..2e3c8f13 100644 --- a/halo2-ecc/src/fields/fp2.rs +++ b/halo2-ecc/src/fields/fp2.rs @@ -1,6 +1,7 @@ use std::fmt::Debug; use std::marker::PhantomData; +use ff::PrimeField as _; use halo2_base::{utils::modulus, AssignedValue, Context}; use num_bigint::BigUint; diff --git a/halo2-ecc/src/lib.rs b/halo2-ecc/src/lib.rs index 10da56bc..3b88702f 100644 --- a/halo2-ecc/src/lib.rs +++ b/halo2-ecc/src/lib.rs @@ -1,7 +1,6 @@ #![allow(clippy::too_many_arguments)] #![allow(clippy::op_ref)] #![allow(clippy::type_complexity)] -#![feature(int_log)] #![feature(trait_alias)] pub mod bigint; diff --git a/rust-toolchain b/rust-toolchain index 51ab4759..cb8136f6 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2022-10-28 \ No newline at end of file +nightly-2023-04-19 \ No newline at end of file