Conversation
…ted yet (give Immediate18TooLarge error)
…Adjusted the uses of the corresponding functions.
Started with a few functions in fp6 and g1; these cannot be tested yet. Some are commented out because they might prevent compilation.
- Extract useful functions to utils.sw - Fuel-rs to version 0.19 in tests_bls12_381 Some functions are commented out in order for compilation to be possible.
- Added comment where error Immediate18TooLarge pops up & what functions work or not - Converted tests_fp and tests_fp2 to use a local node with custom gas limit - Fp2 multiplication fixed - Fixes in g1.sw
…, Fp2, Fp6) - Added a few untested functions for Fp6 (can't compile) - Adjustments for other functions that can now use Choice instead of bool
… neg and ct_eq - Implementation of some small traits in g1 and scalar - Updates to util.sw
There's some assembly in here because Sway doesn't support underflow natively. This is usually leveraged to avoid writing if else.
… test for lexicographically_largest_fp will still give an error.
- Moved tests for bls into testing folder - Included license from dalek-cryptography subtle library
…Also did some cleanup - Moved BitwiseXor for u32 to choice and wherever possible use the binary operator instead of function call - Updated README
84570d2 to
317b182
Compare
Mikerah
approved these changes
Oct 6, 2022
Contributor
Mikerah
left a comment
There was a problem hiding this comment.
We should clearly not what tests run but take way too long to run. Otherwise, LGTM
- Replaced some equals functions with the == symbol. - Uncommented all tests we can run at once
Contributor
Author
|
Made the last fixes as suggested, will merge now |
Contributor
|
🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a new branch that contains the changes requested in the previous PR.
Changes:
choice.swchoice.swintoutilslibrary so it can be reused easilyThis branch works on all comments in the previous PR, except for the last one about assembly versions of the computational heavy operations (whether that would be more efficient than pure Sway). I think it would be better to try that out in a separate branch.
@man2706kum shared that for him there occur some errors in compilation. For me on the other hand; I can compile and run the tests in
testing/tests_bls12_381for Fp succesfully. Might be some versioning issue, would be interesting to know whether you can compile @Mikerah.