[go: up one dir, main page]

EVM Node: Enable executing Dionysus natively 馃崌

Checklist

  • Provide automatic testing.
  • Add an item in the changelog
  • Add a page in the doc

This patch introduces the necessary adjustment on Dionysus so that it can be natively executed.

There is currently two changes that are required for the native execution to be possible:

  1. The populate_delayed_inbox signature needs to be changed, because it is no longer called as a unit -> unit WASM function, but instead as a regular Rust function. This means we can remove the extern "C" annotation (required for exposing the function as a WASM function) and we can pass it explicitely the runtime host.

  2. We cannot rely on the InternalRuntime implementation hard-coded in the kernel to use the WASM host function for getting Irmin root hashes. Instead, we say the host passed as an argument of kernel_loop actually implements InternalRuntime. Basically, it is a way to inject the implementation of our choice. As a consequence, the KernelHost struct is simplified: it does no longer contain an implementor of InternalRuntime, as its Runtime implementor also implements InternalRuntime.

The kernel could be changed to make this updates unnecessary. But in the meantime, this patch does the necessary job.

Manually testing the MR

Edited by Alain Mebsout

Merge request reports

Loading