-
Notifications
You must be signed in to change notification settings - Fork 180
dev: make BuiltinRunner::included public #1989
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
base: main
Are you sure you want to change the base?
Conversation
Hi @enitrat! Could you update the changelog? |
There are some conflicts blocking the CI run. Could you resolve them? |
Hi @enitrat ! Could you give permission to edit the branch? That way we can fix the conflicts ourselves when changelog is updated, instead of making you do it. |
Hey @gabrielbosio @JulianGCalderon anything required from me here? |
Hi @enitrat! There are some conflicts in this branch. Could you allow us to push changes to it, so that we can resolve them? |
Hi @JulianGCalderon sorry but I don't see the "Allow edits from maintain" option on github :( Not sure why it's not showing here. I fixed the conflicts myself |
I think it's because my branch is made on an organization repo, not a personnal one 🤔 |
Hi, @enitrat, I'm not sure I understand why you need to call |
I want to call |
Ok, but if you call |
I only want to run |
because I have hundreds of different functions, called thousands of times during the execution of my program, all unit-tested by invoking them directly, and each builtin that's passed as argument is two more steps per call which is not something I want to accept |
Hi @enitrat! Whether a builtin is included or not depends on: (see initialize_builtins)
If you have this information, you could calculate it manually as a workaround. Is doing this a possibility? |
I don't understand why I would have to go through a workaround, when there already exists a function that, given the current layout, the program, and whether proof mode is enabled of not, returns whether the builtin is included or not. This is essentially the same as me re-coding the exact same function locally, which is not something I want to do. At this point it would be easier for me to just fork the cairo vm and add a |
This PR makes the API of the VM bigger which is something we need to take care of because we don't know what implications this change may have long term in terms of increase of complexity and decrease of maintainability.
The function we're talking about in this discussion might change its logic in the future. Even that function may be removed in the future (who knows, it's not public so a refactor like that can happen), so implementing logic in an module that uses the VM might seem like re-coding but we're talking about code in the VM that's internal and not accessible by external modules for the sake of simplicity and maintainability. |
Ok, then I will just keep using my fork :/ |
Make BuiltinRunner::included public
Description
I made this function public. I need this because when a specific function is ran in proof_mode, that function only takes N out of M builtins, where M is the total amount of builtins for the layout. Then, I can check if a builtin is included (among N) or not, and if it's not, instantly call
final_stack
and write it to the execution_public_memory so that I can generate a valid proof.Description of the pull request changes and motivation.
Checklist