From 363dbbe8da517f10301225bb66e5f9a838fe0aea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= <alex.theissen@me.com>
Date: Tue, 16 Nov 2021 07:52:27 +0100
Subject: [PATCH] Forward wasmer-sandbox feature to sp-sandbox (#10268)

---
 substrate/Cargo.lock                  | 1 +
 substrate/bin/node/runtime/Cargo.toml | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock
index 99b2b53a74a..d93e7016292 100644
--- a/substrate/Cargo.lock
+++ b/substrate/Cargo.lock
@@ -4758,6 +4758,7 @@ dependencies = [
  "sp-npos-elections",
  "sp-offchain",
  "sp-runtime",
+ "sp-sandbox",
  "sp-session",
  "sp-staking",
  "sp-std",
diff --git a/substrate/bin/node/runtime/Cargo.toml b/substrate/bin/node/runtime/Cargo.toml
index d086b6f12d5..9a481120fd0 100644
--- a/substrate/bin/node/runtime/Cargo.toml
+++ b/substrate/bin/node/runtime/Cargo.toml
@@ -41,6 +41,7 @@ sp-transaction-pool = { version = "4.0.0-dev", default-features = false, path =
 sp-version = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/version" }
 sp-npos-elections = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/npos-elections" }
 sp-io = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/io" }
+sp-sandbox = { version = "0.10.0-dev", default-features = false, path = "../../../primitives/sandbox" }
 
 # frame dependencies
 frame-executive = { version = "4.0.0-dev", default-features = false, path = "../../../frame/executive" }
@@ -257,3 +258,8 @@ try-runtime = [
 # Make contract callable functions marked as __unstable__ available. Do not enable
 # on live chains as those are subject to change.
 contracts-unstable-interface = ["pallet-contracts/unstable-interface"]
+# Force `sp-sandbox` to call into the host resident executor. One still need to make sure
+# that `sc-executor` gets the `wasmer-sandbox` feature which happens automatically when
+# specified on the command line.
+# Don't use that on a production chain.
+wasmer-sandbox = ["sp-sandbox/wasmer-sandbox"]
-- 
GitLab