[go: up one dir, main page]

SCORU/WASM: Implement rebootable kernels without consuming inputs

Context

This MR implements #3869 (closed): it allows a kernel to reboot without consuming the next input tick, by simply putting the flag /kernel/env/reboot to 1 in the durable storage. The PVM then restarts with a new kernel_next maximum ticks. The key /kernel/env/reboot is arbitrarily chosen and can be obviously changed, but it made me think of an environment variable for kernels.

The MR also provides a handily crafted kernel that reboots and count the number of reboots, and tests that a rebooting kernel cannot exceed the maximum number of ticks per top level calls.

Manually testing the MR

The reboot tests can be launched directly through:

dune exec src/lib_scoru_wasm/test/test_scoru_wasm.exe -- test "WASM PVM" 12,13 

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Pierrick Couderc

Merge request reports

Loading