Skip to content
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

Return -1 on n==0 for bls_g1_weighted_sum, bls_g2_weighted_sum, and bls_pairing #254

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Dec 6, 2023

Change Description

Return failure (-1) for n==0 for bls_g1_weighted_sum, bls_g2_weighted_sum, and bls_pairing.
Added return_code enum for return code error codes for bls and alt_bn128 and any others that use leap standard return_code enum.

API Changes

  • API Changes

See description.

Documentation Additions

  • Documentation Additions

See description.

Resolves #253

@heifner heifner added the OCI Work exclusive to OCI team label Dec 6, 2023
@heifner heifner requested review from arhag, greg7mdp and linh2931 and removed request for greg7mdp December 6, 2023 13:54
res.data(), res.size()
);
}
if (num == 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might as well add a unit test for num == 0 as you are in this area.

Copy link

@greg7mdp greg7mdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change needed? Wouldn't the internal functions return -1 as well if num == 0?

@heifner
Copy link
Member Author

heifner commented Dec 6, 2023

Why is this change needed? Wouldn't the internal functions return -1 as well if num == 0?

It simplifies the code.

@heifner heifner merged commit 1c151b5 into main Dec 6, 2023
@heifner heifner deleted the GH-253-bls-n0 branch December 6, 2023 17:26
@ericpassmore
Copy link
Contributor

Note:start
group: FEATURE
category: INTERNALS
summary: Return -1 on n==0 for bls_g1_weighted_sum, bls_g2_weighted_sum, and bls_pairing.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Return error for num == 0 for bls_g1_weighted_sum, bls_g2_weighted_sum and bls_pairing
5 participants