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: Add missing boolean constraints for is_real flag #1822

Closed
wants to merge 1 commit into from

Conversation

Nashtare
Copy link
Contributor

Motivation

There seem to be some missing boolean checks on the is_real flag for some precompiles.

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@nhtyy nhtyy added rust Pull requests that update Rust code cryptography An issue or feature that changes or adds cryptographic operations core Issues or PRs relating to SP1 core labels Nov 26, 2024
@rkm0959
Copy link
Contributor

rkm0959 commented Nov 26, 2024

The is_real checks are done implicitly outside of the AIR functions. For example, consider fp.rs.

There, eval_memory_access_slice is called with is_real as verify_memory_access. If you go to that function you will see that the first thing done in eval_memory_access is that do_check, which is the verify_memory_access value, is checked to be boolean. The same idea goes for every syscall.

@Nashtare Nashtare closed this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues or PRs relating to SP1 core cryptography An issue or feature that changes or adds cryptographic operations rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants