Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was 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

Description

@pepyakin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I9-optimisationAn enhancement to provide better overall performance in terms of time-to-completion for a task.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions