contracts: Validate code before deployment (#2330)

* Validate module before storing it in code_cache.

* Bump version.
This commit is contained in:
Sergei Pepyakin
2019-04-19 19:35:11 +02:00
committed by DemiMarie-parity
parent 2a463a7b2a
commit 07268022cc
8 changed files with 57 additions and 12 deletions
+3
View File
@@ -41,6 +41,9 @@ consensus_authorities = { package = "substrate-consensus-authorities", path = ".
[features]
default = ["std"]
core = [
"contract/core",
]
std = [
"parity-codec/std",
"substrate-primitives/std",
+1 -1
View File
@@ -59,7 +59,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("node"),
impl_name: create_runtime_str!("substrate-node"),
authoring_version: 10,
spec_version: 62,
spec_version: 63,
impl_version: 65,
apis: RUNTIME_API_VERSIONS,
};
+10
View File
@@ -2226,6 +2226,7 @@ dependencies = [
"srml-system 1.0.0",
"srml-timestamp 1.0.0",
"substrate-primitives 1.0.0",
"wasmi-validation 0.1.0",
]
[[package]]
@@ -3203,6 +3204,15 @@ dependencies = [
"parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wasmi-validation"
version = "0.1.0"
dependencies = [
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi"
version = "0.2.8"
+4 -1
View File
@@ -12,7 +12,10 @@ crate-type = ["cdylib"]
node-runtime = { path = "..", default-features = false }
[features]
default = []
default = ["core"]
core = [
"node-runtime/core",
]
std = [
"node-runtime/std",
]