cairo-vm icon indicating copy to clipboard operation
cairo-vm copied to clipboard

Add run_for_steps and run_until_steps functions to CairoRunner methods

Open entropidelic opened this issue 3 years ago • 0 comments

We have to add the functionality analogous to the original Cairo VM. The original implementations can be seen here https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/cairo/lang/vm/cairo_runner.py

In a nuthsell, run_for_steps runs the VM for a fixed number of steps, and run_until_steps uses the number of steps passed as input and the current step of the vm, takes the difference of both and with that, runs the vm for that number of steps. If this sounds confusing, please make sure to check the code in the link, it is pretty self-explanatory.

I don't think two different PRs will be needed to solve this ticket, but if the PR gets too big, please consider dividing it into two distinct PRs.

entropidelic avatar Oct 07 '22 22:10 entropidelic