diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index 6449e80917..2cc432c031 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -120,6 +120,14 @@ dependencies = [ "etrace 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "aster" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "syntex_syntax 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "atty" version = "0.2.11" @@ -188,11 +196,36 @@ dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bindgen" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cexpr 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "clang-sys 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_codegen 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_syntax 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bitflags" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bitflags" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "bitflags" version = "0.9.1" @@ -277,6 +310,17 @@ dependencies = [ name = "cc" version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cexpr" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "cfg-if" @@ -302,6 +346,16 @@ dependencies = [ "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "clang-sys" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "clap" version = "2.32.0" @@ -332,14 +386,6 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "cmake" -version = "0.1.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "constant_time_eq" version = "0.1.3" @@ -634,7 +680,7 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.3.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -729,12 +775,9 @@ dependencies = [ ] [[package]] -name = "getopts" -version = "0.2.18" +name = "glob" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "globset" @@ -934,7 +977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jsonrpc-core" version = "9.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git#62d739e807c536575c1c885479706bffed3a8880" +source = "git+https://github.com/paritytech/jsonrpc.git#0d78b8f145c18f08c1103f6b0b51991a89fb0a6f" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -946,7 +989,7 @@ dependencies = [ [[package]] name = "jsonrpc-http-server" version = "9.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git#62d739e807c536575c1c885479706bffed3a8880" +source = "git+https://github.com/paritytech/jsonrpc.git#0d78b8f145c18f08c1103f6b0b51991a89fb0a6f" dependencies = [ "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)", @@ -959,7 +1002,7 @@ dependencies = [ [[package]] name = "jsonrpc-macros" version = "9.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git#62d739e807c536575c1c885479706bffed3a8880" +source = "git+https://github.com/paritytech/jsonrpc.git#0d78b8f145c18f08c1103f6b0b51991a89fb0a6f" dependencies = [ "jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)", "jsonrpc-pubsub 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)", @@ -969,7 +1012,7 @@ dependencies = [ [[package]] name = "jsonrpc-pubsub" version = "9.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git#62d739e807c536575c1c885479706bffed3a8880" +source = "git+https://github.com/paritytech/jsonrpc.git#0d78b8f145c18f08c1103f6b0b51991a89fb0a6f" dependencies = [ "jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -979,7 +1022,7 @@ dependencies = [ [[package]] name = "jsonrpc-server-utils" version = "9.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git#62d739e807c536575c1c885479706bffed3a8880" +source = "git+https://github.com/paritytech/jsonrpc.git#0d78b8f145c18f08c1103f6b0b51991a89fb0a6f" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -995,7 +1038,7 @@ dependencies = [ [[package]] name = "jsonrpc-ws-server" version = "9.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git#62d739e807c536575c1c885479706bffed3a8880" +source = "git+https://github.com/paritytech/jsonrpc.git#0d78b8f145c18f08c1103f6b0b51991a89fb0a6f" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)", @@ -1003,7 +1046,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ws 0.7.5 (git+https://github.com/tomusdrw/ws-rs)", + "ws 0.7.9 (git+https://github.com/tomusdrw/ws-rs)", ] [[package]] @@ -1018,60 +1061,35 @@ dependencies = [ [[package]] name = "kvdb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common.git#579c81eb4f7169dfc764919b020f10bb8f117440" +source = "git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6#616b40150ded71f57f650067fcbc5c99d7c343e6" 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)", -] - -[[package]] -name = "kvdb" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)", ] [[package]] name = "kvdb-memorydb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common.git#579c81eb4f7169dfc764919b020f10bb8f117440" +source = "git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6#616b40150ded71f57f650067fcbc5c99d7c343e6" dependencies = [ - "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common.git)", + "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "kvdb-rocksdb" version = "0.1.4" -source = "git+https://github.com/paritytech/parity-common.git#579c81eb4f7169dfc764919b020f10bb8f117440" +source = "git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6#616b40150ded71f57f650067fcbc5c99d7c343e6" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common.git)", + "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-rocksdb 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kvdb-rocksdb" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-rocksdb 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rocksdb 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1099,6 +1117,16 @@ name = "libc" version = "0.2.43" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "libloading" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "libloading" version = "0.5.0" @@ -1417,7 +1445,18 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "yamux 0.1.0 (git+https://github.com/paritytech/yamux)", + "yamux 0.1.2 (git+https://github.com/paritytech/yamux)", +] + +[[package]] +name = "librocksdb-sys" +version = "5.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bindgen 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1425,16 +1464,6 @@ name = "linked-hash-map" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "local-encoding" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "skeptic 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "lock_api" version = "0.1.5" @@ -1460,6 +1489,11 @@ dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "make-cmd" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "mashup" version = "0.1.9" @@ -1483,6 +1517,14 @@ name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "memchr" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "memchr" version = "2.1.1" @@ -1655,6 +1697,14 @@ name = "nohash-hasher" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "nom" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.39" @@ -1743,12 +1793,7 @@ dependencies = [ [[package]] name = "parity-bytes" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common.git#579c81eb4f7169dfc764919b020f10bb8f117440" - -[[package]] -name = "parity-bytes" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6#616b40150ded71f57f650067fcbc5c99d7c343e6" [[package]] name = "parity-codec" @@ -1780,36 +1825,6 @@ dependencies = [ "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parity-rocksdb" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -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)", - "parity-rocksdb-sys 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parity-rocksdb-sys" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cmake 0.1.35 (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)", - "parity-snappy-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parity-snappy-sys" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cmake 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "parity-wasm" version = "0.31.3" @@ -1878,6 +1893,11 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "percent-encoding" version = "1.0.1" @@ -1903,9 +1923,9 @@ dependencies = [ name = "polkadot-availability-store" version = "0.1.0" dependencies = [ - "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common.git)", - "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common.git)", - "kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common.git)", + "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)", + "kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1959,7 +1979,6 @@ dependencies = [ "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-consensus-aura 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-consensus-common 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-finality-grandpa 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-keyring 0.1.0 (git+https://github.com/paritytech/substrate)", @@ -2043,11 +2062,13 @@ dependencies = [ "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-version 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-aura 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-balances 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-consensus 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-council 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-democracy 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-executive 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-grandpa 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-session 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-staking 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", @@ -2055,6 +2076,7 @@ dependencies = [ "srml-timestamp 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-treasury 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-consensus-aura-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-keyring 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-serializer 0.1.0 (git+https://github.com/paritytech/substrate)", @@ -2070,6 +2092,7 @@ dependencies = [ "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)", "polkadot-availability-store 0.1.0", + "polkadot-consensus 0.1.0", "polkadot-executor 0.1.0", "polkadot-network 0.1.0", "polkadot-primitives 0.1.0", @@ -2079,7 +2102,7 @@ dependencies = [ "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-consensus-aura 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-network 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-finality-grandpa 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-service 0.3.0 (git+https://github.com/paritytech/substrate)", "substrate-telemetry 0.3.0 (git+https://github.com/paritytech/substrate)", @@ -2133,11 +2156,23 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "pulldown-cmark" -version = "0.0.3" +name = "quasi" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_errors 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_syntax 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quasi_codegen" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_errors 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_syntax 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2190,6 +2225,33 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_chacha" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_core" version = "0.2.2" @@ -2203,6 +2265,39 @@ name = "rand_core" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_pcg" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rayon" version = "0.8.2" @@ -2315,6 +2410,15 @@ dependencies = [ "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rocksdb" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "librocksdb-sys 5.11.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rust-crypto" version = "0.2.36" @@ -2452,7 +2556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2465,11 +2569,6 @@ dependencies = [ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "sha1" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "sha1" version = "0.5.0" @@ -2500,20 +2599,6 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "skeptic" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "pulldown-cmark 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "slab" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "slab" version = "0.4.1" @@ -2563,10 +2648,21 @@ dependencies = [ "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sr-api-macros" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sr-io" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "environmental 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.9.0 (git+https://github.com/paritytech/trie)", @@ -2581,7 +2677,7 @@ dependencies = [ [[package]] name = "sr-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2598,7 +2694,7 @@ dependencies = [ [[package]] name = "sr-std" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2606,7 +2702,7 @@ dependencies = [ [[package]] name = "sr-version" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2616,10 +2712,30 @@ dependencies = [ "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", ] +[[package]] +name = "srml-aura" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-io 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-consensus 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-staking 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-system 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-timestamp 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", +] + [[package]] name = "srml-balances" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2638,7 +2754,7 @@ dependencies = [ [[package]] name = "srml-consensus" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2655,7 +2771,7 @@ dependencies = [ [[package]] name = "srml-council" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2675,7 +2791,7 @@ dependencies = [ [[package]] name = "srml-democracy" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2694,7 +2810,7 @@ dependencies = [ [[package]] name = "srml-executive" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2707,10 +2823,30 @@ dependencies = [ "srml-system 0.1.0 (git+https://github.com/paritytech/substrate)", ] +[[package]] +name = "srml-grandpa" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-io 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-session 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-system 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-finality-grandpa-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", +] + [[package]] name = "srml-metadata" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2723,7 +2859,7 @@ dependencies = [ [[package]] name = "srml-session" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2743,7 +2879,7 @@ dependencies = [ [[package]] name = "srml-staking" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2766,7 +2902,7 @@ dependencies = [ [[package]] name = "srml-support" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2777,12 +2913,46 @@ dependencies = [ "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-metadata 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support-procedural 0.1.0 (git+https://github.com/paritytech/substrate)", +] + +[[package]] +name = "srml-support-procedural" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-api-macros 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support-procedural-tools 0.1.0 (git+https://github.com/paritytech/substrate)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "srml-support-procedural-tools" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "srml-support-procedural-tools-derive 0.1.0 (git+https://github.com/paritytech/substrate)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "srml-support-procedural-tools-derive" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "srml-system" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2799,11 +2969,10 @@ dependencies = [ [[package]] name = "srml-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", @@ -2817,7 +2986,7 @@ dependencies = [ [[package]] name = "srml-treasury" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2868,7 +3037,7 @@ dependencies = [ "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2883,7 +3052,7 @@ dependencies = [ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2926,13 +3095,13 @@ dependencies = [ "heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-cli" version = "0.3.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2964,7 +3133,7 @@ dependencies = [ [[package]] name = "substrate-client" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2972,11 +3141,12 @@ dependencies = [ "hash-db 0.9.0 (git+https://github.com/paritytech/trie)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-api-macros 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-version 0.1.0 (git+https://github.com/paritytech/substrate)", @@ -2992,11 +3162,11 @@ dependencies = [ [[package]] name = "substrate-client-db" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hash-db 0.9.0 (git+https://github.com/paritytech/trie)", - "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)", + "kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3013,7 +3183,7 @@ dependencies = [ [[package]] name = "substrate-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3026,16 +3196,31 @@ dependencies = [ "srml-consensus 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-consensus-aura-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-consensus-common 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-network 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "substrate-consensus-aura-primitives" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-io 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-version 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", +] + [[package]] name = "substrate-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3050,7 +3235,7 @@ dependencies = [ [[package]] name = "substrate-executor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3072,14 +3257,15 @@ dependencies = [ [[package]] name = "substrate-finality-grandpa" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ - "finality-grandpa 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "finality-grandpa 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-consensus-common 0.1.0 (git+https://github.com/paritytech/substrate)", @@ -3093,7 +3279,7 @@ dependencies = [ [[package]] name = "substrate-finality-grandpa-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3106,7 +3292,7 @@ dependencies = [ [[package]] name = "substrate-keyring" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3116,7 +3302,7 @@ dependencies = [ [[package]] name = "substrate-keystore" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3132,10 +3318,9 @@ dependencies = [ [[package]] name = "substrate-network" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3148,17 +3333,15 @@ dependencies = [ "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-consensus-common 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-keyring 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-network-libp2p 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-test-client 0.1.0 (git+https://github.com/paritytech/substrate)", "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-network-libp2p" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3181,7 +3364,7 @@ dependencies = [ [[package]] name = "substrate-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" 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)", @@ -3207,7 +3390,7 @@ dependencies = [ [[package]] name = "substrate-rpc" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)", @@ -3229,7 +3412,7 @@ dependencies = [ [[package]] name = "substrate-rpc-servers" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "jsonrpc-http-server 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)", "jsonrpc-pubsub 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)", @@ -3243,7 +3426,7 @@ dependencies = [ [[package]] name = "substrate-serializer" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3252,7 +3435,7 @@ dependencies = [ [[package]] name = "substrate-service" version = "0.3.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" 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)", @@ -3285,7 +3468,7 @@ dependencies = [ [[package]] name = "substrate-state-db" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3297,7 +3480,7 @@ dependencies = [ [[package]] name = "substrate-state-machine" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hash-db 0.9.0 (git+https://github.com/paritytech/trie)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3314,7 +3497,7 @@ dependencies = [ [[package]] name = "substrate-telemetry" version = "0.3.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3326,47 +3509,10 @@ dependencies = [ "ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "substrate-test-client" -version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" -dependencies = [ - "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-consensus-common 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-executor 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-keyring 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-state-machine 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-test-runtime 0.1.0 (git+https://github.com/paritytech/substrate)", -] - -[[package]] -name = "substrate-test-runtime" -version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" -dependencies = [ - "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 0.1.0 (git+https://github.com/paritytech/substrate)", - "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", - "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", - "sr-version 0.1.0 (git+https://github.com/paritytech/substrate)", - "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-keyring 0.1.0 (git+https://github.com/paritytech/substrate)", - "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", -] - [[package]] name = "substrate-transaction-graph" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3380,7 +3526,7 @@ dependencies = [ [[package]] name = "substrate-transaction-pool" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3396,7 +3542,7 @@ dependencies = [ [[package]] name = "substrate-trie" version = "0.4.0" -source = "git+https://github.com/paritytech/substrate#f1960129c00e9353e6f801089e703ecdd2167dd6" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hash-db 0.9.0 (git+https://github.com/paritytech/trie)", "memory-db 0.9.0 (git+https://github.com/paritytech/trie)", @@ -3427,7 +3573,7 @@ dependencies = [ [[package]] name = "syn" -version = "0.15.21" +version = "0.15.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3435,6 +3581,48 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syntex" +version = "0.58.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "syntex_errors 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_syntax 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syntex_errors" +version = "0.58.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_pos 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", + "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syntex_pos" +version = "0.58.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syntex_syntax" +version = "0.58.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_errors 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", + "syntex_pos 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sysinfo" version = "0.6.2" @@ -3456,15 +3644,6 @@ name = "target_info" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "tempfile" version = "3.0.4" @@ -3478,6 +3657,15 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "term" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "termcolor" version = "1.0.4" @@ -3854,6 +4042,11 @@ name = "unicode-width" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicode-xid" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicode-xid" version = "0.1.0" @@ -4022,17 +4215,18 @@ dependencies = [ [[package]] name = "ws" -version = "0.7.5" -source = "git+https://github.com/tomusdrw/ws-rs#f12d19c4c19422fc79af28a3181f598bc07ecd1e" +version = "0.7.9" +source = "git+https://github.com/tomusdrw/ws-rs#4baef2dc1abc8e216559af51cfc120bbcc777e21" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4070,8 +4264,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "yamux" -version = "0.1.0" -source = "git+https://github.com/paritytech/yamux#8f3d16e7645447645d3552a52159d56c8a01de27" +version = "0.1.2" +source = "git+https://github.com/paritytech/yamux#8cec810d4e2bbe77cf9ec8b82962e878e854e53e" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4095,6 +4289,7 @@ dependencies = [ "checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum asn1_der 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "766afdc5c6d7c15de1abe4c9c15e360be3aa972c363ba5b606be3c4271235886" +"checksum aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfdf7355d9db158df68f976ed030ab0f6578af811f5a7bb6dcf221ec24e0e0" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" "checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" @@ -4103,7 +4298,9 @@ dependencies = [ "checksum base64 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5032d51da2741729bfdaeb2664d9b8c6d9fd1e2b90715c660b6def36628499c2" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bigint 4.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ebecac13b3c745150d7b6c3ea7572d372f09d627c2077e893bf26c5c7f70d282" +"checksum bindgen 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ba610cba0c1727ed837316540068b51349b8268c073906067b7c3948598929bd" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" +"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum bitvec 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e37e2176261200377c7cde4c6de020394174df556c356f965e4bc239f5ce1c5a" @@ -4117,13 +4314,14 @@ dependencies = [ "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" "checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" +"checksum cexpr 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42aac45e9567d97474a834efdee3081b3c942b2205be932092f53354ce503d6c" "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" "checksum chashmap 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47e651a8c1eb0cbbaa730f705e2531e75276c6f2bbe2eb12662cfd305213dff8" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" +"checksum clang-sys 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e414af9726e1d11660801e73ccc7fb81803fb5f49e5903a25b348b2b3b480d2e" "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" "checksum clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "97276801e127ffb46b66ce23f35cc96bd454fa311294bced4bbace7baa8b1d17" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum cmake 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "6ec65ee4f9c9d16f335091d23693457ed4928657ba4982289d7fafee03bc614a" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" @@ -4160,7 +4358,7 @@ dependencies = [ "checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7" "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 finality-grandpa 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be6d2735e8f570474c7925a60ebe04ec0bdd9eea7cc4fddab78a0ecfdefec20e" +"checksum finality-grandpa 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a1dffe3c9d4c59d964f25cea31880e56c20414cdae7efe2269411238f850ad39" "checksum fixed-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a557e80084b05c32b455963ff565a9de6f2866da023d6671705c6aff6f65e01c" "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" @@ -4172,7 +4370,7 @@ dependencies = [ "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" -"checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797" +"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865" "checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" "checksum hash-db 0.9.0 (git+https://github.com/paritytech/trie)" = "" @@ -4201,16 +4399,15 @@ dependencies = [ "checksum jsonrpc-server-utils 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)" = "" "checksum jsonrpc-ws-server 9.0.0 (git+https://github.com/paritytech/jsonrpc.git)" = "" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum kvdb 0.1.0 (git+https://github.com/paritytech/parity-common.git)" = "" -"checksum kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "72ae89206cea31c32014b39d5a454b96135894221610dbfd19cf4d2d044fa546" -"checksum kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common.git)" = "" -"checksum kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common.git)" = "" -"checksum kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "06cf755dc587839ba34d3cbe3f12b6ad55850fbcdfe67336157a021a1a5c43ae" +"checksum kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)" = "" +"checksum kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)" = "" +"checksum kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)" = "" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" "checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" +"checksum libloading 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fd38073de8f7965d0c17d30546d4bb6da311ab428d1c7a3fc71dff7f9d4979b9" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum libp2p 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=d961e656a74d1bab5366d371a06f9e10d5f4a6c5)" = "" "checksum libp2p-core 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=d961e656a74d1bab5366d371a06f9e10d5f4a6c5)" = "" @@ -4229,14 +4426,16 @@ dependencies = [ "checksum libp2p-uds 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=d961e656a74d1bab5366d371a06f9e10d5f4a6c5)" = "" "checksum libp2p-websocket 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=d961e656a74d1bab5366d371a06f9e10d5f4a6c5)" = "" "checksum libp2p-yamux 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=d961e656a74d1bab5366d371a06f9e10d5f4a6c5)" = "" +"checksum librocksdb-sys 5.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1b0fa7f4ca5ceff76237db63802cb073d84e64a327e38478e79a669093fb7fa5" "checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" -"checksum local-encoding 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1ceb20f39ff7ae42f3ff9795f3986b1daad821caaa1e1732a0944103a5a1a66" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" +"checksum make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8ca8afbe8af1785e09636acb5a41e08a765f5f0340568716c18a8700ba3c0d3" "checksum mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f2d82b34c7fb11bb41719465c060589e291d505ca4735ea30016a91f6fc79c3b" "checksum mashup-impl 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "aa607bfb674b4efb310512527d64266b065de3f894fc52f84efcbf7eaa5965fb" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" "checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum memory-db 0.9.0 (git+https://github.com/paritytech/trie)" = "" @@ -4254,6 +4453,7 @@ dependencies = [ "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d138afcce92d219ccb6eb53d9b1e8a96ac0d633cfd3c53cd9856d96d1741bb8" +"checksum nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" @@ -4265,14 +4465,10 @@ dependencies = [ "checksum owning_ref 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d52571ddcb42e9c900c901a18d8d67e393df723fcd51dd59c5b1a85d0acb6cc" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" -"checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common.git)" = "" -"checksum parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5168b4cf41f3835e4bc6ffb32f51bc9365dc50cb351904595b3931d917fd0c" +"checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=616b40150ded71f57f650067fcbc5c99d7c343e6)" = "" "checksum parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dca389ea5e1632c89b2ce54f7e2b4a8a8c9d278042222a91e0bf95451218cb4c" "checksum parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa42c2cb493b60b12c75b26e8c94cb734af4df4d7f2cc229dc04c1953dac189" "checksum parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c1117f6574377d21309bfa1f7d69ff734120685d92b02c3f362b122585758840" -"checksum parity-rocksdb 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cd55d2d6d6000ec99f021cf52c9acc7d2a402e14f95ced4c5de230696fabe00b" -"checksum parity-rocksdb-sys 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0e59eda423021494a6cf1be74f6989add403f53157409993f794e17b123cab51" -"checksum parity-snappy-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c2086caac40c79289cb70d7e1c64f5888e1c53f5d38399d3e95101493739f423" "checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc" "checksum parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fa12d706797d42551663426a45e2db2e0364bd1dbf6aeada87e89c5f981f43e9" "checksum parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "149d8f5b97f3c1133e3cfcd8886449959e856b557ff281e292b733d7c69e005e" @@ -4280,6 +4476,7 @@ dependencies = [ "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" "checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" +"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum pretty_assertions 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28ea5118e2f41bfbc974b28d88c07621befd1fa5d6ec23549be96302a1a59dd2" @@ -4287,15 +4484,22 @@ dependencies = [ "checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a" "checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" "checksum protobuf 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cbd08d128db199b1c6bb662e343d7d1a8f6d0060b411675766d88e5146a4bb38" -"checksum pulldown-cmark 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8361e81576d2e02643b04950e487ec172b687180da65c731c03cf336784e6c07" +"checksum quasi 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18c45c4854d6d1cf5d531db97c75880feb91c958b0720f4ec1057135fec358b3" +"checksum quasi_codegen 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51b9e25fa23c044c1803f43ca59c98dac608976dd04ce799411edd58ece776d4" "checksum quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb6ccf8db7bbcb9c2eae558db5ab4f3da1c2a87e4e597ed394726bc8ea6ca1d" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" +"checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a" +"checksum rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "771b009e3a508cb67e8823dda454aaa5368c7bc1c16829fb77d3e980440dd34a" "checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" "checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" +"checksum rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effa3fcaa47e18db002bdde6060944b6d2f9cfd8db471c30e873448ad9187be3" "checksum rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b614fe08b6665cb9a231d07ac1364b0ef3cb3698f1239ee0c4c3a88a524f54c8" "checksum rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "373814f27745b2686b350dd261bfd24576a6fb0e2c5919b3a2b6005f820b0473" "checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356" @@ -4308,6 +4512,7 @@ dependencies = [ "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rhododendron 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e20523445e693f394c0e487113ae656071311c9ee4c1e914441bece8c929b21d" "checksum ring 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6f7d28b30a72c01b458428e0ae988d4149c20d902346902be881e3edc4bb325c" +"checksum rocksdb 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a806011ca1d26f37729ed4dc78afd607cc86d37ee913718108b0b267e768d46f" "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" "checksum rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ceb8ce7a5e520de349e1fa172baeba4a9e8d5ef06c47471863530bc4972ee1e" @@ -4329,32 +4534,35 @@ dependencies = [ "checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" "checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" "checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811" -"checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum sha1 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "171698ce4ec7cbb93babeb3190021b4d72e96ccb98e33d277ae4ea959d6f2d9e" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" "checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" -"checksum skeptic 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24ebf8a06f5f8bae61ae5bbc7af7aac4ef6907ae975130faba1199e5fe82256a" -"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" "checksum slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1e1a2eec401952cd7b12a84ea120e2d57281329940c3f93c2bf04f462539508e" "checksum slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e544d16c6b230d84c866662fe55e31aacfca6ae71e6fc49ae9a311cb379bfc2f" "checksum slog-json 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddd14b8df2df39378b3e933c79784350bf715b11444d99f903df0253bbe524e5" "checksum slog-scope 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "053344c94c0e2b22da6305efddb698d7c485809427cf40555dc936085f67a9df" "checksum smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "622df2d454c29a4d89b30dc3b27b42d7d90d6b9e587dbf8f67652eb7514da484" +"checksum sr-api-macros 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum sr-io 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum sr-std 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum sr-version 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-aura 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-balances 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-consensus 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-council 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-democracy 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-executive 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-grandpa 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-metadata 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-session 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-staking 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-support 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-support-procedural 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-support-procedural-tools 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-support-procedural-tools-derive 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-system 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-timestamp 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-treasury 0.1.0 (git+https://github.com/paritytech/substrate)" = "" @@ -4374,6 +4582,7 @@ dependencies = [ "checksum substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-client-db 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-consensus-aura 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum substrate-consensus-aura-primitives 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-consensus-common 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-executor 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-finality-grandpa 0.1.0 (git+https://github.com/paritytech/substrate)" = "" @@ -4390,20 +4599,22 @@ dependencies = [ "checksum substrate-state-db 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-state-machine 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-telemetry 0.3.0 (git+https://github.com/paritytech/substrate)" = "" -"checksum substrate-test-client 0.1.0 (git+https://github.com/paritytech/substrate)" = "" -"checksum substrate-test-runtime 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-transaction-graph 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-transaction-pool 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-trie 0.4.0 (git+https://github.com/paritytech/substrate)" = "" "checksum subtle 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc7f6353c2ee5407358d063a14cccc1630804527090a6fb5a9489ce4924280fb" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" -"checksum syn 0.15.21 (registry+https://github.com/rust-lang/crates.io-index)" = "816b7af21405b011a23554ea2dc3f6576dc86ca557047c34098c1d741f10f823" +"checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7" +"checksum syntex 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a8f5e3aaa79319573d19938ea38d068056b826db9883a5d47f86c1cecc688f0e" +"checksum syntex_errors 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "867cc5c2d7140ae7eaad2ae9e8bf39cb18a67ca651b7834f88d46ca98faadb9c" +"checksum syntex_pos 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13ad4762fe52abc9f4008e85c4fb1b1fe3aa91ccb99ff4826a439c7c598e1047" +"checksum syntex_syntax 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6e0e4dbae163dd98989464c23dd503161b338790640e11537686f2ef0f25c791" "checksum sysinfo 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "11c5f6e8a7a7146f26ffed9a5ff8bab2706f1ac8a413a415e1d211b819d5c24d" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" "checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" -"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "55c1195ef8513f3273d55ff59fe5da6940287a0d7a98331254397f464833675b" +"checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" @@ -4443,6 +4654,7 @@ dependencies = [ "checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" +"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum unsigned-varint 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5c1441164e5da61f00acd15f5a9e61939693c2c6e8b9fae36a220b82de7e212" @@ -4465,8 +4677,8 @@ dependencies = [ "checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" -"checksum ws 0.7.5 (git+https://github.com/tomusdrw/ws-rs)" = "" +"checksum ws 0.7.9 (git+https://github.com/tomusdrw/ws-rs)" = "" "checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a66b7c2281ebde13cf4391d70d4c7e5946c3c25e72a7b859ca8f677dcd0b0c61" -"checksum yamux 0.1.0 (git+https://github.com/paritytech/yamux)" = "" +"checksum yamux 0.1.2 (git+https://github.com/paritytech/yamux)" = "" diff --git a/polkadot/availability-store/Cargo.toml b/polkadot/availability-store/Cargo.toml index 331f882d6a..19142bd935 100644 --- a/polkadot/availability-store/Cargo.toml +++ b/polkadot/availability-store/Cargo.toml @@ -10,6 +10,6 @@ parking_lot = "0.4" log = "0.3" parity-codec = "2.1" substrate-primitives = { git = "https://github.com/paritytech/substrate" } -kvdb = { git = "https://github.com/paritytech/parity-common.git" } -kvdb-rocksdb = { git = "https://github.com/paritytech/parity-common.git" } -kvdb-memorydb = { git = "https://github.com/paritytech/parity-common.git" } +kvdb = { git = "https://github.com/paritytech/parity-common", rev="616b40150ded71f57f650067fcbc5c99d7c343e6" } +kvdb-rocksdb = { git = "https://github.com/paritytech/parity-common", rev="616b40150ded71f57f650067fcbc5c99d7c343e6" } +kvdb-memorydb = { git = "https://github.com/paritytech/parity-common", rev="616b40150ded71f57f650067fcbc5c99d7c343e6" } diff --git a/polkadot/availability-store/src/lib.rs b/polkadot/availability-store/src/lib.rs index 05c90facbb..589a451cf3 100644 --- a/polkadot/availability-store/src/lib.rs +++ b/polkadot/availability-store/src/lib.rs @@ -77,7 +77,7 @@ fn extrinsic_key(relay_parent: &Hash, candidate_hash: &Hash) -> Vec { /// Handle to the availability store. #[derive(Clone)] pub struct Store { - inner: Arc, + inner: Arc, } impl Store { diff --git a/polkadot/cli/src/lib.rs b/polkadot/cli/src/lib.rs index 3bec3b9979..bea8403f3c 100644 --- a/polkadot/cli/src/lib.rs +++ b/polkadot/cli/src/lib.rs @@ -102,7 +102,7 @@ pub fn run(args: I, worker: W, version: cli::VersionInfo) -> error::Res let (spec, mut config) = cli::parse_matches::(load_spec, version, "parity-polkadot", &matches)?; - match cli::execute_default::(spec, worker, &matches)? { + match cli::execute_default::(spec, worker, &matches, &config)? { cli::Action::ExecutedInternally => (), cli::Action::RunService(worker) => { info!("Parity ·:· Polkadot"); diff --git a/polkadot/consensus/Cargo.toml b/polkadot/consensus/Cargo.toml index bf95fd29db..55227862f4 100644 --- a/polkadot/consensus/Cargo.toml +++ b/polkadot/consensus/Cargo.toml @@ -16,7 +16,6 @@ polkadot-parachain = { path = "../parachain" } polkadot-primitives = { path = "../primitives" } polkadot-runtime = { path = "../runtime" } polkadot-statement-table = { path = "../statement-table" } -substrate-consensus-aura = { git = "https://github.com/paritytech/substrate" } substrate-finality-grandpa = { git = "https://github.com/paritytech/substrate" } substrate-consensus-common = { git = "https://github.com/paritytech/substrate" } substrate-primitives = { git = "https://github.com/paritytech/substrate" } diff --git a/polkadot/consensus/src/attestation_service.rs b/polkadot/consensus/src/attestation_service.rs new file mode 100644 index 0000000000..afc47a92ae --- /dev/null +++ b/polkadot/consensus/src/attestation_service.rs @@ -0,0 +1,216 @@ +// Copyright 2017 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Attestation service. + +/// Attestation service. A long running service that creates and manages parachain attestation +/// instances. +/// +/// This uses a handle to an underlying thread pool to dispatch heavy work +/// such as candidate verification while performing event-driven work +/// on a local event loop. + +use std::thread; +use std::time::{Duration, Instant}; +use std::sync::Arc; + +use client::{BlockchainEvents, ChainHead, BlockBody}; +use client::block_builder::api::BlockBuilder; +use client::blockchain::HeaderBackend; +use client::runtime_api::Core; +use primitives::ed25519; +use futures::prelude::*; +use polkadot_primitives::{Block, BlockId, InherentData}; +use polkadot_primitives::parachain::ParachainHost; +use extrinsic_store::Store as ExtrinsicStore; +use runtime_primitives::traits::ProvideRuntimeApi; + +use tokio::runtime::TaskExecutor; +use tokio::runtime::current_thread::Runtime as LocalRuntime; +use tokio::timer::Interval; + +use super::{Network, Collators}; + +// creates a task to prune redundant entries in availability store upon block finalization +// +// NOTE: this will need to be changed to finality notification rather than +// block import notifications when the consensus switches to non-instant finality. +fn prune_unneeded_availability

(client: Arc

, extrinsic_store: ExtrinsicStore) + -> impl Future + Send + where P: Send + Sync + BlockchainEvents + BlockBody + 'static +{ + use codec::{Encode, Decode}; + use polkadot_primitives::BlockId; + + enum NotifyError { + BodyFetch(::client::error::Error), + } + + impl NotifyError { + fn log(&self, hash: &::polkadot_primitives::Hash) { + match *self { + NotifyError::BodyFetch(ref err) => warn!("Failed to fetch block body for imported block {:?}: {:?}", hash, err), + } + } + } + + client.finality_notification_stream() + .for_each(move |notification| { + use polkadot_runtime::{Call, ParachainsCall, UncheckedExtrinsic as RuntimeExtrinsic}; + + let hash = notification.hash; + let parent_hash = notification.header.parent_hash; + let extrinsics = client.block_body(&BlockId::hash(hash)) + .map_err(NotifyError::BodyFetch); + + let extrinsics = match extrinsics { + Ok(r) => r, + Err(e) => { e.log(&hash); return Ok(()) } + }; + + let candidate_hashes = match extrinsics + .iter() + .filter_map(|ex| RuntimeExtrinsic::decode(&mut ex.encode().as_slice())) + .filter_map(|ex| match ex.function { + Call::Parachains(ParachainsCall::set_heads(ref heads)) => + Some(heads.iter().map(|c| c.candidate.hash()).collect()), + _ => None, + }) + .next() + { + Some(x) => x, + None => return Ok(()), + }; + + if let Err(e) = extrinsic_store.candidates_finalized(parent_hash, candidate_hashes) { + warn!(target: "consensus", "Failed to prune unneeded available data: {:?}", e); + } + + Ok(()) + }) +} + +/// Parachain candidate attestation service handle. +pub(crate) struct ServiceHandle { + thread: Option>, + exit_signal: Option<::exit_future::Signal>, +} + +/// Create and start a new instance of the attestation service. +pub(crate) fn start( + client: Arc

, + parachain_consensus: Arc<::ParachainConsensus>, + thread_pool: TaskExecutor, + key: Arc, + extrinsic_store: ExtrinsicStore, +) -> ServiceHandle + where + C: Collators + Send + Sync + 'static, + ::Future: Send + 'static, + P: BlockchainEvents + ChainHead + BlockBody, + P: ProvideRuntimeApi + HeaderBackend + Send + Sync + 'static, + P::Api: ParachainHost + Core + BlockBuilder, + N: Network + Send + Sync + 'static, + N::TableRouter: Send + 'static, +{ + const TIMER_DELAY: Duration = Duration::from_secs(5); + const TIMER_INTERVAL: Duration = Duration::from_secs(30); + + let (signal, exit) = ::exit_future::signal(); + let thread = thread::spawn(move || { + let mut runtime = LocalRuntime::new().expect("Could not create local runtime"); + let notifications = { + let client = client.clone(); + let consensus = parachain_consensus.clone(); + let key = key.clone(); + + client.import_notification_stream().for_each(move |notification| { + let parent_hash = notification.hash; + if notification.is_new_best { + let res = client + .runtime_api() + .authorities(&BlockId::hash(parent_hash)) + .map_err(Into::into) + .and_then(|authorities| { + consensus.get_or_instantiate( + parent_hash, + &authorities, + key.clone(), + ) + }); + + if let Err(e) = res { + warn!("Unable to start parachain consensus on top of {:?}: {}", + parent_hash, e); + } + } + Ok(()) + }) + }; + + let prune_old_sessions = { + let client = client.clone(); + let interval = Interval::new( + Instant::now() + TIMER_DELAY, + TIMER_INTERVAL, + ); + + interval + .for_each(move |_| match client.leaves() { + Ok(leaves) => { + parachain_consensus.retain(|h| leaves.contains(h)); + Ok(()) + } + Err(e) => { + warn!("Error fetching leaves from client: {:?}", e); + Ok(()) + } + }) + .map_err(|e| warn!("Timer error {:?}", e)) + }; + + runtime.spawn(notifications); + thread_pool.spawn(prune_old_sessions); + + let prune_available = prune_unneeded_availability(client, extrinsic_store) + .select(exit.clone()) + .then(|_| Ok(())); + + // spawn this on the tokio executor since it's fine on a thread pool. + thread_pool.spawn(prune_available); + + if let Err(e) = runtime.block_on(exit) { + debug!("BFT event loop error {:?}", e); + } + }); + + ServiceHandle { + thread: Some(thread), + exit_signal: Some(signal), + } +} + +impl Drop for ServiceHandle { + fn drop(&mut self) { + if let Some(signal) = self.exit_signal.take() { + signal.fire(); + } + + if let Some(thread) = self.thread.take() { + thread.join().expect("The service thread has panicked"); + } + } +} diff --git a/polkadot/consensus/src/dynamic_inclusion.rs b/polkadot/consensus/src/dynamic_inclusion.rs index 232acea238..bec2bd0fa8 100644 --- a/polkadot/consensus/src/dynamic_inclusion.rs +++ b/polkadot/consensus/src/dynamic_inclusion.rs @@ -74,9 +74,6 @@ impl DynamicInclusion { Some(now + until) } } - - /// Get the start instant. - pub fn started_at(&self) -> Instant { self.start } } #[cfg(test)] diff --git a/polkadot/consensus/src/lib.rs b/polkadot/consensus/src/lib.rs index ccf330856b..1cd6ff7079 100644 --- a/polkadot/consensus/src/lib.rs +++ b/polkadot/consensus/src/lib.rs @@ -45,7 +45,6 @@ extern crate substrate_client as client; extern crate exit_future; extern crate tokio; extern crate substrate_consensus_common as consensus; -extern crate substrate_consensus_aura as aura; extern crate substrate_finality_grandpa as grandpa; extern crate substrate_transaction_pool as transaction_pool; @@ -65,14 +64,17 @@ use std::collections::{HashMap, HashSet}; use std::sync::Arc; use std::time::{self, Duration, Instant}; -use aura::ExtraVerification; +use client::{BlockchainEvents, ChainHead, BlockBody}; use client::blockchain::HeaderBackend; -use client::block_builder::api::BlockBuilder; -use codec::{Decode, Encode}; +use client::block_builder::api::BlockBuilder as BlockBuilderApi; +use client::runtime_api::Core; +use codec::Encode; use extrinsic_store::Store as ExtrinsicStore; use parking_lot::Mutex; -use polkadot_primitives::{Hash, Block, BlockId, BlockNumber, Header, Timestamp, SessionKey}; -use polkadot_primitives::{Compact, UncheckedExtrinsic}; +use polkadot_primitives::{ + Hash, Block, BlockId, BlockNumber, Header, Timestamp, SessionKey, InherentData +}; +use polkadot_primitives::Compact; use polkadot_primitives::parachain::{Id as ParaId, Chain, DutyRoster, BlockData, Extrinsic as ParachainExtrinsic, CandidateReceipt, CandidateSignature}; use polkadot_primitives::parachain::{AttestedCandidate, ParachainHost, Statement as PrimitiveStatement}; use primitives::{AuthorityId, ed25519}; @@ -81,6 +83,7 @@ use tokio::runtime::TaskExecutor; use tokio::timer::{Delay, Interval}; use transaction_pool::txpool::{Pool, ChainApi as PoolChainApi}; +use attestation_service::ServiceHandle; use futures::prelude::*; use futures::future::{self, Either}; use collation::CollationFetch; @@ -89,12 +92,11 @@ use dynamic_inclusion::DynamicInclusion; pub use self::collation::{validate_collation, Collators}; pub use self::error::{ErrorKind, Error}; pub use self::shared_table::{SharedTable, StatementProducer, ProducedStatements, Statement, SignedStatement, GenericStatement}; -pub use service::Service; +mod attestation_service; mod dynamic_inclusion; mod evaluation; mod error; -mod service; mod shared_table; pub mod collation; @@ -255,7 +257,7 @@ impl ParachainConsensus where C: Collators + Send + 'static, N: Network, P: ProvideRuntimeApi + HeaderBackend + Send + Sync + 'static, - P::Api: ParachainHost + BlockBuilder, + P::Api: ParachainHost + BlockBuilderApi, ::Future: Send + 'static, N::TableRouter: Send + 'static, { @@ -271,8 +273,6 @@ impl ParachainConsensus where ) -> Result, Error> { - use runtime_primitives::traits::{Hash as HashT, BlakeTwo256}; - let mut live_instances = self.live_instances.lock(); if let Some(tracker) = live_instances.get(&parent_hash) { return Ok(tracker.clone()); @@ -280,10 +280,6 @@ impl ParachainConsensus where let id = BlockId::hash(parent_hash); let duty_roster = self.client.runtime_api().duty_roster(&id)?; - let random_seed = self.client.runtime_api().random_seed(&id)?; - let _random_seed = BlakeTwo256::hash(random_seed.as_ref()); - - let _validators = self.client.runtime_api().validators(&id)?; let (group_info, local_duty) = make_group_info( duty_roster, @@ -298,7 +294,6 @@ impl ParachainConsensus where debug!(target: "consensus", "Active parachains: {:?}", active_parachains); - let _n_parachains = active_parachains.len(); let table = Arc::new(SharedTable::new(group_info, sign_with.clone(), parent_hash, self.extrinsic_store.clone())); let router = self.network.communication_for( authorities, @@ -358,22 +353,55 @@ struct AttestationTracker { } /// Polkadot proposer factory. -struct ProposerFactory { +pub struct ProposerFactory { parachain_consensus: Arc>, transaction_pool: Arc>, + _service_handle: ServiceHandle, } impl ProposerFactory where + C: Collators + Send + Sync + 'static, + ::Future: Send + 'static, + P: BlockchainEvents + ChainHead + BlockBody, + P: ProvideRuntimeApi + HeaderBackend + Send + Sync + 'static, + P::Api: ParachainHost + Core + BlockBuilderApi, + N: Network + Send + Sync + 'static, + N::TableRouter: Send + 'static, TxApi: PoolChainApi, { /// Create a new proposer factory. - fn new( - parachain_consensus: Arc>, + pub fn new( + client: Arc

, + network: N, + collators: C, transaction_pool: Arc>, + thread_pool: TaskExecutor, + parachain_empty_duration: Duration, + key: Arc, + extrinsic_store: ExtrinsicStore, ) -> Self { + let parachain_consensus = Arc::new(ParachainConsensus { + client: client.clone(), + network, + collators, + handle: thread_pool.clone(), + extrinsic_store: extrinsic_store.clone(), + parachain_empty_duration, + live_instances: Mutex::new(HashMap::new()), + }); + + let service_handle = ::attestation_service::start( + client, + parachain_consensus.clone(), + thread_pool, + key, + extrinsic_store, + ); + ProposerFactory { parachain_consensus, transaction_pool, + _service_handle: service_handle, } } } @@ -383,7 +411,7 @@ impl consensus::Environment for ProposerFactory, P: ProvideRuntimeApi + HeaderBackend + Send + Sync + 'static, - P::Api: ParachainHost + BlockBuilder, + P::Api: ParachainHost + BlockBuilderApi, ::Future: Send + 'static, N::TableRouter: Send + 'static, { @@ -495,7 +523,7 @@ pub struct Proposer where impl consensus::Proposer for Proposer where TxApi: PoolChainApi, C: ProvideRuntimeApi + HeaderBackend + Send + Sync, - C::Api: ParachainHost + BlockBuilder, + C::Api: ParachainHost + BlockBuilderApi, { type Error = Error; type Create = Either< @@ -533,55 +561,6 @@ impl consensus::Proposer for Proposer where } } -/// Does verification before importing blocks. -/// Should be used for further verification in aura. -pub struct BlockVerifier; - -impl ExtraVerification for BlockVerifier { - type Verified = Either< - future::FutureResult<(), String>, - Box>, - >; - - fn verify(&self, _header: &Header, body: Option<&[UncheckedExtrinsic]>) -> Self::Verified { - use polkadot_runtime::{Call, UncheckedExtrinsic, TimestampCall}; - - let body = match body { - None => return Either::A(future::ok(())), - Some(body) => body, - }; - - // TODO: reintroduce or revisit necessaity for includability tracker. - let timestamp = current_timestamp(); - - let maybe_in_block = body.iter() - .filter_map(|ex| { - let encoded = ex.encode(); - let runtime_ex = UncheckedExtrinsic::decode(&mut &encoded[..])?; - match runtime_ex.function { - Call::Timestamp(TimestampCall::set(t)) => Some(t), - _ => None, - } - }) - .next(); - - let timestamp_in_block = match maybe_in_block { - None => return Either::A(future::ok(())), - Some(t) => t, - }; - - // we wait until the block timestamp is earlier than current. - if timestamp.0 < timestamp_in_block.0 { - let diff_secs = timestamp_in_block.0 - timestamp.0; - let delay = Delay::new(Instant::now() + Duration::from_secs(diff_secs)) - .map_err(move |e| format!("Error waiting for {} seconds: {:?}", diff_secs, e)); - Either::B(Box::new(delay)) - } else { - Either::A(future::ok(())) - } - } -} - fn current_timestamp() -> Timestamp { time::SystemTime::now().duration_since(time::UNIX_EPOCH) .expect("now always later than unix epoch; qed") @@ -605,7 +584,7 @@ impl ProposalTiming { // // this interval is just meant to produce periodic task wakeups // that lead to the `dynamic_inclusion` getting updated as necessary. - if let Async::Ready(x) = self.attempt_propose.poll().map_err(ErrorKind::Timer)? { + while let Async::Ready(x) = self.attempt_propose.poll().map_err(ErrorKind::Timer)? { x.expect("timer still alive; intervals never end; qed"); } @@ -641,26 +620,31 @@ pub struct CreateProposal { impl CreateProposal where TxApi: PoolChainApi, C: ProvideRuntimeApi + HeaderBackend + Send + Sync, - C::Api: ParachainHost + BlockBuilder, + C::Api: ParachainHost + BlockBuilderApi, { fn propose_with(&self, candidates: Vec) -> Result { use client::block_builder::BlockBuilder; use runtime_primitives::traits::{Hash as HashT, BlakeTwo256}; - use polkadot_primitives::InherentData; // TODO: handle case when current timestamp behind that in state. - let timestamp = ::std::cmp::max(self.minimum_timestamp.0, current_timestamp().0).into(); + let timestamp = ::std::cmp::max(self.minimum_timestamp.0, current_timestamp().0); - let _elapsed_since_start = self.timing.dynamic_inclusion.started_at().elapsed(); - - let _inherent_data = InherentData { + let inherent_data = InherentData { timestamp, - parachain_heads: candidates, + parachains: candidates, + aura_expected_slot: 0, // not required here. }; + let runtime_api = self.client.runtime_api(); + let mut block_builder = BlockBuilder::at_block(&self.parent_id, &*self.client)?; { + let inherents = runtime_api.inherent_extrinsics(&self.parent_id, &inherent_data)?; + for inherent in inherents { + block_builder.push(inherent)?; + } + let mut unqueue_invalid = Vec::new(); let mut pending_size = 0; @@ -685,39 +669,36 @@ impl CreateProposal where self.transaction_pool.remove_invalid(&unqueue_invalid); } - let polkadot_block = block_builder.bake()?; + let new_block = block_builder.bake()?; info!("Proposing block [number: {}; hash: {}; parent_hash: {}; extrinsics: [{}]]", - polkadot_block.header.number, - Hash::from(polkadot_block.header.hash()), - polkadot_block.header.parent_hash, - polkadot_block.extrinsics.iter() + new_block.header.number, + Hash::from(new_block.header.hash()), + new_block.header.parent_hash, + new_block.extrinsics.iter() .map(|xt| format!("{}", BlakeTwo256::hash_of(xt))) .collect::>() .join(", ") ); - let substrate_block = Decode::decode(&mut polkadot_block.encode().as_slice()) - .expect("polkadot blocks defined to serialize to substrate blocks correctly; qed"); - // TODO: full re-evaluation - let active_parachains = self.client.runtime_api().active_parachains(&self.parent_id)?; + let active_parachains = runtime_api.active_parachains(&self.parent_id)?; assert!(evaluation::evaluate_initial( - &substrate_block, - timestamp, + &new_block, + timestamp.into(), &self.parent_hash, self.parent_number, &active_parachains, ).is_ok()); - Ok(substrate_block) + Ok(new_block) } } impl Future for CreateProposal where TxApi: PoolChainApi, C: ProvideRuntimeApi + HeaderBackend + Send + Sync, - C::Api: ParachainHost + BlockBuilder, + C::Api: ParachainHost + BlockBuilderApi, { type Item = Block; type Error = Error; @@ -739,7 +720,6 @@ impl Future for CreateProposal where mod tests { use super::*; use substrate_keyring::Keyring; - use polkadot_primitives::parachain::Statement as PStatement; #[test] fn sign_and_check_statement() { diff --git a/polkadot/consensus/src/service.rs b/polkadot/consensus/src/service.rs deleted file mode 100644 index a9a848e14b..0000000000 --- a/polkadot/consensus/src/service.rs +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2017 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! Consensus service. - -/// Consensus service. A long running service that manages BFT agreement and parachain -/// candidate agreement over the network. -/// -/// This uses a handle to an underlying thread pool to dispatch heavy work -/// such as candidate verification while performing event-driven work -/// on a local event loop. - -use std::thread; -use std::time::{Duration, Instant}; -use std::sync::Arc; - -use client::{BlockchainEvents, ChainHead, BlockBody}; -use client::block_builder::api::BlockBuilder; -use client::blockchain::HeaderBackend; -use client::runtime_api::Core; -use primitives::ed25519; -use futures::prelude::*; -use polkadot_primitives::{Block, BlockId}; -use polkadot_primitives::parachain::ParachainHost; -use extrinsic_store::Store as ExtrinsicStore; -use runtime_primitives::traits::ProvideRuntimeApi; -use transaction_pool::txpool::{ChainApi as PoolChainApi, Pool}; - -use tokio::runtime::TaskExecutor as ThreadPoolHandle; -use tokio::runtime::current_thread::Runtime as LocalRuntime; -use tokio::timer::Interval; - -use super::{Network, Collators, ProposerFactory}; - -// creates a task to prune redundant entries in availability store upon block finalization -// -// NOTE: this will need to be changed to finality notification rather than -// block import notifications when the consensus switches to non-instant finality. -fn prune_unneeded_availability(client: Arc, extrinsic_store: ExtrinsicStore) - -> impl Future + Send - where C: Send + Sync + BlockchainEvents + BlockBody + 'static -{ - use codec::{Encode, Decode}; - use polkadot_primitives::BlockId; - - enum NotifyError { - NoBody, - BodyFetch(::client::error::Error), - UnexpectedFormat, - } - - impl NotifyError { - fn log(&self, hash: &::polkadot_primitives::Hash) { - match *self { - NotifyError::NoBody => warn!("No block body for imported block {:?}", hash), - NotifyError::BodyFetch(ref err) => warn!("Failed to fetch block body for imported block {:?}: {:?}", hash, err), - NotifyError::UnexpectedFormat => warn!("Consensus outdated: Block {:?} has unexpected body format", hash), - } - } - } - - client.finality_notification_stream() - .for_each(move |notification| { - use polkadot_runtime::{Call, ParachainsCall}; - - let hash = notification.hash; - let parent_hash = notification.header.parent_hash; - let runtime_block = client.block_body(&BlockId::hash(hash)) - .map_err(NotifyError::BodyFetch) - .and_then(|maybe_body| maybe_body.ok_or(NotifyError::NoBody)) - .map(|extrinsics| Block { header: notification.header, extrinsics }) - .map(|b: Block| ::polkadot_runtime::Block::decode(&mut b.encode().as_slice())) - .and_then(|maybe_block| maybe_block.ok_or(NotifyError::UnexpectedFormat)); - - let runtime_block = match runtime_block { - Ok(r) => r, - Err(e) => { e.log(&hash); return Ok(()) } - }; - - let candidate_hashes = match runtime_block.extrinsics - .iter() - .filter_map(|ex| match ex.function { - Call::Parachains(ParachainsCall::set_heads(ref heads)) => - Some(heads.iter().map(|c| c.candidate.hash()).collect()), - _ => None, - }) - .next() - { - Some(x) => x, - None => return Ok(()), - }; - - if let Err(e) = extrinsic_store.candidates_finalized(parent_hash, candidate_hashes) { - warn!(target: "consensus", "Failed to prune unneeded available data: {:?}", e); - } - - Ok(()) - }) -} - -/// Consensus service. Starts working when created. -pub struct Service { - thread: Option>, - exit_signal: Option<::exit_future::Signal>, -} - -impl Service { - /// Create and start a new instance. - pub fn new( - client: Arc, - network: N, - transaction_pool: Arc>, - thread_pool: ThreadPoolHandle, - parachain_empty_duration: Duration, - key: ed25519::Pair, - extrinsic_store: ExtrinsicStore, - ) -> Service - where - C: BlockchainEvents + ChainHead + BlockBody, - C: ProvideRuntimeApi + HeaderBackend + Send + Sync + 'static, - C::Api: ParachainHost + Core + BlockBuilder, - N: Network + Collators + Send + Sync + 'static, - N::TableRouter: Send + 'static, - ::Future: Send + 'static, - TxApi: PoolChainApi + Send + 'static, - { - use parking_lot::Mutex; - use std::collections::HashMap; - - const TIMER_DELAY: Duration = Duration::from_secs(5); - const TIMER_INTERVAL: Duration = Duration::from_secs(30); - - let (signal, exit) = ::exit_future::signal(); - let thread = thread::spawn(move || { - let mut runtime = LocalRuntime::new().expect("Could not create local runtime"); - let key = Arc::new(key); - - let parachain_consensus = Arc::new(::ParachainConsensus{ - client: client.clone(), - network: network.clone(), - collators: network.clone(), - handle: thread_pool.clone(), - extrinsic_store: extrinsic_store.clone(), - parachain_empty_duration, - live_instances: Mutex::new(HashMap::new()), - }); - - let factory = ProposerFactory::new( - parachain_consensus.clone(), - transaction_pool - ); - - let notifications = { - let client = client.clone(); - let consensus = parachain_consensus.clone(); - let key = key.clone(); - - client.import_notification_stream().for_each(move |notification| { - let parent_hash = notification.hash; - if notification.is_new_best { - let res = client - .runtime_api() - .authorities(&BlockId::hash(parent_hash)) - .map_err(Into::into) - .and_then(|authorities| { - consensus.get_or_instantiate( - parent_hash, - &authorities, - key.clone(), - ) - }); - - if let Err(e) = res { - warn!("Unable to start parachain consensus on top of {:?}: {}", - parent_hash, e); - } - } - Ok(()) - }) - }; - - let prune_old_sessions = { - let client = client.clone(); - let interval = Interval::new( - Instant::now() + TIMER_DELAY, - TIMER_INTERVAL, - ); - - interval - .for_each(move |_| match client.leaves() { - Ok(leaves) => { - parachain_consensus.retain(|h| leaves.contains(h)); - Ok(()) - } - Err(e) => { - warn!("Error fetching leaves from client: {:?}", e); - Ok(()) - } - }) - .map_err(|e| warn!("Timer error {:?}", e)) - }; - - runtime.spawn(notifications); - thread_pool.spawn(prune_old_sessions); - - let prune_available = prune_unneeded_availability(client, extrinsic_store) - .select(exit.clone()) - .then(|_| Ok(())); - - // spawn this on the tokio executor since it's fine on a thread pool. - thread_pool.spawn(prune_available); - - if let Err(e) = runtime.block_on(exit) { - debug!("BFT event loop error {:?}", e); - } - }); - Service { - thread: Some(thread), - exit_signal: Some(signal), - } - } -} - -impl Drop for Service { - fn drop(&mut self) { - if let Some(signal) = self.exit_signal.take() { - signal.fire(); - } - - if let Some(thread) = self.thread.take() { - thread.join().expect("The service thread has panicked"); - } - } -} diff --git a/polkadot/primitives/src/lib.rs b/polkadot/primitives/src/lib.rs index 321060db3f..340c0d3125 100644 --- a/polkadot/primitives/src/lib.rs +++ b/polkadot/primitives/src/lib.rs @@ -112,7 +112,9 @@ impl Extrinsic for UncheckedExtrinsic {} #[derive(Encode, Decode)] pub struct InherentData { /// Current timestamp. - pub timestamp: Timestamp, + pub timestamp: u64, /// Parachain heads update. This contains fully-attested candidates. - pub parachain_heads: Vec<::parachain::AttestedCandidate>, + pub parachains: Vec<::parachain::AttestedCandidate>, + /// Expected slot for aura authorship. + pub aura_expected_slot: u64, } diff --git a/polkadot/runtime/Cargo.toml b/polkadot/runtime/Cargo.toml index 2398d27e73..7986ce3dbb 100644 --- a/polkadot/runtime/Cargo.toml +++ b/polkadot/runtime/Cargo.toml @@ -19,11 +19,14 @@ sr-io = { git = "https://github.com/paritytech/substrate" } srml-support = { git = "https://github.com/paritytech/substrate" } substrate-primitives = { git = "https://github.com/paritytech/substrate" } substrate-client = { git = "https://github.com/paritytech/substrate" } +substrate-consensus-aura-primitives = { git = "https://github.com/paritytech/substrate", default-features = false } +srml-aura = { git = "https://github.com/paritytech/substrate" } srml-balances = { git = "https://github.com/paritytech/substrate" } srml-consensus = { git = "https://github.com/paritytech/substrate" } srml-council = { git = "https://github.com/paritytech/substrate" } srml-democracy = { git = "https://github.com/paritytech/substrate" } srml-executive = { git = "https://github.com/paritytech/substrate" } +srml-grandpa = { git = "https://github.com/paritytech/substrate" } sr-primitives = { git = "https://github.com/paritytech/substrate" } srml-session = { git = "https://github.com/paritytech/substrate" } srml-staking = { git = "https://github.com/paritytech/substrate" } @@ -52,6 +55,7 @@ std = [ "srml-council/std", "srml-democracy/std", "srml-executive/std", + "srml-grandpa/std", "sr-primitives/std", "srml-session/std", "srml-staking/std", diff --git a/polkadot/runtime/src/lib.rs b/polkadot/runtime/src/lib.rs index 4db8767dce..0e50472e7b 100644 --- a/polkadot/runtime/src/lib.rs +++ b/polkadot/runtime/src/lib.rs @@ -27,6 +27,7 @@ extern crate bitvec; extern crate parity_codec_derive; extern crate parity_codec as codec; +extern crate substrate_consensus_aura_primitives as consensus_aura; extern crate substrate_primitives; #[macro_use] extern crate substrate_client as client; @@ -35,18 +36,19 @@ extern crate substrate_client as client; extern crate sr_std as rstd; #[cfg(test)] extern crate sr_io; -#[macro_use] extern crate sr_version as version; #[macro_use] extern crate sr_primitives; #[macro_use] extern crate srml_support; +extern crate srml_aura as aura; extern crate srml_balances as balances; extern crate srml_consensus as consensus; extern crate srml_council as council; extern crate srml_democracy as democracy; extern crate srml_executive as executive; +extern crate srml_grandpa as grandpa; extern crate srml_session as session; extern crate srml_staking as staking; extern crate srml_system as system; @@ -60,28 +62,23 @@ extern crate substrate_keyring as keyring; mod parachains; -#[cfg(feature = "std")] -use codec::{Encode, Decode}; use rstd::prelude::*; use substrate_primitives::u32_trait::{_2, _4}; use primitives::{ AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, SessionKey, Signature, - parachain, parachain::runtime::ParachainHost, parachain::id::PARACHAIN_HOST, + parachain, }; -#[cfg(feature = "std")] -use primitives::Block as GBlock; -use client::{block_builder::api::runtime::*, runtime_api::{runtime::*, id::*}}; -#[cfg(feature = "std")] -use client::runtime_api::ApiExt; -use sr_primitives::ApplyResult; +use client::{ + block_builder::api as block_builder_api, + runtime_api as client_api, +}; +use consensus_aura::api as aura_api; +use sr_primitives::{ApplyResult, CheckInherentError}; use sr_primitives::transaction_validity::TransactionValidity; use sr_primitives::generic; -use sr_primitives::traits::{Convert, BlakeTwo256, Block as BlockT}; -#[cfg(feature = "std")] -use sr_primitives::traits::ApiRef; -#[cfg(feature = "std")] -use substrate_primitives::AuthorityId; +use sr_primitives::traits::{Convert, BlakeTwo256, Block as BlockT, DigestFor}; use version::RuntimeVersion; +use grandpa::fg_primitives::{self, ScheduledChange}; use council::{motions as council_motions, voting as council_voting}; #[cfg(feature = "std")] use council::seats as council_seats; @@ -100,22 +97,17 @@ pub use timestamp::BlockPeriod; pub use srml_support::{StorageValue, RuntimeMetadata}; const TIMESTAMP_SET_POSITION: u32 = 0; -const NOTE_OFFLINE_POSITION: u32 = 1; -const PARACHAINS_SET_POSITION: u32 = 2; +const PARACHAINS_SET_POSITION: u32 = 1; +const NOTE_OFFLINE_POSITION: u32 = 2; // this should be reintroduced /// Runtime version. pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: ver_str!("polkadot"), - impl_name: ver_str!("parity-polkadot"), + spec_name: create_runtime_str!("polkadot"), + impl_name: create_runtime_str!("parity-polkadot"), authoring_version: 1, spec_version: 101, impl_version: 0, - apis: apis_vec!([ - (BLOCK_BUILDER, 1), - (TAGGED_TRANSACTION_QUEUE, 1), - (METADATA, 1), - (PARACHAIN_HOST, 1), - ]), + apis: RUNTIME_API_VERSIONS, }; /// Native version. @@ -140,6 +132,10 @@ impl system::Trait for Runtime { type Log = Log; } +impl aura::Trait for Runtime { + type HandleReport = aura::StakingSlasher; +} + impl balances::Trait for Runtime { type Balance = Balance; type AccountIndex = AccountIndex; @@ -152,12 +148,16 @@ impl consensus::Trait for Runtime { const NOTE_OFFLINE_POSITION: u32 = NOTE_OFFLINE_POSITION; type Log = Log; type SessionKey = SessionKey; - type OnOfflineValidator = Staking; + + // the aura module handles offline-reports internally + // rather than using an explicit report system. + type InherentOfflineReport = (); } impl timestamp::Trait for Runtime { const TIMESTAMP_SET_POSITION: u32 = TIMESTAMP_SET_POSITION; type Moment = u64; + type OnTimestampSet = Aura; } /// Session key conversion. @@ -170,7 +170,7 @@ impl Convert for SessionKeyConversion { impl session::Trait for Runtime { type ConvertAccountIdToSessionKey = SessionKeyConversion; - type OnSessionChange = Staking; + type OnSessionChange = (Staking, grandpa::SyncedAuthorities); type Event = Event; } @@ -204,6 +204,12 @@ impl treasury::Trait for Runtime { type Event = Event; } +impl grandpa::Trait for Runtime { + type SessionKey = SessionKey; + type Log = Log; + type Event = Event; +} + impl parachains::Trait for Runtime { const SET_POSITION: u32 = PARACHAINS_SET_POSITION; } @@ -211,15 +217,19 @@ impl parachains::Trait for Runtime { construct_runtime!( pub enum Runtime with Log(InternalLog: DigestItem) where Block = Block, - UncheckedExtrinsic = UncheckedExtrinsic + NodeBlock = primitives::Block, + InherentData = primitives::InherentData { System: system::{default, Log(ChangesTrieRoot)}, + Aura: aura::{Module}, Timestamp: timestamp::{Module, Call, Storage, Config, Inherent}, - Consensus: consensus::{Module, Call, Storage, Config, Log(AuthoritiesChange), Inherent}, + // consensus' Inherent is not provided because it assumes instant-finality blocks. + Consensus: consensus::{Module, Call, Storage, Config, Log(AuthoritiesChange) }, Balances: balances, Session: session, Staking: staking, Democracy: democracy, + Grandpa: grandpa::{Module, Call, Storage, Config, Log(), Event}, Council: council::{Module, Call, Storage, Event}, CouncilVoting: council_voting, CouncilMotions: council_motions::{Module, Call, Storage, Event, Origin}, @@ -248,174 +258,8 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = executive::Executive, Balances, AllModules>; -#[cfg(feature = "std")] -pub struct ClientWithApi { - call: ::std::ptr::NonNull>, - commit_on_success: ::std::cell::RefCell, - initialised_block: ::std::cell::RefCell>, - changes: ::std::cell::RefCell, -} - -#[cfg(feature = "std")] -unsafe impl Send for ClientWithApi {} -#[cfg(feature = "std")] -unsafe impl Sync for ClientWithApi {} - -#[cfg(feature = "std")] -impl ApiExt for ClientWithApi { - fn map_api_result Result, R, E>(&self, map_call: F) -> Result { - *self.commit_on_success.borrow_mut() = false; - let res = map_call(self); - *self.commit_on_success.borrow_mut() = true; - - self.commit_on_ok(&res); - - res - } -} - -#[cfg(feature = "std")] -impl client::runtime_api::ConstructRuntimeApi for ClientWithApi { - fn construct_runtime_api<'a, T: client::runtime_api::CallApiAt>(call: &'a T) -> ApiRef<'a, Self> { - ClientWithApi { - call: unsafe { - ::std::ptr::NonNull::new_unchecked( - ::std::mem::transmute( - call as &client::runtime_api::CallApiAt - ) - ) - }, - commit_on_success: true.into(), - initialised_block: None.into(), - changes: Default::default(), - }.into() - } -} - -#[cfg(feature = "std")] -impl ClientWithApi { - fn call_api_at( - &self, - at: &GBlockId, - function: &'static str, - args: &A - ) -> client::error::Result { - let res = unsafe { - self.call.as_ref().call_api_at( - at, - function, - args.encode(), - &mut *self.changes.borrow_mut(), - &mut *self.initialised_block.borrow_mut() - ).and_then(|r| - R::decode(&mut &r[..]) - .ok_or_else(|| - client::error::ErrorKind::CallResultDecode(function).into() - ) - ) - }; - - self.commit_on_ok(&res); - res - } - - fn commit_on_ok(&self, res: &Result) { - if *self.commit_on_success.borrow() { - if res.is_err() { - self.changes.borrow_mut().discard_prospective(); - } else { - self.changes.borrow_mut().commit_prospective(); - } - } - } -} - -#[cfg(feature = "std")] -type GBlockId = generic::BlockId; - -#[cfg(feature = "std")] -impl client::runtime_api::Core for ClientWithApi { - fn version(&self, at: &GBlockId) -> Result { - self.call_api_at(at, "version", &()) - } - - fn authorities(&self, at: &GBlockId) -> Result, client::error::Error> { - self.call_api_at(at, "authorities", &()) - } - - fn execute_block(&self, at: &GBlockId, block: &GBlock) -> Result<(), client::error::Error> { - self.call_api_at(at, "execute_block", block) - } - - fn initialise_block(&self, at: &GBlockId, header: &::Header) -> Result<(), client::error::Error> { - self.call_api_at(at, "initialise_block", header) - } -} - -#[cfg(feature = "std")] -impl client::block_builder::api::BlockBuilder for ClientWithApi { - fn apply_extrinsic(&self, at: &GBlockId, extrinsic: &::Extrinsic) -> Result { - self.call_api_at(at, "apply_extrinsic", extrinsic) - } - - fn finalise_block(&self, at: &GBlockId) -> Result<::Header, client::error::Error> { - self.call_api_at(at, "finalise_block", &()) - } - - fn inherent_extrinsics( - &self, at: &GBlockId, inherent: &Inherent - ) -> Result, client::error::Error> { - self.call_api_at(at, "inherent_extrinsics", inherent) - } - - fn check_inherents(&self, at: &GBlockId, block: &GBlock, inherent: &Inherent) -> Result, client::error::Error> { - self.call_api_at(at, "check_inherents", &(block, inherent)) - } - - fn random_seed(&self, at: &GBlockId) -> Result<::Hash, client::error::Error> { - self.call_api_at(at, "random_seed", &()) - } -} - -#[cfg(feature = "std")] -impl client::runtime_api::TaggedTransactionQueue for ClientWithApi { - fn validate_transaction( - &self, - at: &GBlockId, - utx: &::Extrinsic - ) -> Result { - self.call_api_at(at, "validate_transaction", utx) - } -} - -#[cfg(feature = "std")] -impl client::runtime_api::Metadata for ClientWithApi { - fn metadata(&self, at: &GBlockId) -> Result { - self.call_api_at(at, "metadata", &()) - } -} - -#[cfg(feature = "std")] -impl ::primitives::parachain::ParachainHost for ClientWithApi { - fn validators(&self, at: &GBlockId) -> Result, client::error::Error> { - self.call_api_at(at, "validators", &()) - } - fn duty_roster(&self, at: &GBlockId) -> Result { - self.call_api_at(at, "calculate_duty_roster", &()) - } - fn active_parachains(&self, at: &GBlockId) -> Result, client::error::Error> { - self.call_api_at(at, "active_parachains", &()) - } - fn parachain_head(&self, at: &GBlockId, id: ¶chain::Id) -> Result>, client::error::Error> { - self.call_api_at(at, "parachain_head", &id) - } - fn parachain_code(&self, at: &GBlockId, id: ¶chain::Id) -> Result>, client::error::Error> { - self.call_api_at(at, "parachain_code", &id) - } -} - impl_runtime_apis! { - impl Core for Runtime { + impl client_api::Core for Runtime { fn version() -> RuntimeVersion { VERSION } @@ -433,13 +277,13 @@ impl_runtime_apis! { } } - impl Metadata for Runtime { + impl client_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { Runtime::metadata().into() } } - impl BlockBuilder for Runtime { + impl block_builder_api::BlockBuilder for Runtime { fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyResult { Executive::apply_extrinsic(extrinsic) } @@ -448,12 +292,48 @@ impl_runtime_apis! { Executive::finalise_block() } - fn inherent_extrinsics(data: InherentData) -> Vec { - data.create_inherent_extrinsics() + fn inherent_extrinsics(data: primitives::InherentData) -> Vec<::Extrinsic> { + use sr_primitives::traits::ProvideInherent; + + let mut inherent = Vec::new(); + + inherent.extend( + Timestamp::create_inherent_extrinsics(data.timestamp) + .into_iter() + .map(|v| (v.0, UncheckedExtrinsic::new_unsigned(Call::Timestamp(v.1)))) + ); + + inherent.extend( + Parachains::create_inherent_extrinsics(data.parachains) + .into_iter() + .map(|v| (v.0, UncheckedExtrinsic::new_unsigned(Call::Parachains(v.1)))) + ); + + inherent.as_mut_slice().sort_unstable_by_key(|v| v.0); + inherent.into_iter().map(|v| v.1).collect() } - fn check_inherents(block: Block, data: InherentData) -> Result<(), InherentError> { - data.check_inherents(block) + fn check_inherents(block: Block, data: primitives::InherentData) -> Result<(), CheckInherentError> { + let expected_slot = data.aura_expected_slot; + + // draw timestamp out from extrinsics. + let set_timestamp = block.extrinsics() + .get(TIMESTAMP_SET_POSITION as usize) + .and_then(|xt: &UncheckedExtrinsic| match xt.function { + Call::Timestamp(TimestampCall::set(ref t)) => Some(t.clone()), + _ => None, + }) + .ok_or_else(|| CheckInherentError::Other("No valid timestamp in block.".into()))?; + + // take the "worse" result of normal verification and the timestamp vs. seal + // check. + CheckInherentError::combine_results( + Runtime::check_inherents(block, data), + || { + Aura::verify_inherent(set_timestamp.into(), expected_slot) + .map_err(|s| CheckInherentError::Other(s.into())) + }, + ) } fn random_seed() -> ::Hash { @@ -461,13 +341,13 @@ impl_runtime_apis! { } } - impl TaggedTransactionQueue for Runtime { + impl client_api::TaggedTransactionQueue for Runtime { fn validate_transaction(tx: ::Extrinsic) -> TransactionValidity { Executive::validate_transaction(tx) } } - impl ParachainHost for Runtime { + impl parachain::ParachainHost for Runtime { fn validators() -> Vec { Session::validators() } @@ -484,5 +364,31 @@ impl_runtime_apis! { Parachains::parachain_code(&id) } } + + impl fg_primitives::GrandpaApi for Runtime { + fn grandpa_pending_change(digest: DigestFor) + -> Option> + { + for log in digest.logs.iter().filter_map(|l| match l { + Log(InternalLog::grandpa(grandpa_signal)) => Some(grandpa_signal), + _=> None + }) { + if let Some(change) = Grandpa::scrape_digest_change(log) { + return Some(change); + } + } + None + } + + fn grandpa_authorities() -> Vec<(SessionKey, u64)> { + Grandpa::grandpa_authorities() + } + } + + impl aura_api::AuraApi for Runtime { + fn slot_duration() -> u64 { + Aura::slot_duration() + } + } } diff --git a/polkadot/runtime/src/parachains.rs b/polkadot/runtime/src/parachains.rs index 0f5e781e49..9bfb6e2793 100644 --- a/polkadot/runtime/src/parachains.rs +++ b/polkadot/runtime/src/parachains.rs @@ -20,9 +20,10 @@ use rstd::prelude::*; use codec::Decode; use bitvec::BigEndian; -use sr_primitives::{RuntimeString, traits::{ +use sr_primitives::CheckInherentError; +use sr_primitives::traits::{ Extrinsic, Block as BlockT, Hash as HashT, BlakeTwo256, ProvideInherent, -}}; +}; use primitives::parachain::{Id, Chain, DutyRoster, AttestedCandidate, Statement}; use {system, session}; @@ -32,6 +33,9 @@ use srml_support::dispatch::Result; #[cfg(any(feature = "std", test))] use sr_primitives::{self, ChildrenStorageMap}; +#[cfg(any(feature = "std", test))] +use rstd::marker::PhantomData; + use system::ensure_inherent; pub trait Trait: session::Trait { @@ -53,6 +57,7 @@ decl_storage! { } add_extra_genesis { config(parachains): Vec<(Id, Vec, Vec)>; + config(_phdata): PhantomData; build(|storage: &mut sr_primitives::StorageMap, _: &mut ChildrenStorageMap, config: &GenesisConfig| { use codec::Encode; @@ -62,11 +67,11 @@ decl_storage! { let only_ids: Vec<_> = p.iter().map(|&(ref id, _, _)| id).cloned().collect(); - storage.insert(GenesisConfig::::hash(>::key()).to_vec(), only_ids.encode()); + storage.insert(Self::hash(>::key()).to_vec(), only_ids.encode()); for (id, code, genesis) in p { - let code_key = GenesisConfig::::hash(&>::key_for(&id)).to_vec(); - let head_key = GenesisConfig::::hash(&>::key_for(&id)).to_vec(); + let code_key = Self::hash(&>::key_for(&id)).to_vec(); + let head_key = Self::hash(&>::key_for(&id)).to_vec(); storage.insert(code_key, code.encode()); storage.insert(head_key, genesis.encode()); @@ -418,7 +423,6 @@ impl Module { impl ProvideInherent for Module { type Inherent = Vec; type Call = Call; - type Error = RuntimeString; fn create_inherent_extrinsics(data: Self::Inherent) -> Vec<(u32, Self::Call)> { vec![(T::SET_POSITION, Call::set_heads(data))] @@ -426,7 +430,7 @@ impl ProvideInherent for Module { fn check_inherent Option<&Self::Call>>( block: &Block, _data: Self::Inherent, extract_function: &F - ) -> ::rstd::result::Result<(), Self::Error> { + ) -> ::rstd::result::Result<(), CheckInherentError> { let has_heads = block .extrinsics() .get(T::SET_POSITION as usize) @@ -437,7 +441,11 @@ impl ProvideInherent for Module { } }); - if !has_heads { return Err("No valid parachains inherent in block".into()) } + if !has_heads { + return Err(CheckInherentError::Other( + "No valid parachains inherent in block".into() + )); + } Ok(()) } @@ -446,7 +454,6 @@ impl ProvideInherent for Module { #[cfg(test)] mod tests { use super::*; - use rstd::marker::PhantomData; use sr_io::{TestExternalities, with_externalities}; use substrate_primitives::{H256, Blake2Hasher}; use sr_primitives::{generic, BuildStorage}; @@ -464,7 +471,7 @@ mod tests { impl consensus::Trait for Test { const NOTE_OFFLINE_POSITION: u32 = 1; type SessionKey = SessionKey; - type OnOfflineValidator = (); + type InherentOfflineReport = (); type Log = ::Log; } impl system::Trait for Test { @@ -487,6 +494,7 @@ mod tests { impl timestamp::Trait for Test { const TIMESTAMP_SET_POSITION: u32 = 0; type Moment = u64; + type OnTimestampSet = (); } impl Trait for Test { const SET_POSITION: u32 = 0; @@ -510,16 +518,14 @@ mod tests { t.extend(consensus::GenesisConfig::{ code: vec![], authorities: authority_keys.iter().map(|k| k.to_raw_public().into()).collect(), - _genesis_phantom_data: PhantomData, }.build_storage().unwrap().0); t.extend(session::GenesisConfig::{ session_length: 1000, validators: authority_keys.iter().map(|k| k.to_raw_public().into()).collect(), - _genesis_phantom_data: PhantomData, }.build_storage().unwrap().0); t.extend(GenesisConfig::{ parachains: parachains, - _genesis_phantom_data: PhantomData, + _phdata: Default::default(), }.build_storage().unwrap().0); t.into() } diff --git a/polkadot/runtime/wasm/Cargo.lock b/polkadot/runtime/wasm/Cargo.lock index 0c7200296a..40522f5842 100644 --- a/polkadot/runtime/wasm/Cargo.lock +++ b/polkadot/runtime/wasm/Cargo.lock @@ -11,11 +11,25 @@ name = "bitvec" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "byteorder" version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "constant_time_eq" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "crunchy" version = "0.1.6" @@ -89,7 +103,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -115,7 +129,7 @@ name = "parity-codec-derive" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -148,11 +162,13 @@ dependencies = [ "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-version 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-aura 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-balances 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-consensus 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-council 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-democracy 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-executive 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-grandpa 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-session 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-staking 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", @@ -160,6 +176,7 @@ dependencies = [ "srml-timestamp 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-treasury 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-consensus-aura-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", ] @@ -178,7 +195,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -189,7 +206,7 @@ name = "quote" version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -231,10 +248,21 @@ name = "serde" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "sr-api-macros" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sr-io" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hash-db 0.9.0 (git+https://github.com/paritytech/trie)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -246,7 +274,7 @@ dependencies = [ [[package]] name = "sr-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -260,7 +288,7 @@ dependencies = [ [[package]] name = "sr-std" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -268,7 +296,7 @@ dependencies = [ [[package]] name = "sr-version" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -277,10 +305,30 @@ dependencies = [ "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", ] +[[package]] +name = "srml-aura" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-io 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-consensus 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-staking 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-system 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-timestamp 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", +] + [[package]] name = "srml-balances" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -298,7 +346,7 @@ dependencies = [ [[package]] name = "srml-consensus" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -315,7 +363,7 @@ dependencies = [ [[package]] name = "srml-council" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -335,7 +383,7 @@ dependencies = [ [[package]] name = "srml-democracy" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -354,7 +402,7 @@ dependencies = [ [[package]] name = "srml-executive" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -367,10 +415,29 @@ dependencies = [ "srml-system 0.1.0 (git+https://github.com/paritytech/substrate)", ] +[[package]] +name = "srml-grandpa" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-io 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-session 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-system 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-finality-grandpa-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", +] + [[package]] name = "srml-metadata" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -381,7 +448,7 @@ dependencies = [ [[package]] name = "srml-session" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -401,7 +468,7 @@ dependencies = [ [[package]] name = "srml-staking" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -423,7 +490,7 @@ dependencies = [ [[package]] name = "srml-support" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -432,12 +499,46 @@ dependencies = [ "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", "srml-metadata 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support-procedural 0.1.0 (git+https://github.com/paritytech/substrate)", +] + +[[package]] +name = "srml-support-procedural" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-api-macros 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support-procedural-tools 0.1.0 (git+https://github.com/paritytech/substrate)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "srml-support-procedural-tools" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "srml-support-procedural-tools-derive 0.1.0 (git+https://github.com/paritytech/substrate)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "srml-support-procedural-tools-derive" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "srml-system" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -454,11 +555,10 @@ dependencies = [ [[package]] name = "srml-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", @@ -472,7 +572,7 @@ dependencies = [ [[package]] name = "srml-treasury" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -495,19 +595,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "substrate-client" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-api-macros 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", "sr-version 0.1.0 (git+https://github.com/paritytech/substrate)", "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", ] +[[package]] +name = "substrate-consensus-aura-primitives" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-io 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-version 0.1.0 (git+https://github.com/paritytech/substrate)", + "srml-support 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", +] + +[[package]] +name = "substrate-finality-grandpa-primitives" +version = "0.1.0" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" +dependencies = [ + "parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", + "sr-std 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)", + "substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)", +] + [[package]] name = "substrate-primitives" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate#c10123e41c2f4bfa7aa82f65c229920111c66d19" +source = "git+https://github.com/paritytech/substrate#3329915cd5458bd065c9f921891487e71511097c" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -527,7 +655,17 @@ name = "syn" version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn" +version = "0.15.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -550,7 +688,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum bitvec 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e37e2176261200377c7cde4c6de020394174df556c356f965e4bc239f5ce1c5a" +"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" +"checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" "checksum crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c240f247c278fa08a6d4820a6a222bfc6e0d999e51ba67be94f44c905b2161f2" "checksum fixed-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a557e80084b05c32b455963ff565a9de6f2866da023d6671705c6aff6f65e01c" @@ -568,7 +708,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa42c2cb493b60b12c75b26e8c94cb734af4df4d7f2cc229dc04c1953dac189" "checksum proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c725b36c99df7af7bf9324e9c999b9e37d92c8f8caf106d82e1d7953218d2d8" "checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a" -"checksum proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)" = "88dae56b29da695d783ea7fc5a90de281f79eb38407e77f6d674dd8befc4ac47" +"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" "checksum rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "403bb3a286107a04825a5f82e1270acc1e14028d3d554d7a1e08914549575ab8" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" @@ -576,25 +716,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" +"checksum sr-api-macros 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum sr-io 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum sr-primitives 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum sr-std 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum sr-version 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-aura 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-balances 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-consensus 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-council 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-democracy 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-executive 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-grandpa 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-metadata 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-session 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-staking 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-support 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-support-procedural 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-support-procedural-tools 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum srml-support-procedural-tools-derive 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-system 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-timestamp 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum srml-treasury 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" "checksum substrate-client 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum substrate-consensus-aura-primitives 0.1.0 (git+https://github.com/paritytech/substrate)" = "" +"checksum substrate-finality-grandpa-primitives 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum substrate-primitives 0.1.0 (git+https://github.com/paritytech/substrate)" = "" "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" +"checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7" "checksum uint 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "082df6964410f6aa929a61ddfafc997e4f32c62c22490e439ac351cec827f436" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" diff --git a/polkadot/runtime/wasm/Cargo.toml b/polkadot/runtime/wasm/Cargo.toml index 4282d32cea..489feb6e54 100644 --- a/polkadot/runtime/wasm/Cargo.toml +++ b/polkadot/runtime/wasm/Cargo.toml @@ -15,14 +15,17 @@ parity-codec = { version = "2.1", default-features = false } parity-codec-derive = { version = "2.1", default-features = false } substrate-primitives = { git = "https://github.com/paritytech/substrate", default-features = false } substrate-client = { git = "https://github.com/paritytech/substrate", default-features = false } +substrate-consensus-aura-primitives = { git = "https://github.com/paritytech/substrate", default-features = false } sr-std = { git = "https://github.com/paritytech/substrate", default-features = false } sr-io = { git = "https://github.com/paritytech/substrate", default-features = false } srml-support = { git = "https://github.com/paritytech/substrate", default-features = false } +srml-aura = { git = "https://github.com/paritytech/substrate", default-features = false } srml-balances = { git = "https://github.com/paritytech/substrate", default-features = false } srml-consensus = { git = "https://github.com/paritytech/substrate", default-features = false } srml-council = { git = "https://github.com/paritytech/substrate", default-features = false } srml-democracy = { git = "https://github.com/paritytech/substrate", default-features = false } srml-executive = { git = "https://github.com/paritytech/substrate", default-features = false } +srml-grandpa = { git = "https://github.com/paritytech/substrate", default-features = false } sr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false } srml-session = { git = "https://github.com/paritytech/substrate", default-features = false } srml-staking = { git = "https://github.com/paritytech/substrate", default-features = false } diff --git a/polkadot/runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm b/polkadot/runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm index cd5656aa78..1f1baf2a72 100644 Binary files a/polkadot/runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm and b/polkadot/runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm differ diff --git a/polkadot/runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm b/polkadot/runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm index c5486a58a6..910f6d70d0 100755 Binary files a/polkadot/runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm and b/polkadot/runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm differ diff --git a/polkadot/service/Cargo.toml b/polkadot/service/Cargo.toml index ad4cf73b9e..28e17b0a2b 100644 --- a/polkadot/service/Cargo.toml +++ b/polkadot/service/Cargo.toml @@ -12,6 +12,7 @@ slog = "^2" tokio = "0.1.7" hex-literal = "0.1" polkadot-availability-store = { path = "../availability-store" } +polkadot-consensus = { path = "../consensus" } polkadot-primitives = { path = "../primitives" } polkadot-runtime = { path = "../runtime" } polkadot-executor = { path = "../executor" } @@ -19,9 +20,9 @@ polkadot-network = { path = "../network" } sr-io = { git = "https://github.com/paritytech/substrate" } sr-primitives = { git = "https://github.com/paritytech/substrate" } substrate-primitives = { git = "https://github.com/paritytech/substrate" } -substrate-network = { git = "https://github.com/paritytech/substrate" } substrate-client = { git = "https://github.com/paritytech/substrate" } substrate-consensus-aura = { git = "https://github.com/paritytech/substrate" } +substrate-finality-grandpa = { git = "https://github.com/paritytech/substrate" } substrate-service = { git = "https://github.com/paritytech/substrate" } substrate-telemetry = { git = "https://github.com/paritytech/substrate" } substrate-transaction-pool = { git = "https://github.com/paritytech/substrate" } diff --git a/polkadot/service/src/chain_spec.rs b/polkadot/service/src/chain_spec.rs index 0bae2a8096..5d0703ef4e 100644 --- a/polkadot/service/src/chain_spec.rs +++ b/polkadot/service/src/chain_spec.rs @@ -17,8 +17,10 @@ //! Polkadot chain configurations. use primitives::{AuthorityId, ed25519}; -use polkadot_runtime::{GenesisConfig, ConsensusConfig, CouncilSeatsConfig, DemocracyConfig, - SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill, CouncilVotingConfig}; +use polkadot_runtime::{ + GenesisConfig, ConsensusConfig, CouncilSeatsConfig, DemocracyConfig, + SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill, CouncilVotingConfig, GrandpaConfig +}; const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; const DEFAULT_PROTOCOL_ID: &str = "dot"; @@ -44,7 +46,6 @@ fn staging_testnet_config_genesis() -> GenesisConfig { consensus: Some(ConsensusConfig { code: include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm").to_vec(), // TODO change authorities: initial_authorities.clone(), - _genesis_phantom_data: Default::default(), }), system: None, balances: Some(BalancesConfig { @@ -55,12 +56,10 @@ fn staging_testnet_config_genesis() -> GenesisConfig { creation_fee: 0, reclaim_rebate: 0, balances: endowed_accounts.iter().map(|&k|(k, 1u128 << 60)).collect(), - _genesis_phantom_data: Default::default(), }), session: Some(SessionConfig { validators: initial_authorities.iter().cloned().map(Into::into).collect(), session_length: 60, // that's 5 minutes per session. - _genesis_phantom_data: Default::default(), }), staking: Some(StakingConfig { current_era: 0, @@ -74,13 +73,15 @@ fn staging_testnet_config_genesis() -> GenesisConfig { bonding_duration: 24 * 60 * 12, // 1 day per bond. offline_slash_grace: 4, minimum_validator_count: 4, - _genesis_phantom_data: Default::default(), }), democracy: Some(DemocracyConfig { launch_period: 12 * 60 * 24, // 1 day per public referendum voting_period: 12 * 60 * 24 * 3, // 3 days to discuss & vote on an active referendum minimum_deposit: 5000, // 12000 as the minimum deposit for a referendum - _genesis_phantom_data: Default::default(), + public_delay: 0, + }), + grandpa: Some(GrandpaConfig { + authorities: initial_authorities.clone().into_iter().map(|k| (k, 1)).collect(), }), council_seats: Some(CouncilSeatsConfig { active_council: vec![], @@ -93,17 +94,15 @@ fn staging_testnet_config_genesis() -> GenesisConfig { term_duration: 12 * 60 * 24 * 24, // 24 day term duration for the council. desired_seats: 0, // start with no council: we'll raise this once the stake has been dispersed a bit. inactive_grace_period: 1, // one addition vote should go by before an inactive voter can be reaped. - _genesis_phantom_data: Default::default(), }), council_voting: Some(CouncilVotingConfig { cooloff_period: 75, voting_period: 20, - _genesis_phantom_data: Default::default(), + enact_delay_period: 0, }), parachains: Some(Default::default()), timestamp: Some(TimestampConfig { - period: 5, // 5 second block time. - _genesis_phantom_data: Default::default(), + period: 2, // 2*2=4 second block time. }), treasury: Some(Default::default()), } @@ -137,7 +136,6 @@ fn testnet_genesis(initial_authorities: Vec) -> GenesisConfig { consensus: Some(ConsensusConfig { code: include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm").to_vec(), authorities: initial_authorities.clone(), - _genesis_phantom_data: Default::default(), }), system: None, balances: Some(BalancesConfig { @@ -148,12 +146,10 @@ fn testnet_genesis(initial_authorities: Vec) -> GenesisConfig { creation_fee: 0, reclaim_rebate: 0, balances: endowed_accounts.iter().map(|&k|(k, (1u128 << 60))).collect(), - _genesis_phantom_data: Default::default(), }), session: Some(SessionConfig { validators: initial_authorities.iter().cloned().map(Into::into).collect(), session_length: 10, - _genesis_phantom_data: Default::default(), }), staking: Some(StakingConfig { current_era: 0, @@ -167,13 +163,15 @@ fn testnet_genesis(initial_authorities: Vec) -> GenesisConfig { current_offline_slash: 0, current_session_reward: 0, offline_slash_grace: 0, - _genesis_phantom_data: Default::default(), }), democracy: Some(DemocracyConfig { launch_period: 9, voting_period: 18, minimum_deposit: 10, - _genesis_phantom_data: Default::default(), + public_delay: 0, + }), + grandpa: Some(GrandpaConfig { + authorities: initial_authorities.clone().into_iter().map(|k| (k, 1)).collect(), }), council_seats: Some(CouncilSeatsConfig { active_council: endowed_accounts.iter().filter(|a| initial_authorities.iter().find(|&b| a[..] == b.0).is_none()).map(|a| (a.clone(), 1000000)).collect(), @@ -186,17 +184,15 @@ fn testnet_genesis(initial_authorities: Vec) -> GenesisConfig { term_duration: 1000000, desired_seats: (endowed_accounts.len() - initial_authorities.len()) as u32, inactive_grace_period: 1, - _genesis_phantom_data: Default::default(), }), council_voting: Some(CouncilVotingConfig { cooloff_period: 75, voting_period: 20, - _genesis_phantom_data: Default::default(), + enact_delay_period: 0, }), parachains: Some(Default::default()), timestamp: Some(TimestampConfig { - period: 5, // 5 second block time. - _genesis_phantom_data: Default::default(), + period: 2, // 2*2=4 second block time. }), treasury: Some(Default::default()), } diff --git a/polkadot/service/src/lib.rs b/polkadot/service/src/lib.rs index d82d26ada7..f61bd25545 100644 --- a/polkadot/service/src/lib.rs +++ b/polkadot/service/src/lib.rs @@ -19,18 +19,18 @@ //! Polkadot service. Specialized wrapper over substrate service. extern crate polkadot_availability_store as av_store; +extern crate polkadot_consensus as consensus; extern crate polkadot_primitives; extern crate polkadot_runtime; extern crate polkadot_executor; extern crate polkadot_network; extern crate sr_primitives; extern crate substrate_primitives as primitives; -#[macro_use] -extern crate substrate_network as network; extern crate substrate_client as client; #[macro_use] extern crate substrate_service as service; -extern crate substrate_consensus_aura as consensus; +extern crate substrate_consensus_aura as aura; +extern crate substrate_finality_grandpa as grandpa; extern crate substrate_transaction_pool as transaction_pool; extern crate tokio; @@ -42,12 +42,14 @@ extern crate hex_literal; pub mod chain_spec; use std::sync::Arc; -use polkadot_primitives::{parachain, AccountId, Block}; -use polkadot_runtime::{GenesisConfig, ClientWithApi}; +use std::time::Duration; +use polkadot_primitives::{parachain, AccountId, Block, InherentData}; +use polkadot_runtime::{GenesisConfig, RuntimeApi}; +use primitives::ed25519; use tokio::runtime::TaskExecutor; use service::{FactoryFullConfiguration, FullBackend, LightBackend, FullExecutor, LightExecutor}; use transaction_pool::txpool::{Pool as TransactionPool}; -use consensus::{import_queue, start_aura, Config as AuraConfig, AuraImportQueue, NothingExtra}; +use aura::{import_queue, start_aura, AuraImportQueue, SlotDuration, NothingExtra, InherentProducingFn}; pub use service::{ Roles, PruningMode, TransactionPoolOptions, ComponentClient, @@ -62,7 +64,7 @@ pub use primitives::{Blake2Hasher}; pub use sr_primitives::traits::ProvideRuntimeApi; pub use chain_spec::ChainSpec; -const AURA_SLOT_DURATION: u64 = 6; +const PARACHAIN_EMPTY_DURATION: Duration = Duration::from_secs(4); /// All configuration for the polkadot node. pub type Configuration = FactoryFullConfiguration; @@ -73,11 +75,19 @@ pub struct CustomConfiguration { /// Set to `Some` with a collator `AccountId` and desired parachain /// if the network protocol should be started in collator mode. pub collating_for: Option<(AccountId, parachain::Id)>, + + /// Intermediate state during setup. Will be removed in future. Set to `None`. + // FIXME: rather than putting this on the config, let's have an actual intermediate setup state + // https://github.com/paritytech/substrate/issues/1134 + pub grandpa_import_setup: Option<( + Arc>, + grandpa::LinkHalfForService + )>, } /// Chain API type for the transaction pool. pub type TxChainApi = transaction_pool::ChainApi< - client::Client, + client::Client, Block, >; @@ -89,7 +99,7 @@ pub trait PolkadotService { type Executor: 'static + client::CallExecutor + Send + Sync + Clone; /// Get a handle to the client. - fn client(&self) -> Arc>; + fn client(&self) -> Arc>; /// Get a handle to the network. fn network(&self) -> Arc; @@ -102,7 +112,7 @@ impl PolkadotService for Service> { type Backend = as Components>::Backend; type Executor = as Components>::Executor; - fn client(&self) -> Arc> { + fn client(&self) -> Arc> { Service::client(self) } fn network(&self) -> Arc { @@ -118,9 +128,10 @@ impl PolkadotService for Service> { type Backend = as Components>::Backend; type Executor = as Components>::Executor; - fn client(&self) -> Arc> { + fn client(&self) -> Arc> { Service::client(self) } + fn network(&self) -> Arc { Service::network(self) } @@ -130,10 +141,18 @@ impl PolkadotService for Service> { } } +fn inherent_data_import_queue(timestamp: u64, slot: u64) -> InherentData { + InherentData { + parachains: Vec::new(), + timestamp, + aura_expected_slot: slot, + } +} + construct_service_factory! { struct Factory { Block = Block, - RuntimeApi = ClientWithApi, + RuntimeApi = RuntimeApi, NetworkProtocol = PolkadotProtocol { |config: &Configuration| Ok(PolkadotProtocol::new(config.custom.collating_for)) }, RuntimeDispatch = polkadot_executor::Executor, FullTransactionPoolApi = TxChainApi, FullExecutor> @@ -144,54 +163,108 @@ construct_service_factory! { Configuration = CustomConfiguration, FullService = FullComponents { |config: FactoryFullConfiguration, executor: TaskExecutor| { - let is_auth = config.roles == Roles::AUTHORITY; - FullComponents::::new(config, executor.clone()).map(move |service|{ - if is_auth { - if let Ok(Some(Ok(key))) = service.keystore().contents() - .map(|keys| keys.get(0).map(|k| service.keystore().load(k, ""))) - { - info!("Using authority key {}", key.public()); - let task = start_aura( - AuraConfig { - local_key: Some(Arc::new(key)), - slot_duration: AURA_SLOT_DURATION, - }, - service.client(), - service.proposer(), - service.network(), - ); + FullComponents::::new(config, executor) + } }, + AuthoritySetup = { |mut service: Self::FullService, executor: TaskExecutor, key: Arc| { + use polkadot_network::consensus::ConsensusNetwork; - executor.spawn(task); - } - } + let (block_import, link_half) = service.config.custom.grandpa_import_setup.take() + .expect("Link Half and Block Import are present for Full Services or setup failed before. qed"); - service - }) - } - }, - AuthoritySetup = { |service, _, _| Ok(service) }, + { + info!("Running Grandpa session as Authority {}", key.public()); + let (voter, oracle) = grandpa::run_grandpa( + grandpa::Config { + gossip_duration: Duration::new(4, 0), // FIXME: make this available through chainspec? + local_key: Some(key.clone()), + name: Some(service.config.name.clone()) + }, + link_half, + grandpa::NetworkBridge::new(service.network()), + )?; + + executor.spawn(oracle); + executor.spawn(voter); + } + + let extrinsic_store = { + use std::path::PathBuf; + + let mut path = PathBuf::from(service.config.database_path.clone()); + path.push("availability"); + + ::av_store::Store::new(::av_store::Config { + cache_size: None, + path, + })? + }; + + let client = service.client(); + + // collator connections and consensus network both fulfilled by this + let consensus_network = ConsensusNetwork::new(service.network(), service.client()); + let proposer_factory = ::consensus::ProposerFactory::new( + client.clone(), + consensus_network.clone(), + consensus_network, + service.transaction_pool(), + executor.clone(), + PARACHAIN_EMPTY_DURATION, + key.clone(), + extrinsic_store, + ); + + info!("Using authority key {}", key.public()); + let task = start_aura( + SlotDuration::get_or_compute(&*client)?, + key, + client.clone(), + client, + Arc::new(proposer_factory), + service.network(), + ); + + executor.spawn(task); + Ok(service) + }}, LightService = LightComponents { |config, executor| >::new(config, executor) }, - FullImportQueue = AuraImportQueue, NothingExtra> - { |config, client| Ok(import_queue( - AuraConfig { - local_key: None, - slot_duration: 5 - }, - client, - NothingExtra, - )) - }, - LightImportQueue = AuraImportQueue, NothingExtra> - { |config, client| Ok(import_queue( - AuraConfig { - local_key: None, - slot_duration: 5 - }, - client, - NothingExtra, - )) - }, + FullImportQueue = AuraImportQueue< + Self::Block, + grandpa::BlockImportForService, + NothingExtra, + InherentProducingFn, + > + { |config: &mut FactoryFullConfiguration, client: Arc>| { + let slot_duration = SlotDuration::get_or_compute(&*client)?; + + let (block_import, link_half) = grandpa::block_import::<_, _, _, RuntimeApi, FullClient>(client.clone(), client)?; + let block_import = Arc::new(block_import); + + config.custom.grandpa_import_setup = Some((block_import.clone(), link_half)); + Ok(import_queue( + slot_duration, + block_import, + NothingExtra, + inherent_data_import_queue as _, + )) + }}, + LightImportQueue = AuraImportQueue< + Self::Block, + LightClient, + NothingExtra, + InherentProducingFn, + > + { |config, client: Arc>| { + let slot_duration = SlotDuration::get_or_compute(&*client)?; + + Ok(import_queue( + slot_duration, + client, + NothingExtra, + inherent_data_import_queue as _, + )) + }}, } }