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 layouts #119

Merged
merged 25 commits into from
Jul 30, 2024
Merged

feat: add layouts #119

merged 25 commits into from
Jul 30, 2024

Conversation

zmalatrax
Copy link
Collaborator

@zmalatrax zmalatrax commented Jul 25, 2024

Closes #89

  • Add builtins validation against the layout.
  • Add a flag -l, --layout in the CLI
  • ratio values which were living in the BuiltinInstanceDef in other implementations are refactored into the Layout as the ratios dictionnary.
  • getBuiltinSegment method which allows extracting any memory segment which represents a builtin. It needs to know which builtins have been initialized by the run.
  • builtins attribute for CairoRunner, needed for getBuiltinSegment

NOTE: The builtins attribute currently stores the builtins used by the called program entrypoint (program.builtins). It works well in ExecutionMode as only the builtins in the program are used. However, in Proof Mode, all the builtins from the chosen layout are initialized, that won't be represented by the current builtins attribute.
When introducting the proof mode, this builtins attribute initialization should be refactored to take this into account.

@zmalatrax zmalatrax self-assigned this Jul 25, 2024
@zmalatrax zmalatrax marked this pull request as ready for review July 29, 2024 14:33
enitrat
enitrat previously approved these changes Jul 30, 2024
src/runners/layout.ts Outdated Show resolved Hide resolved
@enitrat enitrat merged commit 6b9bb03 into main Jul 30, 2024
3 checks 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: add Layouts
3 participants