Conversation
|
I tried to do this years ago, but back then
@tarcieri it would be great if you could test this PR with the |
| /// Scalars modulo the order of this group's scalar field. | ||
| /// | ||
| /// This associated type is temporary, and will be removed once downstream users have | ||
| /// migrated to using `Curve` as the primary generic bound. | ||
| type Scalar: PrimeField; |
There was a problem hiding this comment.
I want to remove this associated type (and instead use <Self::Curve as Group>::Scalar, but for annoying historical type-checking reasons we used (the equivalent of) C: PrimeCurveAffine as the main generic parameter in https://github.com/zcash/halo2. I want to change it to use C: PrimeCurve instead (or G: PrimeGroup where I can), but before I can do that I need to kill the CurveExt trait (zcash/pasta_curves#41). So this associated type will stay until that is complete (though I hope to complete 41 in the same release cycle as this PR).
On that note, it would be good to know if any other downstream dependencies do the same thing.
| /// Returns the additive identity. | ||
| fn identity() -> Self; |
There was a problem hiding this comment.
If we end up landing #42 in its current form, then we'd do the obvious thing and replace these methods with CurveAffine: Identity.
This unifies the methods previously exposed by the `PrimeCurveAffine` and `CofactorCurveAffine` traits. The prime-order and cofactor traits are now all marker traits, and their affine-specific traits are automatically derived.
|
hey there @str4d is there any progress on this PR? I'm asking because the privacy-ethereum/halo2curves#38 is dependent on this, and I would like to test pedersen commitment circuit in proof system based on bls12-381 curve operations. Motivation is here: https://hackmd.io/l2XvogKoQOCH748T1rdWZw |
We're waiting for this and all the bumps in all the child libs (pasta, bls etc..). I have the visibility changes ready. And ready to be upstreamed (in case we can avoid vendoring). But for now, our |
- the DlogGroup trait is now group-crate aware, and requires traits in those terms, - the requirements will be further streamlined when zkcrypto/group#48 merges - simplified declarations boilerplate in halo2curves & pasta macros - removed boilerplate macro duplication for grumpkin_msm.
- the DlogGroup trait is now group-crate aware, and requires traits in those terms, - the requirements will be further streamlined when zkcrypto/group#48 merges - simplified declarations boilerplate in halo2curves & pasta macros - removed boilerplate macro duplication for grumpkin_msm.
- the DlogGroup trait is now group-crate aware, and requires traits in those terms, - the requirements will be further streamlined when zkcrypto/group#48 merges - simplified declarations boilerplate in halo2curves & pasta macros - removed boilerplate macro duplication for grumpkin_msm.
- the DlogGroup trait is now group-crate aware, and requires traits in those terms, - the requirements will be further streamlined when zkcrypto/group#48 merges - simplified declarations boilerplate in halo2curves & pasta macros - removed boilerplate macro duplication for grumpkin_msm.
* refactor: Refactor trait imports in provider/traits.rs - Refactored `provider/traits.rs` to remove local definitions of helper traits. - Incorporated `GroupOps`, `GroupOpsOwned`, and `ScalarMulOwned` from `group` module into `provider/traits.rs` to maintain functionality. * refactor: Refactor `DlogGroup` trait and optimize batch operations - the DlogGroup trait is now group-crate aware, and requires traits in those terms, - the requirements will be further streamlined when zkcrypto/group#48 merges - simplified declarations boilerplate in halo2curves & pasta macros - removed boilerplate macro duplication for grumpkin_msm. * fix: adjust macro invocations for wasm32
This unifies the methods previously exposed by the
PrimeCurveAffineandCofactorCurveAffinetraits. The prime-order and cofactor traits are now all marker traits, and their affine-specific traits are automatically derived.