From 9e80d15e621b4b5b5de11b581190d70644131ec8 Mon Sep 17 00:00:00 2001 From: Sun Date: Tue, 9 Mar 2021 11:40:11 +0800 Subject: [PATCH 1/2] Explicitly specify the associated type of the trait --- ec/src/lib.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ec/src/lib.rs b/ec/src/lib.rs index 87712cfc3..f3eeed9ef 100644 --- a/ec/src/lib.rs +++ b/ec/src/lib.rs @@ -328,6 +328,8 @@ where pub trait CurveCycle where + ::BaseField: PrimeField + SquareRootField, + ::BaseField: PrimeField + SquareRootField, ::Projective: MulAssign<::BaseField>, ::Projective: MulAssign<::BaseField>, { @@ -338,7 +340,19 @@ where type E2: AffineCurve; } -pub trait PairingFriendlyCycle: CurveCycle { +pub trait PairingFriendlyCycle: CurveCycle +where + ::BaseField: PrimeField + SquareRootField, + ::BaseField: PrimeField + SquareRootField, + ::Projective: MulAssign<::BaseField>, + ::Projective: MulAssign<::BaseField>, + ::G1Prepared: From, + ::G1Prepared: From, + ::G2Projective: + MulAssign<::ScalarField>, + ::G2Projective: + MulAssign<::ScalarField>, +{ type Engine1: PairingEngine< G1Affine = Self::E1, G1Projective = ::Projective, From 742cc1bb583a30082a616de5e32d815f97eb6871 Mon Sep 17 00:00:00 2001 From: Sun Date: Tue, 9 Mar 2021 11:40:24 +0800 Subject: [PATCH 2/2] add rust minimum version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 71df845a6..20852e034 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ In addition, the [`curves`](https://github.com/arkworks-rs/curves) repository co ## Build guide -The library compiles on the `stable` toolchain of the Rust compiler. To install the latest version of Rust, first install `rustup` by following the instructions [here](https://rustup.rs/), or via your platform's package manager. Once `rustup` is installed, install the Rust toolchain by invoking: +The library compiles on the `stable (1.46+)` toolchain of the Rust compiler. To install the latest version of Rust, first install `rustup` by following the instructions [here](https://rustup.rs/), or via your platform's package manager. Once `rustup` is installed, install the Rust toolchain by invoking: ```bash rustup install stable ```