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

Fix(modexp): properly handle the case where the exponent is zero #771

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

birchmd
Copy link
Member

@birchmd birchmd commented Jun 7, 2023

Description

We need to specially handle the case where the exponent is zero because the main code does not do this correctly. Note: EVM treats 0^0 as equal to 1.

Testing

New test for this case.

@birchmd birchmd added C-bug Category: Something isn't working. A-precompiles Area: Issues that relate to the precompiles. labels Jun 7, 2023
@birchmd birchmd requested a review from aleksuss June 7, 2023 14:56
@birchmd birchmd requested a review from joshuajbouw as a code owner June 7, 2023 14:56
@birchmd birchmd added this pull request to the merge queue Jun 8, 2023
Merged via the queue into develop with commit 7de1115 Jun 8, 2023
19 checks passed
@birchmd birchmd deleted the birchmd/fix/modexp-zero branch June 8, 2023 13:01
birchmd added a commit that referenced this pull request Jun 22, 2023
## Description

We need to specially handle the case where the exponent is zero because
the main code does not do this correctly. Note: EVM treats 0^0 as equal
to 1.

## Testing

New test for this case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-precompiles Area: Issues that relate to the precompiles. C-bug Category: Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants