Prepare release 0.4 (#109)

* Bump the dependencies and remove patch

* temp remove dev-dependencies (until curves are published)

due to circular dev-dependencies

* bring back dev-dependencies

to be merged only after curves crates are released

* bump patch version

* fix

* use frobenius_map_in_place instead of frobenious_map

* temp remove dev dependencies

* chore: Release ark-r1cs-std version 0.4.0-alpha.2

* Revert "temp remove dev dependencies"

This reverts commit 6b3ba6a5e98ea2055222d459d84d49eab7a98d47.

* fix test import after curves have a new version

* chore: Release ark-r1cs-std version 0.4.0-alpha.3

Co-authored-by: onewayfunc <onewayfunc@gmail.com>
This commit is contained in:
mmagician
2022-12-28 16:04:33 +01:00
committed by GitHub
parent 38b0057319
commit d4edfb6e15
10 changed files with 111 additions and 135 deletions

View File

@@ -6,16 +6,16 @@ use crate::{
fields::{fp::FpVar, fp12::Fp12Var, fp2::Fp2Var, FieldVar},
groups::bls12::{G1AffineVar, G1PreparedVar, G1Var, G2PreparedVar, G2Var},
};
use ark_ec::bls12::{Bls12, Bls12Parameters, TwistType};
use ark_ec::bls12::{Bls12, Bls12Config, TwistType};
use ark_ff::BitIteratorBE;
use ark_std::marker::PhantomData;
/// Specifies the constraints for computing a pairing in a BLS12 bilinear group.
pub struct PairingVar<P: Bls12Parameters>(PhantomData<P>);
pub struct PairingVar<P: Bls12Config>(PhantomData<P>);
type Fp2V<P> = Fp2Var<<P as Bls12Parameters>::Fp2Config>;
type Fp2V<P> = Fp2Var<<P as Bls12Config>::Fp2Config>;
impl<P: Bls12Parameters> PairingVar<P> {
impl<P: Bls12Config> PairingVar<P> {
// Evaluate the line function at point p.
#[tracing::instrument(target = "r1cs")]
fn ell(
@@ -59,7 +59,7 @@ impl<P: Bls12Parameters> PairingVar<P> {
}
}
impl<P: Bls12Parameters> PG<Bls12<P>, P::Fp> for PairingVar<P> {
impl<P: Bls12Config> PG<Bls12<P>, P::Fp> for PairingVar<P> {
type G1Var = G1Var<P>;
type G2Var = G2Var<P>;
type G1PreparedVar = G1PreparedVar<P>;

View File

@@ -9,19 +9,19 @@ use crate::{
G2ProjectiveExtendedVar, G2Var,
},
};
use ark_ec::mnt4::{MNT4Parameters, MNT4};
use ark_ec::mnt4::{MNT4Config, MNT4};
use core::marker::PhantomData;
/// Specifies the constraints for computing a pairing in a MNT4 bilinear group.
pub struct PairingVar<P: MNT4Parameters>(PhantomData<P>);
pub struct PairingVar<P: MNT4Config>(PhantomData<P>);
type Fp2G<P> = Fp2Var<<P as MNT4Parameters>::Fp2Config>;
type Fp4G<P> = Fp4Var<<P as MNT4Parameters>::Fp4Config>;
type Fp2G<P> = Fp2Var<<P as MNT4Config>::Fp2Config>;
type Fp4G<P> = Fp4Var<<P as MNT4Config>::Fp4Config>;
/// A variable corresponding to `ark_ec::mnt4::GT`.
pub type GTVar<P> = Fp4G<P>;
impl<P: MNT4Parameters> PairingVar<P> {
impl<P: MNT4Config> PairingVar<P> {
#[tracing::instrument(target = "r1cs", skip(r))]
pub(crate) fn doubling_step_for_flipped_miller_loop(
r: &G2ProjectiveExtendedVar<P>,
@@ -196,7 +196,7 @@ impl<P: MNT4Parameters> PairingVar<P> {
}
}
impl<P: MNT4Parameters> PG<MNT4<P>, P::Fp> for PairingVar<P> {
impl<P: MNT4Config> PG<MNT4<P>, P::Fp> for PairingVar<P> {
type G1Var = G1Var<P>;
type G2Var = G2Var<P>;
type G1PreparedVar = G1PreparedVar<P>;

View File

@@ -9,18 +9,18 @@ use crate::{
G2ProjectiveExtendedVar, G2Var,
},
};
use ark_ec::mnt6::{MNT6Parameters, MNT6};
use ark_ec::mnt6::{MNT6Config, MNT6};
use core::marker::PhantomData;
/// Specifies the constraints for computing a pairing in a MNT6 bilinear group.
pub struct PairingVar<P: MNT6Parameters>(PhantomData<P>);
pub struct PairingVar<P: MNT6Config>(PhantomData<P>);
type Fp3G<P> = Fp3Var<<P as MNT6Parameters>::Fp3Config>;
type Fp6G<P> = Fp6Var<<P as MNT6Parameters>::Fp6Config>;
type Fp3G<P> = Fp3Var<<P as MNT6Config>::Fp3Config>;
type Fp6G<P> = Fp6Var<<P as MNT6Config>::Fp6Config>;
/// A variable corresponding to `ark_ec::mnt6::GT`.
pub type GTVar<P> = Fp6G<P>;
impl<P: MNT6Parameters> PairingVar<P> {
impl<P: MNT6Config> PairingVar<P> {
#[tracing::instrument(target = "r1cs", skip(r))]
pub(crate) fn doubling_step_for_flipped_miller_loop(
r: &G2ProjectiveExtendedVar<P>,
@@ -191,7 +191,7 @@ impl<P: MNT6Parameters> PairingVar<P> {
}
}
impl<P: MNT6Parameters> PG<MNT6<P>, P::Fp> for PairingVar<P> {
impl<P: MNT6Config> PG<MNT6<P>, P::Fp> for PairingVar<P> {
type G1Var = G1Var<P>;
type G2Var = G2Var<P>;
type G1PreparedVar = G1PreparedVar<P>;