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.

Compiled code wasm execution engine for the sandbox capability #2633

@pepyakin

Description

@pepyakin

At the moment we use wasmi for executing code in the sandbox, which is rather slow compared to even non-highly-optimizing compilers such as lightbeam. A step for improving this would be to integrate wasmtime/lightbeam there.

Note that we at this moment assume that wasm executed in sandbox is untrusted. The reason for that is that the primary user of the sandboxing capability is the srml-contract module. This might, however, change because especially taking into the account that sandbox is designed to be more or less universal.

Furthermore, there was an idea of a feature for srml-contract, that allows governance to mark some code_hash as trusted allowing to us to employ the highest tier compiler available on board of the node to compile this code. This would require specifying the desired properties of compiler when instantiating a wasm module with the sandbox.

We have similar problem for the runtime #2634 , so it might make sense to think about the complete solution.

Metadata

Metadata

Assignees

Labels

A3-in_progressPull request is in progress. No review needed at this stage.J0-enhancementAn additional feature request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions