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

Execution options for processor and prover #984

Closed
Tracked by #979
bobbinth opened this issue Jun 30, 2023 · 1 comment · Fixed by #998
Closed
Tracked by #979

Execution options for processor and prover #984

bobbinth opened this issue Jun 30, 2023 · 1 comment · Fixed by #998
Assignees
Labels
enhancement New feature or request processor Related to Miden VM processor
Milestone

Comments

@bobbinth
Copy link
Contributor

In some situations, we may want to provide additional info to the processor on how to execute a program. For example, we may want to specify the maximum number of cycles a program is allowed to consume (see #648). Or if we have some idea of how many cycles a program may execute for, we may give this hint to the processor so that it can allocated the required amount of memory upfront.

We can do this by updating processor::execute() function to look as follows:

pub fn execute<A>(
    program: &Program,
    stack_inputs: StackInputs,
    advice_provider: A,
    options: ExecutionOptions,
) -> Result<ExecutionTrace, ExecutionError>
where
    A: AdviceProvider,

Where ExecutionOptions could look like this:

pub struct ExecutionOptions {
    max_cycles: Option<u32>,
    expected_cycles: u32, // defaults to 64 if not specified
}

We will also need to update the ProofOptions currently accepted by prover::prove() function like so (and maybe rename it to ProvingOptions):

pub struct ProofOptions {
    pub hash_fn: HashFunction,
    pub exec_options: ExecutionOptions,
    pub proof_options: WinterProofOptions,
}
@bobbinth bobbinth added processor Related to Miden VM processor v0.7 labels Jun 30, 2023
@bobbinth bobbinth added the enhancement New feature or request label Jun 30, 2023
@Fumuran Fumuran linked a pull request Jul 4, 2023 that will close this issue
@Fumuran Fumuran linked a pull request Jul 8, 2023 that will close this issue
@bobbinth bobbinth removed the v0.7 label Jul 20, 2023
@bobbinth bobbinth added this to the v0.7 milestone Jul 20, 2023
@bobbinth
Copy link
Contributor Author

Closed by #991 and #998.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request processor Related to Miden VM processor
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants