[go: up one dir, main page]

WASM PVM: Let `kernel_next` decide whether it should be called again or not

We propose to modify the logic of the “PVM scheduling” between input and computation ticks. The key insight is to let the kernel decide whether or not it should be called again within the same commitment period.

There is currently two approaches identified to implement this change:

  • Change the required signature of kernel_next to let return it something akin to an exit code.
  • Add a new host functions to ask to be rebooted/notify there is no need to reboot anymore

In any case, we need to add a upper bound in the number of time kernel_next can be called, and decide on the semantics of “not being called because it would exceed this bound.” At the very least, the kernel should have a way to know if it requests has been carried through or not (i.e., if it has been restarted in the next commitment period despite its request).