Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Refactor sc-executor interface so that the engine is reused #8251

Open
pepyakin opened this issue Mar 3, 2021 · 1 comment
Open

Refactor sc-executor interface so that the engine is reused #8251

pepyakin opened this issue Mar 3, 2021 · 1 comment
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task.

Comments

@pepyakin
Copy link
Contributor

pepyakin commented Mar 3, 2021

A note on terminology first:

  • wasm runtime - is a wasm bytecode blob that provides the logic of blockchain built on substrate
  • execution engine - is piece of software that is able to execute a given wasm bytecode,
  • executor - a module of Substrate that sets up an engine for executing a wasm runtime

Right now, the sc-executor interface to a runtime is split onto two parts:

  • WasmModule
  • WasmRuntime

WasmModule is an object that represents a wasm runtime and obtained by giving an engine a wasm blob. Then it can be used to get an instance of WasmRuntime, i.e. an instantiated wasm module that is ready for serving runtime calls.

This split is very important for the engines that require non-trivial amount to get a prepared module, i.e. that use compilation.

However, this model doesn't recognize a need of reusing something across all WasmModule or WasmRuntimes. For example, in sc-executor-runtime Engine and Store instances are not shared among WasmModules.

@pepyakin pepyakin added the I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. label Mar 3, 2021
@stale
Copy link

stale bot commented Jul 7, 2021

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 7, 2021
@pepyakin pepyakin removed the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task.
Projects
None yet
Development

No branches or pull requests

1 participant