From 74b4bc0911662d8151d28172ac694cd4f5dcb2d7 Mon Sep 17 00:00:00 2001 From: Gav <gavin@parity.io> Date: Thu, 30 Aug 2018 11:17:48 +0200 Subject: [PATCH] Update to latest substrate --- polkadot/Cargo.lock | 153 +++++++++++++------------- polkadot/consensus/src/lib.rs | 4 +- polkadot/runtime/src/checked_block.rs | 10 +- polkadot/runtime/src/lib.rs | 7 +- polkadot/runtime/src/utils.rs | 4 +- 5 files changed, 88 insertions(+), 90 deletions(-) diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index e624fd0cd15..431d743a719 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -245,9 +245,6 @@ dependencies = [ name = "cc" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "cfg-if" @@ -451,7 +448,7 @@ dependencies = [ [[package]] name = "ed25519" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -491,7 +488,7 @@ dependencies = [ [[package]] name = "environmental" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" [[package]] name = "error-chain" @@ -534,7 +531,7 @@ dependencies = [ [[package]] name = "ethcore-io" version = "1.12.0" -source = "git+https://github.com/paritytech/parity.git#108590d924bcc00e62b894de02516ffb2378be11" +source = "git+https://github.com/paritytech/parity.git#8a5c9a8c709ebb92fbcf7a3d085d6e2a1046fcf9" dependencies = [ "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -571,7 +568,7 @@ dependencies = [ [[package]] name = "ethkey" version = "0.3.0" -source = "git+https://github.com/paritytech/parity.git#108590d924bcc00e62b894de02516ffb2378be11" +source = "git+https://github.com/paritytech/parity.git#8a5c9a8c709ebb92fbcf7a3d085d6e2a1046fcf9" dependencies = [ "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "edit-distance 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -630,13 +627,13 @@ dependencies = [ [[package]] name = "fixed-hash" -version = "0.2.2" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +version = "0.2.3" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -732,7 +729,7 @@ dependencies = [ [[package]] name = "hashdb" version = "0.2.1" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -866,7 +863,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jsonrpc-core" version = "8.0.2" -source = "git+https://github.com/paritytech/jsonrpc.git#4486300ea5a02218a03524f8d4f3b214628afe7a" +source = "git+https://github.com/paritytech/jsonrpc.git#98e892b07949b030461cd8781b2c7b635370327f" dependencies = [ "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -878,7 +875,7 @@ dependencies = [ [[package]] name = "jsonrpc-http-server" version = "8.0.1" -source = "git+https://github.com/paritytech/jsonrpc.git#4486300ea5a02218a03524f8d4f3b214628afe7a" +source = "git+https://github.com/paritytech/jsonrpc.git#98e892b07949b030461cd8781b2c7b635370327f" dependencies = [ "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.2 (git+https://github.com/paritytech/jsonrpc.git)", @@ -891,7 +888,7 @@ dependencies = [ [[package]] name = "jsonrpc-macros" version = "8.0.1" -source = "git+https://github.com/paritytech/jsonrpc.git#4486300ea5a02218a03524f8d4f3b214628afe7a" +source = "git+https://github.com/paritytech/jsonrpc.git#98e892b07949b030461cd8781b2c7b635370327f" dependencies = [ "jsonrpc-core 8.0.2 (git+https://github.com/paritytech/jsonrpc.git)", "jsonrpc-pubsub 8.0.1 (git+https://github.com/paritytech/jsonrpc.git)", @@ -901,7 +898,7 @@ dependencies = [ [[package]] name = "jsonrpc-pubsub" version = "8.0.1" -source = "git+https://github.com/paritytech/jsonrpc.git#4486300ea5a02218a03524f8d4f3b214628afe7a" +source = "git+https://github.com/paritytech/jsonrpc.git#98e892b07949b030461cd8781b2c7b635370327f" dependencies = [ "jsonrpc-core 8.0.2 (git+https://github.com/paritytech/jsonrpc.git)", "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -911,7 +908,7 @@ dependencies = [ [[package]] name = "jsonrpc-server-utils" version = "8.0.1" -source = "git+https://github.com/paritytech/jsonrpc.git#4486300ea5a02218a03524f8d4f3b214628afe7a" +source = "git+https://github.com/paritytech/jsonrpc.git#98e892b07949b030461cd8781b2c7b635370327f" dependencies = [ "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -924,7 +921,7 @@ dependencies = [ [[package]] name = "jsonrpc-ws-server" version = "8.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git#4486300ea5a02218a03524f8d4f3b214628afe7a" +source = "git+https://github.com/paritytech/jsonrpc.git#98e892b07949b030461cd8781b2c7b635370327f" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.2 (git+https://github.com/paritytech/jsonrpc.git)", @@ -957,7 +954,7 @@ dependencies = [ [[package]] name = "kvdb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common.git)", @@ -975,7 +972,7 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1356,7 +1353,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "mem" version = "0.1.0" -source = "git+https://github.com/paritytech/parity.git#108590d924bcc00e62b894de02516ffb2378be11" +source = "git+https://github.com/paritytech/parity.git#8a5c9a8c709ebb92fbcf7a3d085d6e2a1046fcf9" [[package]] name = "memchr" @@ -1379,7 +1376,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memorydb" version = "0.2.1" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.2.1 (git+https://github.com/paritytech/parity-common.git)", @@ -1589,12 +1586,12 @@ dependencies = [ [[package]] name = "parity-bytes" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" [[package]] name = "parity-crypto" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1662,7 +1659,7 @@ dependencies = [ [[package]] name = "patricia-trie" version = "0.2.1" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.2.1 (git+https://github.com/paritytech/parity-common.git)", @@ -1684,7 +1681,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "plain_hasher" version = "0.2.0" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1981,7 +1978,7 @@ dependencies = [ [[package]] name = "pwasm-alloc" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "pwasm-libc 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1990,7 +1987,7 @@ dependencies = [ [[package]] name = "pwasm-libc" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" [[package]] name = "quick-error" @@ -2170,7 +2167,7 @@ dependencies = [ [[package]] name = "rlp" version = "0.2.2" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2192,7 +2189,7 @@ dependencies = [ [[package]] name = "rocksdb" version = "0.4.5" -source = "git+https://github.com/paritytech/rust-rocksdb#ecf06adf3148ab10f6f7686b724498382ff4f36e" +source = "git+https://github.com/paritytech/rust-rocksdb#3d96d68a0a913e445e933933f2d1522a8d99f715" dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "local-encoding 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2202,9 +2199,9 @@ dependencies = [ [[package]] name = "rocksdb-sys" version = "0.3.0" -source = "git+https://github.com/paritytech/rust-rocksdb#ecf06adf3148ab10f6f7686b724498382ff4f36e" +source = "git+https://github.com/paritytech/rust-rocksdb#3d96d68a0a913e445e933933f2d1522a8d99f715" dependencies = [ - "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "local-encoding 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "snappy-sys 0.1.0 (git+https://github.com/paritytech/rust-snappy)", @@ -2490,7 +2487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "substrate-bft" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2509,7 +2506,7 @@ dependencies = [ [[package]] name = "substrate-cli" version = "0.3.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2540,7 +2537,7 @@ dependencies = [ [[package]] name = "substrate-client" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2570,7 +2567,7 @@ dependencies = [ [[package]] name = "substrate-client-db" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hashdb 0.2.1 (git+https://github.com/paritytech/parity-common.git)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common.git)", @@ -2592,7 +2589,7 @@ dependencies = [ [[package]] name = "substrate-codec" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2600,7 +2597,7 @@ dependencies = [ [[package]] name = "substrate-codec-derive" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "proc-macro2 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2610,7 +2607,7 @@ dependencies = [ [[package]] name = "substrate-executor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", @@ -2618,7 +2615,7 @@ dependencies = [ "hashdb 0.2.1 (git+https://github.com/paritytech/parity-common.git)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", @@ -2636,7 +2633,7 @@ dependencies = [ [[package]] name = "substrate-extrinsic-pool" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2651,7 +2648,7 @@ dependencies = [ [[package]] name = "substrate-keyring" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2661,7 +2658,7 @@ dependencies = [ [[package]] name = "substrate-keystore" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2677,7 +2674,7 @@ dependencies = [ [[package]] name = "substrate-network" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", @@ -2699,7 +2696,7 @@ dependencies = [ [[package]] name = "substrate-network-libp2p" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2722,13 +2719,13 @@ dependencies = [ [[package]] name = "substrate-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fixed-hash 0.2.2 (git+https://github.com/paritytech/parity-common.git)", + "fixed-hash 0.2.3 (git+https://github.com/paritytech/parity-common.git)", "hashdb 0.2.1 (git+https://github.com/paritytech/parity-common.git)", "patricia-trie 0.2.1 (git+https://github.com/paritytech/parity-common.git)", "plain_hasher 0.2.0 (git+https://github.com/paritytech/parity-common.git)", @@ -2741,14 +2738,14 @@ dependencies = [ "substrate-runtime-std 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uint 0.3.0 (git+https://github.com/paritytech/parity-common.git)", + "uint 0.4.1 (git+https://github.com/paritytech/parity-common.git)", "wasmi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-rpc" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.2 (git+https://github.com/paritytech/jsonrpc.git)", @@ -2770,7 +2767,7 @@ dependencies = [ [[package]] name = "substrate-rpc-servers" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "jsonrpc-core 8.0.2 (git+https://github.com/paritytech/jsonrpc.git)", "jsonrpc-http-server 8.0.1 (git+https://github.com/paritytech/jsonrpc.git)", @@ -2785,7 +2782,7 @@ dependencies = [ [[package]] name = "substrate-runtime-balances" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2809,7 +2806,7 @@ dependencies = [ [[package]] name = "substrate-runtime-consensus" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2826,7 +2823,7 @@ dependencies = [ [[package]] name = "substrate-runtime-council" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.0 (git+https://github.com/paritytech/integer-sqrt-rs.git)", @@ -2849,7 +2846,7 @@ dependencies = [ [[package]] name = "substrate-runtime-democracy" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2870,7 +2867,7 @@ dependencies = [ [[package]] name = "substrate-runtime-executive" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2887,7 +2884,7 @@ dependencies = [ [[package]] name = "substrate-runtime-io" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", "environmental 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", @@ -2902,7 +2899,7 @@ dependencies = [ [[package]] name = "substrate-runtime-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "integer-sqrt 0.1.0 (git+https://github.com/paritytech/integer-sqrt-rs.git)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2920,7 +2917,7 @@ dependencies = [ [[package]] name = "substrate-runtime-sandbox" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", @@ -2933,7 +2930,7 @@ dependencies = [ [[package]] name = "substrate-runtime-session" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2955,7 +2952,7 @@ dependencies = [ [[package]] name = "substrate-runtime-staking" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2980,7 +2977,7 @@ dependencies = [ [[package]] name = "substrate-runtime-std" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "pwasm-alloc 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", "pwasm-libc 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", @@ -2990,7 +2987,7 @@ dependencies = [ [[package]] name = "substrate-runtime-support" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "ed25519 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3005,7 +3002,7 @@ dependencies = [ [[package]] name = "substrate-runtime-system" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3023,7 +3020,7 @@ dependencies = [ [[package]] name = "substrate-runtime-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3041,7 +3038,7 @@ dependencies = [ [[package]] name = "substrate-runtime-version" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3054,7 +3051,7 @@ dependencies = [ [[package]] name = "substrate-serializer" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "serde 1.0.71 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3063,7 +3060,7 @@ dependencies = [ [[package]] name = "substrate-service" version = "0.3.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "exit-future 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3095,7 +3092,7 @@ dependencies = [ [[package]] name = "substrate-state-db" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3107,7 +3104,7 @@ dependencies = [ [[package]] name = "substrate-state-machine" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.2.1 (git+https://github.com/paritytech/parity-common.git)", @@ -3119,13 +3116,13 @@ dependencies = [ "patricia-trie 0.2.1 (git+https://github.com/paritytech/parity-common.git)", "rlp 0.2.2 (git+https://github.com/paritytech/parity-common.git)", "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot)", - "triehash 0.2.0 (git+https://github.com/paritytech/parity-common.git)", + "triehash 0.2.1 (git+https://github.com/paritytech/parity-common.git)", ] [[package]] name = "substrate-telemetry" version = "0.3.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot#7c8f8dfdbdc2d837cf0bc6740b186b0376806d3b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot#f13dfce672731908995ea406e37812aefafe0eea" dependencies = [ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3491,8 +3488,8 @@ dependencies = [ [[package]] name = "triehash" -version = "0.2.0" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +version = "0.2.1" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.2.1 (git+https://github.com/paritytech/parity-common.git)", @@ -3540,8 +3537,8 @@ dependencies = [ [[package]] name = "uint" -version = "0.3.0" -source = "git+https://github.com/paritytech/parity-common.git#abe18ea03c1faae5e9b3787b481086e796ff42fb" +version = "0.4.1" +source = "git+https://github.com/paritytech/parity-common.git#51258799ee639783a7153d807ce9ddf4d49b29fa" dependencies = [ "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3776,7 +3773,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "yamux" version = "0.1.0" -source = "git+https://github.com/paritytech/yamux#672859c4ea288a5d12fb448da8ef8b3dca65cfca" +source = "git+https://github.com/paritytech/yamux#db6285826bed432fa599e6051fadc22920fe6614" dependencies = [ "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3860,7 +3857,7 @@ dependencies = [ "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1ee15a7050e5580b3712877157068ea713b245b080ff302ae2ca973cfcd9baa" "checksum fixed-hash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18d6fd718fb4396e7a9c93ac59ba7143501467ca7a143c145b5555a571d5576" -"checksum fixed-hash 0.2.2 (git+https://github.com/paritytech/parity-common.git)" = "<none>" +"checksum fixed-hash 0.2.3 (git+https://github.com/paritytech/parity-common.git)" = "<none>" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" @@ -4106,14 +4103,14 @@ dependencies = [ "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum transaction-pool 1.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fdb8870eea404a57e2f62056ac45067a53a6207fd31866122356481d3c2e1a30" "checksum triehash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2033893a813c70e7d8a739ca6c36dc0a7a2c913ec718d7cbf84a3837bbe3c7ce" -"checksum triehash 0.2.0 (git+https://github.com/paritytech/parity-common.git)" = "<none>" +"checksum triehash 0.2.1 (git+https://github.com/paritytech/parity-common.git)" = "<none>" "checksum try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2" "checksum twox-hash 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4f85be565a110ed72ed7048cf56570db04ce0a592c98aa59b7dacde3e5718750" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" "checksum uint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "38051a96565903d81c9a9210ce11076b2218f3b352926baa1f5f6abbdfce8273" -"checksum uint 0.3.0 (git+https://github.com/paritytech/parity-common.git)" = "<none>" +"checksum uint 0.4.1 (git+https://github.com/paritytech/parity-common.git)" = "<none>" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" diff --git a/polkadot/consensus/src/lib.rs b/polkadot/consensus/src/lib.rs index 4a848c4241b..944f3f85d5d 100644 --- a/polkadot/consensus/src/lib.rs +++ b/polkadot/consensus/src/lib.rs @@ -549,8 +549,8 @@ impl<C> bft::Proposer<Block> for Proposer<C> // refuse to vote if this block says a validator is offline that we // think isn't. - let missed_proposal = proposal.noted_missed_proposal(); - if !self.offline.read().check_consistency(&self.validators[..], missed_proposal) { + let offline = proposal.noted_offline(); + if !self.offline.read().check_consistency(&self.validators[..], offline) { return Box::new(futures::empty()); } diff --git a/polkadot/runtime/src/checked_block.rs b/polkadot/runtime/src/checked_block.rs index 5965264db57..1a3fa467de7 100644 --- a/polkadot/runtime/src/checked_block.rs +++ b/polkadot/runtime/src/checked_block.rs @@ -16,10 +16,10 @@ //! Typesafe block interaction. -use super::{Call, Block, TIMESTAMP_SET_POSITION, PARACHAINS_SET_POSITION, NOTE_MISSED_PROPOSAL_POSITION}; +use super::{Call, Block, TIMESTAMP_SET_POSITION, PARACHAINS_SET_POSITION, NOTE_OFFLINE_POSITION}; use timestamp::Call as TimestampCall; use parachains::Call as ParachainsCall; -use staking::Call as StakingCall; +use consensus::Call as ConsensusCall; use primitives::parachain::CandidateReceipt; /// Provides a type-safe wrapper around a structurally valid block. @@ -91,9 +91,9 @@ impl CheckedBlock { } /// Extract the noted missed proposal validator indices (if any) from the block. - pub fn noted_missed_proposal(&self) -> &[u32] { - self.inner.extrinsics.get(NOTE_MISSED_PROPOSAL_POSITION as usize).and_then(|xt| match xt.extrinsic.function { - Call::Staking(StakingCall::note_missed_proposal(ref x)) => Some(&x[..]), + pub fn noted_offline(&self) -> &[u32] { + self.inner.extrinsics.get(NOTE_OFFLINE_POSITION as usize).and_then(|xt| match xt.extrinsic.function { + Call::Consensus(ConsensusCall::note_offline(ref x)) => Some(&x[..]), _ => None, }).unwrap_or(&[]) } diff --git a/polkadot/runtime/src/lib.rs b/polkadot/runtime/src/lib.rs index 9404bd7022b..1c1ccf971c1 100644 --- a/polkadot/runtime/src/lib.rs +++ b/polkadot/runtime/src/lib.rs @@ -88,8 +88,8 @@ pub use primitives::Header; pub const TIMESTAMP_SET_POSITION: u32 = 0; /// The position of the parachains set extrinsic. pub const PARACHAINS_SET_POSITION: u32 = 1; -/// The position of the note_missed_proposal extrinsic in the block, if it exists. -pub const NOTE_MISSED_PROPOSAL_POSITION: u32 = 2; +/// The position of the note_offline in the block, if it exists. +pub const NOTE_OFFLINE_POSITION: u32 = 2; /// The address format for describing accounts. pub type Address = balances::Address<Concrete>; @@ -155,7 +155,9 @@ impl balances::Trait for Concrete { pub type Balances = balances::Module<Concrete>; impl consensus::Trait for Concrete { + const NOTE_OFFLINE_POSITION: u32 = NOTE_OFFLINE_POSITION; type SessionKey = SessionKey; + type OnOfflineValidator = Staking; } /// Consensus module for this concrete runtime. pub type Consensus = consensus::Module<Concrete>; @@ -184,7 +186,6 @@ impl session::Trait for Concrete { pub type Session = session::Module<Concrete>; impl staking::Trait for Concrete { - const NOTE_MISSED_PROPOSAL_POSITION: u32 = NOTE_MISSED_PROPOSAL_POSITION; type Event = Event; } /// Staking module for this concrete runtime. diff --git a/polkadot/runtime/src/utils.rs b/polkadot/runtime/src/utils.rs index 93f55928a76..71fdd169a0b 100644 --- a/polkadot/runtime/src/utils.rs +++ b/polkadot/runtime/src/utils.rs @@ -21,7 +21,7 @@ use super::{Call, UncheckedExtrinsic, Extrinsic, Balances}; use runtime_primitives::traits::{Checkable, AuxLookup}; use timestamp::Call as TimestampCall; use parachains::Call as ParachainsCall; -use staking::Call as StakingCall; +use consensus::Call as ConsensusCall; /// Produces the list of inherent extrinsics. pub fn inherent_extrinsics(data: ::primitives::InherentData) -> Vec<UncheckedExtrinsic> { @@ -41,7 +41,7 @@ pub fn inherent_extrinsics(data: ::primitives::InherentData) -> Vec<UncheckedExt if !data.offline_indices.is_empty() { inherent.push(make_inherent( - Call::Staking(StakingCall::note_missed_proposal(data.offline_indices)) + Call::Consensus(ConsensusCall::note_offline(data.offline_indices)) )); } -- GitLab