[go: up one dir, main page]

Expose function to perform multiple compute steps in one call

The PVM executor exposed by lib_scoru_wasm currently exposes a val compute_step : state -> state Lwt.t function that can be used to advance the WASM PVM when it needs no input.

compute_step involves decoding many parts of the PVM state, advancing the PVM state, and then encoding it again. That means when chaining compute_step calls, the borders of these calls perform redundant encoding and then decoding.

We want to have a function val compute_step_many : steps:int64 -> state -> (int64 * state) Lwt.t that behaves identical to compute_step when steps = 1. The idea is that this function can execute up to steps ticks while only needing to decode and encode once.

Edited by Ole Krüger