Add Stark101 tutorial's prime field #875
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Stark101 Prime Field
Description
I have been implementing the Stark101 tutorial using LambdaWorks (see here), and I had implemented the field used within the tutorial.
The prime field order is
3 * 2^30 + 1
, which is FFT-friendly, however I cant implement theIsFFTFriendly
trait for this custom field because the custom field is constructed as shown below:which means that
Stark101PrimeField
is an alias of theU64PrimeField
which does not belong to my crate, therefore I cant implementIsFFTFriendly
(which also does not belong to my crate) to it.The solution is therefore to add the field directly to LambdaWorks itself, and use it.
Note
Although it is ok to use the non-FFT interpolation for the tutorial, which is used for interpolating over 1024 elements, I think its nice that we have the opportunity to use FFT as well. If not, one can complete the tutorial by implementing the field themselves.
Type of change
Checklist