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

made builtins usable and added tests #63

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

AntoineFONDEUR
Copy link
Collaborator

@AntoineFONDEUR AntoineFONDEUR commented Dec 8, 2024

made builtins usable and added tests

Time spent on this PR: 1d

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Currently only the range_check, bitwise and pedersen builtins are actually usable and are tested.

Resolves #62

What is the new behavior?

Cairo programs that include the following builtins can be ran on the GS Cairo VM:

  • range_check and range_check96 with a modification in the way these "0-inputCell" buitlins are implemented : now the range_check(96) is done at the beggining of each step meaning that at the beggining of each step we verify that all the values in the range_check(96) column(s) are of the form "=RANGE_CHECK("...")",
  • pedersen,
  • bitwise,
  • poseidon now takes 3 inputs and returns 3 values,
  • keccak (new implementation because the old one didn't pass the tests),
  • ec_op.

All builtins now take as input a string[][] (which corresponds to the cells in range of form "J2:J9") that is then unpacked.
They also now return a string[] which contains multiple outputs for builtins that need it (instead of mentionning multiple function names).

Added cairo0 test programs and their compiled version.

Updated the gs test runner.

NOTE: ECSDA is no longer used in Cairo 1.

@ClementWalter ClementWalter merged commit 59ffa4c into ClementWalter:main Dec 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: run program with all cairo builtins
2 participants