Skip to content

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

Merged
heifner merged 1 commit intomainfrom
GH-253-bls-n0
Dec 6, 2023
Merged

Return -1 on n==0 for bls_g1_weighted_sum, bls_g2_weighted_sum, and bls_pairing#254
heifner merged 1 commit intomainfrom
GH-253-bls-n0

Conversation

@heifner
Copy link
Contributor

@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
Contributor

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
Contributor

@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
Contributor 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