Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

remove unwraps in alt_bn128 syscall #28955

Merged

Conversation

ananas-block
Copy link
Contributor

Problem

Unwraps in syscalls can cause the local test validator to panic. The alt_bn128 syscall #27961 also uses unwraps.
You can reproduce the issue by passing in e.g. little endian bytes instead of big endian bytes.
This is difficult to catch in unit tests since tests for invalid inputs pass and don’t easily account for the the validator crashing.

Summary of Changes

Removed all unwraps in alt_bn128 syscalls.

Fixes #

@mergify mergify bot added the community Community contribution label Nov 24, 2022
@mergify mergify bot requested a review from a team November 24, 2022 19:24
@ananas-block ananas-block changed the title removed unwraps in alt_bn128 syscall remove unwraps in alt_bn128 syscall Nov 24, 2022
@ananas-block ananas-block marked this pull request as ready for review November 24, 2022 19:38
@Lichtso Lichtso merged commit a901fcc into solana-labs:master Dec 2, 2022
@ananas-block ananas-block deleted the remove_unwraps_in_alt_bn128 branch December 2, 2022 15:01
gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
@ananas-block ananas-block restored the remove_unwraps_in_alt_bn128 branch January 13, 2023 21:41
@ananas-block ananas-block deleted the remove_unwraps_in_alt_bn128 branch January 13, 2023 21:48
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants