Make everything compile again

This commit is contained in:
Bastian Köcher
2019-10-02 16:52:08 +02:00
parent 1ceecff053
commit e91c8e78f2
5 changed files with 97 additions and 134 deletions
+43 -42
View File
@@ -536,8 +536,10 @@ name = "cumulus-collator"
version = "0.1.0"
dependencies = [
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-collator 0.6.0 (git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch)",
"polkadot-primitives 0.6.0 (git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch)",
"sr-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=bkchr-cumulus-branch)",
@@ -550,7 +552,6 @@ dependencies = [
name = "cumulus-consensus"
version = "0.1.0"
dependencies = [
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -614,7 +615,7 @@ dependencies = [
"clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"subtle 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1216,9 +1217,9 @@ dependencies = [
"tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1741,7 +1742,7 @@ dependencies = [
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-udp 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2086,7 +2087,7 @@ dependencies = [
[[package]]
name = "merlin"
version = "1.2.0"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2449,7 +2450,7 @@ dependencies = [
[[package]]
name = "parity-wasm"
version = "0.40.2"
version = "0.40.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -2613,7 +2614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "polkadot-availability-store"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)",
"kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)",
@@ -2628,7 +2629,7 @@ dependencies = [
[[package]]
name = "polkadot-cli"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2642,7 +2643,7 @@ dependencies = [
[[package]]
name = "polkadot-collator"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2663,7 +2664,7 @@ dependencies = [
[[package]]
name = "polkadot-executor"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"polkadot-runtime 0.6.0 (git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch)",
"substrate-executor 2.0.0 (git+https://github.com/paritytech/substrate?branch=bkchr-cumulus-branch)",
@@ -2672,7 +2673,7 @@ dependencies = [
[[package]]
name = "polkadot-network"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
"exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2692,7 +2693,7 @@ dependencies = [
[[package]]
name = "polkadot-parachain"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2708,7 +2709,7 @@ dependencies = [
[[package]]
name = "polkadot-primitives"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"bitvec 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2726,7 +2727,7 @@ dependencies = [
[[package]]
name = "polkadot-runtime"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"bitvec 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2777,7 +2778,7 @@ dependencies = [
[[package]]
name = "polkadot-service"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2818,7 +2819,7 @@ dependencies = [
[[package]]
name = "polkadot-statement-table"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-primitives 0.6.0 (git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch)",
@@ -2828,7 +2829,7 @@ dependencies = [
[[package]]
name = "polkadot-validation"
version = "0.6.0"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#979e1982c724ba4070fedc7d0ed949e719f572f5"
source = "git+https://github.com/paritytech/polkadot?branch=bkchr-cumulus-branch#824b270e661473a76dd38bd2dbce41c2b2575668"
dependencies = [
"bitvec 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3328,12 +3329,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"merlin 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"merlin 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"subtle 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3571,7 +3572,7 @@ dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"subtle 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4320,7 +4321,7 @@ dependencies = [
"futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
"futures-timer 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"merlin 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"merlin 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4421,7 +4422,7 @@ dependencies = [
"libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-wasm 0.40.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-wasm 0.40.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 2.0.0 (git+https://github.com/paritytech/substrate?branch=bkchr-cumulus-branch)",
"sr-version 2.0.0 (git+https://github.com/paritytech/substrate?branch=bkchr-cumulus-branch)",
@@ -4510,7 +4511,7 @@ dependencies = [
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"substrate-application-crypto 2.0.0 (git+https://github.com/paritytech/substrate?branch=bkchr-cumulus-branch)",
"substrate-primitives 2.0.0 (git+https://github.com/paritytech/substrate?branch=bkchr-cumulus-branch)",
"subtle 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4954,7 +4955,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "subtle"
version = "2.1.1"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -5103,10 +5104,10 @@ dependencies = [
"tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-udp 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -5168,7 +5169,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -5183,7 +5184,7 @@ dependencies = [
[[package]]
name = "tokio-reactor"
version = "0.1.9"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -5192,7 +5193,7 @@ dependencies = [
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -5231,21 +5232,21 @@ dependencies = [
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "tokio-threadpool"
version = "0.1.15"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -5272,7 +5273,7 @@ dependencies = [
"mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -5289,7 +5290,7 @@ dependencies = [
"mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -5579,7 +5580,7 @@ dependencies = [
"memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-wasm 0.40.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-wasm 0.40.3 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmi-validation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -5596,7 +5597,7 @@ name = "wasmi-validation"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"parity-wasm 0.40.2 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-wasm 0.40.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -5979,7 +5980,7 @@ dependencies = [
"checksum memory-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ef49315991403ba5fa225a70399df5e115f57b274cb0b1b4bcd6e734fa5bd783"
"checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882"
"checksum memrange 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cc29ba65898edc4fdc252cb31cd3925f37c1a8ba25bb46eec883569984976530"
"checksum merlin 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "66448a173ad394ef5ebf734efa724f3644dcffda083b1e89979da4461ddac079"
"checksum merlin 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "de2d16d3b15fec5943d1144f861f61f279d165fdd60998ca262913b9bf1c8adb"
"checksum miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202"
"checksum miniz_oxide 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7108aff85b876d06f22503dcce091e29f76733b2bfdd91eebce81f5e68203a10"
"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23"
@@ -6017,7 +6018,7 @@ dependencies = [
"checksum parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f"
"checksum parity-util-mem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2005637ccf93dbb60c85081ccaaf3f945f573da48dcc79f27f9646caa3ec1dc"
"checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc"
"checksum parity-wasm 0.40.2 (registry+https://github.com/rust-lang/crates.io-index)" = "49d1e33551976be5345d2ecbfe995830719746c7f0902f0880a13d40e215f851"
"checksum parity-wasm 0.40.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1e39faaa292a687ea15120b1ac31899b13586446521df6c149e46f1584671e0f"
"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5"
"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337"
"checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7"
@@ -6216,7 +6217,7 @@ dependencies = [
"checksum substrate-wasm-builder-runner 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "af21b27fad38b212c1919f700cb0def33c88cde14d22e0d1b17d4521f4eb8b40"
"checksum substrate-wasm-interface 2.0.0 (git+https://github.com/paritytech/substrate?branch=bkchr-cumulus-branch)" = "<none>"
"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
"checksum subtle 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "01f40907d9ffc762709e4ff3eb4a6f6b41b650375a3f09ac92b641942b7fb082"
"checksum subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab3af2eb31c42e8f0ccf43548232556c42737e01a96db6e1777b0be108e79799"
"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf"
"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f"
@@ -6239,11 +6240,11 @@ dependencies = [
"checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac"
"checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af"
"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926"
"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce"
"checksum tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c56391be9805bc80163151c0b9e5164ee64f4b0200962c346fea12773158f22d"
"checksum tokio-rustls 0.10.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3e5cebc3ca33110e460c4d2e7c5e863b159fadcbf125449d896720695b2af709"
"checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7"
"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119"
"checksum tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "90ca01319dea1e376a001e8dc192d42ebde6dd532532a5bad988ac37db365b19"
"checksum tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd2c6a3885302581f4401c82af70d792bb9df1700e7437b0aeb4ada94d5388c"
"checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e"
"checksum tokio-udp 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f02298505547f73e60f568359ef0d016d5acd6e830ab9bc7c4a5b3403440121b"
"checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445"
+3 -1
View File
@@ -17,5 +17,7 @@ polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch =
# other deps
log = "0.4.8"
codec = { package = "parity-scale-codec", version = "1.0.5", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "1.0.6", features = [ "derive" ] }
futures = "0.1.29"
futures03 = { package = "futures-preview", version = "0.3.0-alpha.19"}
parking_lot = "0.9"
+48 -28
View File
@@ -16,7 +16,7 @@
//! Cumulus Collator implementation for Substrate.
use runtime_primitives::{traits::Block as BlockT, ed25519};
use runtime_primitives::traits::Block as BlockT;
use consensus_common::{Environment, Proposer};
use inherents::InherentDataProviders;
@@ -24,15 +24,24 @@ use polkadot_collator::{
InvalidHead, ParachainContext, BuildParachainContext, Network as CollatorNetwork, VersionInfo,
};
use polkadot_primitives::{
Hash, parachain::{self, BlockData, Message, Id as ParaId, Extrinsic, Status as ParachainStatus}
Hash,
parachain::{
self, BlockData, Message, Id as ParaId, OutgoingMessages, Status as ParachainStatus,
CollatorPair,
}
};
use codec::{Decode, Encode};
use log::error;
use futures03::TryFutureExt;
use futures::{Future, future::IntoFuture};
use std::{sync::Arc, marker::PhantomData, time::Duration};
use parking_lot::Mutex;
/// The head data of the parachain, stored in the relay chain.
#[derive(Decode, Encode, Debug)]
struct HeadData<Block: BlockT> {
@@ -41,7 +50,7 @@ struct HeadData<Block: BlockT> {
/// The implementation of the Cumulus `Collator`.
pub struct Collator<Block, PF> {
proposer_factory: Arc<PF>,
proposer_factory: Arc<Mutex<PF>>,
_phantom: PhantomData<Block>,
inherent_data_providers: InherentDataProviders,
collator_network: Arc<dyn CollatorNetwork>,
@@ -50,12 +59,12 @@ pub struct Collator<Block, PF> {
impl<Block: BlockT, PF: Environment<Block>> Collator<Block, PF> {
/// Create a new instance.
fn new(
proposer_factory: Arc<PF>,
proposer_factory: PF,
inherent_data_providers: InherentDataProviders,
collator_network: Arc<dyn CollatorNetwork>,
) -> Self {
Self {
proposer_factory,
proposer_factory: Arc::new(Mutex::new(proposer_factory)),
inherent_data_providers,
_phantom: PhantomData,
collator_network,
@@ -76,15 +85,18 @@ impl<Block, PF> Clone for Collator<Block, PF> {
impl<Block, PF> ParachainContext for Collator<Block, PF> where
Block: BlockT,
PF: Environment<Block> + 'static,
PF: Environment<Block> + 'static + Send + Sync,
PF::Error: std::fmt::Debug,
PF::Proposer: Send + Sync,
<PF::Proposer as Proposer<Block>>::Create: Unpin + Send + Sync,
{
type ProduceCandidate = Box<
dyn Future<Item=(BlockData, parachain::HeadData, Extrinsic), Error=InvalidHead>
dyn Future<Item=(BlockData, parachain::HeadData, OutgoingMessages), Error=InvalidHead>
+ Send + Sync
>;
fn produce_candidate<I: IntoIterator<Item=(ParaId, Message)>>(
&self,
&mut self,
_relay_chain_parent: Hash,
status: ParachainStatus,
_: I,
@@ -93,13 +105,16 @@ impl<Block, PF> ParachainContext for Collator<Block, PF> where
let inherent_providers = self.inherent_data_providers.clone();
let res = HeadData::<Block>::decode(&mut &status.head_data.0[..])
.ok_or_else(|| InvalidHead).into_future()
.map_err(|_| InvalidHead)
.into_future()
.and_then(move |last_head|
factory.init(&last_head.header).map_err(|e| {
//TODO: Do we want to return the real error?
error!("Could not create proposer: {:?}", e);
InvalidHead
})
factory.lock()
.init(&last_head.header)
.map_err(|e| {
//TODO: Do we want to return the real error?
error!("Could not create proposer: {:?}", e);
InvalidHead
})
)
.and_then(move |proposer|
inherent_providers.create_inherent_data()
@@ -109,25 +124,25 @@ impl<Block, PF> ParachainContext for Collator<Block, PF> where
InvalidHead
})
)
.and_then(|(proposer, inherent_data)| {
.and_then(|(mut proposer, inherent_data)| {
proposer.propose(
inherent_data,
Default::default(),
//TODO: Fix this.
Duration::from_secs(6),
)
.into_future()
.map_err(|e| {
error!("Proposing failed: {:?}", e);
InvalidHead
})
.compat()
})
.map(|b| {
let block_data = BlockData(b.encode());
let head_data = HeadData::<Block> { header: b.deconstruct().0 };
let extrinsic = Extrinsic { outgoing_messages: Vec::new() };
let messages = OutgoingMessages { outgoing_messages: Vec::new() };
(block_data, parachain::HeadData(head_data.encode()), extrinsic)
(block_data, parachain::HeadData(head_data.encode()), messages)
});
Box::new(res)
@@ -137,13 +152,13 @@ impl<Block, PF> ParachainContext for Collator<Block, PF> where
/// Implements `BuildParachainContext` to build a collator instance.
struct CollatorBuilder<Block, PF> {
inherent_data_providers: InherentDataProviders,
proposer_factory: Arc<PF>,
proposer_factory: PF,
_phantom: PhantomData<Block>,
}
impl<Block, PF> CollatorBuilder<Block, PF> {
/// Create a new instance of self.
fn new(proposer_factory: Arc<PF>, inherent_data_providers: InherentDataProviders) -> Self {
fn new(proposer_factory: PF, inherent_data_providers: InherentDataProviders) -> Self {
Self {
inherent_data_providers,
proposer_factory,
@@ -154,8 +169,10 @@ impl<Block, PF> CollatorBuilder<Block, PF> {
impl<Block, PF> BuildParachainContext for CollatorBuilder<Block, PF> where
Block: BlockT,
PF: Environment<Block> + 'static,
PF: Environment<Block> + 'static + Send + Sync,
PF::Error: std::fmt::Debug,
PF::Proposer: Send + Sync,
<PF::Proposer as Proposer<Block>>::Create: Unpin + Send + Sync,
{
type ParachainContext = Collator<Block, PF>;
@@ -166,19 +183,22 @@ impl<Block, PF> BuildParachainContext for CollatorBuilder<Block, PF> where
/// Run a collator with the given proposer factory.
pub fn run_collator<Block, PF, E, I>(
proposer_factory: Arc<PF>,
proposer_factory: PF,
inherent_data_providers: InherentDataProviders,
para_id: ParaId,
exit: E,
key: Arc<ed25519::Pair>,
args: I,
key: Arc<CollatorPair>,
version: VersionInfo,
) -> Result<(), cli::error::Error>
where
Block: BlockT,
PF: Environment<Block> + 'static + Send,
PF::Error: std::fmt::Debug
PF: Environment<Block> + 'static + Send + Sync,
PF::Error: std::fmt::Debug,
PF::Proposer: Send + Sync,
<PF::Proposer as Proposer<Block>>::Create: Unpin + Send + Sync,
E: IntoFuture<Item=(), Error=()>,
E::Future: Send + Clone + Sync + 'static,
{
let builder = CollatorBuilder::new(proposer_factory, inherent_data_providers);
polkadot_collator::run_collator(builder, para_id, exit, key, args, version)
}
polkadot_collator::run_collator(builder, para_id, exit, key, version)
}
+1 -2
View File
@@ -17,8 +17,7 @@ polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch =
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "bkchr-cumulus-branch" }
# other deps
futures = "0.1.29"
futures03 = { package = "futures-preview", version = "0.3.0-alpha.18"}
futures = { package = "futures-preview", version = "0.3.0-alpha.19"}
tokio = "0.1.22"
codec = { package = "parity-scale-codec", version = "1.0.5", features = [ "derive" ] }
log = "0.4"
+2 -61
View File
@@ -22,9 +22,7 @@ use sr_primitives::traits::{Block as BlockT, Header as HeaderT, ProvideRuntimeAp
use polkadot_primitives::{Hash as PHash, Block as PBlock};
use polkadot_primitives::parachain::{Id as ParaId, ParachainHost};
use futures03::{
Stream, stream, StreamExt, TryStreamExt, TryStream, future, Future, TryFutureExt, FutureExt,
};
use futures::{Stream, StreamExt, TryStreamExt, future, Future, TryFutureExt, FutureExt};
use codec::{Encode, Decode};
use log::warn;
@@ -35,10 +33,6 @@ pub trait LocalClient {
/// The block type of the local client.
type Block: BlockT;
/// Mark the given block as the best block.
/// Returns `false` if the block is not known.
fn mark_best(&self, hash: <Self::Block as BlockT>::Hash) -> ClientResult<bool>;
/// Finalize the given block.
/// Returns `false` if the block is not known.
fn finalize(&self, hash: <Self::Block as BlockT>::Hash) -> ClientResult<bool>;
@@ -67,13 +61,9 @@ pub trait PolkadotClient: Clone {
/// The error type for interacting with the Polkadot client.
type Error: std::fmt::Debug + Send;
/// A stream that yields updates to the parachain head.
type HeadUpdates: Stream<Item = HeadUpdate> + Send;
/// A stream that yields finalized head-data for a certain parachain.
type Finalized: Stream<Item = Vec<u8>> + Send;
/// Get a stream of head updates.
fn head_updates(&self, para_id: ParaId) -> ClientResult<Self::HeadUpdates>;
/// Get a stream of finalized heads.
fn finalized_heads(&self, para_id: ParaId) -> ClientResult<Self::Finalized>;
}
@@ -85,23 +75,8 @@ pub fn follow_polkadot<'a, L: 'a, P: 'a>(para_id: ParaId, local: Arc<L>, polkado
L: LocalClient + Send + Sync,
P: PolkadotClient + Send + Sync,
{
let head_updates = polkadot.head_updates(para_id)?;
let finalized_heads = polkadot.finalized_heads(para_id)?;
let follow_best = {
let local = local.clone();
head_updates
.map(|update| {
<Option<<L::Block as BlockT>::Header>>::decode(&mut &update.head_data[..])
.map_err(|_| Error::InvalidHeadData)
})
.try_filter_map(|h| future::ready(Ok(h)))
.try_for_each(move |p_head| {
future::ready(local.mark_best(p_head.hash()).map_err(Error::Client).map(|_| ()))
})
};
let follow_finalized = {
let local = local.clone();
@@ -117,7 +92,7 @@ pub fn follow_polkadot<'a, L: 'a, P: 'a>(para_id: ParaId, local: Arc<L>, polkado
};
Ok(
future::try_join(follow_best, follow_finalized)
follow_finalized
.map_err(|e| warn!("Could not follow relay-chain: {:?}", e))
.map(|_| ())
)
@@ -130,16 +105,6 @@ impl<B, E, Block, RA> LocalClient for Client<B, E, Block, RA> where
{
type Block = Block;
fn mark_best(&self, hash: <Self::Block as BlockT>::Hash) -> ClientResult<bool> {
match self.set_head(BlockId::hash(hash)) {
Ok(()) => Ok(true),
Err(e) => match e {
ClientError::UnknownBlock(_) => Ok(false),
_ => Err(e),
}
}
}
fn finalize(&self, hash: <Self::Block as BlockT>::Hash) -> ClientResult<bool> {
match self.finalize_block(BlockId::hash(hash), None, true) {
Ok(()) => Ok(true),
@@ -168,32 +133,8 @@ impl<B, E, RA> PolkadotClient for Arc<Client<B, E, PBlock, RA>> where
{
type Error = ClientError;
type HeadUpdates = Box<dyn Stream<Item=HeadUpdate> + Send + Unpin>;
type Finalized = Box<dyn Stream<Item=Vec<u8>> + Send + Unpin>;
fn head_updates(&self, para_id: ParaId) -> ClientResult<Self::HeadUpdates> {
let parachain_key = parachain_key(para_id);
let stream = self.storage_changes_notification_stream(Some(&[parachain_key.clone()]), None)?;
let s = stream.filter_map(move |(hash, changes)| {
let head_data = changes.iter()
.filter_map(|(_, k, v)| if k == &parachain_key { Some(v) } else { None })
.next();
let res = match head_data {
Some(Some(head_data)) => Some(HeadUpdate {
relay_hash: hash,
head_data: head_data.0.clone(),
}),
Some(None) | None => None,
};
future::ready(res)
});
Ok(Box::new(s))
}
fn finalized_heads(&self, para_id: ParaId) -> ClientResult<Self::Finalized> {
let polkadot = self.clone();
let parachain_key = parachain_key(para_id);