This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Forward wasmer-sandbox feature to sp-sandbox#10268
Merged
paritytech-processbot[bot] merged 1 commit intomasterfrom Nov 16, 2021
Merged
Forward wasmer-sandbox feature to sp-sandbox#10268paritytech-processbot[bot] merged 1 commit intomasterfrom
paritytech-processbot[bot] merged 1 commit intomasterfrom
Conversation
bkchr
approved these changes
Nov 15, 2021
0x7CFE
approved these changes
Nov 16, 2021
Member
Author
|
bot merge |
2 tasks
grishasobol
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Mar 28, 2022
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes an issue where the
wasmer-sandboxfeature wasn't properly forwarded tosp-sandbox. The effect was that even thoughsc-executorwas providing a wasmer sandbox (instead of a wasmi one), it wasn't used becausesp-sandboxwas using the embedded executor (as it should in production use cases to not rely on the sandboxing host functions). The reason why we need this forwarding is becausesp-sandboxis part of the runtime and features supplied on the CLI are only applied when piped through thenode-runtimecrate.You can see the effects from it in this PR where there is no difference in weight. The bug was introduced by: #9592.
I reran the end-to-end benchmarks on Linux with the following CLI:
The results now clearly indicate that they were run with different execution engines. Unfortunately, it confirmed our suspicion that wasmer is even slower than wasmi on these example contracts. Weight benchmarks suggest that slowness of host function calling might be responsible.
g = {0, 1}means without or with gas metering injected.