-
Notifications
You must be signed in to change notification settings - Fork 142
SIMD-0334: Fix alt_bn128_pairing syscall length check #324
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
Conversation
|
Clippy gives error only for |
|
I fixed everywhere. It looks like clippy does not see code inside |
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.
Yep, all the changes look good to me. Let's just make the length check style more consistent for the Solana target and then this should be good.
| .checked_rem(ALT_BN128_PAIRING_ELEMENT_SIZE) | ||
| .is_none() | ||
| { | ||
| if input.len() % ALT_BN128_PAIRING_ELEMENT_SIZE != 0 { |
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.
Let's change this to the clippy style as was done in alt_bn128_versioned_pairing.
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.
This is what I did at first, but CI failed because is_multiple_of is unstable feature in sbf compiler.
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.
Oh I see. Sorry, I was also wondering why you reverted there. I think the changes are good as is then.
| .checked_rem(ALT_BN128_PAIRING_ELEMENT_SIZE) | ||
| .is_none() | ||
| { | ||
| if input.len() % ALT_BN128_PAIRING_ELEMENT_SIZE != 0 { |
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 here.
Implemented SDK changes for SIMD-0334