-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: make FpOperations
use PrimeField32
to clean up type inconsistency hacks
#203
Conversation
core/src/operations/field/params.rs
Outdated
@@ -58,7 +56,7 @@ impl<'a, T: Debug + Default + Clone> From<Iter<'a, T>> for Limbs<T> { | |||
} | |||
|
|||
// TODO: we probably won't need this in the future when we do things properly. | |||
pub fn convert_polynomial<F: Field>(value: Polynomial<BabyBear>) -> Limbs<F> { | |||
pub fn convert_polynomial<F: PrimeField32>(value: Polynomial<F>) -> Limbs<F> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should be cleaned up since we don't need it anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
core/src/operations/field/params.rs
Outdated
@@ -69,8 +67,7 @@ pub fn convert_polynomial<F: Field>(value: Polynomial<BabyBear>) -> Limbs<F> { | |||
Limbs(inner) | |||
} | |||
|
|||
// TODO: we probably won't need this in the future when we do things properly. | |||
pub fn convert_vec<F: Field>(value: Vec<BabyBear>) -> Vec<F> { | |||
pub fn convert_vec<F: PrimeField32>(value: Vec<F>) -> Vec<F> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with cleaning this up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Currently, it takes
Field
but then under the hood, we actually useBabyBear
. This PR removes that hack and makesFpOperations
takePrimeField32
and use that, hence removing the hardcodedBabyBear
.