Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
raychu86 committed Feb 3, 2023
1 parent 34e526c commit 04e7eaf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 31 deletions.
8 changes: 4 additions & 4 deletions circuit/environment/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ pub trait Environment: 'static + Copy + Clone + fmt::Debug + fmt::Display + Eq +
type Network: console::Network<Affine = Self::Affine, Field = Self::BaseField, Scalar = Self::ScalarField>;

type Affine: AffineCurve<
BaseField = Self::BaseField,
ScalarField = Self::ScalarField,
Coordinates = (Self::BaseField, Self::BaseField),
>;
BaseField = Self::BaseField,
ScalarField = Self::ScalarField,
Coordinates = (Self::BaseField, Self::BaseField),
>;
type BaseField: PrimeField + SquareRootField + Copy;
type ScalarField: PrimeField<BigInteger = <Self::BaseField as PrimeField>::BigInteger> + Copy;

Expand Down
10 changes: 5 additions & 5 deletions console/network/environment/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ pub trait Environment:
'static + Copy + Clone + Debug + PartialEq + Eq + Hash + Serialize + DeserializeOwned + Send + Sync
{
type Affine: AffineCurve<
Projective = Self::Projective,
BaseField = Self::Field,
ScalarField = Self::Scalar,
Coordinates = (Self::Field, Self::Field),
>;
Projective = Self::Projective,
BaseField = Self::Field,
ScalarField = Self::Scalar,
Coordinates = (Self::Field, Self::Field),
>;
type BigInteger: BigInteger;
type Field: PrimeField<BigInteger = Self::BigInteger> + SquareRootField + Copy;
type PairingCurve: PairingEngine<Fr = Self::Field>;
Expand Down
34 changes: 17 additions & 17 deletions curves/src/templates/bls12/bls12.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ pub trait Bls12Parameters: 'static + Copy + Clone + Debug + PartialEq + Eq + Has
type Fp12Params: Fp12Parameters<Fp6Params = Self::Fp6Params>;
type G1Parameters: ShortWeierstrassParameters<BaseField = Self::Fp>;
type G2Parameters: ShortWeierstrassParameters<
BaseField = Fp2<Self::Fp2Params>,
ScalarField = <Self::G1Parameters as ModelParameters>::ScalarField,
>;
BaseField = Fp2<Self::Fp2Params>,
ScalarField = <Self::G1Parameters as ModelParameters>::ScalarField,
>;

fn g1_is_in_correct_subgroup(p: &short_weierstrass_jacobian::Affine<Self::G1Parameters>) -> bool {
p.mul_bits(BitIteratorBE::new(<Self::G1Parameters as ModelParameters>::ScalarField::characteristic())).is_zero()
Expand Down Expand Up @@ -108,21 +108,21 @@ impl<P: Bls12Parameters> Bls12<P> {
impl<P: Bls12Parameters> PairingEngine for Bls12<P>
where
G1Affine<P>: PairingCurve<
BaseField = <P::G1Parameters as ModelParameters>::BaseField,
ScalarField = <P::G1Parameters as ModelParameters>::ScalarField,
Projective = G1Projective<P>,
PairWith = G2Affine<P>,
Prepared = G1Prepared<P>,
PairingResult = Fp12<P::Fp12Params>,
>,
BaseField = <P::G1Parameters as ModelParameters>::BaseField,
ScalarField = <P::G1Parameters as ModelParameters>::ScalarField,
Projective = G1Projective<P>,
PairWith = G2Affine<P>,
Prepared = G1Prepared<P>,
PairingResult = Fp12<P::Fp12Params>,
>,
G2Affine<P>: PairingCurve<
BaseField = <P::G2Parameters as ModelParameters>::BaseField,
ScalarField = <P::G1Parameters as ModelParameters>::ScalarField,
Projective = G2Projective<P>,
PairWith = G1Affine<P>,
Prepared = G2Prepared<P>,
PairingResult = Fp12<P::Fp12Params>,
>,
BaseField = <P::G2Parameters as ModelParameters>::BaseField,
ScalarField = <P::G1Parameters as ModelParameters>::ScalarField,
Projective = G2Projective<P>,
PairWith = G1Affine<P>,
Prepared = G2Prepared<P>,
PairingResult = Fp12<P::Fp12Params>,
>,
{
type Fq = P::Fp;
type Fqe = Fp2<P::Fp2Params>;
Expand Down
6 changes: 1 addition & 5 deletions synthesizer/src/store/consensus/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ pub trait ConsensusStorage<N: Network>: 'static + Clone + Send + Sync {
/// The program storage.
type ProgramStorage: ProgramStorage<N>;
/// The block storage.
type BlockStorage: BlockStorage<
N,
TransactionStorage = Self::TransactionStorage,
TransitionStorage = Self::TransitionStorage,
>;
type BlockStorage: BlockStorage<N, TransactionStorage = Self::TransactionStorage, TransitionStorage = Self::TransitionStorage>;
/// The transaction storage.
type TransactionStorage: TransactionStorage<N, TransitionStorage = Self::TransitionStorage>;
/// The transition storage.
Expand Down

0 comments on commit 04e7eaf

Please sign in to comment.