EVM Node: Enable executing Dionysus natively 馃崌
Checklist
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:
-
The
populate_delayed_inboxsignature needs to be changed, because it is no longer called as aunit -> unitWASM function, but instead as a regular Rust function. This means we can remove theextern "C"annotation (required for exposing the function as a WASM function) and we can pass it explicitely the runtime host. -
We cannot rely on the
InternalRuntimeimplementation hard-coded in the kernel to use the WASM host function for getting Irmin root hashes. Instead, we say thehostpassed as an argument ofkernel_loopactually implementsInternalRuntime. Basically, it is a way to inject the implementation of our choice. As a consequence, theKernelHoststruct is simplified: it does no longer contain an implementor ofInternalRuntime, as itsRuntimeimplementor also implementsInternalRuntime.
The kernel could be changed to make this updates unnecessary. But in the meantime, this patch does the necessary job.