diff --git a/Cargo.lock b/Cargo.lock index 8d0caed2dd03d..744b5ec88fa96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,11 +1,9 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. [[package]] name = "MacTypes-sys" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -41,10 +39,10 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -56,7 +54,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -106,7 +104,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -119,7 +117,7 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -131,13 +129,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -148,7 +146,7 @@ version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -194,16 +192,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cexpr 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "clang-sys 0.26.4 (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.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -300,7 +298,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -325,12 +323,12 @@ name = "cexpr" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nom 4.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cfg-if" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -349,7 +347,7 @@ version = "0.26.4" 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.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -403,7 +401,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -411,7 +409,7 @@ name = "core-foundation-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -425,15 +423,15 @@ dependencies = [ "criterion-plot 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "csv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -453,13 +451,13 @@ name = "crossbeam" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -469,7 +467,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -490,15 +488,24 @@ dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-deque" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-epoch" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 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)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -510,19 +517,27 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-utils" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -530,8 +545,8 @@ name = "crossbeam-utils" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -568,7 +583,7 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -576,7 +591,7 @@ name = "csv-core" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -608,13 +623,13 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "1.0.3" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -664,7 +679,7 @@ version = "1.0.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -672,12 +687,12 @@ dependencies = [ [[package]] name = "either" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "elastic-array" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -685,13 +700,13 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 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)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -705,7 +720,7 @@ name = "error-chain" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -722,7 +737,7 @@ name = "failure" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -733,7 +748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -747,7 +762,7 @@ name = "fdlimit" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -770,7 +785,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -806,8 +821,8 @@ name = "fs-swap" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -842,7 +857,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -877,11 +892,11 @@ name = "globset" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -890,15 +905,15 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -946,7 +961,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hex-literal" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -992,10 +1007,10 @@ dependencies = [ [[package]] name = "http" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1023,7 +1038,7 @@ dependencies = [ "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1033,26 +1048,27 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.23" +version = "0.12.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1081,7 +1097,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1104,7 +1120,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1113,7 +1129,7 @@ name = "itertools" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1123,74 +1139,74 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jsonrpc-core" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" 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)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-derive" -version = "10.0.2" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-http-server" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-pubsub" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-server-utils" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-ws-server" -version = "10.0.1" +version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-ws 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1226,7 +1242,7 @@ name = "kvdb" version = "0.1.0" source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d#b0317f649ab2c665b7987b8475878fc4d2e1f81d" dependencies = [ - "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", ] @@ -1244,14 +1260,14 @@ name = "kvdb-rocksdb" version = "0.1.4" source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d#b0317f649ab2c665b7987b8475878fc4d2e1f81d" dependencies = [ - "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "elastic-array 0.10.2 (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?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.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.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rocksdb 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1262,7 +1278,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1272,7 +1288,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.48" +version = "0.2.50" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1289,9 +1305,9 @@ name = "libp2p" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-dns 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1312,11 +1328,11 @@ dependencies = [ "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1325,22 +1341,22 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "multistream-select 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1352,7 +1368,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1365,7 +1381,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1374,16 +1390,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1392,17 +1408,17 @@ name = "libp2p-identify" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1416,7 +1432,7 @@ dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "bigint 4.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1426,11 +1442,11 @@ dependencies = [ "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1449,9 +1465,9 @@ dependencies = [ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1462,14 +1478,14 @@ name = "libp2p-mplex" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1478,14 +1494,14 @@ name = "libp2p-noise" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1494,7 +1510,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1502,7 +1518,7 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1527,7 +1543,7 @@ dependencies = [ "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1537,22 +1553,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "asn1_der 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1567,7 +1583,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1593,9 +1609,9 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rw-stream-sink 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "websocket 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1606,7 +1622,7 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "yamux 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1618,7 +1634,7 @@ dependencies = [ "bindgen 0.43.2 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1675,7 +1691,7 @@ name = "log" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1698,11 +1714,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1726,13 +1741,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "merlin" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1754,7 +1768,7 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1779,7 +1793,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1799,12 +1813,12 @@ name = "multistream-select" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (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)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1821,16 +1835,16 @@ name = "native-tls" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.19 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.42 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1838,8 +1852,8 @@ name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1850,8 +1864,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1861,7 +1875,7 @@ version = "0.1.0" dependencies = [ "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-executor 0.1.0", "node-primitives 0.1.0", @@ -1870,7 +1884,7 @@ dependencies = [ "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", - "structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-basic-authorship 0.1.0", "substrate-cli 0.3.0", "substrate-client 0.1.0", @@ -1884,7 +1898,7 @@ dependencies = [ "substrate-service-test 0.3.0", "substrate-telemetry 0.3.1", "substrate-transaction-pool 0.1.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1924,8 +1938,8 @@ dependencies = [ "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 0.1.0", "sr-std 0.1.0", "substrate-primitives 0.1.0", @@ -1936,13 +1950,13 @@ dependencies = [ name = "node-runtime" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 0.1.0", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 0.1.0", "sr-std 0.1.0", "sr-version 0.1.0", @@ -1968,6 +1982,8 @@ dependencies = [ "substrate-client 0.1.0", "substrate-consensus-aura-primitives 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1979,7 +1995,7 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-executor 0.1.0", "node-template-runtime 0.9.0", @@ -1997,7 +2013,7 @@ dependencies = [ "substrate-primitives 0.1.0", "substrate-service 0.3.0", "substrate-transaction-pool 0.1.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2008,8 +2024,8 @@ version = "0.9.0" dependencies = [ "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", @@ -2026,6 +2042,8 @@ dependencies = [ "srml-timestamp 0.1.0", "substrate-client 0.1.0", "substrate-consensus-aura-primitives 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -2041,10 +2059,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "nom" -version = "4.2.0" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2063,10 +2081,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2093,15 +2111,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.10.16" +version = "0.10.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2111,12 +2129,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.40" +version = "0.9.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2148,7 +2167,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2159,7 +2178,7 @@ dependencies = [ "proc-macro-crate 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2183,7 +2202,7 @@ dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2214,7 +2233,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (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)", @@ -2257,9 +2276,9 @@ name = "parking_lot_core" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2268,10 +2287,10 @@ name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2280,10 +2299,10 @@ name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2304,7 +2323,7 @@ dependencies = [ "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2375,7 +2394,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2401,7 +2420,7 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2445,7 +2464,7 @@ name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2455,7 +2474,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2468,7 +2487,7 @@ 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-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2479,14 +2498,14 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.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_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2534,19 +2553,19 @@ name = "rand_jitter" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (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_os" -version = "0.1.2" +version = "0.1.3" 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-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2554,11 +2573,11 @@ dependencies = [ [[package]] name = "rand_pcg" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2584,7 +2603,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2594,9 +2613,9 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2627,11 +2646,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2671,8 +2690,8 @@ version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2683,7 +2702,7 @@ name = "rocksdb" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "librocksdb-sys 5.14.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2693,7 +2712,7 @@ version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2727,9 +2746,9 @@ name = "rw-stream-sink" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2760,23 +2779,23 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schnorrkel" version = "0.0.0" -source = "git+https://github.com/w3f/schnorrkel#0876f3f2194426150efea99304a8d23a336744bc" +source = "git+https://github.com/w3f/schnorrkel#ba2c5ced364af25f73345be33a4ba7dcefe382ac" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2805,7 +2824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2816,7 +2835,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2834,27 +2853,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2932,8 +2951,8 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2943,21 +2962,18 @@ version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "smallvec" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "snow" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2967,8 +2983,9 @@ dependencies = [ "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2991,7 +3008,7 @@ dependencies = [ "substrate-primitives 0.1.0", "substrate-state-machine 0.1.0", "substrate-test-client 0.1.0", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3018,11 +3035,13 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-std 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3052,8 +3071,8 @@ version = "0.1.0" dependencies = [ "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 0.1.0", "sr-std 0.1.0", ] @@ -3062,14 +3081,16 @@ dependencies = [ name = "srml-assets" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3077,12 +3098,12 @@ dependencies = [ name = "srml-aura" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", @@ -3093,6 +3114,8 @@ dependencies = [ "srml-system 0.1.0", "srml-timestamp 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3100,16 +3123,18 @@ dependencies = [ name = "srml-balances" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3117,16 +3142,18 @@ dependencies = [ name = "srml-consensus" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3135,12 +3162,12 @@ name = "srml-contract" version = "0.1.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-sandbox 0.1.0", @@ -3151,6 +3178,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "srml-timestamp 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3159,11 +3188,11 @@ dependencies = [ name = "srml-council" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", @@ -3171,6 +3200,8 @@ dependencies = [ "srml-democracy 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3178,17 +3209,19 @@ dependencies = [ name = "srml-democracy" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-balances 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3196,14 +3229,16 @@ dependencies = [ name = "srml-example" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "srml-balances 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3211,10 +3246,10 @@ dependencies = [ name = "srml-executive" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", @@ -3223,6 +3258,8 @@ dependencies = [ "srml-indices 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3230,15 +3267,17 @@ dependencies = [ name = "srml-fees" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3246,18 +3285,19 @@ dependencies = [ name = "srml-finality-tracker" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", "substrate-primitives 0.1.0", ] @@ -3266,8 +3306,8 @@ name = "srml-grandpa" version = "0.1.0" dependencies = [ "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", @@ -3276,6 +3316,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-finality-grandpa-primitives 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3283,18 +3325,20 @@ dependencies = [ name = "srml-indices" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3303,9 +3347,10 @@ name = "srml-metadata" version = "0.1.0" dependencies = [ "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 0.1.0", + "substrate-metadata 0.1.0", "substrate-primitives 0.1.0", ] @@ -3313,11 +3358,11 @@ dependencies = [ name = "srml-session" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", @@ -3325,6 +3370,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "srml-timestamp 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3332,10 +3379,10 @@ dependencies = [ name = "srml-staking" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", @@ -3346,6 +3393,8 @@ dependencies = [ "srml-system 0.1.0", "srml-timestamp 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3353,16 +3402,18 @@ dependencies = [ name = "srml-sudo" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", "srml-support-procedural 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3371,19 +3422,21 @@ name = "srml-support" version = "0.1.0" dependencies = [ "bitmask 0.5.0 (git+https://github.com/paritytech/bitmask)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-metadata 0.1.0", "srml-support-procedural 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -3394,7 +3447,7 @@ dependencies = [ "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 0.1.0", "srml-support-procedural-tools 0.1.0", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3405,7 +3458,7 @@ dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", "srml-support-procedural-tools-derive 0.1.0", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3414,22 +3467,24 @@ version = "0.1.0" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "srml-system" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3437,15 +3492,17 @@ dependencies = [ name = "srml-timestamp" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3453,16 +3510,18 @@ dependencies = [ name = "srml-treasury" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-balances 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -3471,12 +3530,14 @@ name = "srml-upgrade-key" version = "0.1.0" dependencies = [ "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-consensus 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -3496,13 +3557,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "stdweb" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb-internal-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb-internal-macros 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3513,24 +3574,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "stdweb-internal-macros" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3558,22 +3619,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "structopt" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "structopt-derive" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3635,17 +3696,17 @@ dependencies = [ "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (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.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 0.1.0", - "structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-client 0.1.0", "substrate-network 0.1.0", "substrate-panic-handler 0.1.0", @@ -3653,9 +3714,9 @@ dependencies = [ "substrate-service 0.3.0", "substrate-state-machine 0.1.0", "substrate-telemetry 0.3.1", - "sysinfo 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sysinfo 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3667,7 +3728,7 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3692,7 +3753,7 @@ dependencies = [ name = "substrate-client-db" version = "0.1.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", @@ -3716,7 +3777,7 @@ dependencies = [ name = "substrate-consensus-aura" version = "0.1.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (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)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3740,7 +3801,7 @@ dependencies = [ "substrate-service 0.3.0", "substrate-telemetry 0.3.1", "substrate-test-client 0.1.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3765,7 +3826,7 @@ dependencies = [ "substrate-consensus-common 0.1.0", "substrate-inherents 0.1.0", "substrate-primitives 0.1.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3783,7 +3844,7 @@ dependencies = [ "substrate-inherents 0.1.0", "substrate-primitives 0.1.0", "substrate-test-client 0.1.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3808,7 +3869,7 @@ dependencies = [ "substrate-keyring 0.1.0", "substrate-primitives 0.1.0", "substrate-transaction-pool 0.1.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3818,14 +3879,14 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-version 0.1.0", "substrate-panic-handler 0.1.0", @@ -3842,7 +3903,7 @@ dependencies = [ name = "substrate-finality-grandpa" version = "0.1.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "finality-grandpa 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "fork-tree 0.1.0", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3862,7 +3923,7 @@ dependencies = [ "substrate-service 0.3.0", "substrate-telemetry 0.3.1", "substrate-test-client 0.1.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3890,8 +3951,8 @@ dependencies = [ name = "substrate-keyring" version = "0.1.0" dependencies = [ - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 0.1.0", ] @@ -3903,21 +3964,43 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-primitives 0.1.0", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "substrate-metadata" +version = "0.1.0" +dependencies = [ + "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-std 0.1.0", + "substrate-metadata-derive 0.1.0", +] + +[[package]] +name = "substrate-metadata-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "substrate-network" version = "0.1.0" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "fork-tree 0.1.0", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3936,7 +4019,7 @@ dependencies = [ "substrate-network-libp2p 0.1.0", "substrate-primitives 0.1.0", "substrate-test-client 0.1.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3944,21 +4027,21 @@ name = "substrate-network-libp2p" version = "0.1.0" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "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)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3968,7 +4051,7 @@ dependencies = [ name = "substrate-panic-handler" version = "0.1.0" dependencies = [ - "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3982,7 +4065,7 @@ dependencies = [ "hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "hash256-std-hasher 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3991,11 +4074,13 @@ dependencies = [ "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 0.1.0", "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-serializer 0.1.0", "tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4010,17 +4095,17 @@ dependencies = [ "assert_matches 1.3.0 (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)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 0.1.0", "sr-version 0.1.0", "substrate-client 0.1.0", @@ -4031,18 +4116,18 @@ dependencies = [ "substrate-state-machine 0.1.0", "substrate-test-client 0.1.0", "substrate-transaction-pool 0.1.0", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-rpc-servers" version = "0.1.0" dependencies = [ - "jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-http-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-ws-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 0.1.0", "substrate-rpc 0.1.0", ] @@ -4051,8 +4136,8 @@ dependencies = [ name = "substrate-serializer" version = "0.1.0" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4062,13 +4147,13 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", @@ -4084,14 +4169,14 @@ dependencies = [ "substrate-test-client 0.1.0", "substrate-transaction-pool 0.1.0", "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-service-test" version = "0.3.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "fdlimit 0.1.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)", @@ -4102,14 +4187,14 @@ dependencies = [ "substrate-primitives 0.1.0", "substrate-service 0.3.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-state-db" version = "0.1.0" dependencies = [ - "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.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 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4122,7 +4207,7 @@ version = "0.1.0" dependencies = [ "hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4137,12 +4222,12 @@ dependencies = [ name = "substrate-telemetry" version = "0.3.1" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4171,12 +4256,12 @@ dependencies = [ name = "substrate-test-runtime" version = "0.1.0" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-primitives 0.1.0", "sr-std 0.1.0", @@ -4187,6 +4272,8 @@ dependencies = [ "substrate-executor 0.1.0", "substrate-inherents 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -4200,8 +4287,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 0.1.0", "substrate-test-runtime 0.1.0", ] @@ -4229,7 +4316,7 @@ version = "0.4.0" dependencies = [ "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hasher 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4252,7 +4339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.26" +version = "0.15.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4267,17 +4354,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.28 (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 = "sysinfo" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4303,11 +4390,11 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.0.6" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4327,7 +4414,7 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4345,7 +4432,7 @@ name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4353,7 +4440,7 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4385,8 +4472,8 @@ name = "tinytemplate" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4396,28 +4483,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" 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)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4428,14 +4515,14 @@ name = "tokio-codec" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-current-thread" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4449,8 +4536,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4464,46 +4551,48 @@ dependencies = [ [[package]] name = "tokio-fs" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (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)", ] [[package]] name = "tokio-reactor" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (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)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-sync" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4512,26 +4601,25 @@ name = "tokio-tcp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (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)", - "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4555,7 +4643,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4563,13 +4651,13 @@ name = "tokio-udp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (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)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4577,16 +4665,16 @@ name = "tokio-uds" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (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)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4594,7 +4682,7 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4622,7 +4710,7 @@ name = "trie-db" version = "0.11.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)", + "elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4705,7 +4793,7 @@ dependencies = [ [[package]] name = "unicase" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4724,7 +4812,7 @@ name = "unicode-normalization" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4742,20 +4830,12 @@ name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "unsigned-varint" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4814,9 +4894,9 @@ name = "wabt" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4862,19 +4942,19 @@ dependencies = [ [[package]] name = "websocket" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4885,7 +4965,7 @@ name = "which" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4940,12 +5020,12 @@ version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (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)", "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.19 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (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.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4976,7 +5056,7 @@ name = "yamux" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (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)", "nohash-hasher 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4984,7 +5064,7 @@ dependencies = [ "quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] @@ -4992,7 +5072,7 @@ dependencies = [ "checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" "checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" "checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" -"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" +"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" "checksum aio-limited 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f10b352bc3fc08ae24dc5d2d3ddcac153678533986122dc283d747b12071000" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" @@ -5003,7 +5083,7 @@ dependencies = [ "checksum assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" -"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5" +"checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" "checksum base-x 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d55aa264e822dbafa12db4d54767aff17c6ba55ea2d8559b3e17392c7d000e5d" "checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" @@ -5024,11 +5104,11 @@ dependencies = [ "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" -"checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427" "checksum cc 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "389803e36973d242e7fecb092b2de44a3d35ac62524b3b9339e51d577d668e02" "checksum cexpr 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "644d693ecfa91955ed32dcc7eda4914e1be97a641fb6f0645a37348e20b230da" -"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" +"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ef0c1bcf2e99c649104bd7a7012d8f8802684400e03db0ec0af48583c6fa0e4" "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" @@ -5044,8 +5124,10 @@ dependencies = [ "checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" +"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" +"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" @@ -5057,7 +5139,7 @@ dependencies = [ "checksum ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "044f882973b245404e90c90e7e42e8ee8d7a64edfd7adf83d684fb97e8e2c1b6" "checksum ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "630391922b1b893692c6334369ff528dcc3a9d8061ccf4c803aa8f83cb13db5e" "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" -"checksum curve25519-dalek 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dae47cc3529cdab597dbc8b606e565707209b506e55848f3c15679214a56c956" +"checksum curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1f8a6fc0376eb52dc18af94915cc04dfdf8353746c0e8c550ae683a0815e5c1" "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a" @@ -5065,9 +5147,9 @@ dependencies = [ "checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" "checksum dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" "checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" -"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" -"checksum elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "88d4851b005ef16de812ea9acdb7bece2f0a40dd86c07b85631d7dafa54537bb" -"checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e" +"checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac" +"checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" +"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum environmental 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db746025e3ea695bfa0ae744dbacd5fcfc8db51b9760cf8bd0ab69708bb93c49" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" "checksum exit-future 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "87559b08e99a81a92bbb867d237543e43495857749f688e0773390a20d56c61c" @@ -5098,16 +5180,16 @@ dependencies = [ "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" -"checksum hex-literal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae0e5c30fb65e661a0e39860e37100dfbe4d39aff865e9357a6a4ed0b5bbf303" +"checksum hex-literal 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "27455ce8b4a6666c87220e4b59c9a83995476bdadc10197905e61dbe906e36fa" "checksum hex-literal-impl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1d340b6514f232f6db1bd16db65302a5278a04fef9ce867cb932e7e5fa21130a" "checksum hmac 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a13f4163aa0c5ca1be584aace0e2212b2e41be5478218d4f657f5f778b2ae2a" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" -"checksum http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1a10e5b573b9a0146545010f50772b9e8b1dd0a256564cc4307694c68832a2f5" +"checksum http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fe67e3678f2827030e89cc4b9e7ecd16d52f132c0b940ab5005f88e821500f6a" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" -"checksum hyper 0.12.23 (registry+https://github.com/rust-lang/crates.io-index)" = "860faf61a9957c9cb0e23e69f1c8290e92f6eb660fcdd1f2d6777043a2ae1a46" +"checksum hyper 0.12.25 (registry+https://github.com/rust-lang/crates.io-index)" = "7d5b6658b016965ae301fa995306db965c93677880ea70765a84235a96eae896" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum impl-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2050d823639fbeae26b2b5ba09aca8907793117324858070ade0673c49f793b" "checksum impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5158079de9d4158e0ce1de3ae0bd7be03904efc40b3d7dd8b8c301cbf6b52b56" @@ -5117,12 +5199,12 @@ dependencies = [ "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" -"checksum jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5152c3fda235dfd68341b3edf4121bc4428642c93acbd6de88c26bf95fc5d7" -"checksum jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c14be84e86c75935be83a34c6765bf31f97ed6c9163bb0b83007190e9703940a" -"checksum jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99e1ce36c7cc9dcab398024d76849ab2cb917ee812653bce6f74fc9eb7c82d16" -"checksum jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56608ed54b1b2a69f4357cb8bdfbcbd99fe1179383c03a09bb428931bd35f592" -"checksum jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5521613b31ea22d36d9f95ad642058dccec846a94ed8690957652d479f620707" -"checksum jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20b8333a5a6e6ccbcf5c90f90919de557cba4929efa164e9bd0e8e497eb20e46" +"checksum jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc15eef5f8b6bef5ac5f7440a957ff95d036e2f98706947741bfc93d1976db4c" +"checksum jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dae61ca8a3b047fb11309b00661bc56837085bd07e46f907b9c562c0b03e68" +"checksum jsonrpc-http-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11d2a00824306155b8ef57fe957f31b8cd8ad24262f15cf911d84dcf9a3f206d" +"checksum jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37fce55133ee264d0ab42bd862efcd45ae1d062cda599f4cc12ccc4be3195f2a" +"checksum jsonrpc-server-utils 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9527f01ef25f251d64082cbefc0c6d6f367349afe6848ef908a674e06b2bdd3" +"checksum jsonrpc-ws-server 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3889012aa638a2f18eb1a879f46fc8b34e7e1423cbff3247cd1531de0d51084b" "checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" "checksum keccak-hasher 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb9d3670023f4c04153d90b8a557a822d1b27ed702bb015a87cf7bffead5b611" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" @@ -5130,9 +5212,9 @@ dependencies = [ "checksum kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum kvdb-rocksdb 0.1.4 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" +"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "e962c7641008ac010fa60a7dfdc1712449f29c44ef2d4702394aea943ee75047" +"checksum libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "aab692d7759f5cd8c859e169db98ae5b52c924add2af5fbbca11d12fefb567c1" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum libp2p 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395d54c4c96fa175eabf4505e8a7bd616d916fa49fa27c60ceaa6d5d9b51bc" "checksum libp2p-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c8dc95c7fda9de223bc195b637290918e8decb18e63fd3d03005f84b8ce380b" @@ -5163,11 +5245,11 @@ dependencies = [ "checksum lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d06ff7ff06f729ce5f4e227876cb88d10bc59cd4ae1e09fbb2bde15c850dc21" "checksum make-cmd 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8ca8afbe8af1785e09636acb5a41e08a765f5f0340568716c18a8700ba3c0d3" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1dd4eaac298c32ce07eb6ed9242eda7d82955b9170b7d6db59b2e02cc63fcb8" +"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum memory-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94da53143d45f6bad3753f532e56ad57a6a26c0ca6881794583310c7cb4c885f" "checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" -"checksum merlin 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a9e97b439f6d38cbe2a4a4aa93f6770c5305f62761b78b1851406c09c87ee2a" +"checksum merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "83c2dda19c01176e8e7148f7bdb88bbdf215a8db0641f89fc40e4b81736aeda5" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" "checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" @@ -5180,16 +5262,16 @@ dependencies = [ "checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17" "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 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b30adc557058ce00c9d0d7cb3c6e0b5bc6f36e2e2eabe74b0ba726d194abd588" +"checksum nom 4.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22293d25d3f33a8567cc8a1dc20f40c7eeb761ce83d0fcca059858580790cac3" "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.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" +"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" "checksum once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" -"checksum openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ec7bd7ca4cce6dbdc77e7c1230682740d307d1218a87fb0349a571272be749f9" +"checksum openssl 0.10.19 (registry+https://github.com/rust-lang/crates.io-index)" = "84321fb9004c3bce5611188a644d6171f895fa2889d155927d528782edb21c5d" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)" = "1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6" +"checksum openssl-sys 0.9.42 (registry+https://github.com/rust-lang/crates.io-index)" = "cb534d752bf98cf363b473950659ac2546517f9c6be9723771614ab3f03bbc9e" "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?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "" @@ -5220,7 +5302,7 @@ dependencies = [ "checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a" "checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4" "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" -"checksum protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82d117bc7565ce6be0150159251c9b1eeec7b129f5a2aa86e10acb5970de1cb" +"checksum protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24d5d73d2b88fddb8b8141f2730d950d88772c940ac4f8f3e93230b9a99d92df" "checksum pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "efb0dcbddbb600f47a7098d33762a00552c671992171637f5bb310b37fe1f0e4" "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" @@ -5236,8 +5318,8 @@ dependencies = [ "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_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" -"checksum rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7c690732391ae0abafced5015ffb53656abfaec61b342290e5eb56b286a679d" -"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" +"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929" "checksum rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "373814f27745b2686b350dd261bfd24576a6fb0e2c5919b3a2b6005f820b0473" @@ -5246,7 +5328,7 @@ dependencies = [ "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d813022b2e00774a48eaf43caaa3c20b45f040ba8cbf398e2e8911a06668dbe6" -"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" +"checksum regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53ee8cfdddb2e0291adfb9f13d31d3bbe0a03c9a402c01b1e24188d86c35b24f" "checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rhododendron 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9381ed76c1ec4e8994f1f7d2c6d7e33eed3ff7176e16fece09c2e993fc4a5a" @@ -5262,7 +5344,7 @@ dependencies = [ "checksum safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7bf422d23a88c16d5090d455f182bc99c60af4df6a345c63428acf5129e347" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" -"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" +"checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" "checksum schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)" = "" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum secp256k1 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfaccd3a23619349e0878d9a241f34b1982343cdf67367058cd7d078d326b63e" @@ -5270,9 +5352,9 @@ dependencies = [ "checksum security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d6696852716b589dff9e886ff83778bb635150168e83afa8ac6b8a78cb82abc" "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.87 (registry+https://github.com/rust-lang/crates.io-index)" = "2e20fde37801e83c891a2dc4ebd3b81f0da4d1fb67a9e0a2a3b921e2536a58ee" -"checksum serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "633e97856567e518b59ffb2ad7c7a4fd4c5d91d9c7f32dd38a27b2bf7e8114ea" -"checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" +"checksum serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "92514fb95f900c9b5126e32d020f5c6d40564c27a5ea6d1d7d9f157a96623560" +"checksum serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6eabf4b5914e88e24eea240bb7c9f9a2cbc1bbbe8d961d381975ec3c6b806c" +"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d963c78ce367df26d7ea8b8cc655c651b42e8a1e584e869c1e17dae3ccb116a" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" @@ -5283,31 +5365,31 @@ dependencies = [ "checksum slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e544d16c6b230d84c866662fe55e31aacfca6ae71e6fc49ae9a311cb379bfc2f" "checksum slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" "checksum slog-scope 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "60c04b4726fa04595ccf2c2dad7bcd15474242c4c5e109a8a376e8a2c9b1539a" -"checksum smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "88aea073965ab29f6edb5493faf96ad662fb18aa9eeb186a3b7057951605ed15" -"checksum snow 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7251f8920e9043106cfe466c04ed3eb257b8315a7699259c4fd0af6dffb6aef6" +"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" +"checksum snow 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5a64f02fd208ef15bd2d1a65861df4707e416151e1272d02c8faafad1c138100" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" "checksum static_slice 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "92a7e0c5e3dfb52e8fbe0e63a1b947bbb17b4036408b151353c4491374931362" -"checksum stdweb 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "461e7f2e33670b1c33f1ea22bb2f86de6136fabd0c4d27d167ed425c231143ca" +"checksum stdweb 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)" = "5eafd45550bc406cfa179ea263ba0935da87adf220dab40e2c25c4675edc49d8" "checksum stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e21ebd9179de08f2300a65454268a17ea3de204627458588c84319c4def3930" -"checksum stdweb-internal-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "432465093692af7379dcd196ce4be398c906958d91b412fff9102a66238d6f26" +"checksum stdweb-internal-macros 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1635afd059cbfac7d5b1274f0c44cec110c1e013c48e8bbc22e07e52696cf887" "checksum stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a2a2f4a2eb556337b2d1a302630bbddf989ae383c70393e89b48152b9896cbda" "checksum stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8861bc80f649f5b4c9bd38b696ae9af74499d479dbfb327f0607de6b326a36bc" "checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad348dc73012fcf78c71f06f9d942232cdd4c859d4b6975e27836c3efc0c3" -"checksum structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ef98172b1a00b0bec738508d3726540edcbd186d50dfd326f2b1febbb3559f04" +"checksum structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3d0760c312538987d363c36c42339b55f5ee176ea8808bbe4543d484a291c8d1" +"checksum structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "528aeb7351d042e6ffbc2a6fb76a86f9b622fdf7c25932798e7a82cb03bc94c6" "checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" -"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" +"checksum syn 0.15.28 (registry+https://github.com/rust-lang/crates.io-index)" = "218aa5a01ab9805df6e9e48074c8d88f317cc9660b1ad6c3dabac2d627d185d6" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" -"checksum sysinfo 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4da1ccc493b46042d6f5352910a7f18ed8fe81307dd7db3f2e2d8a7db6f6284" +"checksum sysinfo 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a0cb7899e248ed0baa6ef6f8406352523c2f99bc7c4b1800f4cd6d5dde99eb" "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.6 (registry+https://github.com/rust-lang/crates.io-index)" = "37daa55a7240c4931c84559f03b3cad7d19535840d1c4a0cc4e9b2fb0dcf70ff" +"checksum tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b86c784c88d98c801132806dadd3819ed29d8600836c4088e855cdf3e178ed8a" "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" @@ -5317,17 +5399,17 @@ dependencies = [ "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" "checksum tinytemplate 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7655088894274afb52b807bd3c87072daa1fedd155068b8705cabfd628956115" "checksum tk-listen 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5462b0f968c0457efe38fcd2df7e487096b992419e4f5337b06775a614bbda4b" -"checksum tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "e0500b88064f08bebddd0c0bed39e19f5c567a5f30975bee52b0c0d3e2eeb38c" +"checksum tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fcaabb3cec70485d0df6e9454fe514393ad1c4070dee8915f11041e95630b230" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" -"checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" +"checksum tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c756b04680eea21902a46fca4e9f410a2332c04995af590e07ff262e2193a9a3" "checksum tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82c65483db54eb91b4ef3a9389a3364558590faf30ce473141707c0e16fda975" "checksum tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30c6dbf2d1ad1de300b393910e8a3aa272b724a400b6531da03eed99e329fbf0" -"checksum tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9cbbc8a3698b7ab652340f46633364f9eaa928ddaaee79d8b8f356dd79a09d" -"checksum tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b53aeb9d3f5ccf2ebb29e19788f96987fa1355f8fe45ea193928eaaaf3ae820f" -"checksum tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afbcdb0f0d2a1e4c440af82d7bbf0bf91a8a8c0575bcd20c05d15be7e9d3a02f" -"checksum tokio-sync 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3742b64166c1ee9121f1921aea5a726098458926a6b732d906ef23b1f3ef6f4f" +"checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" +"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" +"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" +"checksum tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1bf2b9dac2a0509b5cfd1df5aa25eafacb616a42a491a13604d6bbeab4486363" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd86cb15547d02daa2b21aadaf4e37dee3368df38a526178a5afa3c034d2fb" +"checksum tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "742e511f6ce2298aeb86fc9ea0d8df81c2388c6ebae3dc8a7316e8c9df0df801" "checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" "checksum tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" @@ -5346,13 +5428,12 @@ dependencies = [ "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum uint 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7780bb27fd8a22295e0d9d53ae3be253f715a0dccb1808527f478f1c2603708" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" +"checksum unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41d17211f887da8e4a70a45b9536f26fc5de166b81e2d5d80de4a17fd22553bd" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "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.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.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2c64cdf40b4a9645534a943668681bcb219faf51874d4b65d2e0abda1b10a2ab" "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" @@ -5367,7 +5448,7 @@ dependencies = [ "checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" "checksum wasmi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21ef487a11df1ed468cf613c78798c26282da5c30e9d49f824872d4c77b47d1d" -"checksum websocket 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2c67346c042adbd4f5b2a49700e340befc5b772094fec8d36df6b825523d933" +"checksum websocket 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7cc2d74d89f9df981ab41ae624e33cf302fdf456b93455c6a31911a99c9f0bb8" "checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" diff --git a/Cargo.toml b/Cargo.toml index 699f9a158981f..8ad1b1e85a478 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,6 +84,8 @@ members = [ "node/runtime", "node-template", "subkey", + "core/metadata", + "core/metadata-derive", ] exclude = [ "node/runtime/wasm", diff --git a/core/executor/wasm/Cargo.lock b/core/executor/wasm/Cargo.lock index dc1159e8d0ac2..81b25de9e9ef8 100644 --- a/core/executor/wasm/Cargo.lock +++ b/core/executor/wasm/Cargo.lock @@ -179,6 +179,26 @@ name = "static_assertions" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "substrate-metadata" +version = "0.1.0" +dependencies = [ + "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-std 0.1.0", +] + +[[package]] +name = "substrate-metadata-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "substrate-primitives" version = "0.1.0" @@ -190,6 +210,8 @@ dependencies = [ "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] diff --git a/core/metadata-derive/Cargo.toml b/core/metadata-derive/Cargo.toml new file mode 100644 index 0000000000000..6fc49c23e4671 --- /dev/null +++ b/core/metadata-derive/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "substrate-metadata-derive" +version = "0.1.0" +authors = ["Bryan Chen "] +edition = "2018" + +[lib] +proc-macro = true + +[dependencies] +syn = "0.15" +quote = "0.6" +proc-macro2 = "0.4" + +[features] +default = ["std"] +std = [] diff --git a/core/metadata-derive/src/encode.rs b/core/metadata-derive/src/encode.rs new file mode 100644 index 0000000000000..8ccce4e4ecabd --- /dev/null +++ b/core/metadata-derive/src/encode.rs @@ -0,0 +1,206 @@ +use quote::{quote, quote_spanned}; + +use proc_macro2::{Span, TokenStream}; +use syn::{ + Data, Field, Fields, Type, + Meta, NestedMeta, Lit, Attribute, Variant, + punctuated::Punctuated, + spanned::Spanned, + token::Comma, +}; + +type FieldsList = Punctuated; + +fn encode_fields( + fields: &FieldsList, + registry: &TokenStream +) -> TokenStream +{ + let recurse = fields.iter().enumerate().map(|(i, f)| { + let compact = get_enable_compact(f); + let name = f.ident.as_ref().map(|iden| quote! { + _substrate_metadata::FieldName::Named(stringify!(#iden).into()) + }) + .unwrap_or(quote! { + _substrate_metadata::FieldName::Unnamed(#i as u16) + }); + let ty = &f.ty; + quote_spanned! { f.span() => + { + let type_name = <#ty as _substrate_metadata::EncodeMetadata>::type_name(); + #registry.register(type_name.clone(), <#ty as _substrate_metadata::EncodeMetadata>::type_metadata_kind); + _substrate_metadata::FieldMetadata { + name: #name, + ty: if #compact { _substrate_metadata::MetadataName::Compact(Box::new(type_name)) } else { type_name } + } + } + } + }); + + quote! { + _substrate_metadata::TypeMetadataKind::Struct(vec![#( #recurse, )*]) + } +} + +pub fn quote(data: &Data, registry: &TokenStream) -> TokenStream { + let call_site = Span::call_site(); + let res = match *data { + Data::Struct(ref data) => { + match data.fields { + Fields::Named(ref fields) => encode_fields( + &fields.named, + registry + ), + Fields::Unnamed(ref fields) => encode_fields( + &fields.unnamed, + registry + ), + Fields::Unit => quote_spanned! { call_site => + _substrate_metadata::TypeMetadataKind::Struct(vec![]) + }, + } + }, + Data::Enum(ref data) => { + let recurse = data.variants.iter().enumerate().map(|(i, f)| { + let name = &f.ident; + let index = index(f, i); + match f.fields { + Fields::Named(ref fields) => { + let field_name = |ty: &Type| { + quote_spanned!(call_site => #ty) + }; + let fields = fields.named + .iter() + .map(|f| { + let ty = field_name(&f.ty); + let name = &f.ident; + quote_spanned! { f.span() => + { + let type_name = <#ty as _substrate_metadata::EncodeMetadata>::type_name(); + #registry.register( + type_name.clone(), + <#ty as _substrate_metadata::EncodeMetadata>::type_metadata_kind + ); + _substrate_metadata::FieldMetadata { + name: _substrate_metadata::FieldName::Named(stringify!(#name).into()), + ty: type_name + } + } + } + }); + + quote_spanned! { f.span() => + _substrate_metadata::EnumVariantMetadata { + name: stringify!(#name).into(), + index: #index as u16, + fields: vec![#( #fields, )*] + } + } + }, + Fields::Unnamed(ref fields) => { + let field_name = |ty: &Type| { + quote_spanned!(call_site => #ty) + }; + let fields = fields.unnamed + .iter() + .enumerate() + .map(|(i, f)| { + let ty = field_name(&f.ty); + quote! { + { + let type_name = <#ty as _substrate_metadata::EncodeMetadata>::type_name(); + #registry.register( + type_name.clone(), + <#ty as _substrate_metadata::EncodeMetadata>::type_metadata_kind + ); + _substrate_metadata::FieldMetadata { + name: _substrate_metadata::FieldName::Unnamed(#i as u16), + ty: type_name + } + } + } + }); + + quote_spanned! { f.span() => + _substrate_metadata::EnumVariantMetadata { + name: stringify!(#name).into(), + index: #index as u16, + fields: vec![#( #fields, )*] + } + } + }, + Fields::Unit => { + quote_spanned! { f.span() => + _substrate_metadata::EnumVariantMetadata { + name: stringify!(#name).into(), + index: #index as u16, + fields: Vec::new() + } + } + }, + } + }); + + quote! { + _substrate_metadata::TypeMetadataKind::Enum(vec![#( #recurse, )*]) + } + }, + Data::Union(_) => panic!("Union types are not supported."), + }; + res +} + +fn find_meta_item<'a, F, R, I>(itr: I, pred: F) -> Option where + F: FnMut(&NestedMeta) -> Option + Clone, + I: Iterator +{ + itr.filter_map(|attr| { + let pair = attr.path.segments.first()?; + let seg = pair.value(); + if seg.ident == "codec" { + let meta = attr.interpret_meta(); + if let Some(Meta::List(ref meta_list)) = meta { + return meta_list.nested.iter().filter_map(pred.clone()).next(); + } + } + + None + }).next() +} + +fn index(v: &Variant, i: usize) -> TokenStream { + // look for an index in attributes + let index = find_meta_item(v.attrs.iter(), |meta| { + if let NestedMeta::Meta(Meta::NameValue(ref nv)) = meta { + if nv.ident == "index" { + if let Lit::Str(ref s) = nv.lit { + let byte: u8 = s.value().parse().expect("Numeric index expected."); + return Some(byte) + } + } + } + + None + }); + + // then fallback to discriminant or just index + index.map(|i| quote! { #i }) + .unwrap_or_else(|| v.discriminant + .as_ref() + .map(|&(_, ref expr)| quote! { #expr }) + .unwrap_or_else(|| quote! { #i }) + ) +} + +fn get_enable_compact(field_entry: &Field) -> bool { + // look for `encode(compact)` in the attributes + find_meta_item(field_entry.attrs.iter(), |meta| { + if let NestedMeta::Meta(Meta::Word(ref word)) = meta { + if word == "compact" { + return Some(()); + } + } + + None + }).is_some() +} diff --git a/core/metadata-derive/src/lib.rs b/core/metadata-derive/src/lib.rs new file mode 100644 index 0000000000000..c00d1499190f6 --- /dev/null +++ b/core/metadata-derive/src/lib.rs @@ -0,0 +1,113 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate 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. + +// Substrate 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 Substrate. If not, see . + +//! Derives type metadata information to enable self-descriptive codec + +extern crate proc_macro; + +use syn::parse_quote; +use quote::{quote}; + +use proc_macro::TokenStream; +use proc_macro2::{Span}; +use syn::{DeriveInput, Generics, Ident, GenericParam}; + +mod encode; + +#[proc_macro_derive(EncodeMetadata, attributes(codec))] +pub fn encode_derive(input: TokenStream) -> TokenStream { + let input: DeriveInput = match syn::parse(input) { + Ok(input) => input, + Err(e) => return e.to_compile_error().into(), + }; + + let generics = add_trait_bounds(input.generics, parse_quote!(_substrate_metadata::EncodeMetadata)); + + let generic_types = generics.params.iter().map(|param| { + if let GenericParam::Type(ref type_param) = *param { + Some(type_param.ident.clone()) + } else { + None + } + }) + .filter(Option::is_some) + .collect::>(); + + let name = &input.ident; + let impl_type_name = if generic_types.is_empty() { + quote! { + fn type_name() -> _substrate_metadata::MetadataName { + _substrate_metadata::MetadataName::Custom(module_path!().into(), stringify!(#name).into()) + } + } + } else { + let generic_type_names = generic_types.into_iter().map(|t| { + quote! { + <#t as _substrate_metadata::EncodeMetadata>::type_name() + } + }); + quote! { + fn type_name() -> _substrate_metadata::MetadataName { + _substrate_metadata::MetadataName::CustomWithGenerics(module_path!().into(), stringify!(#name).into(), vec![ + #( #generic_type_names ),* + ]) + } + } + }; + + let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); + + let registry = quote!(registry); + + let metadata_kind = encode::quote(&input.data, ®istry); + + let impl_block = quote! { + impl #impl_generics _substrate_metadata::EncodeMetadata for #name #ty_generics #where_clause { + #impl_type_name + + fn type_metadata_kind(registry: &mut _substrate_metadata::MetadataRegistry) -> _substrate_metadata::TypeMetadataKind { + #metadata_kind + } + } + }; + + let mut new_name = "_IMPL_ENCODEMETADATA_FOR_".to_string(); + new_name.push_str(name.to_string().trim_start_matches("r#")); + let dummy_const = Ident::new(&new_name, Span::call_site()); + + let generated = quote! { + #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] + const #dummy_const: () = { + #[allow(unknown_lints)] + #[cfg_attr(feature = "cargo-clippy", allow(useless_attribute))] + #[allow(rust_2018_idioms)] + extern crate substrate_metadata as _substrate_metadata; + use _substrate_metadata::rstd::prelude::*; + #impl_block + }; + }; + + generated.into() +} + +fn add_trait_bounds(mut generics: Generics, bounds: syn::TypeParamBound) -> Generics { + for param in &mut generics.params { + if let GenericParam::Type(ref mut type_param) = *param { + type_param.bounds.push(bounds.clone()); + } + } + generics +} diff --git a/core/metadata/Cargo.toml b/core/metadata/Cargo.toml new file mode 100644 index 0000000000000..5e2d171a9c3c4 --- /dev/null +++ b/core/metadata/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "substrate-metadata" +version = "0.1.0" +authors = ["Bryan Chen "] +edition = "2018" + +[dependencies] +parity-codec = { version = "3.1", default-features = false } +parity-codec-derive = { version = "3.1", default-features = false } +serde = { version = "1.0", default-features = false } +serde_derive = { version = "1.0", optional = true } +rstd = { package="sr-std", path = "../sr-std", default-features = false } +primitive-types = { version = "0.2", default-features = false, features = ["codec"] } + +[dev-dependencies] +substrate-metadata-derive = { path = "../metadata-derive" } + +[features] +default = ["std"] +std = [ + "primitive-types/std", + "primitive-types/serde", + "primitive-types/heapsize", + "primitive-types/byteorder", + "primitive-types/rustc-hex", + "primitive-types/libc", + "serde/std", + "serde_derive", + "parity-codec/std", + "parity-codec-derive/std", + "rstd/std", +] +nightly = [] +strict = [] diff --git a/core/metadata/src/lib.rs b/core/metadata/src/lib.rs new file mode 100644 index 0000000000000..f9bcc759f60e2 --- /dev/null +++ b/core/metadata/src/lib.rs @@ -0,0 +1,321 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate 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. + +// Substrate 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 Substrate. If not, see . + +//! Implements type metadata information handling to enable self-descriptive codec + +#![cfg_attr(not(feature = "std"), no_std)] + +#[cfg(feature = "std")] +use serde_derive::Serialize; + +#[cfg(feature = "std")] +use parity_codec_derive::Decode; +use parity_codec_derive::Encode; + +mod registry; + +use primitive_types::{U256, U512, H160, H256, H512}; + +pub use rstd; +use rstd::prelude::*; + +pub use registry::MetadataRegistry; + +#[cfg(feature = "std")] +pub type StringBuf = String; + +#[cfg(not(feature = "std"))] +pub type StringBuf = &'static str; + +#[derive(Encode, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub enum MetadataName { + Unknown, + Custom(StringBuf, StringBuf), + CustomWithGenerics(StringBuf, StringBuf, Vec), + Array(u16, Box), + Vector(Box), + Tuple(Vec), + Option(Box), + Result(Box, Box), + Compact(Box), + Str, + Unit, + Bool, + Usize, Isize, + U8, I8, + U16, I16, + U32, I32, + U64, I64, + U128, I128, + U256, + U512, + H160, H256, H512, +} + +#[derive(Encode, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub enum FieldName { + Unnamed(u16), + Named(StringBuf), +} + +#[derive(Encode, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct FieldMetadata { + pub name: FieldName, + pub ty: MetadataName +} + +#[derive(Encode, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct EnumVariantMetadata { + pub name: StringBuf, + pub index: u16, + pub fields: Vec +} + +#[derive(Encode, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub enum TypeMetadataKind { + Primitive, + Struct(Vec), + Enum(Vec), +} + +#[derive(Encode, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct TypeMetadata { + pub name: MetadataName, + pub kind: TypeMetadataKind, +} + +pub trait EncodeMetadata { + fn type_name() -> MetadataName; + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind; + + fn register_type_metadata(registry: &mut MetadataRegistry) { + registry.register(Self::type_name(), Self::type_metadata_kind); + } +} + +macro_rules! impl_primitives { + ( $( $t:ty => $p:expr, )* ) => { $( + impl EncodeMetadata for $t { + fn type_name() -> MetadataName { + $p + } + + fn type_metadata_kind(_registry: &mut MetadataRegistry) -> TypeMetadataKind { + TypeMetadataKind::Primitive + } + } + )* } +} + +impl_primitives!( + bool => MetadataName::Bool, + usize => MetadataName::Usize, + isize => MetadataName::Isize, + u8 => MetadataName::U8, + i8 => MetadataName::I8, + u16 => MetadataName::U16, + i16 => MetadataName::I16, + u32 => MetadataName::U32, + i32 => MetadataName::I32, + u64 => MetadataName::U64, + i64 => MetadataName::I64, + u128 => MetadataName::U128, + i128 => MetadataName::I128, + U256 => MetadataName::U256, + U512 => MetadataName::U512, + H160 => MetadataName::H160, + H256 => MetadataName::H256, + H512 => MetadataName::H512, +); + +macro_rules! impl_array { + ( $( $n:expr )* ) => { $( + impl EncodeMetadata for [T; $n] { + fn type_name() -> MetadataName { + MetadataName::Array($n, Box::new(T::type_name())) + } + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind { + registry.register(T::type_name(), T::type_metadata_kind); + TypeMetadataKind::Primitive + } + } + )* } +} + +impl_array!(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 + 40 48 56 64 72 96 128 160 192 224 256); + +macro_rules! tuple_impl { + ($one:ident,) => { + impl<$one: EncodeMetadata> EncodeMetadata for ($one,) { + fn type_name() -> MetadataName { + MetadataName::Tuple(vec![<$one>::type_name()]) + } + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind { + registry.register(<$one>::type_name(), <$one>::type_metadata_kind); + TypeMetadataKind::Primitive + } + } + }; + ($first:ident, $($rest:ident,)+) => { + impl<$first: EncodeMetadata, $($rest: EncodeMetadata),+> + EncodeMetadata for + ($first, $($rest),+) { + fn type_name() -> MetadataName { + MetadataName::Tuple(vec![ + <$first>::type_name(), + $( <$rest>::type_name(), )+ + ]) + } + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind { + registry.register(<$first>::type_name(), <$first>::type_metadata_kind); + $( { + registry.register(<$rest>::type_name(), <$rest>::type_metadata_kind); + } )+ + TypeMetadataKind::Primitive + } + } + + tuple_impl!($($rest,)+); + } +} + +tuple_impl!(A, B, C, D, E, F, G, H, I, J, K,); + +impl EncodeMetadata for Vec { + fn type_name() -> MetadataName { + MetadataName::Vector(Box::new(T::type_name())) + } + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind { + registry.register(T::type_name(), T::type_metadata_kind); + TypeMetadataKind::Primitive + } +} + +impl EncodeMetadata for Option { + fn type_name() -> MetadataName { + MetadataName::Option(Box::new(T::type_name())) + } + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind { + registry.register(T::type_name(), T::type_metadata_kind); + TypeMetadataKind::Primitive + } +} + +impl EncodeMetadata for Result { + fn type_name() -> MetadataName { + MetadataName::Result(Box::new(T::type_name()), Box::new(E::type_name())) + } + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind { + registry.register(T::type_name(), T::type_metadata_kind); + registry.register(E::type_name(), E::type_metadata_kind); + TypeMetadataKind::Primitive + } +} + +impl EncodeMetadata for Box { + fn type_name() -> MetadataName { + T::type_name() + } + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind { + T::type_metadata_kind(registry) + } +} + +impl EncodeMetadata for &T { + fn type_name() -> MetadataName { + T::type_name() + } + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind { + T::type_metadata_kind(registry) + } +} + +impl EncodeMetadata for [T] { + fn type_name() -> MetadataName { + >::type_name() + } + + fn type_metadata_kind(registry: &mut MetadataRegistry) -> TypeMetadataKind { + >::type_metadata_kind(registry) + } +} + +impl EncodeMetadata for parity_codec::Compact { + fn type_name() -> MetadataName { + MetadataName::Compact(Box::new(T::type_name())) + } + + fn type_metadata_kind(_registry: &mut MetadataRegistry) -> TypeMetadataKind { + TypeMetadataKind::Primitive + } +} + +impl EncodeMetadata for ::rstd::marker::PhantomData { + fn type_name() -> MetadataName { + MetadataName::Unit + } + + fn type_metadata_kind(_registry: &mut MetadataRegistry) -> TypeMetadataKind { + TypeMetadataKind::Primitive + } +} + +impl EncodeMetadata for () { + fn type_name() -> MetadataName { + MetadataName::Unit + } + + fn type_metadata_kind(_registry: &mut MetadataRegistry) -> TypeMetadataKind { + TypeMetadataKind::Primitive + } +} + +impl EncodeMetadata for &str { + fn type_name() -> MetadataName { + MetadataName::Str + } + + fn type_metadata_kind(_registry: &mut MetadataRegistry) -> TypeMetadataKind { + TypeMetadataKind::Primitive + } +} + +#[cfg(feature = "std")] +impl EncodeMetadata for String { + fn type_name() -> MetadataName { + MetadataName::Str + } + + fn type_metadata_kind(_registry: &mut MetadataRegistry) -> TypeMetadataKind { + TypeMetadataKind::Primitive + } +} diff --git a/core/metadata/src/registry.rs b/core/metadata/src/registry.rs new file mode 100644 index 0000000000000..26ef6c3df7a67 --- /dev/null +++ b/core/metadata/src/registry.rs @@ -0,0 +1,63 @@ +#[cfg(feature = "std")] +use serde_derive::Serialize; + +#[cfg(feature = "std")] +use parity_codec_derive::Decode; +use parity_codec_derive::Encode; + +use super::{TypeMetadata, TypeMetadataKind, MetadataName}; + +use rstd::prelude::*; + +#[derive(Encode, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct MetadataRegistry { + pub list: Vec, +} + +impl MetadataRegistry { + pub fn new() -> MetadataRegistry { + MetadataRegistry { + list: Vec::new() + } + } + + pub fn register< + F: Fn(& mut MetadataRegistry) -> TypeMetadataKind + >(&mut self, name: MetadataName, f: F) { + // simple primitive types are ignored to reduce storage usage + // and they are assumed to be decodable by all valid decoder implementations + let should_ignore = match name { + MetadataName::Custom(_, _) => false, + MetadataName::CustomWithGenerics(_, _, _) => false, + MetadataName::Array(_, _) | + MetadataName::Vector(_) | + MetadataName::Tuple(_) | + MetadataName::Option(_) | + MetadataName::Result(_, _) => { + // build-ins are also ignored but their sub-types are registered + f(self); + true + } + _ => true + }; + if should_ignore { + return; + } + if self.exists(&name) { + return; + } + let m = TypeMetadata { + kind: TypeMetadataKind::Primitive, + name, + }; + self.list.push(m); + let idx = self.list.len(); + // needs to be called after self type is registered incase it reference self type again + self.list[idx - 1].kind = f(self); + } + + fn exists(&self, name: &MetadataName) -> bool { + self.list.iter().find(|m| m.name == *name).is_some() + } +} diff --git a/core/metadata/tests/mod.rs b/core/metadata/tests/mod.rs new file mode 100644 index 0000000000000..6661a2c9782ba --- /dev/null +++ b/core/metadata/tests/mod.rs @@ -0,0 +1,243 @@ +// Copyright 2017-2018 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate 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. + +// Substrate 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 Substrate. If not, see . + +//! Tests for the module. + +#![cfg(test)] +#![allow(dead_code)] + +extern crate substrate_metadata; +extern crate substrate_metadata_derive; + +use substrate_metadata::*; +use substrate_metadata_derive::EncodeMetadata; + + +#[derive(Debug, PartialEq, EncodeMetadata)] +struct Unit; + +#[derive(Debug, PartialEq, EncodeMetadata)] +struct Indexed(u32, u64); + +#[derive(Debug, PartialEq, EncodeMetadata)] +struct Struct { + pub a: A, + pub b: B, + pub c: C, +} + + +#[derive(Debug, PartialEq, EncodeMetadata)] +struct StructWithPhantom { + pub a: u32, + pub b: u64, + _c: ::std::marker::PhantomData, +} + +type TestType = Struct>; + +#[derive(Debug, PartialEq, EncodeMetadata)] +enum EnumType { + A, + B(u32, u64), + C { + a: u32, + b: u64, + }, +} + +#[derive(Debug, PartialEq, EncodeMetadata)] +enum EnumWithDiscriminant { + A = 1, + B = 15, + C = 255, +} + +#[derive(Debug, PartialEq, EncodeMetadata)] +struct StructWithCompact { + #[codec(compact)] + pub a: u32, + pub b: u64, +} + + +fn get_metadata() -> MetadataRegistry { + let mut reg = MetadataRegistry::new(); + T::register_type_metadata(&mut reg); + reg +} + +#[test] +fn should_work() { + assert_eq!(get_metadata::(), MetadataRegistry { + list: vec![ + TypeMetadata { + name: MetadataName::Custom("mod".into(), "Unit".into()), + kind: TypeMetadataKind::Struct(Vec::new()) + } + ] + }); + assert_eq!(get_metadata::(), MetadataRegistry { + list: vec![ + TypeMetadata { + name: MetadataName::Custom("mod".into(), "Indexed".into()), + kind: TypeMetadataKind::Struct(vec![ + FieldMetadata { + name: FieldName::Unnamed(0), + ty: MetadataName::U32 + }, + FieldMetadata { + name: FieldName::Unnamed(1), + ty: MetadataName::U64 + }, + ]) + } + ] + }); + assert_eq!(get_metadata::(), MetadataRegistry { + list: vec![ + TypeMetadata { + name: MetadataName::Custom("mod".into(), "StructWithPhantom".into()), + kind: TypeMetadataKind::Struct(vec![ + FieldMetadata { + name: FieldName::Named("a".into()), + ty: MetadataName::U32 + }, + FieldMetadata { + name: FieldName::Named("b".into()), + ty: MetadataName::U64 + }, + FieldMetadata { + name: FieldName::Named("_c".into()), + ty: MetadataName::Unit + }, + ]) + } + ] + }); + assert_eq!(get_metadata::(), MetadataRegistry { + list: vec![ + TypeMetadata { + name: MetadataName::CustomWithGenerics("mod".into(), "Struct".into(), vec![ + MetadataName::U32, MetadataName::U64, MetadataName::Vector(Box::new(MetadataName::U8)) + ]), + kind: TypeMetadataKind::Struct(vec![ + FieldMetadata { + name: FieldName::Named("a".into()), + ty: MetadataName::U32, + }, + FieldMetadata { + name: FieldName::Named("b".into()), + ty: MetadataName::U64, + }, + FieldMetadata { + name: FieldName::Named("c".into()), + ty: MetadataName::Vector(Box::new(MetadataName::U8)), + }, + ]) + } + ] + }); + assert_eq!(get_metadata::(), MetadataRegistry { + list: vec![ + TypeMetadata { + name: MetadataName::Custom("mod".into(), "EnumWithDiscriminant".into()), + kind: TypeMetadataKind::Enum(vec![ + EnumVariantMetadata { + name: "A".into(), + index: 1, + fields: Vec::new(), + }, + EnumVariantMetadata { + name: "B".into(), + index: 15, + fields: Vec::new(), + }, + EnumVariantMetadata { + name: "C".into(), + index: 255, + fields: Vec::new(), + }, + ]) + } + ] + }); + assert_eq!(get_metadata::, TestType>>(), MetadataRegistry { + list: vec![ + TypeMetadata { + name: MetadataName::CustomWithGenerics("mod".into(), "Struct".into(), vec![ + MetadataName::U32, + MetadataName::Option(Box::new(MetadataName::U64)), + MetadataName::CustomWithGenerics("mod".into(), "Struct".into(), vec![ + MetadataName::U32, MetadataName::U64, MetadataName::Vector(Box::new(MetadataName::U8)) + ]), + ]), + kind: TypeMetadataKind::Struct(vec![ + FieldMetadata { + name: FieldName::Named("a".into()), + ty: MetadataName::U32, + }, + FieldMetadata { + name: FieldName::Named("b".into()), + ty: MetadataName::Option(Box::new(MetadataName::U64)), + }, + FieldMetadata { + name: FieldName::Named("c".into()), + ty: MetadataName::CustomWithGenerics("mod".into(), "Struct".into(), vec![ + MetadataName::U32, MetadataName::U64, MetadataName::Vector(Box::new(MetadataName::U8)) + ]), + }, + ]) + }, + TypeMetadata { + name: MetadataName::CustomWithGenerics("mod".into(), "Struct".into(), vec![ + MetadataName::U32, MetadataName::U64, MetadataName::Vector(Box::new(MetadataName::U8)) + ]), + kind: TypeMetadataKind::Struct(vec![ + FieldMetadata { + name: FieldName::Named("a".into()), + ty: MetadataName::U32, + }, + FieldMetadata { + name: FieldName::Named("b".into()), + ty: MetadataName::U64, + }, + FieldMetadata { + name: FieldName::Named("c".into()), + ty: MetadataName::Vector(Box::new(MetadataName::U8)), + }, + ]) + } + ] + }); + assert_eq!(get_metadata::(), MetadataRegistry { + list: vec![ + TypeMetadata { + name: MetadataName::Custom("mod".into(), "StructWithCompact".into()), + kind: TypeMetadataKind::Struct(vec![ + FieldMetadata { + name: FieldName::Named("a".into()), + ty: MetadataName::Compact(Box::new(MetadataName::U32)) + }, + FieldMetadata { + name: FieldName::Named("b".into()), + ty: MetadataName::U64 + }, + ]) + } + ] + }); +} diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index 7aeeaf1029b29..40f1fc7ebfb11 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -27,6 +27,8 @@ rand = { version = "0.6", optional = true } sha2 = { version = "0.8", optional = true } substrate-bip39 = { git = "https://github.com/paritytech/substrate-bip39", optional = true } tiny-bip39 = { version = "0.6.0", optional = true } +substrate-metadata = { path = "../metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] substrate-serializer = { path = "../serializer" } @@ -63,4 +65,6 @@ std = [ "rand", "sha2", "schnorrkel", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/core/primitives/src/authority_id.rs b/core/primitives/src/authority_id.rs index e1b97fbc5bcd2..a308ff6135529 100644 --- a/core/primitives/src/authority_id.rs +++ b/core/primitives/src/authority_id.rs @@ -17,10 +17,11 @@ #[cfg(feature = "std")] use serde::{Serialize, Serializer, Deserialize, Deserializer}; use parity_codec::{Encode, Decode}; +use substrate_metadata_derive::EncodeMetadata; use crate::H256; /// An identifier for an authority in the consensus algorithm. The same size as ed25519::Public. -#[derive(Clone, Copy, PartialEq, Eq, Default, Encode, Decode)] +#[derive(Clone, Copy, PartialEq, Eq, Default, Encode, Decode, EncodeMetadata)] pub struct Ed25519AuthorityId(pub [u8; 32]); #[cfg(feature = "std")] diff --git a/core/sr-primitives/Cargo.toml b/core/sr-primitives/Cargo.toml index 4ef85b49897a0..9bc795cf41dcf 100644 --- a/core/sr-primitives/Cargo.toml +++ b/core/sr-primitives/Cargo.toml @@ -14,6 +14,8 @@ substrate-primitives = { path = "../primitives", default-features = false } rstd = { package = "sr-std", path = "../sr-std", default-features = false } runtime_io = { package = "sr-io", path = "../sr-io", default-features = false } log = { version = "0.4", optional = true } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] serde_json = "1.0" @@ -29,4 +31,6 @@ std = [ "runtime_io/std", "parity-codec/std", "substrate-primitives/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/core/sr-primitives/src/generic/block.rs b/core/sr-primitives/src/generic/block.rs index 5fb83a2a4f766..27706e7ebbef6 100644 --- a/core/sr-primitives/src/generic/block.rs +++ b/core/sr-primitives/src/generic/block.rs @@ -24,6 +24,8 @@ use serde_derive::Serialize; use rstd::prelude::*; use crate::codec::{Codec, Encode, Decode}; +use substrate_metadata::EncodeMetadata; +use substrate_metadata_derive::EncodeMetadata; use crate::traits::{self, Member, Block as BlockT, Header as HeaderT, MaybeSerialize}; use crate::Justification; @@ -61,7 +63,7 @@ impl fmt::Display for BlockId { } /// Abstraction over a substrate block. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug, Serialize))] #[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] #[cfg_attr(feature = "std", serde(deny_unknown_fields))] @@ -75,7 +77,7 @@ pub struct Block { impl traits::Block for Block where Header: HeaderT, - Extrinsic: Member + Codec + traits::Extrinsic, + Extrinsic: Member + Codec + EncodeMetadata + traits::Extrinsic, { type Extrinsic = Extrinsic; type Header = Header; diff --git a/core/sr-primitives/src/generic/digest.rs b/core/sr-primitives/src/generic/digest.rs index 95d243b97df74..52b437fc17539 100644 --- a/core/sr-primitives/src/generic/digest.rs +++ b/core/sr-primitives/src/generic/digest.rs @@ -25,9 +25,11 @@ use crate::codec::{Decode, Encode, Codec, Input}; use crate::traits::{self, Member, DigestItem as DigestItemT, MaybeHash}; use substrate_primitives::hash::H512 as Signature; +use substrate_metadata::EncodeMetadata; +use substrate_metadata_derive::EncodeMetadata; /// Generic header digest. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug, Serialize))] pub struct Digest { /// A list of logs in the digest. @@ -41,7 +43,7 @@ impl Default for Digest { } impl traits::Digest for Digest where - Item: DigestItemT + Codec + Item: DigestItemT + Codec + EncodeMetadata { type Hash = Item::Hash; type Item = Item; @@ -61,7 +63,7 @@ impl traits::Digest for Digest where /// Digest item that is able to encode/decode 'system' digest items and /// provide opaque access to other items. -#[derive(PartialEq, Eq, Clone)] +#[derive(PartialEq, Eq, Clone, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub enum DigestItem { /// System digest item announcing that authorities set has been changed @@ -108,7 +110,7 @@ pub enum DigestItemRef<'a, Hash: 'a, AuthorityId: 'a> { /// digest items using `DigestItemRef` type and we can't auto-derive `Decode` /// trait for `DigestItemRef`. #[repr(u32)] -#[derive(Encode, Decode)] +#[derive(Encode, Decode, EncodeMetadata)] enum DigestItemType { Other = 0, AuthoritiesChange, @@ -137,8 +139,8 @@ impl DigestItem { } impl< - Hash: Codec + Member, - AuthorityId: Codec + Member + MaybeHash, + Hash: Codec + EncodeMetadata + Member, + AuthorityId: Codec + EncodeMetadata + Member + MaybeHash, > traits::DigestItem for DigestItem { type Hash = Hash; type AuthorityId = AuthorityId; @@ -179,7 +181,7 @@ impl Decode for DigestItem } } -impl<'a, Hash: Codec + Member, AuthorityId: Codec + Member> DigestItemRef<'a, Hash, AuthorityId> { +impl<'a, Hash: Codec + EncodeMetadata + Member, AuthorityId: Codec + EncodeMetadata + Member> DigestItemRef<'a, Hash, AuthorityId> { /// Cast this digest item into `AuthoritiesChange`. pub fn as_authorities_change(&self) -> Option<&'a [AuthorityId]> { match *self { diff --git a/core/sr-primitives/src/generic/era.rs b/core/sr-primitives/src/generic/era.rs index 037013b4feaa9..9299f095d81c1 100644 --- a/core/sr-primitives/src/generic/era.rs +++ b/core/sr-primitives/src/generic/era.rs @@ -20,12 +20,13 @@ use serde_derive::{Serialize, Deserialize}; use crate::codec::{Decode, Encode, Input, Output}; +use substrate_metadata_derive::EncodeMetadata; pub type Period = u64; pub type Phase = u64; /// An era to describe the longevity of a transaction. -#[derive(PartialEq, Eq, Clone, Copy)] +#[derive(PartialEq, Eq, Clone, Copy, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))] pub enum Era { /// The transaction is valid forever. The genesis hash must be present in the signed content. diff --git a/core/sr-primitives/src/generic/header.rs b/core/sr-primitives/src/generic/header.rs index 60ccd93b3ded8..511e1115d886a 100644 --- a/core/sr-primitives/src/generic/header.rs +++ b/core/sr-primitives/src/generic/header.rs @@ -22,9 +22,11 @@ use crate::codec::{Decode, Encode, Codec, Input, Output, HasCompact, EncodeAsRef use crate::traits::{self, Member, SimpleArithmetic, SimpleBitOps, MaybeDisplay, Hash as HashT, DigestItem as DigestItemT, MaybeSerializeDebug, MaybeSerializeDebugButNotDeserialize}; use crate::generic::Digest; +use substrate_metadata::EncodeMetadata; +use substrate_metadata_derive::EncodeMetadata; /// Abstraction over a block header for a substrate chain. -#[derive(PartialEq, Eq, Clone)] +#[derive(PartialEq, Eq, Clone, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug, Serialize))] #[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] #[cfg_attr(feature = "std", serde(deny_unknown_fields))] @@ -84,10 +86,10 @@ impl Encode for Header where } impl traits::Header for Header where - Number: Member + MaybeSerializeDebug + ::rstd::hash::Hash + MaybeDisplay + SimpleArithmetic + Codec + Copy + Into, + Number: Member + MaybeSerializeDebug + ::rstd::hash::Hash + MaybeDisplay + SimpleArithmetic + Codec + EncodeMetadata + Copy + Into, Hash: HashT, - DigestItem: DigestItemT + Codec, - Hash::Output: Default + ::rstd::hash::Hash + Copy + Member + MaybeSerializeDebugButNotDeserialize + MaybeDisplay + SimpleBitOps + Codec, + DigestItem: DigestItemT + Codec + EncodeMetadata, + Hash::Output: Default + ::rstd::hash::Hash + Copy + Member + MaybeSerializeDebugButNotDeserialize + MaybeDisplay + SimpleBitOps + Codec + EncodeMetadata, { type Number = Number; type Hash = ::Output; @@ -128,10 +130,10 @@ impl traits::Header for Header Header where - Number: Member + ::rstd::hash::Hash + Copy + MaybeDisplay + SimpleArithmetic + Codec + Into, + Number: Member + ::rstd::hash::Hash + Copy + MaybeDisplay + SimpleArithmetic + Codec + EncodeMetadata + Into, Hash: HashT, - DigestItem: DigestItemT + Codec, - Hash::Output: Default + ::rstd::hash::Hash + Copy + Member + MaybeDisplay + SimpleBitOps + Codec, + DigestItem: DigestItemT + Codec + EncodeMetadata, + Hash::Output: Default + ::rstd::hash::Hash + Copy + Member + MaybeDisplay + SimpleBitOps + Codec + EncodeMetadata, { /// Convenience helper for computing the hash of the header without having /// to import the trait. diff --git a/core/sr-primitives/src/generic/unchecked_mortal_compact_extrinsic.rs b/core/sr-primitives/src/generic/unchecked_mortal_compact_extrinsic.rs index 243747092c49c..aff098260ccb9 100644 --- a/core/sr-primitives/src/generic/unchecked_mortal_compact_extrinsic.rs +++ b/core/sr-primitives/src/generic/unchecked_mortal_compact_extrinsic.rs @@ -25,12 +25,14 @@ use crate::codec::{Decode, Encode, Input, Compact}; use crate::traits::{self, Member, SimpleArithmetic, MaybeDisplay, CurrentHeight, BlockNumberToHash, Lookup, Checkable, Extrinsic}; use super::{CheckedExtrinsic, Era}; +use substrate_metadata::EncodeMetadata; +use substrate_metadata_derive::EncodeMetadata; const TRANSACTION_VERSION: u8 = 1; /// A extrinsic right from the external world. This is unchecked and so /// can contain a signature. -#[derive(PartialEq, Eq, Clone)] +#[derive(PartialEq, Eq, Clone, EncodeMetadata)] pub struct UncheckedMortalCompactExtrinsic { /// The signature, address, number of extrinsics have come before from /// the same signer and an era describing the longevity of this transaction, @@ -74,7 +76,7 @@ where Signature: Member + traits::Verify, AccountId: Member + MaybeDisplay, BlockNumber: SimpleArithmetic, - Hash: Encode, + Hash: Encode + EncodeMetadata, Context: Lookup + CurrentHeight + BlockNumberToHash, @@ -186,12 +188,14 @@ impl fmt::Debug for UncheckedMortalCompactExtri } } +#[cfg(test)] #[cfg(test)] mod tests { use super::*; use runtime_io::blake2_256; use crate::codec::{Encode, Decode}; use serde_derive::{Serialize, Deserialize}; + use substrate_metadata_derive::EncodeMetadata; struct TestContext; impl Lookup for TestContext { @@ -209,7 +213,7 @@ mod tests { fn block_number_to_hash(&self, n: u64) -> Option { Some(n) } } - #[derive(Eq, PartialEq, Clone, Debug, Serialize, Deserialize, Encode, Decode)] + #[derive(Eq, PartialEq, Clone, Debug, Serialize, Deserialize, Encode, Decode, EncodeMetadata)] struct TestSig(u64, Vec); impl traits::Verify for TestSig { type Signer = u64; diff --git a/core/sr-primitives/src/generic/unchecked_mortal_extrinsic.rs b/core/sr-primitives/src/generic/unchecked_mortal_extrinsic.rs index 93eeb55884479..fa0fa840354cb 100644 --- a/core/sr-primitives/src/generic/unchecked_mortal_extrinsic.rs +++ b/core/sr-primitives/src/generic/unchecked_mortal_extrinsic.rs @@ -25,6 +25,7 @@ use crate::codec::{Decode, Encode, Input}; use crate::traits::{self, Member, SimpleArithmetic, MaybeDisplay, CurrentHeight, BlockNumberToHash, Lookup, Checkable, Extrinsic}; use super::{CheckedExtrinsic, Era}; +use substrate_metadata::EncodeMetadata; const TRANSACTION_VERSION: u8 = 1; @@ -73,7 +74,7 @@ where Signature: Member + traits::Verify, AccountId: Member + MaybeDisplay, BlockNumber: SimpleArithmetic, - Hash: Encode, + Hash: Encode + EncodeMetadata, Context: Lookup + CurrentHeight + BlockNumberToHash, diff --git a/core/sr-primitives/src/lib.rs b/core/sr-primitives/src/lib.rs index 618a4b969f0b7..0435841eb30fb 100644 --- a/core/sr-primitives/src/lib.rs +++ b/core/sr-primitives/src/lib.rs @@ -22,6 +22,10 @@ #[doc(hidden)] pub use parity_codec as codec; +#[doc(hidden)] +pub use substrate_metadata; +#[doc(hidden)] +pub use substrate_metadata_derive; #[cfg(feature = "std")] #[doc(hidden)] pub use serde_derive; @@ -32,6 +36,7 @@ pub use runtime_io::{StorageOverlay, ChildrenStorageOverlay}; use rstd::prelude::*; use substrate_primitives::hash::{H256, H512}; use codec::{Encode, Decode}; +use substrate_metadata_derive::EncodeMetadata; #[cfg(feature = "std")] use substrate_primitives::hexdisplay::ascii_format; @@ -129,7 +134,7 @@ impl BuildStorage for StorageOverlay { /// Permill is parts-per-million (i.e. after multiplying by this, divide by 1000000). #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))] -#[derive(Encode, Decode, Default, Copy, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, Default, Copy, Clone, PartialEq, Eq, EncodeMetadata)] pub struct Permill(u32); impl Permill { @@ -187,7 +192,7 @@ impl From> for Permill { /// Perbill is parts-per-billion. It stores a value between 0 and 1 in fixed point and /// provides a means to multiply some other value by that. #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))] -#[derive(Encode, Decode, Default, Copy, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, Default, Copy, Clone, PartialEq, Eq, EncodeMetadata)] pub struct Perbill(u32); impl Perbill { @@ -259,7 +264,7 @@ impl From> for Perbill { } /// Ed25519 signature verify. -#[derive(Eq, PartialEq, Clone, Default, Encode, Decode)] +#[derive(Eq, PartialEq, Clone, Default, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] pub struct Ed25519Signature(pub H512); @@ -472,7 +477,7 @@ macro_rules! impl_outer_log { ) => { /// Wrapper for all possible log entries for the `$trait` runtime. Provides binary-compatible /// `Encode`/`Decode` implementations with the corresponding `generic::DigestItem`. - #[derive(Clone, PartialEq, Eq)] + #[derive(Clone, PartialEq, Eq, $crate::substrate_metadata_derive::EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug, $crate::serde_derive::Serialize))] $(#[$attr])* #[allow(non_camel_case_types)] @@ -480,7 +485,7 @@ macro_rules! impl_outer_log { /// All possible log entries for the `$trait` runtime. `Encode`/`Decode` implementations /// are auto-generated => it is not binary-compatible with `generic::DigestItem`. - #[derive(Clone, PartialEq, Eq, Encode, Decode)] + #[derive(Clone, PartialEq, Eq, Encode, Decode, $crate::substrate_metadata_derive::EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug, $crate::serde_derive::Serialize))] $(#[$attr])* #[allow(non_camel_case_types)] @@ -583,7 +588,7 @@ macro_rules! impl_outer_log { /// Simple blob to hold an extrinsic without commiting to its format and ensure it is serialized /// correctly. -#[derive(PartialEq, Eq, Clone, Default, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Default, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct OpaqueExtrinsic(pub Vec); @@ -620,9 +625,10 @@ mod tests { use super::RuntimeT; use crate::codec::{Encode, Decode}; use serde_derive::Serialize; + use substrate_metadata_derive::EncodeMetadata; pub type Log = RawLog<::AuthorityId>; - #[derive(Serialize, Debug, Encode, Decode, PartialEq, Eq, Clone)] + #[derive(Serialize, Debug, Encode, Decode, PartialEq, Eq, Clone, EncodeMetadata)] pub enum RawLog { A1(AuthorityId), AuthoritiesChange(Vec), A3(AuthorityId) } } @@ -630,9 +636,10 @@ mod tests { use super::RuntimeT; use crate::codec::{Encode, Decode}; use serde_derive::Serialize; + use substrate_metadata_derive::EncodeMetadata; pub type Log = RawLog<::AuthorityId>; - #[derive(Serialize, Debug, Encode, Decode, PartialEq, Eq, Clone)] + #[derive(Serialize, Debug, Encode, Decode, PartialEq, Eq, Clone, EncodeMetadata)] pub enum RawLog { B1(AuthorityId), B2(AuthorityId) } } diff --git a/core/sr-primitives/src/testing.rs b/core/sr-primitives/src/testing.rs index 96a10363aacd0..ee59263403e1b 100644 --- a/core/sr-primitives/src/testing.rs +++ b/core/sr-primitives/src/testing.rs @@ -27,9 +27,11 @@ use crate::generic::DigestItem as GenDigestItem; pub use substrate_primitives::{H256, Ed25519AuthorityId}; use substrate_primitives::U256; +use substrate_metadata::EncodeMetadata; +use substrate_metadata_derive::EncodeMetadata; /// Authority Id -#[derive(Default, PartialEq, Eq, Clone, Encode, Decode, Debug)] +#[derive(Default, PartialEq, Eq, Clone, Encode, Decode, Debug, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct UintAuthorityId(pub u64); impl Into for UintAuthorityId { @@ -50,7 +52,7 @@ impl Convert for ConvertUintAuthorityId { pub type DigestItem = GenDigestItem; /// Header Digest -#[derive(Default, PartialEq, Eq, Clone, Serialize, Debug, Encode, Decode)] +#[derive(Default, PartialEq, Eq, Clone, Serialize, Debug, Encode, Decode, EncodeMetadata)] pub struct Digest { /// Generated logs pub logs: Vec, @@ -74,7 +76,7 @@ impl traits::Digest for Digest { } /// Block Header -#[derive(PartialEq, Eq, Clone, Serialize, Debug, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Serialize, Debug, Encode, Decode, EncodeMetadata)] #[serde(rename_all = "camelCase")] #[serde(deny_unknown_fields)] pub struct Header { @@ -137,7 +139,7 @@ impl<'a> Deserialize<'a> for Header { } /// An opaque extrinsic wrapper type. -#[derive(PartialEq, Eq, Clone, Debug, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Debug, Encode, Decode, EncodeMetadata)] pub struct ExtrinsicWrapper(Xt); impl traits::Extrinsic for ExtrinsicWrapper { @@ -168,7 +170,7 @@ impl Deref for ExtrinsicWrapper { } /// Testing block -#[derive(PartialEq, Eq, Clone, Serialize, Debug, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Serialize, Debug, Encode, Decode, EncodeMetadata)] pub struct Block { /// Block header pub header: Header, @@ -176,7 +178,7 @@ pub struct Block { pub extrinsics: Vec, } -impl traits::Block for Block { +impl traits::Block for Block { type Extrinsic = Xt; type Header = Header; type Hash =
::Hash; @@ -203,7 +205,7 @@ impl<'a, Xt> Deserialize<'a> for Block where Block: Decode { } /// Test transaction -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, EncodeMetadata)] pub struct TestXt(pub Option, pub u64, pub Call); impl Serialize for TestXt where TestXt: Encode @@ -219,17 +221,17 @@ impl Debug for TestXt { } } -impl Checkable for TestXt { +impl Checkable for TestXt { type Checked = Self; fn check(self, _: &Context) -> Result { Ok(self) } } -impl traits::Extrinsic for TestXt { +impl traits::Extrinsic for TestXt { fn is_signed(&self) -> Option { None } } impl Applyable for TestXt where - Call: 'static + Sized + Send + Sync + Clone + Eq + Codec + Debug, + Call: 'static + Sized + Send + Sync + Clone + Eq + Codec + EncodeMetadata + Debug, { type AccountId = u64; type Index = u64; diff --git a/core/sr-primitives/src/traits.rs b/core/sr-primitives/src/traits.rs index b05f1a38da264..695a0cb72fec6 100644 --- a/core/sr-primitives/src/traits.rs +++ b/core/sr-primitives/src/traits.rs @@ -25,6 +25,8 @@ use runtime_io; use serde_derive::{Serialize, Deserialize}; use substrate_primitives::{self, Hasher, Blake2Hasher}; use crate::codec::{Codec, Encode, HasCompact}; +use substrate_metadata::EncodeMetadata; +use substrate_metadata_derive::EncodeMetadata; pub use integer_sqrt::IntegerSquareRoot; pub use num_traits::{ Zero, One, Bounded, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv, @@ -78,7 +80,7 @@ pub trait Lookup { /// context. pub trait StaticLookup { /// Type to lookup from. - type Source: Codec + Clone + PartialEq + MaybeDebug; + type Source: Codec + Clone + PartialEq + MaybeDebug + EncodeMetadata; /// Type to lookup into. type Target; /// Attempt a lookup. @@ -90,7 +92,7 @@ pub trait StaticLookup { /// A lookup implementation returning the input value. #[derive(Default)] pub struct IdentityLookup(PhantomData); -impl StaticLookup for IdentityLookup { +impl StaticLookup for IdentityLookup { type Source = T; type Target = T; fn lookup(x: T) -> result::Result { Ok(x) } @@ -117,7 +119,7 @@ pub trait BlockNumberToHash { type BlockNumber: Zero; /// The type of the hash. - type Hash: Encode; + type Hash: Encode + EncodeMetadata; /// Get the hash for a given block number, or `None` if unknown. fn block_number_to_hash(&self, n: Self::BlockNumber) -> Option; @@ -297,10 +299,10 @@ macro_rules! tuple_impl { tuple_impl!(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z,); /// Abstraction around hashing -pub trait Hash: 'static + MaybeSerializeDebug + Clone + Eq + PartialEq { // Stupid bug in the Rust compiler believes derived +pub trait Hash: 'static + MaybeSerializeDebug + Clone + Eq + PartialEq + EncodeMetadata { // Stupid bug in the Rust compiler believes derived // traits must be fulfilled by all type parameters. /// The hash type produced. - type Output: Member + MaybeSerializeDebug + rstd::hash::Hash + AsRef<[u8]> + AsMut<[u8]> + Copy + Default; + type Output: Member + MaybeSerializeDebug + rstd::hash::Hash + AsRef<[u8]> + AsMut<[u8]> + Copy + Default + EncodeMetadata; /// The associated hash_db Hasher type. type Hasher: Hasher; @@ -337,7 +339,7 @@ pub trait Hash: 'static + MaybeSerializeDebug + Clone + Eq + PartialEq { // Stup } /// Blake2-256 Hash implementation. -#[derive(PartialEq, Eq, Clone)] +#[derive(PartialEq, Eq, Clone, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] pub struct BlakeTwo256; @@ -496,15 +498,15 @@ impl Mem /// `parent_hash`, as well as a `digest` and a block `number`. /// /// You can also create a `new` one from those fields. -pub trait Header: Clone + Send + Sync + Codec + Eq + MaybeSerializeDebugButNotDeserialize + 'static { +pub trait Header: Clone + Send + Sync + Codec + EncodeMetadata + Eq + MaybeSerializeDebugButNotDeserialize + 'static { /// Header number. - type Number: Member + MaybeSerializeDebug + ::rstd::hash::Hash + Copy + MaybeDisplay + SimpleArithmetic + Codec; + type Number: Member + MaybeSerializeDebug + ::rstd::hash::Hash + Copy + MaybeDisplay + SimpleArithmetic + Codec + EncodeMetadata; /// Header hash type - type Hash: Member + MaybeSerializeDebug + ::rstd::hash::Hash + Copy + MaybeDisplay + Default + SimpleBitOps + Codec + AsRef<[u8]> + AsMut<[u8]>; + type Hash: Member + MaybeSerializeDebug + ::rstd::hash::Hash + Copy + MaybeDisplay + Default + SimpleBitOps + Codec + EncodeMetadata + AsRef<[u8]> + AsMut<[u8]>; /// Hashing algorithm type Hashing: Hash; /// Digest type - type Digest: Digest + Codec; + type Digest: Digest + Codec + EncodeMetadata; /// Creates new header. fn new( @@ -552,13 +554,13 @@ pub trait Header: Clone + Send + Sync + Codec + Eq + MaybeSerializeDebugButNotDe /// `Extrinsic` piece of information as well as a `Header`. /// /// You can get an iterator over each of the `extrinsics` and retrieve the `header`. -pub trait Block: Clone + Send + Sync + Codec + Eq + MaybeSerializeDebugButNotDeserialize + 'static { +pub trait Block: Clone + Send + Sync + Codec + EncodeMetadata + Eq + MaybeSerializeDebugButNotDeserialize + 'static { /// Type of extrinsics. - type Extrinsic: Member + Codec + Extrinsic + MaybeSerialize; + type Extrinsic: Member + Codec + EncodeMetadata + Extrinsic + MaybeSerialize; /// Header type. type Header: Header; /// Block hash type. - type Hash: Member + MaybeSerializeDebug + ::rstd::hash::Hash + Copy + MaybeDisplay + Default + SimpleBitOps + Codec + AsRef<[u8]> + AsMut<[u8]>; + type Hash: Member + MaybeSerializeDebug + ::rstd::hash::Hash + Copy + MaybeDisplay + Default + SimpleBitOps + Codec + EncodeMetadata + AsRef<[u8]> + AsMut<[u8]>; /// Returns a reference to the header. fn header(&self) -> &Self::Header; @@ -672,12 +674,11 @@ pub trait Digest: Member + MaybeSerializeDebugButNotDeserialize + Default { /// for casting member to 'system' log items, known to substrate. /// /// If the runtime does not supports some 'system' items, use `()` as a stub. -pub trait DigestItem: Codec + Member + MaybeSerializeDebugButNotDeserialize { +pub trait DigestItem: Codec + EncodeMetadata + Member + MaybeSerializeDebugButNotDeserialize { /// `ChangesTrieRoot` payload. type Hash: Member; /// `AuthorityChange` payload. - type AuthorityId: Member + MaybeHash + crate::codec::Encode + crate::codec::Decode; - + type AuthorityId: Member + MaybeHash + crate::codec::Encode + crate::codec::Decode + EncodeMetadata; /// Returns Some if the entry is the `AuthoritiesChange` entry. fn as_authorities_change(&self) -> Option<&[Self::AuthorityId]>; diff --git a/core/test-runtime/Cargo.toml b/core/test-runtime/Cargo.toml index a3e413e5e61a9..85ef6743264f0 100644 --- a/core/test-runtime/Cargo.toml +++ b/core/test-runtime/Cargo.toml @@ -21,6 +21,8 @@ runtime_primitives = { package = "sr-primitives", path = "../sr-primitives", def runtime_version = { package = "sr-version", path = "../sr-version", default-features = false } runtime_support = { package = "srml-support", path = "../../srml/support", default-features = false } cfg-if = "0.1.6" +substrate-metadata = { path = "../metadata", default-features = false } +substrate-metadata-derive = { path = "../metadata-derive", default-features = false } [dev-dependencies] substrate-executor = { path = "../executor" } @@ -43,4 +45,6 @@ std = [ "runtime_primitives/std", "runtime_version/std", "consensus_aura/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/core/test-runtime/src/lib.rs b/core/test-runtime/src/lib.rs index 59b56e3e0f084..00ed19ab9f99d 100644 --- a/core/test-runtime/src/lib.rs +++ b/core/test-runtime/src/lib.rs @@ -23,6 +23,7 @@ pub mod system; use rstd::{prelude::*, marker::PhantomData}; use parity_codec::{Encode, Decode, Input}; +use substrate_metadata_derive::EncodeMetadata; use substrate_client::{ runtime_api as client_api, block_builder::api as block_builder_api, decl_runtime_apis, @@ -68,7 +69,7 @@ pub fn native_version() -> NativeVersion { } /// Calls in transactions. -#[derive(Clone, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct Transfer { pub from: AccountId, @@ -78,7 +79,7 @@ pub struct Transfer { } /// Extrinsic for test-runtime. -#[derive(Clone, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub enum Extrinsic { AuthoritiesChange(Vec), diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index fdba699543195..5c9e3b52970b6 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -1159,7 +1159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "schnorrkel" version = "0.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/w3f/schnorrkel#ba2c5ced364af25f73345be33a4ba7dcefe382ac" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1168,6 +1168,7 @@ dependencies = [ "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1345,6 +1346,8 @@ dependencies = [ "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-std 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1375,6 +1378,7 @@ dependencies = [ "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 0.1.0", + "substrate-metadata 0.1.0", "substrate-primitives 0.1.0", ] @@ -1395,6 +1399,8 @@ dependencies = [ "srml-metadata 0.1.0", "srml-support-procedural 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1441,11 +1447,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "substrate-bip39" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/paritytech/substrate-bip39#a28806512c977992af8d6740d45352f5a1c832a0" dependencies = [ "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1544,6 +1550,27 @@ dependencies = [ "substrate-primitives 0.1.0", ] +[[package]] +name = "substrate-metadata" +version = "0.1.0" +dependencies = [ + "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-std 0.1.0", +] + +[[package]] +name = "substrate-metadata-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "substrate-panic-handler" version = "0.1.0" @@ -1568,12 +1595,14 @@ dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 0.1.0", - "substrate-bip39 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1641,6 +1670,8 @@ dependencies = [ "substrate-consensus-aura-primitives 0.1.0", "substrate-inherents 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -2206,7 +2237,7 @@ dependencies = [ "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" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" -"checksum schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe554f318830b48e5da8ab1ccb1ffd02b79228364dac7766b7cd1ec461ca5116" +"checksum schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)" = "" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "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" @@ -2226,7 +2257,7 @@ dependencies = [ "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" -"checksum substrate-bip39 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ec6183ce9e04bec5f113ff19c8ef5355dad20a4196134b5402732bf5d3c1a351" +"checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" "checksum syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)" = "525bd55255f03c816e5d7f615587bd13030c7103354fadb104993dcee6a788ec" diff --git a/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm b/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm index 416fd30a5c971..3046652576658 100644 Binary files a/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm and b/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm differ diff --git a/node-template/runtime/Cargo.toml b/node-template/runtime/Cargo.toml index 066e9da79dc7a..636a57c69b97d 100644 --- a/node-template/runtime/Cargo.toml +++ b/node-template/runtime/Cargo.toml @@ -26,6 +26,8 @@ sudo = { package = "srml-sudo", path = "../../srml/sudo", default_features = fal runtime-primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default_features = false } client = { package = "substrate-client", path = "../../core/client", default_features = false } consensus-aura = { package = "substrate-consensus-aura-primitives", path = "../../core/consensus/aura/primitives", default_features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [features] default = ["std"] @@ -50,4 +52,6 @@ std = [ "serde", "safe-mix/std", "consensus-aura/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/node-template/runtime/src/lib.rs b/node-template/runtime/src/lib.rs index fd696e9500a85..9ee5d9dd870ae 100644 --- a/node-template/runtime/src/lib.rs +++ b/node-template/runtime/src/lib.rs @@ -14,7 +14,7 @@ use primitives::bytes; use primitives::{Ed25519AuthorityId, OpaqueMetadata}; use runtime_primitives::{ ApplyResult, transaction_validity::TransactionValidity, Ed25519Signature, generic, - traits::{self, BlakeTwo256, Block as BlockT, StaticLookup}, create_runtime_str + traits::{self, Verify, BlakeTwo256, Block as BlockT, StaticLookup}, create_runtime_str }; use client::{ block_builder::api::{CheckInherentsResult, InherentData, self as block_builder_api}, @@ -23,6 +23,7 @@ use client::{ use version::RuntimeVersion; #[cfg(feature = "std")] use version::NativeVersion; +use substrate_metadata_derive::EncodeMetadata; // A few exports that help ease life for downstream crates. #[cfg(any(feature = "std", test))] @@ -35,7 +36,7 @@ pub use timestamp::BlockPeriod; pub use support::{StorageValue, construct_runtime}; /// Alias to Ed25519 pubkey that identifies an account on the chain. -pub type AccountId = primitives::H256; +pub type AccountId = ::Signer; /// A hash of some data used by the chain. pub type Hash = primitives::H256; @@ -57,7 +58,7 @@ pub mod opaque { use super::*; /// Opaque, encoded, unchecked extrinsic. - #[derive(PartialEq, Eq, Clone, Default, Encode, Decode)] + #[derive(PartialEq, Eq, Clone, Default, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))] pub struct UncheckedExtrinsic(#[cfg_attr(feature = "std", serde(with="bytes"))] pub Vec); impl traits::Extrinsic for UncheckedExtrinsic { @@ -174,7 +175,7 @@ impl sudo::Trait for Runtime { } /// Used for the module template in `./template.rs` -impl template::Trait for Runtime { +impl template::Trait for Runtime { type Event = Event; } diff --git a/node-template/runtime/src/template.rs b/node-template/runtime/src/template.rs index 300b48af114c7..8f190c4ad9294 100644 --- a/node-template/runtime/src/template.rs +++ b/node-template/runtime/src/template.rs @@ -10,6 +10,7 @@ use support::{decl_module, decl_storage, decl_event, StorageValue, dispatch::Result}; use system::ensure_signed; +use rstd::prelude::*; /// The module's configuration trait. pub trait Trait: system::Trait { @@ -22,7 +23,7 @@ pub trait Trait: system::Trait { /// This module's storage items. decl_storage! { trait Store for Module as TemplateModule { - // Just a dummy storage item. + // Just a dummy storage item. // Here we are declaring a StorageValue, `Something` as a Option // `get(something)` is the default getter which returns either the stored `u32` or `None` if nothing stored Something get(something): Option; diff --git a/node-template/runtime/wasm/Cargo.lock b/node-template/runtime/wasm/Cargo.lock index 622198affb571..41cff4e4ec7e9 100644 --- a/node-template/runtime/wasm/Cargo.lock +++ b/node-template/runtime/wasm/Cargo.lock @@ -765,6 +765,8 @@ dependencies = [ "srml-timestamp 0.1.0", "substrate-client 0.1.0", "substrate-consensus-aura-primitives 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1201,7 +1203,7 @@ dependencies = [ [[package]] name = "schnorrkel" version = "0.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/w3f/schnorrkel#ba2c5ced364af25f73345be33a4ba7dcefe382ac" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1210,6 +1212,7 @@ dependencies = [ "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1387,6 +1390,8 @@ dependencies = [ "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-std 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1425,6 +1430,8 @@ dependencies = [ "srml-system 0.1.0", "srml-timestamp 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1440,6 +1447,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1455,6 +1464,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1484,6 +1495,8 @@ dependencies = [ "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1502,6 +1515,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1513,6 +1528,7 @@ dependencies = [ "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 0.1.0", + "substrate-metadata 0.1.0", "substrate-primitives 0.1.0", ] @@ -1531,6 +1547,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "srml-timestamp 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1549,6 +1567,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1564,6 +1584,8 @@ dependencies = [ "srml-support 0.1.0", "srml-support-procedural 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1583,6 +1605,8 @@ dependencies = [ "srml-metadata 0.1.0", "srml-support-procedural 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1629,6 +1653,8 @@ dependencies = [ "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1644,6 +1670,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1659,11 +1687,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "substrate-bip39" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/paritytech/substrate-bip39#a28806512c977992af8d6740d45352f5a1c832a0" dependencies = [ "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1762,6 +1790,27 @@ dependencies = [ "substrate-primitives 0.1.0", ] +[[package]] +name = "substrate-metadata" +version = "0.1.0" +dependencies = [ + "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-std 0.1.0", +] + +[[package]] +name = "substrate-metadata-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "substrate-panic-handler" version = "0.1.0" @@ -1786,12 +1835,14 @@ dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 0.1.0", - "substrate-bip39 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2396,7 +2447,7 @@ dependencies = [ "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" "checksum safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7bf422d23a88c16d5090d455f182bc99c60af4df6a345c63428acf5129e347" -"checksum schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe554f318830b48e5da8ab1ccb1ffd02b79228364dac7766b7cd1ec461ca5116" +"checksum schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)" = "" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "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" @@ -2416,7 +2467,7 @@ dependencies = [ "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" -"checksum substrate-bip39 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ec6183ce9e04bec5f113ff19c8ef5355dad20a4196134b5402732bf5d3c1a351" +"checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" "checksum syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)" = "525bd55255f03c816e5d7f615587bd13030c7103354fadb104993dcee6a788ec" diff --git a/node/runtime/Cargo.toml b/node/runtime/Cargo.toml index 0c695f5ef1952..a95a2af6ae434 100644 --- a/node/runtime/Cargo.toml +++ b/node/runtime/Cargo.toml @@ -38,6 +38,8 @@ rustc-hex = { version = "2.0", optional = true } hex-literal = { version = "0.1.0", optional = true } serde = { version = "1.0", optional = true } substrate-keyring = { path = "../../core/keyring", optional = true } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [features] default = ["std"] @@ -73,4 +75,6 @@ std = [ "hex-literal", "serde", "substrate-keyring", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/node/runtime/src/lib.rs b/node/runtime/src/lib.rs index 45b252b04cb67..f9fdffda2790a 100644 --- a/node/runtime/src/lib.rs +++ b/node/runtime/src/lib.rs @@ -22,6 +22,7 @@ use rstd::prelude::*; use parity_codec::{Encode, Decode}; +use substrate_metadata_derive::EncodeMetadata; #[cfg(feature = "std")] use support::{Serialize, Deserialize}; use support::construct_runtime; @@ -60,8 +61,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("node"), impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, - spec_version: 34, - impl_version: 35, + spec_version: 36, + impl_version: 36, apis: RUNTIME_API_VERSIONS, }; diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index f6cfef7c80957..c0d36d019ade7 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -790,6 +790,8 @@ dependencies = [ "substrate-client 0.1.0", "substrate-consensus-aura-primitives 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1236,7 +1238,7 @@ dependencies = [ [[package]] name = "schnorrkel" version = "0.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/w3f/schnorrkel#ba2c5ced364af25f73345be33a4ba7dcefe382ac" dependencies = [ "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "curve25519-dalek 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1245,6 +1247,7 @@ dependencies = [ "merlin 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1422,6 +1425,8 @@ dependencies = [ "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 0.1.0", "sr-std 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1470,6 +1475,8 @@ dependencies = [ "srml-system 0.1.0", "srml-timestamp 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1485,6 +1492,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1500,6 +1509,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1521,6 +1532,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "srml-timestamp 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1538,6 +1551,8 @@ dependencies = [ "srml-democracy 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1555,6 +1570,8 @@ dependencies = [ "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1583,6 +1600,8 @@ dependencies = [ "sr-std 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1599,6 +1618,7 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", ] [[package]] @@ -1615,6 +1635,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-finality-grandpa-primitives 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1633,6 +1655,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1644,6 +1668,7 @@ dependencies = [ "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 0.1.0", + "substrate-metadata 0.1.0", "substrate-primitives 0.1.0", ] @@ -1662,6 +1687,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "srml-timestamp 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1680,6 +1707,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-keyring 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1695,6 +1724,8 @@ dependencies = [ "srml-support 0.1.0", "srml-support-procedural 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1714,6 +1745,8 @@ dependencies = [ "srml-metadata 0.1.0", "srml-support-procedural 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1760,6 +1793,8 @@ dependencies = [ "sr-primitives 0.1.0", "sr-std 0.1.0", "srml-support 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "substrate-primitives 0.1.0", ] @@ -1775,6 +1810,8 @@ dependencies = [ "srml-support 0.1.0", "srml-system 0.1.0", "substrate-inherents 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1790,6 +1827,8 @@ dependencies = [ "srml-balances 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1803,6 +1842,8 @@ dependencies = [ "srml-consensus 0.1.0", "srml-support 0.1.0", "srml-system 0.1.0", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", ] [[package]] @@ -1818,11 +1859,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "substrate-bip39" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/paritytech/substrate-bip39#a28806512c977992af8d6740d45352f5a1c832a0" dependencies = [ "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1932,6 +1973,27 @@ dependencies = [ "substrate-primitives 0.1.0", ] +[[package]] +name = "substrate-metadata" +version = "0.1.0" +dependencies = [ + "parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "sr-std 0.1.0", +] + +[[package]] +name = "substrate-metadata-derive" +version = "0.1.0" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "substrate-panic-handler" version = "0.1.0" @@ -1956,12 +2018,14 @@ dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-std 0.1.0", - "substrate-bip39 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)", + "substrate-metadata 0.1.0", + "substrate-metadata-derive 0.1.0", "tiny-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "twox-hash 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2567,7 +2631,7 @@ dependencies = [ "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" "checksum safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7bf422d23a88c16d5090d455f182bc99c60af4df6a345c63428acf5129e347" -"checksum schnorrkel 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe554f318830b48e5da8ab1ccb1ffd02b79228364dac7766b7cd1ec461ca5116" +"checksum schnorrkel 0.0.0 (git+https://github.com/w3f/schnorrkel)" = "" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "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" @@ -2587,7 +2651,7 @@ dependencies = [ "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" -"checksum substrate-bip39 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ec6183ce9e04bec5f113ff19c8ef5355dad20a4196134b5402732bf5d3c1a351" +"checksum substrate-bip39 0.2.0 (git+https://github.com/paritytech/substrate-bip39)" = "" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" "checksum syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)" = "525bd55255f03c816e5d7f615587bd13030c7103354fadb104993dcee6a788ec" diff --git a/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm b/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm index 2192c80bc519e..4e85a5e63f49c 100644 Binary files a/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm and b/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm differ diff --git a/srml/assets/Cargo.toml b/srml/assets/Cargo.toml index 621d4a1ac461e..04ca3453e45fa 100644 --- a/srml/assets/Cargo.toml +++ b/srml/assets/Cargo.toml @@ -14,6 +14,8 @@ primitives = { package = "sr-primitives", path = "../../core/sr-primitives", def srml-support = { path = "../support", default-features = false } # `system` module provides us with all sorts of useful stuff and macros depend on it being around. system = { package = "srml-system", path = "../system", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] substrate-primitives = { path = "../../core/primitives" } @@ -28,4 +30,6 @@ std = [ "primitives/std", "srml-support/std", "system/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/aura/Cargo.toml b/srml/aura/Cargo.toml index bb8af29e8d11b..4c5a26475869d 100644 --- a/srml/aura/Cargo.toml +++ b/srml/aura/Cargo.toml @@ -17,6 +17,8 @@ system = { package = "srml-system", path = "../system", default-features = false timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false } staking = { package = "srml-staking", path = "../staking", default-features = false } session = { package = "srml-session", path = "../session", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] lazy_static = "1.0" @@ -37,4 +39,6 @@ std = [ "timestamp/std", "staking/std", "inherents/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/aura/src/lib.rs b/srml/aura/src/lib.rs index 553bebec75af7..c0c55da2587ca 100644 --- a/srml/aura/src/lib.rs +++ b/srml/aura/src/lib.rs @@ -148,7 +148,7 @@ impl AuraReport { pub fn punish(&self, validator_count: usize, mut punish_with: F) where F: FnMut(usize, usize) { - // If all validators have been skipped, then it implies some sort of + // If all validators have been skipped, then it implies some sort of // systematic problem common to all rather than a minority of validators // unfulfilling their specific duties. In this case, it doesn't make // sense to punish anyone, so we guard against it. diff --git a/srml/aura/src/mock.rs b/srml/aura/src/mock.rs index 6a0afb646951c..ca8b4a6b5789c 100644 --- a/srml/aura/src/mock.rs +++ b/srml/aura/src/mock.rs @@ -23,13 +23,14 @@ use srml_support::impl_outer_origin; use runtime_io; use substrate_primitives::{H256, Blake2Hasher}; use crate::{Trait, Module}; +use substrate_metadata_derive::EncodeMetadata; impl_outer_origin!{ pub enum Origin for Test {} } // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. -#[derive(Clone, PartialEq, Eq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug, EncodeMetadata)] pub struct Test; impl consensus::Trait for Test { diff --git a/srml/balances/Cargo.toml b/srml/balances/Cargo.toml index c8d5d152a3e76..1e15782e5d791 100644 --- a/srml/balances/Cargo.toml +++ b/srml/balances/Cargo.toml @@ -14,6 +14,8 @@ rstd = { package = "sr-std", path = "../../core/sr-std", default-features = fals primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false } srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] runtime_io = { package = "sr-io", path = "../../core/sr-io" } @@ -30,4 +32,6 @@ std = [ "srml-support/std", "primitives/std", "system/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/balances/src/lib.rs b/srml/balances/src/lib.rs index c9b62998fc070..64ee875fc7a4f 100644 --- a/srml/balances/src/lib.rs +++ b/srml/balances/src/lib.rs @@ -37,6 +37,7 @@ use primitives::traits::{ Zero, SimpleArithmetic, As, StaticLookup, Member, CheckedAdd, CheckedSub, MaybeSerializeDebug }; use system::{IsDeadAccount, OnNewAccount, ensure_signed}; +use substrate_metadata_derive::EncodeMetadata; mod mock; mod tests; @@ -77,7 +78,7 @@ decl_event!( ); /// Struct to encode the vesting schedule of an individual account. -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct VestingSchedule { /// Locked amount at genesis. @@ -97,7 +98,7 @@ impl> VestingSchedule { } } -#[derive(Encode, Decode, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct BalanceLock { pub id: LockIdentifier, @@ -370,7 +371,7 @@ impl Module { /// Returns `Ok` iff the account is able to make a withdrawal of the given amount /// for the given reason. - /// + /// /// `Err(...)` with the reason why not otherwise. pub fn ensure_account_can_withdraw( who: &T::AccountId, diff --git a/srml/balances/src/mock.rs b/srml/balances/src/mock.rs index 55403a12aa4d1..07ffabaf1d7b3 100644 --- a/srml/balances/src/mock.rs +++ b/srml/balances/src/mock.rs @@ -24,13 +24,14 @@ use substrate_primitives::{H256, Blake2Hasher}; use runtime_io; use srml_support::impl_outer_origin; use crate::{GenesisConfig, Module, Trait}; +use substrate_metadata_derive::EncodeMetadata; impl_outer_origin!{ pub enum Origin for Runtime {} } // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. -#[derive(Clone, PartialEq, Eq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug, EncodeMetadata)] pub struct Runtime; impl system::Trait for Runtime { type Origin = Origin; diff --git a/srml/consensus/Cargo.toml b/srml/consensus/Cargo.toml index 105f978c6371f..ad0949c630a09 100644 --- a/srml/consensus/Cargo.toml +++ b/srml/consensus/Cargo.toml @@ -15,6 +15,8 @@ rstd = { package = "sr-std", path = "../../core/sr-std", default-features = fals primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false } srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] runtime_io = { package = "sr-io", path = "../../core/sr-io" } @@ -31,4 +33,6 @@ std = [ "primitives/std", "system/std", "inherents/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/consensus/src/lib.rs b/srml/consensus/src/lib.rs index 32d2a7b141d02..7be1bf2618c25 100644 --- a/srml/consensus/src/lib.rs +++ b/srml/consensus/src/lib.rs @@ -23,6 +23,7 @@ use serde_derive::Serialize; use rstd::prelude::*; use parity_codec as codec; use codec::{Encode, Decode}; +use substrate_metadata_derive::EncodeMetadata; use srml_support::{storage, Parameter, decl_storage, decl_module}; use srml_support::storage::StorageValue; use srml_support::storage::unhashed::StorageVec; @@ -118,7 +119,7 @@ pub type Log = RawLog< /// A logs in this module. #[cfg_attr(feature = "std", derive(Serialize, Debug))] -#[derive(Encode, Decode, PartialEq, Eq, Clone)] +#[derive(Encode, Decode, PartialEq, Eq, Clone, EncodeMetadata)] pub enum RawLog { /// Authorities set has been changed. Contains the new set of authorities. AuthoritiesChange(Vec), diff --git a/srml/consensus/src/mock.rs b/srml/consensus/src/mock.rs index 490c1ca078cb2..c6f02d9972faf 100644 --- a/srml/consensus/src/mock.rs +++ b/srml/consensus/src/mock.rs @@ -23,13 +23,14 @@ use srml_support::impl_outer_origin; use runtime_io; use substrate_primitives::{H256, Blake2Hasher}; use crate::{GenesisConfig, Trait, Module}; +use substrate_metadata_derive::EncodeMetadata; impl_outer_origin!{ pub enum Origin for Test {} } // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. -#[derive(Clone, PartialEq, Eq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug, EncodeMetadata)] pub struct Test; impl Trait for Test { type Log = DigestItem; diff --git a/srml/contract/Cargo.toml b/srml/contract/Cargo.toml index d0c851e26e766..a8ad00fe18b20 100644 --- a/srml/contract/Cargo.toml +++ b/srml/contract/Cargo.toml @@ -1,3 +1,4 @@ + [package] name = "srml-contract" version = "0.1.0" @@ -20,6 +21,8 @@ system = { package = "srml-system", path = "../system", default-features = false balances = { package = "srml-balances", path = "../balances", default-features = false } timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false } fees = { package = "srml-fees", path = "../fees", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] wabt = "~0.7.4" @@ -45,4 +48,6 @@ std = [ "parity-wasm/std", "pwasm-utils/std", "fees/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/contract/src/lib.rs b/srml/contract/src/lib.rs index 8de372ffe894d..4954bd5598377 100644 --- a/srml/contract/src/lib.rs +++ b/srml/contract/src/lib.rs @@ -70,6 +70,7 @@ use serde_derive::{Serialize, Deserialize}; use rstd::prelude::*; use rstd::marker::PhantomData; use parity_codec::{Codec, Encode, Decode}; +use substrate_metadata_derive::EncodeMetadata; use runtime_primitives::traits::{Hash, As, SimpleArithmetic,Bounded, StaticLookup}; use srml_support::dispatch::{Result, Dispatchable}; use srml_support::{Parameter, StorageMap, StorageValue, StorageDoubleMap, decl_module, decl_event, decl_storage}; @@ -404,7 +405,7 @@ impl Config { /// Definition of the cost schedule and other parameterizations for wasm vm. #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))] -#[derive(Clone, Encode, Decode, PartialEq, Eq)] +#[derive(Clone, Encode, Decode, PartialEq, Eq, EncodeMetadata)] pub struct Schedule { /// Version of the schedule. pub version: u32, diff --git a/srml/contract/src/tests.rs b/srml/contract/src/tests.rs index cf280c0f007c9..a05983a3bb444 100644 --- a/srml/contract/src/tests.rs +++ b/srml/contract/src/tests.rs @@ -35,6 +35,7 @@ use crate::{ ContractAddressFor, GenesisConfig, Module, RawEvent, StorageOf, Trait, ComputeDispatchFee }; +use substrate_metadata_derive::EncodeMetadata; mod contract { // Re-export contents of the root. This basically @@ -58,7 +59,7 @@ impl_outer_dispatch! { } } -#[derive(Clone, Eq, PartialEq)] +#[derive(Clone, Eq, PartialEq, EncodeMetadata)] pub struct Test; impl system::Trait for Test { type Origin = Origin; diff --git a/srml/contract/src/wasm/mod.rs b/srml/contract/src/wasm/mod.rs index c617725c51782..87ebad48e3c71 100644 --- a/srml/contract/src/wasm/mod.rs +++ b/srml/contract/src/wasm/mod.rs @@ -24,6 +24,7 @@ use crate::gas::GasMeter; use rstd::prelude::*; use parity_codec::{Encode, Decode}; +use substrate_metadata_derive::EncodeMetadata; use sandbox; #[macro_use] @@ -38,7 +39,7 @@ use self::code_cache::load as load_code; pub use self::code_cache::save as save_code; /// A prepared wasm module ready for execution. -#[derive(Clone, Encode, Decode)] +#[derive(Clone, Encode, Decode, EncodeMetadata)] pub struct PrefabWasmModule { /// Version of the schedule with which the code was instrumented. #[codec(compact)] diff --git a/srml/council/Cargo.toml b/srml/council/Cargo.toml index 868ec3bcff038..81d8a16471316 100644 --- a/srml/council/Cargo.toml +++ b/srml/council/Cargo.toml @@ -16,6 +16,8 @@ primitives = { package = "sr-primitives", path = "../../core/sr-primitives", def srml-support = { path = "../support", default-features = false } democracy = { package = "srml-democracy", path = "../democracy", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] hex-literal = "0.1.0" @@ -35,4 +37,6 @@ std = [ "primitives/std", "democracy/std", "system/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/council/src/lib.rs b/srml/council/src/lib.rs index de64b8c55c507..5e22118e173e7 100644 --- a/srml/council/src/lib.rs +++ b/srml/council/src/lib.rs @@ -36,6 +36,7 @@ mod tests { pub use primitives::testing::{Digest, DigestItem, Header}; pub use substrate_primitives::{Blake2Hasher}; pub use {seats, motions, voting}; + use substrate_metadata_derive::EncodeMetadata; impl_outer_origin! { pub enum Origin for Test { @@ -57,7 +58,7 @@ mod tests { } // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. - #[derive(Clone, Eq, PartialEq, Debug)] + #[derive(Clone, Eq, PartialEq, Debug, EncodeMetadata)] pub struct Test; impl system::Trait for Test { type Origin = Origin; diff --git a/srml/democracy/Cargo.toml b/srml/democracy/Cargo.toml index 29b70938f20c1..fe6abbac022d6 100644 --- a/srml/democracy/Cargo.toml +++ b/srml/democracy/Cargo.toml @@ -15,6 +15,8 @@ runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false } srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] substrate-primitives = { path = "../../core/primitives" } @@ -32,4 +34,6 @@ std = [ "srml-support/std", "primitives/std", "system/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/democracy/src/lib.rs b/srml/democracy/src/lib.rs index fb2ee276681d5..30d53ae493d75 100644 --- a/srml/democracy/src/lib.rs +++ b/srml/democracy/src/lib.rs @@ -27,6 +27,7 @@ use srml_support::{decl_module, decl_storage, decl_event, ensure}; use srml_support::traits::{Currency, LockableCurrency, WithdrawReason, ArithmeticType, LockIdentifier}; use srml_support::dispatch::Result; use system::ensure_signed; +use substrate_metadata_derive::EncodeMetadata; mod vote_threshold; pub use vote_threshold::{Approved, VoteThreshold}; @@ -41,7 +42,7 @@ pub type ReferendumIndex = u32; pub type LockPeriods = i8; /// A number of lock periods, plus a vote, one way or the other. -#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, Default)] +#[derive(Encode, Decode, Copy, Clone, Eq, PartialEq, Default, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct Vote(i8); @@ -160,7 +161,7 @@ decl_module! { } /// Info regarding an ongoing referendum. -#[derive(Encode, Decode, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct ReferendumInfo { /// When voting on this referendum will end. @@ -434,7 +435,7 @@ mod tests { } // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. - #[derive(Clone, Eq, PartialEq, Debug)] + #[derive(Clone, Eq, PartialEq, Debug, EncodeMetadata)] pub struct Test; impl system::Trait for Test { type Origin = Origin; diff --git a/srml/democracy/src/vote_threshold.rs b/srml/democracy/src/vote_threshold.rs index d436757539d47..b7c11a47fdb24 100644 --- a/srml/democracy/src/vote_threshold.rs +++ b/srml/democracy/src/vote_threshold.rs @@ -19,11 +19,12 @@ #[cfg(feature = "std")] use serde_derive::{Serialize, Deserialize}; use parity_codec::{Encode, Decode}; +use substrate_metadata_derive::EncodeMetadata; use primitives::traits::{Zero, IntegerSquareRoot}; use rstd::ops::{Add, Mul, Div, Rem}; /// A means of determining if a vote is past pass threshold. -#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))] pub enum VoteThreshold { /// A supermajority of approvals is needed to pass this vote. diff --git a/srml/example/Cargo.toml b/srml/example/Cargo.toml index c1cf286346402..02e032c137b7d 100644 --- a/srml/example/Cargo.toml +++ b/srml/example/Cargo.toml @@ -11,6 +11,8 @@ parity-codec = { version = "3.1", default-features = false } srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } balances = { package = "srml-balances", path = "../balances", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] sr-io = { path = "../../core/sr-io" } @@ -26,4 +28,6 @@ std = [ "srml-support/std", "system/std", "balances/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/executive/Cargo.toml b/srml/executive/Cargo.toml index 04f6526666ce1..912cf62121085 100644 --- a/srml/executive/Cargo.toml +++ b/srml/executive/Cargo.toml @@ -20,6 +20,8 @@ srml-indices = { path = "../indices" } balances = { package = "srml-balances", path = "../balances" } fees = { package = "srml-fees", path = "../fees" } parity-codec-derive = { version = "3.1" } +substrate-metadata = { path = "../../core/metadata" } +substrate-metadata-derive = { path = "../../core/metadata-derive" } [features] default = ["std"] diff --git a/srml/executive/src/lib.rs b/srml/executive/src/lib.rs index d00c2693ffafb..b4a34992c7559 100644 --- a/srml/executive/src/lib.rs +++ b/srml/executive/src/lib.rs @@ -287,6 +287,7 @@ mod tests { use system; use fees; use hex_literal::{hex, hex_impl}; + use substrate_metadata_derive::EncodeMetadata; impl_outer_origin! { pub enum Origin for Runtime { @@ -300,7 +301,7 @@ mod tests { } // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. - #[derive(Clone, Eq, PartialEq)] + #[derive(Clone, Eq, PartialEq, EncodeMetadata)] pub struct Runtime; impl system::Trait for Runtime { type Origin = Origin; diff --git a/srml/fees/Cargo.toml b/srml/fees/Cargo.toml index d29d77c7489ff..f46c17e83b250 100644 --- a/srml/fees/Cargo.toml +++ b/srml/fees/Cargo.toml @@ -15,6 +15,8 @@ runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = runtime_primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false } srml-support = { package = "srml-support", path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [features] default = ["std"] @@ -28,4 +30,6 @@ std = [ "runtime_primitives/std", "srml-support/std", "system/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/finality-tracker/Cargo.toml b/srml/finality-tracker/Cargo.toml index ac30f1e13dc64..cb17e5a5ef5da 100644 --- a/srml/finality-tracker/Cargo.toml +++ b/srml/finality-tracker/Cargo.toml @@ -14,6 +14,7 @@ rstd = { package = "sr-std", path = "../../core/sr-std", default-features = fals primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false } srml-support = { path = "../support", default-features = false } srml-system = { path = "../system", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } [dev-dependencies] substrate-primitives = { path = "../../core/primitives", default-features = false } @@ -32,4 +33,5 @@ std = [ "primitives/std", "srml-system/std", "inherents/std", + "substrate-metadata/std", ] diff --git a/srml/grandpa/Cargo.toml b/srml/grandpa/Cargo.toml index ac4ea857de063..edb5977880d7d 100644 --- a/srml/grandpa/Cargo.toml +++ b/srml/grandpa/Cargo.toml @@ -17,6 +17,8 @@ srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } session = { package = "srml-session", path = "../session", default-features = false } finality-tracker = { package = "srml-finality-tracker", path = "../finality-tracker", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] runtime_io = { package = "sr-io", path = "../../core/sr-io" } @@ -35,4 +37,6 @@ std = [ "system/std", "session/std", "finality-tracker/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/grandpa/src/lib.rs b/srml/grandpa/src/lib.rs index 37d2da66c0887..6c51ec99d683f 100644 --- a/srml/grandpa/src/lib.rs +++ b/srml/grandpa/src/lib.rs @@ -44,6 +44,7 @@ use primitives::traits::{CurrentHeight, Convert}; use substrate_primitives::Ed25519AuthorityId; use system::ensure_signed; use primitives::traits::MaybeSerializeDebug; +use substrate_metadata_derive::EncodeMetadata; mod mock; mod tests; @@ -70,7 +71,7 @@ pub trait GrandpaChangeSignal { /// A logs in this module. #[cfg_attr(feature = "std", derive(Serialize, Debug))] -#[derive(Encode, Decode, PartialEq, Eq, Clone)] +#[derive(Encode, Decode, PartialEq, Eq, Clone, EncodeMetadata)] pub enum RawLog { /// Authorities set change has been signalled. Contains the new set of authorities /// and the delay in blocks _to finalize_ before applying. @@ -148,7 +149,7 @@ pub struct OldStoredPendingChange { } /// A stored pending change. -#[derive(Encode)] +#[derive(Encode, EncodeMetadata)] pub struct StoredPendingChange { /// The block number this was scheduled at. pub scheduled_at: N, diff --git a/srml/grandpa/src/mock.rs b/srml/grandpa/src/mock.rs index 7c35141e17969..67377c52b40d9 100644 --- a/srml/grandpa/src/mock.rs +++ b/srml/grandpa/src/mock.rs @@ -25,6 +25,7 @@ use srml_support::{impl_outer_origin, impl_outer_event}; use substrate_primitives::{H256, Blake2Hasher}; use parity_codec::{Encode, Decode}; use crate::{GenesisConfig, Trait, Module, RawLog}; +use substrate_metadata_derive::EncodeMetadata; impl_outer_origin!{ pub enum Origin for Test {} @@ -37,7 +38,7 @@ impl From> for DigestItem { } // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. -#[derive(Clone, PartialEq, Eq, Debug, Decode, Encode)] +#[derive(Clone, PartialEq, Eq, Debug, Decode, Encode, EncodeMetadata)] pub struct Test; impl Trait for Test { type Log = DigestItem; diff --git a/srml/indices/Cargo.toml b/srml/indices/Cargo.toml index 399c7b1bd051f..e739a8b23fc59 100644 --- a/srml/indices/Cargo.toml +++ b/srml/indices/Cargo.toml @@ -17,6 +17,8 @@ primitives = { package = "sr-primitives", path = "../../core/sr-primitives", def srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } substrate-primitives = { path = "../../core/primitives", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] ref_thread_local = "0.0" @@ -35,4 +37,6 @@ std = [ "srml-support/std", "primitives/std", "system/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/indices/src/address.rs b/srml/indices/src/address.rs index fd8f0249dec96..93c9b370494d5 100644 --- a/srml/indices/src/address.rs +++ b/srml/indices/src/address.rs @@ -19,6 +19,7 @@ #[cfg(feature = "std")] use std::fmt; use crate::{Member, Decode, Encode, As, Input, Output}; +use substrate_metadata::{EncodeMetadata, MetadataName, MetadataRegistry, TypeMetadataKind}; /// An indices-aware address, which can be either a direct `AccountId` or /// an index. @@ -108,3 +109,15 @@ impl Default for Address where Address::Id(Default::default()) } } + +impl EncodeMetadata for Address where + AccountId: Member, + AccountIndex: Member, +{ + fn type_name() -> MetadataName { + MetadataName::Custom(module_path!().into(), "Address".into()) + } + fn type_metadata_kind(_registry: &mut MetadataRegistry) -> TypeMetadataKind { + TypeMetadataKind::Primitive + } +} diff --git a/srml/indices/src/lib.rs b/srml/indices/src/lib.rs index 76261796c8b78..568d254307fde 100644 --- a/srml/indices/src/lib.rs +++ b/srml/indices/src/lib.rs @@ -24,6 +24,7 @@ use parity_codec::{Encode, Decode, Codec, Input, Output}; use srml_support::{StorageValue, StorageMap, Parameter, decl_module, decl_event, decl_storage}; use primitives::traits::{One, SimpleArithmetic, As, StaticLookup, Member}; use system::{IsDeadAccount, OnNewAccount}; +use substrate_metadata::EncodeMetadata; use self::address::Address as RawAddress; @@ -39,7 +40,7 @@ pub type Address = RawAddress<::AccountId, :: /// Turn an Id into an Index, or None for the purpose of getting /// a hint at a possibly desired index. -pub trait ResolveHint> { +pub trait ResolveHint> { /// Turn an Id into an Index, or None for the purpose of getting /// a hint at a possibly desired index. fn resolve_hint(who: &AccountId) -> Option; @@ -47,7 +48,7 @@ pub trait ResolveHint> { /// Simple encode-based resolve hint implemenntation. pub struct SimpleResolveHint(PhantomData<(AccountId, AccountIndex)>); -impl> ResolveHint for SimpleResolveHint { +impl> ResolveHint for SimpleResolveHint { fn resolve_hint(who: &AccountId) -> Option { Some(AccountIndex::sa(who.using_encoded(|e| e[0] as usize + e[1] as usize * 256))) } diff --git a/srml/indices/src/mock.rs b/srml/indices/src/mock.rs index 80d3fa2c4fc9d..97da7ae4f847b 100644 --- a/srml/indices/src/mock.rs +++ b/srml/indices/src/mock.rs @@ -26,6 +26,7 @@ use substrate_primitives::{H256, Blake2Hasher}; use srml_support::impl_outer_origin; use {runtime_io, system}; use crate::{GenesisConfig, Module, Trait, IsDeadAccount, OnNewAccount, ResolveHint}; +use substrate_metadata_derive::EncodeMetadata; impl_outer_origin!{ pub enum Origin for Runtime {} @@ -63,7 +64,7 @@ impl ResolveHint for TestResolveHint { } // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. -#[derive(Clone, PartialEq, Eq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug, EncodeMetadata)] pub struct Runtime; impl system::Trait for Runtime { type Origin = Origin; diff --git a/srml/metadata/Cargo.toml b/srml/metadata/Cargo.toml index 1bbb8a77df76e..02d50fcd19c17 100644 --- a/srml/metadata/Cargo.toml +++ b/srml/metadata/Cargo.toml @@ -10,6 +10,7 @@ serde = { version = "1.0", optional = true } serde_derive = { version = "1.0", optional = true } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } [features] default = ["std"] @@ -18,5 +19,6 @@ std = [ "rstd/std", "primitives/std", "serde", - "serde_derive" + "serde_derive", + "substrate-metadata/std", ] diff --git a/srml/metadata/src/lib.rs b/srml/metadata/src/lib.rs index ec47b6ccc6a56..5cf389cf82de5 100644 --- a/srml/metadata/src/lib.rs +++ b/srml/metadata/src/lib.rs @@ -29,6 +29,8 @@ use parity_codec::{Decode, Input}; use parity_codec::{Encode, Output}; use rstd::vec::Vec; +use substrate_metadata::MetadataName; + #[cfg(feature = "std")] type StringBuf = String; @@ -120,12 +122,19 @@ type DecodeDifferentStr = DecodeDifferent<&'static str, StringBuf>; #[cfg(not(feature = "std"))] type DecodeDifferentStr = DecodeDifferent<&'static str, StringBuf>; +#[derive(Clone, PartialEq, Eq, Encode)] +#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] +pub struct TypeName { + pub type_name: MetadataName, + pub display_name: DecodeDifferentStr, +} + /// All the metadata about a function. #[derive(Clone, PartialEq, Eq, Encode)] #[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] pub struct FunctionMetadata { pub name: DecodeDifferentStr, - pub arguments: DecodeDifferentArray, + pub arguments: Vec, pub documentation: DecodeDifferentArray<&'static str, StringBuf>, } @@ -134,7 +143,7 @@ pub struct FunctionMetadata { #[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] pub struct FunctionArgumentMetadata { pub name: DecodeDifferentStr, - pub ty: DecodeDifferentStr, + pub ty: TypeName, } /// Newtype wrapper for support encoding functions (actual the result of the function). @@ -176,7 +185,7 @@ impl serde::Serialize for FnEncode { pub struct OuterEventMetadata { pub name: DecodeDifferentStr, pub events: DecodeDifferentArray< - (&'static str, FnEncode<&'static [EventMetadata]>), + (&'static str, FnEncode>), (StringBuf, Vec) >, } @@ -186,17 +195,10 @@ pub struct OuterEventMetadata { #[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] pub struct EventMetadata { pub name: DecodeDifferentStr, - pub arguments: DecodeDifferentArray<&'static str, StringBuf>, + pub arguments: Vec, pub documentation: DecodeDifferentArray<&'static str, StringBuf>, } -/// All the metadata about a storage. -#[derive(Clone, PartialEq, Eq, Encode)] -#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] -pub struct StorageMetadata { - pub functions: DecodeDifferentArray, -} - /// All the metadata about a storage function. #[derive(Clone, PartialEq, Eq, Encode)] #[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] @@ -257,10 +259,10 @@ impl std::fmt::Debug for DefaultByteGetter { #[derive(Clone, PartialEq, Eq, Encode)] #[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] pub enum StorageFunctionType { - Plain(DecodeDifferentStr), + Plain(TypeName), Map { - key: DecodeDifferentStr, - value: DecodeDifferentStr, + key: TypeName, + value: TypeName, } } @@ -302,7 +304,9 @@ pub enum RuntimeMetadata { /// Unused; enum filler. V0(RuntimeMetadataDeprecated), /// Version 1 for runtime metadata. - V1(RuntimeMetadataV1), + V1(RuntimeMetadataDeprecated), + /// Version 2 for runtime metadata with complete type information. + V2(RuntimeMetadataV2), } /// Enum that should fail. @@ -322,11 +326,17 @@ impl Decode for RuntimeMetadataDeprecated { } } -/// The metadata of a runtime version 1. +/// The metadata of a runtime version 2 with complete type information #[derive(Eq, Encode, PartialEq)] #[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))] -pub struct RuntimeMetadataV1 { - pub modules: DecodeDifferentArray, +pub struct RuntimeMetadataV2 { + /// Contains details of each runtime module + pub modules: Vec, + pub module_path: DecodeDifferentStr, + /// Contains all the type descriptions in all the runtime modules + pub type_registry: substrate_metadata::MetadataRegistry, + /// The block type been used, which should include the type description of header and extrinsic + pub block: MetadataName, } /// All metadata about an runtime module. @@ -340,7 +350,7 @@ pub struct ModuleMetadata { pub event: ODFnA, } -type ODFnA = Option, Vec>>; +type ODFnA = Option>, Vec>>; impl Into for RuntimeMetadataPrefixed { fn into(self) -> primitives::OpaqueMetadata { diff --git a/srml/session/Cargo.toml b/srml/session/Cargo.toml index 8412505d32965..32ce3c8e03976 100644 --- a/srml/session/Cargo.toml +++ b/srml/session/Cargo.toml @@ -16,6 +16,8 @@ srml-support = { path = "../support", default-features = false } consensus = { package = "srml-consensus", path = "../consensus", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] substrate-primitives = { path = "../../core/primitives" } @@ -33,5 +35,7 @@ std = [ "primitives/std", "consensus/std", "system/std", - "timestamp/std" + "timestamp/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/staking/Cargo.toml b/srml/staking/Cargo.toml index c548b3a2ef117..e788297293c0a 100644 --- a/srml/staking/Cargo.toml +++ b/srml/staking/Cargo.toml @@ -17,6 +17,8 @@ srml-support = { path = "../support", default-features = false } consensus = { package = "srml-consensus", path = "../consensus", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } session = { package = "srml-session", path = "../session", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] substrate-primitives = { path = "../../core/primitives" } @@ -36,4 +38,6 @@ std = [ "primitives/std", "session/std", "system/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/staking/src/lib.rs b/srml/staking/src/lib.rs index b96cb8bbf630a..40696b48acebf 100644 --- a/srml/staking/src/lib.rs +++ b/srml/staking/src/lib.rs @@ -34,6 +34,8 @@ use session::OnSessionChange; use primitives::Perbill; use primitives::traits::{Zero, One, As, StaticLookup, Saturating, Bounded}; use system::ensure_signed; +use substrate_metadata_derive::EncodeMetadata; + mod mock; mod tests; @@ -44,7 +46,7 @@ const MAX_NOMINATIONS: usize = 16; const MAX_UNSTAKE_THRESHOLD: u32 = 10; /// A destination account for payment. -#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Copy, Clone, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub enum RewardDestination { /// Pay into the stash account, increasing the amount at stake accordingly. @@ -62,7 +64,7 @@ impl Default for RewardDestination { } /// Preference of what happens on a slash event. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct ValidatorPrefs { /// Validator should ensure this many more slashes than is necessary before being unstaked. @@ -83,7 +85,7 @@ impl Default for ValidatorPrefs { } /// Just a Balance/BlockNumber tuple to encode when a chunk of funds will be unlocked. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct UnlockChunk { /// Amount of funds to be unlocked. @@ -95,7 +97,7 @@ pub struct UnlockChunk { } /// The ledger of a (bonded) stash. -#[derive(PartialEq, Eq, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct StakingLedger { /// The stash account whose balance is actually locked and at stake. @@ -135,7 +137,7 @@ impl< } /// The amount of exposure (to slashing) than an individual nominator has. -#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode)] +#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct IndividualExposure { /// Which nominator. @@ -146,7 +148,7 @@ pub struct IndividualExposure { } /// A snapshot of the stake backing a single validator in the system. -#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Default)] +#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Default, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct Exposure { /// The total balance backing this validator. @@ -211,12 +213,12 @@ decl_storage! { pub Payee get(payee): map T::AccountId => RewardDestination; /// The set of keys are all controllers that want to validate. - /// + /// /// The values are the preferences that a validator has. pub Validators get(validators): linked_map T::AccountId => ValidatorPrefs>; /// The set of keys are all controllers that want to nominate. - /// + /// /// The value are the nominations. pub Nominators get(nominators): linked_map T::AccountId => Vec; @@ -227,7 +229,7 @@ decl_storage! { // The historical validators and their nominations for a given era. Stored as a trie root of the mapping // `T::AccountId` => `Exposure>`, which is just the contents of `Stakers`, // under a key that is the `era`. - // + // // Every era change, this will be appended with the trie root of the contents of `Stakers`, and the oldest // entry removed down to a specific number of entries (probably around 90 for a 3 month history). // pub HistoricalStakers get(historical_stakers): map T::BlockNumber => Option; @@ -276,7 +278,7 @@ decl_storage! { >::select_validators(); }); }); - } + } } decl_module! { @@ -307,9 +309,9 @@ decl_module! { /// Add some extra amount that have appeared in the stash `free_balance` into the balance up for /// staking. - /// + /// /// Use this if there are additional funds in your stash account that you wish to bond. - /// + /// /// NOTE: This call must be made by the controller, not the stash. fn bond_extra(origin, max_additional: BalanceOf) { let controller = ensure_signed(origin)?; @@ -325,14 +327,14 @@ decl_module! { } /// Schedule a portion of the stash to be unlocked ready for transfer out after the bond - /// period ends. If this leaves an amount actively bonded less than + /// period ends. If this leaves an amount actively bonded less than /// T::Currency::existential_deposit(), then it is increased to the full amount. - /// + /// /// Once the unlock period is done, you can call `withdraw_unbonded` to actually move - /// the funds out of management ready for transfer. - /// + /// the funds out of management ready for transfer. + /// /// NOTE: This call must be made by the controller, not the stash. - /// + /// /// See also `withdraw_unbonded`. fn unbond(origin, #[compact] value: BalanceOf) { let controller = ensure_signed(origin)?; @@ -357,12 +359,12 @@ decl_module! { } /// Remove any unlocked chunks from the `unlocking` queue from our management. - /// + /// /// This essentially frees up that balance to be used by the stash account to do /// whatever it wants. - /// + /// /// NOTE: This call must be made by the controller, not the stash. - /// + /// /// See also `unbond`. fn withdraw_unbonded(origin) { let controller = ensure_signed(origin)?; @@ -374,7 +376,7 @@ decl_module! { /// Declare the desire to validate for the origin controller. /// /// Effects will be felt at the beginning of the next era. - /// + /// /// NOTE: This call must be made by the controller, not the stash. fn validate(origin, prefs: ValidatorPrefs>) { let controller = ensure_signed(origin)?; @@ -387,7 +389,7 @@ decl_module! { /// Declare the desire to nominate `targets` for the origin controller. /// /// Effects will be felt at the beginning of the next era. - /// + /// /// NOTE: This call must be made by the controller, not the stash. fn nominate(origin, targets: Vec<::Source>) { let controller = ensure_signed(origin)?; @@ -405,7 +407,7 @@ decl_module! { /// Declare no desire to either validate or nominate. /// /// Effects will be felt at the beginning of the next era. - /// + /// /// NOTE: This call must be made by the controller, not the stash. fn chill(origin) { let controller = ensure_signed(origin)?; @@ -417,7 +419,7 @@ decl_module! { /// (Re-)set the payment target for a controller. /// /// Effects will be felt at the beginning of the next era. - /// + /// /// NOTE: This call must be made by the controller, not the stash. fn set_payee(origin, payee: RewardDestination) { let controller = ensure_signed(origin)?; @@ -548,7 +550,7 @@ impl Module { let _ = T::Currency::reward(&l.stash, amount); Self::update_ledger(who, l); }, - } + } } /// Reward a given validator by a specific amount. Add the reward to their, and their nominators' @@ -639,7 +641,7 @@ impl Module { /// @returns the new SlotStake value. fn select_validators() -> BalanceOf { // Map of (would-be) validator account to amount of stake backing it. - + // First, we pull all validators, together with their stash balance into a Vec (cpu=O(V), mem=O(V)) let mut candidates = >::enumerate() .map(|(who, _)| { @@ -763,7 +765,7 @@ impl Module { let _ = Self::slash_validator(&v, slash); >::remove(&v); let _ = Self::apply_force_new_era(false); - + RawEvent::OfflineSlash(v.clone(), slash) } else { RawEvent::OfflineWarning(v.clone(), slash_count) diff --git a/srml/sudo/Cargo.toml b/srml/sudo/Cargo.toml index 8473d2fb44fe3..9f1f5c722b95a 100644 --- a/srml/sudo/Cargo.toml +++ b/srml/sudo/Cargo.toml @@ -14,6 +14,8 @@ sr-primitives = { path = "../../core/sr-primitives", default-features = false } srml-support = { path = "../support", default-features = false } srml-support-procedural = { path = "../support/procedural" } system = { package = "srml-system", path = "../system", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] sr-io = { path = "../../core/sr-io", default-features = false } @@ -29,4 +31,6 @@ std = [ "sr-primitives/std", "srml-support/std", "system/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/support/Cargo.toml b/srml/support/Cargo.toml index 2cc4cfa0c8327..fbf2f76d73260 100644 --- a/srml/support/Cargo.toml +++ b/srml/support/Cargo.toml @@ -18,6 +18,8 @@ srml-support-procedural = { path = "./procedural" } paste = "0.1" once_cell = { version = "0.1.6", default-features = false, optional = true } bitmask = { git = "https://github.com/paritytech/bitmask", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] pretty_assertions = "0.5.1" @@ -36,6 +38,8 @@ std = [ "sr-primitives/std", "srml-metadata/std", "inherents/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] nightly = [] strict = [] diff --git a/srml/support/procedural/src/storage/transformation.rs b/srml/support/procedural/src/storage/transformation.rs index c152ceff25ba3..4814622eef705 100644 --- a/srml/support/procedural/src/storage/transformation.rs +++ b/srml/support/procedural/src/storage/transformation.rs @@ -111,7 +111,7 @@ pub fn decl_storage_impl(input: TokenStream) -> TokenStream { &traitinstance, &storage_lines, ); - let (store_default_struct, store_functions_to_metadata) = store_functions_to_metadata( + let (store_default_struct, store_functions_to_metadata, register_type_metadata) = store_functions_to_metadata( &scrate, &traitinstance, &traittype, @@ -130,18 +130,16 @@ pub fn decl_storage_impl(input: TokenStream) -> TokenStream { } impl<#traitinstance: 'static + #traittype> #module_ident<#traitinstance> { #impl_store_fns - pub fn store_metadata() -> #scrate::storage::generator::StorageMetadata { - #scrate::storage::generator::StorageMetadata { - functions: #scrate::storage::generator::DecodeDifferent::Encode(#store_functions_to_metadata) , - } - } - pub fn store_metadata_functions() -> &'static [#scrate::storage::generator::StorageFunctionMetadata] { + pub fn store_metadata_functions() -> #scrate::rstd::vec::Vec<#scrate::storage::generator::StorageFunctionMetadata> { + use #scrate::rstd::prelude::*; #store_functions_to_metadata } pub fn store_metadata_name() -> &'static str { #cratename_string } - + pub fn store_metadata_register(registry: &mut #scrate::substrate_metadata::MetadataRegistry) { + #register_type_metadata + } } #extra_genesis @@ -528,10 +526,11 @@ fn store_functions_to_metadata ( traitinstance: &Ident, traittype: &syn::TypeParamBound, storage_lines: &ext::Punctuated, -) -> (TokenStream2, TokenStream2) { +) -> (TokenStream2, TokenStream2, TokenStream2) { let mut items = TokenStream2::new(); let mut default_getter_struct_def = TokenStream2::new(); + let mut register_type_metadata = TokenStream2::new(); for sline in storage_lines.inner.iter() { let DeclStorageLine { attrs, @@ -546,24 +545,43 @@ fn store_functions_to_metadata ( let typ = type_infos.typ; let styp = clean_type_string(&typ.to_string()); - let stype = match type_infos.kind { - DeclStorageTypeInfosKind::Simple => { + let (stype, reg_type) = match type_infos.kind { + DeclStorageTypeInfosKind::Simple => ( quote!{ #scrate::storage::generator::StorageFunctionType::Plain( - #scrate::storage::generator::DecodeDifferent::Encode(#styp), + #scrate::storage::generator::TypeName { + type_name: <#typ as #scrate::substrate_metadata::EncodeMetadata>::type_name(), + display_name: #scrate::storage::generator::DecodeDifferent::Encode(#styp), + } ) - } - }, - DeclStorageTypeInfosKind::Map { key_type, .. } => { - let kty = clean_type_string("e!(#key_type).to_string()); + }, quote!{ - #scrate::storage::generator::StorageFunctionType::Map { - key: #scrate::storage::generator::DecodeDifferent::Encode(#kty), - value: #scrate::storage::generator::DecodeDifferent::Encode(#styp), + <#typ as #scrate::substrate_metadata::EncodeMetadata>::register_type_metadata(registry); + } + ), + DeclStorageTypeInfosKind::Map { key_type, .. } => ( + { + let kty = clean_type_string("e!(#key_type).to_string()); + quote!{ + #scrate::storage::generator::StorageFunctionType::Map { + key: #scrate::storage::generator::TypeName { + type_name: <#key_type as #scrate::substrate_metadata::EncodeMetadata>::type_name(), + display_name: #scrate::storage::generator::DecodeDifferent::Encode(#kty), + }, + value: #scrate::storage::generator::TypeName { + type_name: <#typ as #scrate::substrate_metadata::EncodeMetadata>::type_name(), + display_name: #scrate::storage::generator::DecodeDifferent::Encode(#styp), + }, + } } + }, + quote!{ + <#key_type as #scrate::substrate_metadata::EncodeMetadata>::register_type_metadata(registry); + <#typ as #scrate::substrate_metadata::EncodeMetadata>::register_type_metadata(registry); } - }, + ), }; + register_type_metadata.extend(reg_type); let modifier = if type_infos.is_option { quote!{ #scrate::storage::generator::StorageFunctionModifier::Optional @@ -633,13 +651,17 @@ fn store_functions_to_metadata ( }; default_getter_struct_def.extend(def_get); } - (default_getter_struct_def, quote!{ - { - &[ - #items - ] - } - }) + ( + default_getter_struct_def, + quote!{ + { + vec![ + #items + ] + } + }, + register_type_metadata + ) } diff --git a/srml/support/src/dispatch.rs b/srml/support/src/dispatch.rs index 26ac2cdc2342b..2ee50907c478f 100644 --- a/srml/support/src/dispatch.rs +++ b/srml/support/src/dispatch.rs @@ -21,10 +21,10 @@ pub use crate::rstd::prelude::{Vec, Clone, Eq, PartialEq}; #[cfg(feature = "std")] pub use std::fmt; pub use crate::rstd::result; -pub use crate::codec::{Codec, Decode, Encode, Input, Output, HasCompact, EncodeAsRef}; +pub use crate::codec::{Codec, Decode, Encode, Input, Output, HasCompact, EncodeAsRef, Compact}; pub use srml_metadata::{ FunctionMetadata, DecodeDifferent, DecodeDifferentArray, - FunctionArgumentMetadata, OuterDispatchMetadata, OuterDispatchCall + FunctionArgumentMetadata, OuterDispatchMetadata, OuterDispatchCall, TypeName }; /// Result of a module function call; either nothing (functions are only called for "side efeects") @@ -53,16 +53,16 @@ pub trait Callable { pub type CallableCallFor = ::Call; #[cfg(feature = "std")] -pub trait Parameter: Codec + Clone + Eq + fmt::Debug {} +pub trait Parameter: Codec + Clone + Eq + substrate_metadata::EncodeMetadata + fmt::Debug {} #[cfg(feature = "std")] -impl Parameter for T where T: Codec + Clone + Eq + fmt::Debug {} +impl Parameter for T where T: Codec + Clone + Eq + substrate_metadata::EncodeMetadata + fmt::Debug {} #[cfg(not(feature = "std"))] -pub trait Parameter: Codec + Clone + Eq {} +pub trait Parameter: Codec + Clone + Eq + substrate_metadata::EncodeMetadata {} #[cfg(not(feature = "std"))] -impl Parameter for T where T: Codec + Clone + Eq {} +impl Parameter for T where T: Codec + Clone + Eq + substrate_metadata::EncodeMetadata {} /// Declare a module struct and implement the dispatch logic. /// @@ -574,6 +574,16 @@ macro_rules! decl_module { #[cfg(not(feature = "std"))] pub struct $mod_type<$trait_instance: $trait_name>(::core::marker::PhantomData<$trait_instance>); + impl<$trait_instance: $trait_name> $crate::substrate_metadata::EncodeMetadata for $mod_type<$trait_instance> { + fn type_name() -> $crate::substrate_metadata::MetadataName { + $crate::substrate_metadata::MetadataName::Custom(module_path!().into(), stringify!($mod_type).into()) + } + + fn type_metadata_kind(_registry: &mut $crate::substrate_metadata::MetadataRegistry) -> $crate::substrate_metadata::TypeMetadataKind { + $crate::substrate_metadata::TypeMetadataKind::Struct($crate::rstd::vec::Vec::new()) + } + } + decl_module! { @impl_on_initialise $mod_type<$trait_instance: $trait_name>; @@ -607,6 +617,7 @@ macro_rules! decl_module { #[cfg(feature = "std")] $(#[$attr])* + #[derive($crate::substrate_metadata_derive::EncodeMetadata)] pub enum $call_type<$trait_instance: $trait_name> { __PhantomItem(::std::marker::PhantomData<$trait_instance>), __OtherPhantomItem(::std::marker::PhantomData<$trait_instance>), @@ -618,6 +629,7 @@ macro_rules! decl_module { #[cfg(not(feature = "std"))] $(#[$attr])* + #[derive($crate::substrate_metadata_derive::EncodeMetadata)] pub enum $call_type<$trait_instance: $trait_name> { __PhantomItem(::core::marker::PhantomData<$trait_instance>), __OtherPhantomItem(::core::marker::PhantomData<$trait_instance>), @@ -899,6 +911,31 @@ macro_rules! impl_outer_dispatch { } } } + impl $crate::substrate_metadata::EncodeMetadata for $call_type { + fn type_name() -> $crate::substrate_metadata::MetadataName { + $crate::substrate_metadata::MetadataName::Custom(module_path!().into(), stringify!($call_type).into()) + } + + #[allow(unused_variables)] + fn type_metadata_kind(registry: &mut $crate::substrate_metadata::MetadataRegistry) -> $crate::substrate_metadata::TypeMetadataKind { + let mut idx: u16 = 0; + $crate::substrate_metadata::TypeMetadataKind::Enum($crate::_vec![ + $({ + let type_name = <$camelcase as $crate::substrate_metadata::EncodeMetadata>::type_name(); + registry.register(type_name.clone(), <$camelcase as $crate::substrate_metadata::EncodeMetadata>::type_metadata_kind); + idx += 1; + $crate::substrate_metadata::EnumVariantMetadata { + name: stringify!($camelcase).into(), + index: idx - 1, + fields: $crate::_vec![$crate::substrate_metadata::FieldMetadata { + name: $crate::substrate_metadata::FieldName::Unnamed(0), + ty: type_name, + }] + } + }),* + ]) + } + } $( impl $crate::dispatch::IsSubType<$camelcase> for $call_type { fn is_aux_sub_type(&self) -> Option<&<$camelcase as $crate::dispatch::Callable>::Call> { @@ -944,9 +981,13 @@ macro_rules! __dispatch_impl_metadata { $($rest:tt)* ) => { impl<$trait_instance: $trait_name> $mod_type<$trait_instance> { - pub fn call_functions() -> &'static [$crate::dispatch::FunctionMetadata] { + pub fn call_functions() -> $crate::rstd::vec::Vec<$crate::dispatch::FunctionMetadata> { $crate::__call_to_functions!($($rest)*) } + #[allow(unused_variables)] + pub fn call_metadata_register(registry: &mut $crate::substrate_metadata::MetadataRegistry) { + $crate::__call_metadata_register!(registry; $($rest)*); + } } } } @@ -1003,7 +1044,7 @@ macro_rules! __functions_to_metadata{ $origin_type:ty; $( $function_metadata:expr ),*; ) => { - &[ $( $function_metadata ),* ] + $crate::_vec![ $( $function_metadata ),* ] } } @@ -1020,29 +1061,49 @@ macro_rules! __function_to_metadata { ) => { $crate::dispatch::FunctionMetadata { name: $crate::dispatch::DecodeDifferent::Encode(stringify!($fn_name)), - arguments: $crate::dispatch::DecodeDifferent::Encode(&[ + arguments: $crate::_vec![ $( $crate::dispatch::FunctionArgumentMetadata { name: $crate::dispatch::DecodeDifferent::Encode(stringify!($param_name)), - ty: $crate::dispatch::DecodeDifferent::Encode( - $crate::__function_to_metadata!(@stringify_expand_attr + ty: $crate::dispatch::TypeName { + type_name: $crate::__function_to_metadata!(@get_type_name $(#[$codec_attr])* $param_name: $param - ) - ), + ), + display_name: $crate::dispatch::DecodeDifferent::Encode( + $crate::__function_to_metadata!(@stringify_expand_attr + $(#[$codec_attr])* $param_name: $param + ) + ), + }, } ),* - ]), + ], documentation: $crate::dispatch::DecodeDifferent::Encode(&[ $( $fn_doc ),* ]), } }; + (@get_type_name #[compact] $param_name:ident : $param:ty) => { + <$crate::dispatch::Compact<$param> as $crate::substrate_metadata::EncodeMetadata>::type_name() + }; + + (@get_type_name $param_name:ident : $param:ty) => { + <$param as $crate::substrate_metadata::EncodeMetadata>::type_name() + }; + + (@get_type_name $(#[codec_attr:ident])* $param_name:ident : $param:ty) => { + compile_error!(concat!( + "Invalid attribute for parameter `", stringify!($param_name), + "`, the following attributes are supported: `#[compact]`" + )) + }; + (@stringify_expand_attr #[compact] $param_name:ident : $param:ty) => { concat!("Compact<", stringify!($param), ">") }; (@stringify_expand_attr $param_name:ident : $param:ty) => { stringify!($param) }; - (@stringify_expand_attr $(#[codec_attr:ident])* $param_name:ident : $param:ty) => { + (@stringify_expand_attr $(#[codec_attr:ident])* $param_name:ident : $param:ty) => { compile_error!(concat!( "Invalid attribute for parameter `", stringify!($param_name), "`, the following attributes are supported: `#[compact]`" @@ -1050,16 +1111,89 @@ macro_rules! __function_to_metadata { } } +#[macro_export] +#[doc(hidden)] +macro_rules! __call_metadata_register { + ( + $registry:ident; + $call_type:ident $origin_type:ty + {$( + $(#[doc = $doc_attr:tt])* + fn $fn_name:ident($from:ident + $( + , $(#[$codec_attr:ident])* $param_name:ident : $param:ty + )* + ); + )*} + ) => { + $crate::__call_metadata_register_fn!( + $registry; + ; + $( $( $param ),* ; )* + ) + }; +} + +#[macro_export] +#[doc(hidden)] +macro_rules! __call_metadata_register_fn { + ( + $registry:ident; + $( $function_metadata:expr ),*; + $( + $param:ty + ),* + ; + $( $rest:tt )* + ) => { + + $crate::__call_metadata_register_fn!( + $registry; + $( $function_metadata, )* $crate::__call_metadata_register_expand!($registry; + $( $param ),* + ); + $($rest)* + ) + }; + ( + $registry:ident; + $( $function_metadata:expr ),*; + ) => { + { + $( $function_metadata );* + } + }; +} + +#[macro_export] +#[doc(hidden)] +macro_rules! __call_metadata_register_expand { + ( + $registry:ident; + $( $param:ty ),* + ) => { + { + $( + $registry.register( + <$param as $crate::substrate_metadata::EncodeMetadata>::type_name(), + <$param as $crate::substrate_metadata::EncodeMetadata>::type_metadata_kind + ) + );* + } + }; +} #[cfg(test)] // Do not complain about unused `dispatch` and `dispatch_aux`. #[allow(dead_code)] mod tests { use super::*; use crate::runtime_primitives::traits::{OnInitialise, OnFinalise}; + use substrate_metadata::*; + use substrate_metadata_derive::EncodeMetadata; pub trait Trait { type Origin; - type BlockNumber: Into; + type BlockNumber: Into + EncodeMetadata; } pub mod system { @@ -1084,55 +1218,7 @@ mod tests { } } - const EXPECTED_METADATA: &'static [FunctionMetadata] = &[ - FunctionMetadata { - name: DecodeDifferent::Encode("aux_0"), - arguments: DecodeDifferent::Encode(&[]), - documentation: DecodeDifferent::Encode(&[ - " Hi, this is a comment." - ]) - }, - FunctionMetadata { - name: DecodeDifferent::Encode("aux_1"), - arguments: DecodeDifferent::Encode(&[ - FunctionArgumentMetadata { - name: DecodeDifferent::Encode("_data"), - ty: DecodeDifferent::Encode("Compact") - } - ]), - documentation: DecodeDifferent::Encode(&[]), - }, - FunctionMetadata { - name: DecodeDifferent::Encode("aux_2"), - arguments: DecodeDifferent::Encode(&[ - FunctionArgumentMetadata { - name: DecodeDifferent::Encode("_data"), - ty: DecodeDifferent::Encode("i32"), - }, - FunctionArgumentMetadata { - name: DecodeDifferent::Encode("_data2"), - ty: DecodeDifferent::Encode("String"), - } - ]), - documentation: DecodeDifferent::Encode(&[]), - }, - FunctionMetadata { - name: DecodeDifferent::Encode("aux_3"), - arguments: DecodeDifferent::Encode(&[]), - documentation: DecodeDifferent::Encode(&[]), - }, - FunctionMetadata { - name: DecodeDifferent::Encode("aux_4"), - arguments: DecodeDifferent::Encode(&[ - FunctionArgumentMetadata { - name: DecodeDifferent::Encode("_data"), - ty: DecodeDifferent::Encode("i32"), - } - ]), - documentation: DecodeDifferent::Encode(&[]), - } - ]; - + #[derive(EncodeMetadata)] struct TraitImpl {} impl Trait for TraitImpl { @@ -1142,8 +1228,69 @@ mod tests { #[test] fn module_json_metadata() { + let expected = vec![ + FunctionMetadata { + name: DecodeDifferent::Encode("aux_0"), + arguments: Vec::new(), + documentation: DecodeDifferent::Encode(&[ + " Hi, this is a comment." + ]) + }, + FunctionMetadata { + name: DecodeDifferent::Encode("aux_1"), + arguments: vec![ + FunctionArgumentMetadata { + name: DecodeDifferent::Encode("_data"), + ty: TypeName { + display_name: DecodeDifferent::Encode("Compact"), + type_name: MetadataName::Compact(Box::new(MetadataName::U32)), + }, + }, + ], + documentation: DecodeDifferent::Encode(&[]), + }, + FunctionMetadata { + name: DecodeDifferent::Encode("aux_2"), + arguments: vec![ + FunctionArgumentMetadata { + name: DecodeDifferent::Encode("_data"), + ty: TypeName { + display_name: DecodeDifferent::Encode("i32"), + type_name: MetadataName::I32, + }, + }, + FunctionArgumentMetadata { + name: DecodeDifferent::Encode("_data2"), + ty: TypeName { + display_name: DecodeDifferent::Encode("String"), + type_name: MetadataName::Str, + }, + } + ], + documentation: DecodeDifferent::Encode(&[]), + }, + FunctionMetadata { + name: DecodeDifferent::Encode("aux_3"), + arguments: Vec::new(), + documentation: DecodeDifferent::Encode(&[]), + }, + FunctionMetadata { + name: DecodeDifferent::Encode("aux_4"), + arguments: vec![ + FunctionArgumentMetadata { + name: DecodeDifferent::Encode("_data"), + ty: TypeName { + display_name: DecodeDifferent::Encode("i32"), + type_name: MetadataName::I32, + }, + } + ], + documentation: DecodeDifferent::Encode(&[]), + } + ]; + let metadata = Module::::call_functions(); - assert_eq!(EXPECTED_METADATA, metadata); + assert_eq!(expected, metadata); } #[test] diff --git a/srml/support/src/event.rs b/srml/support/src/event.rs index 50c2947814821..dad37bf4af246 100644 --- a/srml/support/src/event.rs +++ b/srml/support/src/event.rs @@ -17,7 +17,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEncode}; +pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEncode, TypeName}; /// Implement the `Event` for a module. /// @@ -110,7 +110,7 @@ macro_rules! decl_event { } ) => { // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. - #[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode)] + #[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode, $crate::substrate_metadata_derive::EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] $(#[$attr])* pub enum Event { @@ -123,7 +123,7 @@ macro_rules! decl_event { } impl Event { #[allow(dead_code)] - pub fn metadata() -> &'static [ $crate::event::EventMetadata ] { + pub fn metadata() -> $crate::rstd::vec::Vec<$crate::event::EventMetadata> { $crate::__events_to_metadata!(; $( $events )* ) } } @@ -229,7 +229,7 @@ macro_rules! __decl_generic_event { ) => { pub type Event<$event_generic_param> = RawEvent<$( $generic_type ),*>; // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. - #[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode)] + #[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode, $crate::substrate_metadata_derive::EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] $(#[$attr])* pub enum RawEvent<$( $generic_param ),*> { @@ -240,9 +240,9 @@ macro_rules! __decl_generic_event { impl<$( $generic_param ),*> From> for () { fn from(_: RawEvent<$( $generic_param ),*>) -> () { () } } - impl<$( $generic_param ),*> RawEvent<$( $generic_param ),*> { + impl<$( $generic_param: $crate::substrate_metadata::EncodeMetadata),*> RawEvent<$( $generic_param ),*> { #[allow(dead_code)] - pub fn metadata() -> &'static [$crate::event::EventMetadata] { + pub fn metadata() -> $crate::rstd::vec::Vec<$crate::event::EventMetadata> { $crate::__events_to_metadata!(; $( $events )* ) } } @@ -265,9 +265,12 @@ macro_rules! __events_to_metadata { $( $metadata, )* $crate::event::EventMetadata { name: $crate::event::DecodeDifferent::Encode(stringify!($event)), - arguments: $crate::event::DecodeDifferent::Encode(&[ - $( $( stringify!($param) ),* )* - ]), + arguments: $crate::_vec![ + $( $( $crate::event::TypeName { + type_name: <$param as $crate::substrate_metadata::EncodeMetadata>::type_name(), + display_name: $crate::event::DecodeDifferent::Encode(stringify!($param)), + } ),* )* + ], documentation: $crate::event::DecodeDifferent::Encode(&[ $( $doc_attr ),* ]), @@ -278,7 +281,7 @@ macro_rules! __events_to_metadata { ( $( $metadata:expr ),*; ) => { - &[ $( $metadata ),* ] + $crate::_vec![ $( $metadata ),* ] } } @@ -372,7 +375,7 @@ macro_rules! impl_outer_event { $( $module_name:ident::Event $( <$generic_param:ident> )*, )*; ) => { // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. - #[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode)] + #[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode, $crate::substrate_metadata_derive::EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] $(#[$attr])* #[allow(non_camel_case_types)] @@ -431,13 +434,13 @@ macro_rules! __impl_outer_event_json_metadata { } } #[allow(dead_code)] - pub fn __module_events_system() -> &'static [$crate::event::EventMetadata] { + pub fn __module_events_system() -> $crate::rstd::vec::Vec<$crate::event::EventMetadata> { system::Event::metadata() } $( #[allow(dead_code)] $crate::paste::item!{ - pub fn [< __module_events_ $module_name >] () -> &'static [$crate::event::EventMetadata] { + pub fn [< __module_events_ $module_name >] () -> $crate::rstd::vec::Vec<$crate::event::EventMetadata> { $module_name::Event $( ::<$generic_param> )* ::metadata() } } @@ -452,6 +455,8 @@ mod tests { use super::*; use serde_derive::Serialize; use parity_codec::{Encode, Decode}; + use substrate_metadata::MetadataName; + use substrate_metadata_derive::EncodeMetadata; mod system { pub trait Trait { @@ -541,7 +546,7 @@ mod tests { ); } - #[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, Serialize)] + #[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, Serialize, EncodeMetadata)] pub struct TestRuntime; impl_outer_event! { @@ -552,7 +557,7 @@ mod tests { } } - #[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, Serialize)] + #[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, Serialize, EncodeMetadata)] pub struct TestRuntime2; impl_outer_event! { @@ -565,13 +570,13 @@ mod tests { impl event_module::Trait for TestRuntime { type Origin = u32; - type Balance = u32; + type Balance = u64; type BlockNumber = u32; } impl event_module2::Trait for TestRuntime { type Origin = u32; - type Balance = u32; + type Balance = u64; type BlockNumber = u32; } @@ -582,13 +587,13 @@ mod tests { impl event_module::Trait for TestRuntime2 { type Origin = u32; - type Balance = u32; + type Balance = u64; type BlockNumber = u32; } impl event_module2::Trait for TestRuntime2 { type Origin = u32; - type Balance = u32; + type Balance = u64; type BlockNumber = u32; } @@ -602,50 +607,57 @@ mod tests { events: DecodeDifferent::Encode(&[ ( "system", - FnEncode(|| &[ + FnEncode(|| vec![ EventMetadata { name: DecodeDifferent::Encode("SystemEvent"), - arguments: DecodeDifferent::Encode(&[]), + arguments: Vec::new(), documentation: DecodeDifferent::Encode(&[]), } ]) ), ( "event_module", - FnEncode(|| &[ + FnEncode(|| vec![ EventMetadata { name: DecodeDifferent::Encode("TestEvent"), - arguments: DecodeDifferent::Encode(&[ "Balance", "Origin" ]), + arguments: vec![ + TypeName { display_name: DecodeDifferent::Encode("Balance"), type_name: MetadataName::U64 }, + TypeName { display_name: DecodeDifferent::Encode("Origin"), type_name: MetadataName::U32 }, + ], documentation: DecodeDifferent::Encode(&[ " Hi, I am a comment." ]) }, EventMetadata { name: DecodeDifferent::Encode("EventWithoutParams"), - arguments: DecodeDifferent::Encode(&[]), + arguments: Vec::new(), documentation: DecodeDifferent::Encode(&[ " Dog" ]), }, ]) ), ( "event_module2", - FnEncode(|| &[ + FnEncode(|| vec![ EventMetadata { name: DecodeDifferent::Encode("TestEvent"), - arguments: DecodeDifferent::Encode(&[ "BalanceRenamed" ]), + arguments: vec![ + TypeName { display_name: DecodeDifferent::Encode("BalanceRenamed"), type_name: MetadataName::U64 }, + ], documentation: DecodeDifferent::Encode(&[]) }, EventMetadata { name: DecodeDifferent::Encode("TestOrigin"), - arguments: DecodeDifferent::Encode(&[ "OriginRenamed" ]), + arguments: vec![ + TypeName { display_name: DecodeDifferent::Encode("OriginRenamed"), type_name: MetadataName::U32 }, + ], documentation: DecodeDifferent::Encode(&[]), }, ]) ), ( "event_module3", - FnEncode(|| &[ + FnEncode(|| vec![ EventMetadata { name: DecodeDifferent::Encode("HiEvent"), - arguments: DecodeDifferent::Encode(&[]), + arguments: Vec::new(), documentation: DecodeDifferent::Encode(&[]) } ]) diff --git a/srml/support/src/lib.rs b/srml/support/src/lib.rs index 7914e7d67793a..0dc68bf587b89 100644 --- a/srml/support/src/lib.rs +++ b/srml/support/src/lib.rs @@ -28,6 +28,10 @@ pub use serde; pub use sr_std as rstd; #[doc(hidden)] pub use parity_codec as codec; +#[doc(hidden)] +pub use substrate_metadata; +#[doc(hidden)] +pub use substrate_metadata_derive; #[cfg(feature = "std")] #[doc(hidden)] pub use once_cell; @@ -134,6 +138,20 @@ macro_rules! for_each_tuple { } } +#[macro_export] +#[doc(hidden)] +macro_rules! _vec { + ( $( $x:expr ),* ) => { + { + #[allow(unused_mut)] + let mut temp_vec = $crate::rstd::vec::Vec::new(); + $( + temp_vec.push($x); + )* + temp_vec + } + }; +} #[cfg(test)] mod tests { use super::*; @@ -142,7 +160,7 @@ mod tests { use runtime_primitives::BuildStorage; pub trait Trait { - type BlockNumber: Codec + Default; + type BlockNumber: Codec + Default + substrate_metadata::EncodeMetadata; type Origin; } diff --git a/srml/support/src/metadata.rs b/srml/support/src/metadata.rs index 1a919e36f8170..9a0a0e48e30a4 100644 --- a/srml/support/src/metadata.rs +++ b/srml/support/src/metadata.rs @@ -16,7 +16,7 @@ pub use srml_metadata::{ DecodeDifferent, FnEncode, RuntimeMetadata, - ModuleMetadata, RuntimeMetadataV1, + ModuleMetadata, RuntimeMetadataV2, DefaultByteGetter, RuntimeMetadataPrefixed, }; @@ -24,21 +24,31 @@ pub use srml_metadata::{ /// /// Example: /// ```compile_fail -/// impl_runtime_metadata!(for RUNTIME_NAME with modules MODULE0, MODULE2, MODULE3 with Storage); +/// impl_runtime_metadata!(for RUNTIME_NAME, BLOCK_NAME with modules MODULE0, MODULE2, MODULE3 with Storage); /// ``` /// /// In this example, just `MODULE3` implements the `Storage` trait. #[macro_export] macro_rules! impl_runtime_metadata { ( - for $runtime:ident with modules + for $runtime:ident, $block:ident with modules $( $rest:tt )* ) => { impl $runtime { pub fn metadata() -> $crate::metadata::RuntimeMetadataPrefixed { - $crate::metadata::RuntimeMetadata::V1 ( - $crate::metadata::RuntimeMetadataV1 { - modules: $crate::__runtime_modules_to_metadata!($runtime;; $( $rest )*), + let mut registry = $crate::substrate_metadata::MetadataRegistry::new(); + let block_type_name = < + $block as $crate::substrate_metadata::EncodeMetadata + >::type_name(); + registry.register(block_type_name.clone(), < + $block as $crate::substrate_metadata::EncodeMetadata + >::type_metadata_kind); + $crate::metadata::RuntimeMetadata::V2 ( + $crate::metadata::RuntimeMetadataV2 { + modules: $crate::__runtime_modules_to_metadata!(registry; $runtime;; $( $rest )*), + module_path: $crate::metadata::DecodeDifferent::Encode(module_path!()), + type_registry: registry, + block: block_type_name, } ).into() } @@ -50,28 +60,31 @@ macro_rules! impl_runtime_metadata { #[doc(hidden)] macro_rules! __runtime_modules_to_metadata { ( + $registry: ident; $runtime: ident; $( $metadata:expr ),*; $mod:ident::$module:ident $(with)+ $($kw:ident)*, $( $rest:tt )* ) => { $crate::__runtime_modules_to_metadata!( + $registry; $runtime; $( $metadata, )* $crate::metadata::ModuleMetadata { name: $crate::metadata::DecodeDifferent::Encode(stringify!($mod)), prefix: $crate::__runtime_modules_to_metadata_calls_storagename!($mod, $module, $runtime, $(with $kw)*), - storage: $crate::__runtime_modules_to_metadata_calls_storage!($mod, $module, $runtime, $(with $kw)*), - calls: $crate::__runtime_modules_to_metadata_calls_call!($mod, $module, $runtime, $(with $kw)*), + storage: $crate::__runtime_modules_to_metadata_calls_storage!($registry, $mod, $module, $runtime, $(with $kw)*), + calls: $crate::__runtime_modules_to_metadata_calls_call!($registry, $mod, $module, $runtime, $(with $kw)*), event: $crate::__runtime_modules_to_metadata_calls_event!($mod, $module, $runtime, $(with $kw)*), }; $( $rest )* ) }; ( + $registry: ident; $runtime:ident; $( $metadata:expr ),*; ) => { - $crate::metadata::DecodeDifferent::Encode(&[ $( $metadata ),* ]) + vec![ $( $metadata ),* ] }; } @@ -80,6 +93,7 @@ macro_rules! __runtime_modules_to_metadata { macro_rules! __runtime_modules_to_metadata_calls_call { // skip system ( + $registry: ident, system, $skip_module: ident, $skip_runtime: ident, @@ -89,28 +103,34 @@ macro_rules! __runtime_modules_to_metadata_calls_call { None }; ( + $registry: ident, $mod: ident, $module: ident, $runtime: ident, with Call $(with $kws:ident)* ) => { - Some($crate::metadata::DecodeDifferent::Encode( - $crate::metadata::FnEncode( - $mod::$module::<$runtime>::call_functions - ) - )) + { + $mod::$module::<$runtime>::call_metadata_register(&mut $registry); + Some($crate::metadata::DecodeDifferent::Encode( + $crate::metadata::FnEncode( + $mod::$module::<$runtime>::call_functions + ) + )) + } }; ( + $registry: ident, $mod: ident, $module: ident, $runtime: ident, with $_:ident $(with $kws:ident)* ) => { - $crate::__runtime_modules_to_metadata_calls_call!( $mod, $module, $runtime, $(with $kws)* ); + $crate::__runtime_modules_to_metadata_calls_call!( $registry, $mod, $module, $runtime, $(with $kws)* ); }; ( + $registry: ident, $mod: ident, $module: ident, $runtime: ident, @@ -196,28 +216,34 @@ macro_rules! __runtime_modules_to_metadata_calls_storagename { #[doc(hidden)] macro_rules! __runtime_modules_to_metadata_calls_storage { ( + $registry: ident, $mod: ident, $module: ident, $runtime: ident, with Storage $(with $kws:ident)* ) => { - Some($crate::metadata::DecodeDifferent::Encode( - $crate::metadata::FnEncode( - $mod::$module::<$runtime>::store_metadata_functions - ) - )) + { + $mod::$module::<$runtime>::store_metadata_register(&mut $registry); + Some($crate::metadata::DecodeDifferent::Encode( + $crate::metadata::FnEncode( + $mod::$module::<$runtime>::store_metadata_functions + ) + )) + } }; ( + $registry: ident, $mod: ident, $module: ident, $runtime: ident, with $_:ident $(with $kws:ident)* ) => { - $crate::__runtime_modules_to_metadata_calls_storage!( $mod, $module, $runtime, $(with $kws)* ); + $crate::__runtime_modules_to_metadata_calls_storage!( $registry, $mod, $module, $runtime, $(with $kws)* ); }; ( + $registry: ident, $mod: ident, $module: ident, $runtime: ident, @@ -233,12 +259,14 @@ macro_rules! __runtime_modules_to_metadata_calls_storage { mod tests { use super::*; use srml_metadata::{ - EventMetadata, + EventMetadata, TypeName, StorageFunctionModifier, StorageFunctionType, FunctionMetadata, StorageFunctionMetadata, ModuleMetadata, RuntimeMetadataPrefixed }; use crate::codec::{Encode, Decode}; + use substrate_metadata::{MetadataRegistry, MetadataName, TypeMetadata, TypeMetadataKind}; + use substrate_metadata_derive::EncodeMetadata; mod system { pub trait Trait { @@ -278,7 +306,6 @@ mod tests { mod event_module { use crate::dispatch::Result; - pub trait Trait { type Origin; type Balance; @@ -304,7 +331,7 @@ mod tests { pub trait Trait { type Origin; type Balance; - type BlockNumber; + type BlockNumber: substrate_metadata::EncodeMetadata; } decl_event!( @@ -331,9 +358,12 @@ mod tests { type EventModule = event_module::Module; type EventModule2 = event_module2::Module; - #[derive(Debug, Clone, PartialEq, Eq, Encode, Decode)] + #[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, EncodeMetadata)] pub struct TestRuntime; + #[derive(EncodeMetadata)] + pub struct Block; + impl_outer_event! { pub enum TestEvent for TestRuntime { event_module, @@ -354,13 +384,13 @@ mod tests { impl event_module::Trait for TestRuntime { type Origin = Origin; - type Balance = u32; + type Balance = u64; type BlockNumber = u32; } impl event_module2::Trait for TestRuntime { type Origin = Origin; - type Balance = u32; + type Balance = u64; type BlockNumber = u32; } @@ -371,89 +401,113 @@ mod tests { } impl_runtime_metadata!( - for TestRuntime with modules + for TestRuntime, Block with modules system::Module with Event, event_module::Module with Event Call, event_module2::Module with Event Storage Call, ); - const EXPECTED_METADATA: RuntimeMetadata = RuntimeMetadata::V1( - RuntimeMetadataV1 { - modules: DecodeDifferent::Encode(&[ - ModuleMetadata { - name: DecodeDifferent::Encode("system"), - prefix: DecodeDifferent::Encode(FnEncode(||"")), - storage: None, - calls: None, - event: Some(DecodeDifferent::Encode( - FnEncode(||&[ - EventMetadata { - name: DecodeDifferent::Encode("SystemEvent"), - arguments: DecodeDifferent::Encode(&[]), - documentation: DecodeDifferent::Encode(&[]) - } - ]) - )), - }, - ModuleMetadata { - name: DecodeDifferent::Encode("event_module"), - prefix: DecodeDifferent::Encode(FnEncode(||"")), - storage: None, - calls: Some( - DecodeDifferent::Encode(FnEncode(||&[ - FunctionMetadata { - name: DecodeDifferent::Encode("aux_0"), - arguments: DecodeDifferent::Encode(&[]), - documentation: DecodeDifferent::Encode(&[]), - } - ]))), - event: Some(DecodeDifferent::Encode( - FnEncode(||&[ - EventMetadata { - name: DecodeDifferent::Encode("TestEvent"), - arguments: DecodeDifferent::Encode(&["Balance"]), - documentation: DecodeDifferent::Encode(&[" Hi, I am a comment."]) - } - ]) - )), - }, - ModuleMetadata { - name: DecodeDifferent::Encode("event_module2"), - prefix: DecodeDifferent::Encode(FnEncode(||"TestStorage")), - storage: Some(DecodeDifferent::Encode( - FnEncode(||&[ - StorageFunctionMetadata { - name: DecodeDifferent::Encode("StorageMethod"), - modifier: StorageFunctionModifier::Optional, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), - default: DecodeDifferent::Encode( - DefaultByteGetter( - &event_module2::__GetByteStructStorageMethod(::std::marker::PhantomData::) - ) - ), - documentation: DecodeDifferent::Encode(&[]), - } - ]) - )), - calls: Some(DecodeDifferent::Encode(FnEncode(||&[ ]))), - event: Some(DecodeDifferent::Encode( - FnEncode(||&[ - EventMetadata { - name: DecodeDifferent::Encode("TestEvent"), - arguments: DecodeDifferent::Encode(&["Balance"]), - documentation: DecodeDifferent::Encode(&[]) - } - ]) - )), - }, - ])} - ); - #[test] fn runtime_metadata() { + let expected = RuntimeMetadata::V2( + RuntimeMetadataV2 { + module_path: DecodeDifferent::Encode("srml_support::metadata::tests"), + type_registry: MetadataRegistry { + list: vec![ + TypeMetadata { + name: MetadataName::Custom("srml_support::metadata::tests".into(), "Block".into()), + kind: TypeMetadataKind::Struct(Vec::new()), + } + ] + }, + modules: vec![ + ModuleMetadata { + name: DecodeDifferent::Encode("system"), + prefix: DecodeDifferent::Encode(FnEncode(||"")), + storage: None, + calls: None, + event: Some(DecodeDifferent::Encode( + FnEncode(|| vec![ + EventMetadata { + name: DecodeDifferent::Encode("SystemEvent"), + arguments: Vec::new(), + documentation: DecodeDifferent::Encode(&[]) + } + ]) + )), + }, + ModuleMetadata { + name: DecodeDifferent::Encode("event_module"), + prefix: DecodeDifferent::Encode(FnEncode(||"")), + storage: None, + calls: Some( + DecodeDifferent::Encode(FnEncode(|| vec![ + FunctionMetadata { + name: DecodeDifferent::Encode("aux_0"), + arguments: Vec::new(), + documentation: DecodeDifferent::Encode(&[]), + } + ]))), + event: Some(DecodeDifferent::Encode( + FnEncode(|| vec![ + EventMetadata { + name: DecodeDifferent::Encode("TestEvent"), + arguments: vec![ + TypeName { + display_name: DecodeDifferent::Encode("Balance"), + type_name: MetadataName::U64 + } + ], + documentation: DecodeDifferent::Encode(&[" Hi, I am a comment."]) + } + ]) + )), + }, + ModuleMetadata { + name: DecodeDifferent::Encode("event_module2"), + prefix: DecodeDifferent::Encode(FnEncode(||"TestStorage")), + storage: Some(DecodeDifferent::Encode( + FnEncode(|| vec![ + StorageFunctionMetadata { + name: DecodeDifferent::Encode("StorageMethod"), + modifier: StorageFunctionModifier::Optional, + ty: StorageFunctionType::Plain(TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32 + }), + default: DecodeDifferent::Encode( + DefaultByteGetter( + &event_module2::__GetByteStructStorageMethod(::std::marker::PhantomData::) + ) + ), + documentation: DecodeDifferent::Encode(&[]), + } + ]) + )), + calls: Some(DecodeDifferent::Encode(FnEncode(|| Vec::new()))), + event: Some(DecodeDifferent::Encode( + FnEncode(|| vec![ + EventMetadata { + name: DecodeDifferent::Encode("TestEvent"), + arguments: vec![ + TypeName { + display_name: DecodeDifferent::Encode("Balance"), + type_name: MetadataName::U64 + } + ], + documentation: DecodeDifferent::Encode(&[]) + } + ]) + )), + }, + ], + block: MetadataName::Custom("srml_support::metadata::tests".into(), "Block".into()), + } + ); + let metadata_encoded = TestRuntime::metadata().encode(); let metadata_decoded = RuntimeMetadataPrefixed::decode(&mut &metadata_encoded[..]); - let expected_metadata: RuntimeMetadataPrefixed = EXPECTED_METADATA.into(); + let expected_metadata: RuntimeMetadataPrefixed = expected.into(); assert_eq!(expected_metadata, metadata_decoded.unwrap()); } diff --git a/srml/support/src/origin.rs b/srml/support/src/origin.rs index 9b76c3ac2b6ce..4ab2663991810 100644 --- a/srml/support/src/origin.rs +++ b/srml/support/src/origin.rs @@ -195,6 +195,8 @@ macro_rules! impl_outer_origin { #[cfg(test)] mod tests { + use substrate_metadata_derive::EncodeMetadata; + mod system { pub trait Trait { type AccountId; @@ -231,7 +233,7 @@ mod tests { } } - #[derive(Clone, PartialEq, Eq, Debug)] + #[derive(Clone, PartialEq, Eq, Debug, EncodeMetadata)] pub struct TestRuntime; impl system::Trait for TestRuntime { diff --git a/srml/support/src/runtime.rs b/srml/support/src/runtime.rs index 6fc3a96069d58..c554fed00406f 100644 --- a/srml/support/src/runtime.rs +++ b/srml/support/src/runtime.rs @@ -299,7 +299,7 @@ macro_rules! construct_runtime { } ),*; ) => { - #[derive(Clone, Copy, PartialEq, Eq)] + #[derive(Clone, Copy, PartialEq, Eq, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Debug))] pub struct $runtime; impl $crate::runtime_primitives::traits::GetNodeBlockType for $runtime { @@ -337,6 +337,7 @@ macro_rules! construct_runtime { ); $crate::__decl_runtime_metadata!( $runtime; + $block; ; $( $name: $module::{ $( $modules )* } @@ -721,6 +722,7 @@ macro_rules! __decl_runtime_metadata { // leading is Module : parse ( $runtime:ident; + $block:ident; $( $parsed_modules:ident { $( $withs:ident )* } )*; $( { leading_module: $( $leading_module:ident )* } )? $name:ident: $module:ident::{ @@ -732,6 +734,7 @@ macro_rules! __decl_runtime_metadata { ) => { $crate::__decl_runtime_metadata!( $runtime; + $block; $( $parsed_modules { $( $withs )* } )* $module { $( $( $leading_module )* )? $( $modules )* }; $( $rest_name: $rest_module::{ @@ -743,6 +746,7 @@ macro_rules! __decl_runtime_metadata { // leading isn't Module : put it in leadings ( $runtime:ident; + $block:ident; $( $parsed_modules:ident { $( $withs:ident )* } )*; $( { leading_module: $( $leading_module:ident )* } )? $name:ident: $module:ident::{ @@ -754,6 +758,7 @@ macro_rules! __decl_runtime_metadata { ) => { $crate::__decl_runtime_metadata!( $runtime; + $block; $( $parsed_modules { $( $withs )* } )*; { leading_module: $( $( $leading_module )* )? $other_module } $name: $module::{ @@ -769,6 +774,7 @@ macro_rules! __decl_runtime_metadata { // does not contain Module : skip ( $runtime:ident; + $block:ident; $( $parsed_modules:ident { $( $withs:ident )* } )*; $( { leading_module: $( $leading_module:ident )* } )? $name:ident: $module:ident::{} @@ -778,6 +784,7 @@ macro_rules! __decl_runtime_metadata { ) => { $crate::__decl_runtime_metadata!( $runtime; + $block; $( $parsed_modules { $( $withs )* } )*; $( $rest_name: $rest_module::{ @@ -789,10 +796,11 @@ macro_rules! __decl_runtime_metadata { // end of decl ( $runtime:ident; + $block:ident; $( $parsed_modules:ident { $( $withs:ident )* } )*; ) => { $crate::impl_runtime_metadata!( - for $runtime with modules + for $runtime, $block with modules $( $parsed_modules::Module with $( $withs )* , )* ); } diff --git a/srml/support/src/storage/generator.rs b/srml/support/src/storage/generator.rs index d76e5f62dfb4f..aacc927cd6a8d 100644 --- a/srml/support/src/storage/generator.rs +++ b/srml/support/src/storage/generator.rs @@ -56,9 +56,9 @@ pub use crate::rstd::marker::PhantomData; pub use crate::rstd::boxed::Box; pub use srml_metadata::{ - DecodeDifferent, StorageMetadata, StorageFunctionMetadata, + DecodeDifferent, StorageFunctionMetadata, StorageFunctionType, StorageFunctionModifier, - DefaultByte, DefaultByteGetter, + DefaultByte, DefaultByteGetter, TypeName }; /// Abstraction around storage. @@ -558,6 +558,7 @@ mod tests { use codec::{Decode, Encode}; use super::*; use crate::rstd::marker::PhantomData; + use substrate_metadata::*; impl Storage for RefCell, Vec>> { fn exists(&self, key: &[u8]) -> bool { @@ -624,8 +625,8 @@ mod tests { } pub trait Trait { - type Origin: codec::Encode + codec::Decode + ::std::default::Default; - type BlockNumber; + type Origin: codec::Encode + codec::Decode + ::std::default::Default + EncodeMetadata; + type BlockNumber: EncodeMetadata; } decl_module! { @@ -683,12 +684,18 @@ mod tests { type BlockNumber = u32; } - const EXPECTED_METADATA: StorageMetadata = StorageMetadata { - functions: DecodeDifferent::Encode(&[ + #[test] + fn store_metadata_functions() { + let expected = vec![ StorageFunctionMetadata { name: DecodeDifferent::Encode("U32"), modifier: StorageFunctionModifier::Optional, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructU32(PhantomData::)) ), @@ -697,7 +704,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("PUBU32"), modifier: StorageFunctionModifier::Optional, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBU32(PhantomData::)) ), @@ -706,7 +718,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("U32MYDEF"), modifier: StorageFunctionModifier::Optional, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructU32MYDEF(PhantomData::)) ), @@ -715,7 +732,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("PUBU32MYDEF"), modifier: StorageFunctionModifier::Optional, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBU32MYDEF(PhantomData::)) ), @@ -724,7 +746,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("GETU32"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("T::Origin")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("T::Origin"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructGETU32(PhantomData::)) ), @@ -733,7 +760,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("PUBGETU32"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBGETU32(PhantomData::)) ), @@ -742,7 +774,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("GETU32WITHCONFIG"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructGETU32WITHCONFIG(PhantomData::)) ), @@ -751,7 +788,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("PUBGETU32WITHCONFIG"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBGETU32WITHCONFIG(PhantomData::)) ), @@ -760,7 +802,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("GETU32MYDEF"), modifier: StorageFunctionModifier::Optional, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructGETU32MYDEF(PhantomData::)) ), @@ -769,7 +816,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("PUBGETU32MYDEF"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBGETU32MYDEF(PhantomData::)) ), @@ -778,7 +830,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("GETU32WITHCONFIGMYDEF"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructGETU32WITHCONFIGMYDEF(PhantomData::)) ), @@ -787,7 +844,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("PUBGETU32WITHCONFIGMYDEF"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBGETU32WITHCONFIGMYDEF(PhantomData::)) ), @@ -796,7 +858,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("PUBGETU32WITHCONFIGMYDEFOPT"), modifier: StorageFunctionModifier::Optional, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBGETU32WITHCONFIGMYDEFOPT(PhantomData::)) ), @@ -807,7 +874,14 @@ mod tests { name: DecodeDifferent::Encode("MAPU32"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map{ - key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String") + key: TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + }, + value: TypeName { + display_name: DecodeDifferent::Encode("String"), + type_name: MetadataName::Str, + } }, default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructMAPU32(PhantomData::)) @@ -818,7 +892,14 @@ mod tests { name: DecodeDifferent::Encode("PUBMAPU32"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map{ - key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String") + key: TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + }, + value: TypeName { + display_name: DecodeDifferent::Encode("String"), + type_name: MetadataName::Str, + } }, default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBMAPU32(PhantomData::)) @@ -829,7 +910,14 @@ mod tests { name: DecodeDifferent::Encode("MAPU32MYDEF"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map{ - key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String") + key: TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + }, + value: TypeName { + display_name: DecodeDifferent::Encode("String"), + type_name: MetadataName::Str, + } }, default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructMAPU32MYDEF(PhantomData::)) @@ -840,7 +928,14 @@ mod tests { name: DecodeDifferent::Encode("PUBMAPU32MYDEF"), modifier: StorageFunctionModifier::Optional, ty: StorageFunctionType::Map{ - key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String") + key: TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + }, + value: TypeName { + display_name: DecodeDifferent::Encode("String"), + type_name: MetadataName::Str, + } }, default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBMAPU32MYDEF(PhantomData::)) @@ -851,7 +946,14 @@ mod tests { name: DecodeDifferent::Encode("GETMAPU32"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map{ - key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String") + key: TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + }, + value: TypeName { + display_name: DecodeDifferent::Encode("String"), + type_name: MetadataName::Str, + } }, default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructGETMAPU32(PhantomData::)) @@ -862,7 +964,14 @@ mod tests { name: DecodeDifferent::Encode("PUBGETMAPU32"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map{ - key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String") + key: TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + }, + value: TypeName { + display_name: DecodeDifferent::Encode("String"), + type_name: MetadataName::Str, + } }, default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBGETMAPU32(PhantomData::)) @@ -873,7 +982,14 @@ mod tests { name: DecodeDifferent::Encode("GETMAPU32MYDEF"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map{ - key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String") + key: TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + }, + value: TypeName { + display_name: DecodeDifferent::Encode("String"), + type_name: MetadataName::Str, + } }, default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructGETMAPU32MYDEF(PhantomData::)) @@ -884,7 +1000,14 @@ mod tests { name: DecodeDifferent::Encode("PUBGETMAPU32MYDEF"), modifier: StorageFunctionModifier::Default, ty: StorageFunctionType::Map{ - key: DecodeDifferent::Encode("u32"), value: DecodeDifferent::Encode("String") + key: TypeName { + display_name: DecodeDifferent::Encode("u32"), + type_name: MetadataName::U32, + }, + value: TypeName { + display_name: DecodeDifferent::Encode("String"), + type_name: MetadataName::Str, + } }, default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructPUBGETMAPU32MYDEF(PhantomData::)) @@ -894,7 +1017,12 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("COMPLEXTYPE1"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("::std::vec::Vec<::Origin>")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("::std::vec::Vec<::Origin>"), + type_name: MetadataName::Vector(Box::new(MetadataName::U32)), + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructCOMPLEXTYPE1(PhantomData::)) ), @@ -903,7 +1031,15 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("COMPLEXTYPE2"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("(Vec)>>, u32)")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("(Vec)>>, u32)"), + type_name: MetadataName::Tuple(vec![ + MetadataName::Vector(Box::new(MetadataName::Vector(Box::new(MetadataName::Tuple(vec![MetadataName::U16, MetadataName::Unit]))))), + MetadataName::U32 + ]), + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructCOMPLEXTYPE2(PhantomData::)) ), @@ -912,19 +1048,21 @@ mod tests { StorageFunctionMetadata { name: DecodeDifferent::Encode("COMPLEXTYPE3"), modifier: StorageFunctionModifier::Default, - ty: StorageFunctionType::Plain(DecodeDifferent::Encode("([u32; 25])")), + ty: StorageFunctionType::Plain( + TypeName { + display_name: DecodeDifferent::Encode("([u32; 25])"), + type_name: MetadataName::Array(25, Box::new(MetadataName::U32)), + } + ), default: DecodeDifferent::Encode( DefaultByteGetter(&__GetByteStructCOMPLEXTYPE3(PhantomData::)) ), documentation: DecodeDifferent::Encode(&[]), }, - ]) - }; + ]; - #[test] - fn store_metadata() { - let metadata = Module::::store_metadata(); - assert_eq!(EXPECTED_METADATA, metadata); + let metadata = Module::::store_metadata_functions(); + assert_eq!(expected, metadata); } #[test] @@ -946,7 +1084,7 @@ mod tests { mod test2 { pub trait Trait { type Origin; - type BlockNumber; + type BlockNumber: substrate_metadata::EncodeMetadata; } decl_module! { @@ -982,7 +1120,7 @@ mod test2 { mod test3 { pub trait Trait { type Origin; - type BlockNumber; + type BlockNumber: substrate_metadata::EncodeMetadata; } decl_module! { pub struct Module for enum Call where origin: T::Origin {} diff --git a/srml/support/src/traits.rs b/srml/support/src/traits.rs index 37290d4ef14a0..da2991310261d 100644 --- a/srml/support/src/traits.rs +++ b/srml/support/src/traits.rs @@ -21,6 +21,8 @@ use crate::codec::{Codec, Encode, Decode}; use crate::runtime_primitives::traits::{ MaybeSerializeDebug, SimpleArithmetic, As }; +use substrate_metadata::EncodeMetadata; +use substrate_metadata_derive::EncodeMetadata; /// The account with the given id was killed. pub trait OnFreeBalanceZero { @@ -62,7 +64,7 @@ pub enum UpdateBalanceOutcome { } pub trait ArithmeticType { - type Type: SimpleArithmetic + As + As + Codec + Copy + MaybeSerializeDebug + Default; + type Type: SimpleArithmetic + As + As + Codec + Copy + MaybeSerializeDebug + Default + EncodeMetadata; } /// Abstraction over a fungible assets system. @@ -228,11 +230,11 @@ pub trait ChargeFee: ChargeBytesFee { bitmask! { /// Reasons for moving funds out of an account. - #[derive(Encode, Decode)] + #[derive(Encode, Decode, EncodeMetadata)] pub mask WithdrawReasons: i8 where /// Reason for moving funds out of an account. - #[derive(Encode, Decode)] + #[derive(Encode, Decode, EncodeMetadata)] flags WithdrawReason { /// In order to pay for (system) transaction costs. TransactionPayment = 0b00000001, diff --git a/srml/system/Cargo.toml b/srml/system/Cargo.toml index ea2628a3a24cd..629abe08cd822 100644 --- a/srml/system/Cargo.toml +++ b/srml/system/Cargo.toml @@ -15,6 +15,8 @@ rstd = { package = "sr-std", path = "../../core/sr-std", default-features = fals runtime_io = { package = "sr-io", path = "../../core/sr-io", default-features = false } primitives = { package = "sr-primitives", path = "../../core/sr-primitives", default-features = false } srml-support = { path = "../support", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [features] default = ["std"] @@ -28,4 +30,6 @@ std = [ "runtime_io/std", "srml-support/std", "primitives/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/system/src/lib.rs b/srml/system/src/lib.rs index 384c4fb462b1e..e66703c34957c 100644 --- a/srml/system/src/lib.rs +++ b/srml/system/src/lib.rs @@ -31,6 +31,7 @@ use substrate_primitives::storage::well_known_keys; use srml_support::{storage, StorageValue, StorageMap, Parameter, decl_module, decl_event, decl_storage}; use safe_mix::TripletMix; use parity_codec::{Encode, Decode}; +use substrate_metadata_derive::EncodeMetadata; #[cfg(any(feature = "std", test))] use runtime_io::{twox_128, TestExternalities, Blake2Hasher}; @@ -105,7 +106,7 @@ decl_module! { } /// A phase of a block's execution. -#[derive(Encode, Decode)] +#[derive(Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Serialize, PartialEq, Eq, Clone, Debug))] pub enum Phase { /// Applying an extrinsic. @@ -115,7 +116,7 @@ pub enum Phase { } /// Record of an event happening. -#[derive(Encode, Decode)] +#[derive(Encode, Decode, EncodeMetadata)] #[cfg_attr(feature = "std", derive(Serialize, PartialEq, Eq, Clone, Debug))] pub struct EventRecord { /// The phase of the block it happened in. @@ -164,7 +165,7 @@ pub type Log = RawLog< /// A logs in this module. #[cfg_attr(feature = "std", derive(Serialize, Debug))] -#[derive(Encode, Decode, PartialEq, Eq, Clone)] +#[derive(Encode, Decode, PartialEq, Eq, Clone, EncodeMetadata)] pub enum RawLog { /// Changes trie has been computed for this block. Contains the root of /// changes trie. diff --git a/srml/timestamp/Cargo.toml b/srml/timestamp/Cargo.toml index 0c089b60e6515..b9042021ec3a8 100644 --- a/srml/timestamp/Cargo.toml +++ b/srml/timestamp/Cargo.toml @@ -13,6 +13,8 @@ runtime_primitives = { package = "sr-primitives", path = "../../core/sr-primitiv inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] runtime_io = { package = "sr-io", path = "../../core/sr-io" } @@ -28,4 +30,6 @@ std = [ "parity-codec/std", "system/std", "inherents/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/treasury/Cargo.toml b/srml/treasury/Cargo.toml index 9bfb4b1725e71..67fa76a2cd5f2 100644 --- a/srml/treasury/Cargo.toml +++ b/srml/treasury/Cargo.toml @@ -14,6 +14,8 @@ runtime_primitives = { package = "sr-primitives", path = "../../core/sr-primitiv srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } balances = { package = "srml-balances", path = "../balances", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [dev-dependencies] runtime_io = { package = "sr-io", path = "../../core/sr-io" } @@ -30,4 +32,6 @@ std = [ "srml-support/std", "system/std", "balances/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ] diff --git a/srml/treasury/src/lib.rs b/srml/treasury/src/lib.rs index aa0eec6479ec5..e8732b7a39014 100644 --- a/srml/treasury/src/lib.rs +++ b/srml/treasury/src/lib.rs @@ -25,6 +25,7 @@ use srml_support::{StorageValue, StorageMap, decl_module, decl_storage, decl_eve use srml_support::traits::{Currency, OnDilution, ArithmeticType}; use runtime_primitives::{Permill, traits::{Zero, EnsureOrigin, StaticLookup}}; use parity_codec::{Encode, Decode}; +use substrate_metadata_derive::EncodeMetadata; use system::ensure_signed; type BalanceOf = <::Currency as ArithmeticType>::Type; @@ -127,7 +128,7 @@ decl_module! { /// A spending proposal. #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))] -#[derive(Encode, Decode, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, EncodeMetadata)] pub struct Proposal { proposer: AccountId, value: Balance, diff --git a/srml/upgrade-key/Cargo.toml b/srml/upgrade-key/Cargo.toml index c548798dec96c..ed942392dc506 100644 --- a/srml/upgrade-key/Cargo.toml +++ b/srml/upgrade-key/Cargo.toml @@ -12,6 +12,8 @@ sr-primitives = { path = "../../core/sr-primitives", default-features = false } srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } consensus = { package = "srml-consensus", path = "../consensus", default-features = false } +substrate-metadata = { path = "../../core/metadata", default-features = false } +substrate-metadata-derive = { path = "../../core/metadata-derive", default-features = false } [features] default = ["std"] @@ -23,4 +25,6 @@ std = [ "srml-support/std", "system/std", "consensus/std", + "substrate-metadata/std", + "substrate-metadata-derive/std", ]