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

feat: Add Proof mode Initialization & Loop #120

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Conversation

zmalatrax
Copy link
Collaborator

@zmalatrax zmalatrax commented Aug 1, 2024

Closes #134, #135

  • Builtins initialization: in proof mode, all builtins of the layout are initialized but only the ones used by the program are appended to the stack.

  • Specific stack initialization:

    • The Cairo Zero compiler adds instructions when compiling to proof mode, which requires prepending to the stack the the start of the builtin stack
    • The Cairo compiler does not add specific instructions, the end segment must be populated with a JumpRel 0 instruction.
  • Introduces a RunnerMode enum for different initialization steps depending on the run context.

  • The different checks (builtins usage, range_check, memory and diluted pool) have been inline in a single method checkCellsUsage(), which returns a boolean whether they passed for the chosen layout.

@zmalatrax zmalatrax changed the title feat: Add Proof mode feat: Add Proof mode Initialization & Loop Aug 12, 2024
@zmalatrax zmalatrax linked an issue Aug 13, 2024 that may be closed by this pull request
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: add Proof Mode Loop and Cells Checks feat: add Proof Mode initialization
1 participant