Switch parachain interface to new runtime_interface macro (#665)

* Make use of `runtime_interface` for parachain externalities

This also changes the encoding of the `ValidationResult` return value to
match the default encoding used in Substrate.

* Fix compilation for web

* Update `Cargo.lock`

* Include feedback

* Move proc macro

* Update parachain/src/lib.rs

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
Bastian Köcher
2020-01-08 20:44:50 +01:00
committed by GitHub
parent 10f1f3a381
commit 06386558ae
16 changed files with 468 additions and 609 deletions
+13 -7
View File
@@ -7,17 +7,20 @@ edition = "2018"
[dependencies]
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = [ "derive" ] }
wasmi = { version = "0.4.5", optional = true }
derive_more = { version = "0.14.1", optional = true }
serde = { version = "1.0.102", default-features = false, features = [ "derive" ] }
derive_more = { version = "0.99.2", optional = true }
serde = { version = "1.0.102", default-features = false, features = [ "derive" ], optional = true }
rstd = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", optional = true }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", optional = true }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", optional = true }
lazy_static = { version = "1.4.0", optional = true }
parking_lot = { version = "0.7.1", optional = true }
parking_lot = { version = "0.10.0", optional = true }
log = { version = "0.4.8", optional = true }
[target.'cfg(not(target_os = "unknown"))'.dependencies]
shared_memory = { version = "0.8.2", optional = true }
shared_memory = { version = "0.10.0", optional = true }
[dev-dependencies]
tiny-keccak = "1.5.0"
@@ -29,7 +32,6 @@ default = ["std"]
wasm-api = []
std = [
"codec/std",
"wasmi",
"derive_more",
"serde/std",
"rstd/std",
@@ -37,5 +39,9 @@ std = [
"sp-core/std",
"lazy_static",
"parking_lot",
"log"
"log",
"sp-runtime-interface/std",
"sp-externalities",
"sc-executor",
"sp-io",
]