diff --git a/Cargo.lock b/Cargo.lock index 4d4a44ef4..620e16a6c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,7 +26,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "arc-swap" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -59,7 +59,7 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -70,7 +70,7 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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)", ] @@ -82,7 +82,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.24 (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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -93,7 +93,7 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -120,7 +120,7 @@ dependencies = [ "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.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -139,7 +139,7 @@ name = "blake2-rfc" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -170,7 +170,7 @@ dependencies = [ "git2 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -185,7 +185,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -197,17 +197,17 @@ name = "bzip2" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "bzip2-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bzip2-sys" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -245,7 +245,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -282,7 +282,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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -290,7 +290,7 @@ name = "core-foundation-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -301,13 +301,18 @@ dependencies = [ "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crc32fast" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "croaring" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "croaring-sys 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -317,7 +322,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bindgen 0.37.4 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -334,7 +339,7 @@ dependencies = [ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -351,7 +356,7 @@ name = "crossbeam-epoch" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -416,7 +421,7 @@ dependencies = [ "crossbeam-channel 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "enum-map 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "enumset 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "ncurses 5.97.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -424,7 +429,7 @@ dependencies = [ "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "signal-hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -435,7 +440,7 @@ name = "daemonize" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -456,7 +461,7 @@ name = "dirs" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -478,7 +483,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.10" +version = "0.8.13" 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)", @@ -499,7 +504,7 @@ name = "enum-map-derive" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -526,9 +531,9 @@ name = "enumset_derive" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.20 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -537,9 +542,9 @@ version = "0.5.13" 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.1.1 (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.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -557,9 +562,9 @@ name = "failure_derive" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.20 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -570,20 +575,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "filetime" -version = "0.2.3" +version = "0.2.4" 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.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "flate2" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -653,7 +659,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -675,7 +681,9 @@ dependencies = [ "ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "cursive 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "daemonize 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "grin_api 0.4.2", "grin_config 0.4.2", "grin_core 0.4.2", @@ -687,7 +695,7 @@ dependencies = [ "humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", @@ -707,18 +715,18 @@ dependencies = [ "grin_pool 0.4.2", "grin_store 0.4.2", "grin_util 0.4.2", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-rustls 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustls 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-rustls 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -762,7 +770,7 @@ dependencies = [ "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -816,7 +824,7 @@ name = "grin_p2p" version = "0.4.2" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 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)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "grin_core 0.4.2", @@ -857,7 +865,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.3.25 (registry+https://github.com/rust-lang/crates.io-index)", "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", @@ -882,10 +890,10 @@ dependencies = [ "grin_store 0.4.2", "grin_util 0.4.2", "grin_wallet 0.4.2", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-staticfile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -907,7 +915,7 @@ dependencies = [ "failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "grin_core 0.4.2", "grin_util 0.4.2", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -951,16 +959,16 @@ dependencies = [ "grin_keychain 0.4.2", "grin_store 0.4.2", "grin_util 0.4.2", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "prettytable-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-retry 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -973,14 +981,14 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 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)", "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.13 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (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.1 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -995,10 +1003,10 @@ dependencies = [ [[package]] name = "http" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "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)", ] @@ -1015,7 +1023,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "humantime" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1023,27 +1031,27 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "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.13 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (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)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1054,8 +1062,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ct-logs 0.4.0 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustls 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1072,9 +1080,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.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.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1083,9 +1091,9 @@ name = "hyper-tls" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.16 (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.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1110,13 +1118,13 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itertools" -version = "0.7.8" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1160,17 +1168,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.43" +version = "0.2.44" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libflate" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1179,7 +1187,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1190,7 +1198,7 @@ version = "0.2.2" 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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1208,7 +1216,7 @@ version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1229,17 +1237,17 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "liblmdb-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "supercow 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lock_api" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1273,17 +1281,17 @@ dependencies = [ "antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log-mdc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde-value 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_yaml 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_yaml 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)", "thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1312,7 +1320,7 @@ name = "memchr" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1321,7 +1329,7 @@ version = "2.1.1" 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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1330,7 +1338,7 @@ name = "memmap" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1364,7 +1372,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1382,7 +1390,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1396,7 +1404,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.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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)", @@ -1410,7 +1418,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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1440,7 +1448,7 @@ 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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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.15 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1448,7 +1456,7 @@ dependencies = [ "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1457,7 +1465,7 @@ version = "5.97.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1467,7 +1475,7 @@ 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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1479,7 +1487,7 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.25 (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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1615,7 +1623,7 @@ name = "num_cpus" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1632,7 +1640,7 @@ dependencies = [ "cfg-if 0.1.6 (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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1647,7 +1655,7 @@ version = "0.9.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1660,14 +1668,6 @@ dependencies = [ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "owning_ref" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "owning_ref" version = "0.4.0" @@ -1681,7 +1681,7 @@ name = "parking_lot" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1690,10 +1690,10 @@ name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.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.5 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1799,7 +1799,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1823,7 +1823,7 @@ name = "quote" version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1832,7 +1832,7 @@ version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1842,7 +1842,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1853,11 +1853,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.2.2 (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" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_chacha" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_core" version = "0.2.2" @@ -1871,9 +1898,42 @@ name = "rand_core" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_pcg" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "redox_syscall" -version = "0.1.40" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1881,7 +1941,7 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1892,7 +1952,7 @@ dependencies = [ "argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1902,22 +1962,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.0.6" +version = "1.1.0" 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.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.4 (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)", ] [[package]] name = "regex-syntax" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1934,21 +1994,21 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.13 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "libflate 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1956,12 +2016,12 @@ dependencies = [ [[package]] name = "ring" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1977,11 +2037,11 @@ dependencies = [ [[package]] name = "rpassword" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2010,7 +2070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "sct 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2063,7 +2123,7 @@ name = "sct" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ring 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2074,7 +2134,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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2084,7 +2144,7 @@ version = "0.2.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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2119,9 +2179,9 @@ name = "serde_derive" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.20 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2136,7 +2196,7 @@ dependencies = [ [[package]] name = "serde_urlencoded" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2147,7 +2207,7 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2172,8 +2232,8 @@ name = "signal-hook" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arc-swap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "arc-swap 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2188,7 +2248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2201,7 +2261,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "string" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2219,17 +2279,17 @@ name = "syn" version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "syn" -version = "0.15.20" +version = "0.15.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2239,9 +2299,9 @@ name = "synstructure" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.20 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2250,21 +2310,21 @@ name = "tar" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tempfile" -version = "3.0.4" +version = "3.0.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)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2284,7 +2344,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2301,8 +2361,8 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2319,8 +2379,8 @@ name = "thread-id" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2337,30 +2397,31 @@ name = "time" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "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.8.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.3 (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-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.8 (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.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2368,7 +2429,7 @@ name = "tokio-codec" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2378,22 +2439,22 @@ name = "tokio-core" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "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)", "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)", "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-current-thread" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2415,7 +2476,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)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2423,17 +2484,17 @@ name = "tokio-io" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "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.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.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)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2462,7 +2523,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustls 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2479,34 +2540,34 @@ name = "tokio-tcp" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "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.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.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)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-timer" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2514,37 +2575,38 @@ dependencies = [ [[package]] name = "tokio-udp" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "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.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-uds" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 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)", "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.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (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.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2575,7 +2637,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ucd-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2721,7 +2783,7 @@ name = "webpki" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ring 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2739,7 +2801,7 @@ name = "which" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2802,7 +2864,7 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2824,7 +2886,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2835,12 +2897,12 @@ dependencies = [ "checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" -"checksum arc-swap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e9e39eb1e0b7b07b084378c1432e95555b46296bd18523211285edce54a0b05f" +"checksum arc-swap 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5c5ed110e2537bdd3f5b9091707a8a5556a72ac49bbd7302ae0b28fdccb3246c" "checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392" "checksum array-macro 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8b1b1a00de235e9f2cc0e650423dc249d875c116a5934188c08fdd0c02d840ef" "checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" "checksum arrayvec 0.3.25 (registry+https://github.com/rust-lang/crates.io-index)" = "06f59fe10306bb78facd90d28c2038ad23ffaaefa85bac43c8a434cde383334f" -"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +"checksum arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f405cc4c21cd8b784f6c8fc2adf9bc00f59558f0049b5ec21517f875963040cc" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" "checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" @@ -2855,9 +2917,9 @@ dependencies = [ "checksum built 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61f5aae2fa15b68fbcf0cbab64e659a55d10e9bacc55d3470ef77ae73030d755" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" -"checksum bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0ce55bd354b095246fc34caf4e9e242f5297a7fd938b090cadfea6eee614aa62" +"checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" "checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" -"checksum bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b" +"checksum bzip2-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6584aa36f5ad4c9247f5323b0a42f37802b37a836f0ad87084d7a33961abe25f" "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" "checksum cexpr 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42aac45e9567d97474a834efdee3081b3c942b2205be932092f53354ce503d6c" "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" @@ -2869,6 +2931,7 @@ dependencies = [ "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" +"checksum crc32fast 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e0e685559fa8bccfa46afd0f876047ee5d87c536d71d0c2b3a08cc9e880f73eb" "checksum croaring 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a2c82431f150237fc25ef9ece26ccbcc8325118f44a538b48449a7639cb6e9cf" "checksum croaring-sys 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d36e44ca368664098be5d03576da36edd3e2c728df553f13f89cb25fbc3792c5" "checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19" @@ -2889,7 +2952,7 @@ dependencies = [ "checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum encode_unicode 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90b2c9496c001e8cb61827acdefad780795c42264c137744cae6f7d9e3450abd" -"checksum encoding_rs 0.8.10 (registry+https://github.com/rust-lang/crates.io-index)" = "065f4d0c826fdaef059ac45487169d918558e3cf86c9d89f6e81cf52369126e5" +"checksum encoding_rs 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1a8fa54e6689eb2549c4efed8d00d7f3b2b994a064555b0e8df4ae3764bcc4be" "checksum enum-map 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "caa1769f019df7ccd8f9a741d2d608309688d0f1bd8a8747c14ac993660c761c" "checksum enum-map-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f915c8ef505ce27b6fa51515463938aa2e9135081fefc93aef786539a646a365" "checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" @@ -2899,8 +2962,8 @@ dependencies = [ "checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7" "checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum filetime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b3ea0c97183a611b1673e5e28b160d7e1035106cad053c988aae3bbd996fdcce" -"checksum flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3b0c7353385f92079524de3b7116cf99d73947c08a7472774e9b3b04bff3b901" +"checksum filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a2df5c1a8c4be27e7707789dc42ae65976e60b394afd293d1419ab915833e646" +"checksum flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2291c165c8e703ee54ef3055ad6188e3d51108e2ded18e9f2476e774fc5ad3d4" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" @@ -2915,25 +2978,25 @@ dependencies = [ "checksum grin_secp256k1zkp 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "42fd2759f1fb49fcbbf74fc9a818a0a32be49622395e82d88a26bba42a9bdd71" "checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" "checksum hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "733e1b3ac906631ca01ebb577e9bb0f5e37a454032b9036b5eaea4013ed6f99a" -"checksum http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "24f58e8c2d8e886055c3ead7b28793e1455270b5fb39650984c224bc538ba581" +"checksum http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "02096a6d2c55e63f7fcb800690e4f889a25f6ec342e3adb4594e293b625215ab" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" -"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" -"checksum hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2f60ae467ef4fc5eba9a34d31648c9c8ed902faf45a217f6734ce9ea64779ac7" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" +"checksum hyper 0.12.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0aeedb8ca5f0f96be00f84073c6d0d5f962ecad020ef543dff99a7c12717a60e" "checksum hyper-rustls 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68f2aa6b1681795bf4da8063f718cd23145aa0c9a5143d9787b345aa60d38ee4" "checksum hyper-staticfile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4080cb44b9c1e4c6dfd6f7ee85a9c3439777ec9c59df32f944836d3de58ac35e" "checksum hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "32cd73f14ad370d3b4d4b7dce08f69b81536c82e39fcc89731930fe5788cd661" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" +"checksum itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0d47946d458e94a1b7bcabbf6521ea7c037062c81f534615abcad76e84d4970d" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ddf83704f4e79979a424d1082dd2c1e52683058056c9280efa19ac5f6bc9033c" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" "checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" -"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" -"checksum libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "21138fc6669f438ed7ae3559d5789a5f0ba32f28c1f0608d1e452b0bb06ee936" +"checksum libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311" +"checksum libflate 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "bff3ac7d6f23730d3b533c35ed75eef638167634476a499feef16c428d74b57b" "checksum libgit2-sys 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4916b5addc78ec36cc309acfcdf0b9f9d97ab7b84083118b248709c5b7029356" "checksum liblmdb-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "feed38a3a580f60bf61aaa067b0ff4123395966839adeaf67258a9e50c4d2e49" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" @@ -2941,7 +3004,7 @@ dependencies = [ "checksum linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7860ec297f7008ff7a1e3382d7f7e1dcd69efc94751a2284bafc3d013c2aa939" "checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" "checksum lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "13416eee745b087c22934f35f1f24da22da41ba2a5ce197143d168ce055cc58d" -"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" +"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum log-mdc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" @@ -2986,7 +3049,6 @@ dependencies = [ "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106" "checksum ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2f0015e9e8e28ee20c581cfbfe47c650cedeb9ed0721090e0b7ebb10b9cdbcc2" -"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 parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" @@ -3002,26 +3064,32 @@ dependencies = [ "checksum pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a029430f0d744bc3d15dd474d591bed2402b645d024583082b9f63bb936dac6" "checksum prettytable-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5511ca4c805aa35f0abff6be7923231d664408b60c09f44ef715f2bce106cd9e" "checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4" -"checksum proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)" = "88dae56b29da695d783ea7fc5a90de281f79eb38407e77f6d674dd8befc4ac47" +"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" +"checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a" +"checksum rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "771b009e3a508cb67e8823dda454aaa5368c7bc1c16829fb77d3e980440dd34a" "checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" "checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" -"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" +"checksum rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effa3fcaa47e18db002bdde6060944b6d2f9cfd8db471c30e873448ad9187be3" +"checksum redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "679da7508e9a6390aeaf7fbd02a800fdc64b73fe2204dd2c8ae66d22d9d5ad5d" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "214a97e49be64fd2c86f568dd0cb2c757d2cc53de95b273b6ad0a1c908482f26" "checksum reexport-proc-macro 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "438fe63770eda15baf98e30b4d27ada49b932866307fa04fec24d9043fe63324" -"checksum regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ee84f70c8c08744ea9641a731c7fadb475bf2ecc52d7f627feb833e0b3990467" -"checksum regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fbc557aac2b708fe84121caf261346cc2eed71978024337e42eb46b8a252ac6e" +"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" +"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ab52e462d1e15891441aeefadff68bdea005174328ce3da0a314f2ad313ec837" -"checksum ring 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed733c36010c3d4d4718588f16a6c06a670b01c0047029ae81c3ca0acd81ff5" +"checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" "checksum ripemd160 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "482aa56cc68aaeccdaaff1cc5a72c247da8bbad3beb174ca5741f274c22883fb" -"checksum rpassword 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d127299b02abda51634f14025aec43ae87a7aa7a95202b6a868ec852607d1451" +"checksum rpassword 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37473170aedbe66ffa3ad3726939ba677d83c646ad4fd99e5b4bc38712f45ec" "checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" @@ -3042,22 +3110,22 @@ dependencies = [ "checksum serde-value 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7a663f873dedc4eac1a559d4c6bc0d0b2c34dc5ac4702e105014b8281489e44f" "checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" "checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811" -"checksum serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aaed41d9fb1e2f587201b863356590c90c1157495d811430a0c0325fe8169650" -"checksum serde_yaml 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a2054770c85c7f026ad772e31ff631e65e378154ee20e85d0ada8c6ed053e63a" +"checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" +"checksum serde_yaml 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0887a8e097a69559b56aa2526bf7aff7c3048cf627dff781f0b56a6001534593" "checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" "checksum signal-hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8941ae94fa73d0f73b422774b3a40a7195cecd88d1c090f4b37ade7dc795ab66" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" -"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d" +"checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" +"checksum string 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98998cced76115b1da46f63388b909d118a37ae0be0f82ad35773d4a4bc9d18d" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" "checksum supercow 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "171758edb47aa306a78dfa4ab9aeb5167405bd4e3dc2b64e88f6a84bbe98bd63" "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" -"checksum syn 0.15.20 (registry+https://github.com/rust-lang/crates.io-index)" = "8886c8d2774e853fcd7d9d2131f6e40ba46c9c0e358e4d57178452abd6859bb0" +"checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tar 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "a303ba60a099fcd2aaa646b14d2724591a96a75283e4b7ed3d1a1658909d9ae2" -"checksum tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "55c1195ef8513f3273d55ff59fe5da6940287a0d7a98331254397f464833675b" +"checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2" "checksum term 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5e6b677dd1e8214ea1ef4297f85dbcbed8e8cdddb561040cc998ca2551c37561" "checksum term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" @@ -3066,28 +3134,28 @@ dependencies = [ "checksum thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" -"checksum tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6e93c78d23cc61aa245a8acd2c4a79c4d7fa7fb5c3ca90d5737029f043a84895" +"checksum tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "a7817d4c98cc5be21360b3b37d6036fe9b7aefa5b7a201b7b16ff33423822f7d" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" -"checksum tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f90fcd90952f0a496d438a976afba8e5c205fb12123f813d8ab3aa1c8436638c" +"checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" "checksum tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c117b6cf86bb730aab4834f10df96e4dd586eff2c3c27d3781348da49e255bde" "checksum tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "60ae25f6b17d25116d2cba342083abe5255d3c2c79cb21ea11aa049c53bf7c75" "checksum tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7392fe0a70d5ce0c882c4778116c519bd5dbaa8a7c3ae3d04578b3afafdcda21" -"checksum tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4b26fd37f1125738b2170c80b551f69ff6fecb277e6e5ca885e53eec2b005018" +"checksum tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "502b625acb4ee13cbb3b90b8ca80e0addd263ddacf6931666ef751e610b07fb5" "checksum tokio-retry 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f05746ae87dca83a2016b4f5dba5b237b897dd12fd324f60afe282112f16969a" "checksum tokio-rustls 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "208d62fa3e015426e3c64039d9d20adf054a3c9b4d9445560f1c41c75bef3eab" "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" "checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" -"checksum tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3929aee321c9220ed838ed6c3928be7f9b69986b0e3c22c972a66dbf8a298c68" -"checksum tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3a52f00c97fedb6d535d27f65cccb7181c8dd4c6edc3eda9ea93f6d45d05168e" -"checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c" -"checksum tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df195376b43508f01570bacc73e13a1de0854dc59e79d1ec09913e8db6dd2a70" -"checksum toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4a2ecc31b0351ea18b3fe11274b8db6e4d82bce861bbb22e6dbed40417902c65" +"checksum tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "56c5556262383032878afad66943926a1d1f0967f17e94bd7764ceceb3b70e7f" +"checksum tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4f37f0111d76cc5da132fe9bc0590b9b9cfd079bc7e75ac3846278430a299ff8" +"checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" +"checksum tokio-uds 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "99ce87382f6c1a24b513a72c048b2c8efe66cb5161c9061d00bee510f08dc168" +"checksum toml 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "19782e145d5abefb03758958f06ea35f7b1d8421b534140e0238fd3d0bfd66e3" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" -"checksum ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d0f8bfa9ff0cadcd210129ad9d2c5f145c13e9ced3d3e5d948a6213487d52444" +"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "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 unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" diff --git a/Cargo.toml b/Cargo.toml index 7bf4019e1..b9fdc7df5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,8 @@ serde_json = "1" log = "0.4" term = "0.5" rpassword = "2.0.0" +failure = "0.1" +failure_derive = "0.1" grin_api = { path = "./api", version = "0.4.2" } grin_config = { path = "./config", version = "0.4.2" } diff --git a/api/src/rest.rs b/api/src/rest.rs index b53a0581e..0badb975d 100644 --- a/api/src/rest.rs +++ b/api/src/rest.rs @@ -91,6 +91,7 @@ impl From> for Error { } /// TLS config +#[derive(Clone)] pub struct TLSConfig { pub certificate: String, pub private_key: String, diff --git a/chain/tests/data_file_integrity.rs b/chain/tests/data_file_integrity.rs index 4fc50100f..440bf7db9 100644 --- a/chain/tests/data_file_integrity.rs +++ b/chain/tests/data_file_integrity.rs @@ -32,10 +32,10 @@ use chain::Chain; use core::core::verifier_cache::LruVerifierCache; use core::core::{Block, BlockHeader, Transaction}; use core::global::{self, ChainTypes}; +use core::libtx; use core::pow::{self, Difficulty}; use core::{consensus, genesis}; use keychain::{ExtKeychain, ExtKeychainPath, Keychain}; -use core::libtx; fn clean_output_dir(dir_name: &str) { let _ = fs::remove_dir_all(dir_name); diff --git a/chain/tests/mine_simple_chain.rs b/chain/tests/mine_simple_chain.rs index 01f03d0cb..05630a34c 100644 --- a/chain/tests/mine_simple_chain.rs +++ b/chain/tests/mine_simple_chain.rs @@ -32,10 +32,10 @@ use core::core::hash::Hashed; use core::core::verifier_cache::LruVerifierCache; use core::core::{Block, BlockHeader, OutputFeatures, OutputIdentifier, Transaction}; use core::global::ChainTypes; +use core::libtx::{self, build}; use core::pow::Difficulty; use core::{consensus, global, pow}; use keychain::{ExtKeychain, ExtKeychainPath, Keychain}; -use core::libtx::{self, build}; fn clean_output_dir(dir_name: &str) { let _ = fs::remove_dir_all(dir_name); diff --git a/chain/tests/store_indices.rs b/chain/tests/store_indices.rs index 632b3ff0a..b4afd04de 100644 --- a/chain/tests/store_indices.rs +++ b/chain/tests/store_indices.rs @@ -27,9 +27,9 @@ use chain::{Error, Tip}; use core::core::hash::Hashed; use core::core::Block; use core::global::{self, ChainTypes}; +use core::libtx; use core::pow::{self, Difficulty}; use keychain::{ExtKeychain, ExtKeychainPath, Keychain}; -use core::libtx; fn clean_output_dir(dir_name: &str) { let _ = fs::remove_dir_all(dir_name); diff --git a/chain/tests/test_coinbase_maturity.rs b/chain/tests/test_coinbase_maturity.rs index 2866c19ab..7be8440b3 100644 --- a/chain/tests/test_coinbase_maturity.rs +++ b/chain/tests/test_coinbase_maturity.rs @@ -32,10 +32,10 @@ use chain::ErrorKind; use core::core::transaction; use core::core::verifier_cache::LruVerifierCache; use core::global::{self, ChainTypes}; +use core::libtx::{self, build}; use core::pow::Difficulty; use core::{consensus, pow}; use keychain::{ExtKeychain, ExtKeychainPath, Keychain}; -use core::libtx::{self, build}; fn clean_output_dir(dir_name: &str) { let _ = fs::remove_dir_all(dir_name); diff --git a/core/fuzz/src/main.rs b/core/fuzz/src/main.rs index 96a336ca2..1d15a0ef3 100644 --- a/core/fuzz/src/main.rs +++ b/core/fuzz/src/main.rs @@ -4,11 +4,11 @@ extern crate grin_wallet; use grin_core::core::target::Difficulty; use grin_core::core::{Block, BlockHeader, CompactBlock, Transaction}; +use grin_core::libtx::build::{input, output, transaction, with_fee}; +use grin_core::libtx::reward; use grin_core::ser; use grin_keychain::keychain::ExtKeychain; use grin_keychain::Keychain; -use grin_core::libtx::build::{input, output, transaction, with_fee}; -use grin_core::libtx::reward; use std::fs::{self, File}; use std::path::Path; diff --git a/core/src/genesis.rs b/core/src/genesis.rs index 92b5f4c61..01be438c4 100644 --- a/core/src/genesis.rs +++ b/core/src/genesis.rs @@ -120,10 +120,11 @@ pub fn genesis_testnet4() -> core::Block { nonces: vec![ 0x46f3b4, 0x1135f8c, 0x1a1596f, 0x1e10f71, 0x41c03ea, 0x63fe8e7, 0x65af34f, 0x73c16d3, 0x8216dc3, 0x9bc75d0, 0xae7d9ad, 0xc1cb12b, 0xc65e957, 0xf67a152, - 0xfac6559, 0x100c3d71, 0x11eea08b, 0x1225dfbb, 0x124d61a1, 0x132a14b4, 0x13f4ec38, - 0x1542d236, 0x155f2df0, 0x1577394e, 0x163c3513, 0x19349845, 0x19d46953, 0x19f65ed4, - 0x1a0411b9, 0x1a2fa039, 0x1a72a06c, 0x1b02ddd2, 0x1b594d59, 0x1b7bffd3, 0x1befe12e, - 0x1c82e4cd, 0x1d492478, 0x1de132a5, 0x1e578b3c, 0x1ed96855, 0x1f222896, 0x1fea0da6, + 0xfac6559, 0x100c3d71, 0x11eea08b, 0x1225dfbb, 0x124d61a1, 0x132a14b4, + 0x13f4ec38, 0x1542d236, 0x155f2df0, 0x1577394e, 0x163c3513, 0x19349845, + 0x19d46953, 0x19f65ed4, 0x1a0411b9, 0x1a2fa039, 0x1a72a06c, 0x1b02ddd2, + 0x1b594d59, 0x1b7bffd3, 0x1befe12e, 0x1c82e4cd, 0x1d492478, 0x1de132a5, + 0x1e578b3c, 0x1ed96855, 0x1f222896, 0x1fea0da6, ], edge_bits: 29, }, diff --git a/core/src/lib.rs b/core/src/lib.rs index e8d5a72db..50c65306c 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -39,9 +39,9 @@ extern crate serde_derive; extern crate siphasher; #[macro_use] extern crate log; -extern crate uuid; extern crate chrono; extern crate failure; +extern crate uuid; #[macro_use] extern crate failure_derive; diff --git a/core/tests/block.rs b/core/tests/block.rs index 6634a55ad..05611332b 100644 --- a/core/tests/block.rs +++ b/core/tests/block.rs @@ -32,8 +32,8 @@ use grin_core::core::id::ShortIdentifiable; use grin_core::core::verifier_cache::{LruVerifierCache, VerifierCache}; use grin_core::core::Committed; use grin_core::core::{Block, BlockHeader, CompactBlock, KernelFeatures, OutputFeatures}; -use grin_core::{global, ser}; use grin_core::libtx::build::{self, input, output, with_fee}; +use grin_core::{global, ser}; use keychain::{BlindingFactor, ExtKeychain, Keychain}; use util::secp; diff --git a/core/tests/common/mod.rs b/core/tests/common/mod.rs index 066591462..971bc78d2 100644 --- a/core/tests/common/mod.rs +++ b/core/tests/common/mod.rs @@ -20,10 +20,10 @@ extern crate grin_util as util; use grin_core::core::block::{Block, BlockHeader}; use grin_core::core::Transaction; -use grin_core::pow::Difficulty; -use keychain::{Identifier, Keychain}; use grin_core::libtx::build::{self, input, output, with_fee}; use grin_core::libtx::reward; +use grin_core::pow::Difficulty; +use keychain::{Identifier, Keychain}; // utility producing a transaction with 2 inputs and a single outputs pub fn tx2i1o() -> Transaction { diff --git a/core/tests/verifier_cache.rs b/core/tests/verifier_cache.rs index 4206bedca..dd1232136 100644 --- a/core/tests/verifier_cache.rs +++ b/core/tests/verifier_cache.rs @@ -24,8 +24,8 @@ pub mod common; use grin_core::core::verifier_cache::{LruVerifierCache, VerifierCache}; use grin_core::core::{Output, OutputFeatures}; -use keychain::{ExtKeychain, Keychain}; use grin_core::libtx::proof; +use keychain::{ExtKeychain, Keychain}; fn verifier_cache() -> Arc> { Arc::new(RwLock::new(LruVerifierCache::new())) diff --git a/pool/tests/block_building.rs b/pool/tests/block_building.rs index db1214c46..4ef22066d 100644 --- a/pool/tests/block_building.rs +++ b/pool/tests/block_building.rs @@ -33,8 +33,8 @@ use core::core::verifier_cache::LruVerifierCache; use core::core::{Block, BlockHeader, Transaction}; use core::pow::Difficulty; -use keychain::{ExtKeychain, Keychain}; use core::libtx; +use keychain::{ExtKeychain, Keychain}; use common::*; diff --git a/pool/tests/block_reconciliation.rs b/pool/tests/block_reconciliation.rs index 735c9e2be..944312896 100644 --- a/pool/tests/block_reconciliation.rs +++ b/pool/tests/block_reconciliation.rs @@ -33,9 +33,9 @@ use core::core::{Block, BlockHeader}; use common::*; use core::core::hash::Hashed; use core::core::verifier_cache::LruVerifierCache; +use core::libtx; use core::pow::Difficulty; use keychain::{ExtKeychain, Keychain}; -use core::libtx; #[test] fn test_transaction_pool_block_reconciliation() { diff --git a/pool/tests/common/mod.rs b/pool/tests/common/mod.rs index 5f83b6930..3731c9632 100644 --- a/pool/tests/common/mod.rs +++ b/pool/tests/common/mod.rs @@ -39,8 +39,8 @@ use chain::store::ChainStore; use chain::types::Tip; use pool::*; -use keychain::{ExtKeychain, Keychain}; use core::libtx; +use keychain::{ExtKeychain, Keychain}; use pool::types::*; use pool::TransactionPool; diff --git a/pool/tests/transaction_pool.rs b/pool/tests/transaction_pool.rs index ce9743cdd..8c166e2fe 100644 --- a/pool/tests/transaction_pool.rs +++ b/pool/tests/transaction_pool.rs @@ -31,9 +31,9 @@ use util::RwLock; use common::*; use core::core::verifier_cache::LruVerifierCache; use core::core::{transaction, Block, BlockHeader}; +use core::libtx; use core::pow::Difficulty; use keychain::{ExtKeychain, Keychain}; -use core::libtx; /// Test we can add some txs to the pool (both stempool and txpool). #[test] diff --git a/servers/src/mining/mine_block.rs b/servers/src/mining/mine_block.rs index a7cb22e42..18bb8ee93 100644 --- a/servers/src/mining/mine_block.rs +++ b/servers/src/mining/mine_block.rs @@ -173,8 +173,7 @@ fn burn_reward(block_fees: BlockFees) -> Result<(core::Output, core::TxKernel, B let keychain = ExtKeychain::from_random_seed().unwrap(); let key_id = ExtKeychain::derive_key_id(1, 1, 0, 0, 0); let (out, kernel) = - libtx::reward::output(&keychain, &key_id, block_fees.fees, block_fees.height) - .unwrap(); + libtx::reward::output(&keychain, &key_id, block_fees.fees, block_fees.height).unwrap(); Ok((out, kernel, block_fees)) } diff --git a/src/bin/cmd/mod.rs b/src/bin/cmd/mod.rs index 510df4f3c..b06b22f06 100644 --- a/src/bin/cmd/mod.rs +++ b/src/bin/cmd/mod.rs @@ -16,6 +16,7 @@ mod client; mod config; mod server; mod wallet; +mod wallet_args; pub use self::client::client_command; pub use self::config::{config_command_server, config_command_wallet}; diff --git a/src/bin/cmd/wallet.rs b/src/bin/cmd/wallet.rs index fb85a726b..6de0570b0 100644 --- a/src/bin/cmd/wallet.rs +++ b/src/bin/cmd/wallet.rs @@ -13,28 +13,28 @@ // limitations under the License. use clap::ArgMatches; -use rpassword; -use std::collections::HashMap; -use std::fs::File; -use std::io::Write; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use std::thread; use std::time::Duration; -use serde_json as json; - -use api::TLSConfig; +use super::wallet_args; use config::GlobalWalletConfig; -use core::{core, global}; -use grin_wallet::libwallet::ErrorKind; -use grin_wallet::{self, controller, display, libwallet}; -use grin_wallet::{ - instantiate_wallet, FileWalletCommAdapter, HTTPNodeClient, HTTPWalletCommAdapter, - KeybaseWalletCommAdapter, LMDBBackend, NullWalletCommAdapter, WalletConfig, WalletSeed, -}; -use keychain; +use core::global; +use grin_wallet::{self, command, WalletConfig, WalletSeed}; use servers::start_webwallet_server; -use util::file::get_first_line; + +// define what to do on argument error +macro_rules! arg_parse { + ( $r:expr ) => { + match $r { + Ok(res) => res, + Err(e) => { + println!("{}", e); + return 0; + } + } + }; +} pub fn _init_wallet_seed(wallet_config: WalletConfig, password: &str) { if let Err(_) = WalletSeed::from_file(&wallet_config, password) { @@ -54,33 +54,6 @@ pub fn seed_exists(wallet_config: WalletConfig) -> bool { } } -pub fn prompt_password(args: &ArgMatches) -> String { - match args.value_of("pass") { - None => { - println!("Temporary note:"); - println!( - "If this is your first time running your wallet since BIP32 (word lists) \ - were implemented, your seed will be converted to \ - the new format. Please ensure the provided password is correct." - ); - println!("If this goes wrong, your old 'wallet.seed' file has been saved as 'wallet.seed.bak' \ - Rename this file to back to `wallet.seed` and try again"); - rpassword::prompt_password_stdout("Password: ").unwrap() - } - Some(p) => p.to_owned(), - } -} - -pub fn prompt_password_confirm() -> String { - let first = rpassword::prompt_password_stdout("Password: ").unwrap(); - let second = rpassword::prompt_password_stdout("Confirm Password: ").unwrap(); - if first != second { - println!("Passwords do not match"); - std::process::exit(0); - } - first -} - pub fn wallet_command(wallet_args: &ArgMatches, config: GlobalWalletConfig) -> i32 { // just get defaults from the global config let mut wallet_config = config.members.unwrap().wallet; @@ -101,669 +74,95 @@ pub fn wallet_command(wallet_args: &ArgMatches, config: GlobalWalletConfig) -> i wallet_config.check_node_api_http_addr = sa.to_string().clone(); } - let mut show_spent = false; - if wallet_args.is_present("show_spent") { - show_spent = true; - } - let node_api_secret = get_first_line(wallet_config.node_api_secret_path.clone()); + let global_wallet_args = + arg_parse!(wallet_args::parse_global_args(&wallet_config, &wallet_args)); - // Decrypt the seed from the seed file and derive the keychain. - // Generate the initial wallet seed if we are running "wallet init". - if let ("init", Some(r)) = wallet_args.subcommand() { - if let Err(e) = WalletSeed::seed_file_exists(&wallet_config) { - println!( - "Not creating wallet - Wallet seed file already exists at {}", - e.inner - ); - return 0; - } - let list_length = match r.is_present("short_wordlist") { - false => 32, - true => 16, - }; - println!("Please enter a password for your new wallet"); - let passphrase = prompt_password_confirm(); - WalletSeed::init_file(&wallet_config, list_length, &passphrase) - .expect("Failed to init wallet seed file."); - info!("Wallet seed file created"); - let client_n = - HTTPNodeClient::new(&wallet_config.check_node_api_http_addr, node_api_secret); - let _: LMDBBackend = - LMDBBackend::new(wallet_config.clone(), &passphrase, client_n).unwrap_or_else(|e| { - panic!( - "Error creating DB for wallet: {} Config: {:?}", - e, wallet_config - ); - }); - info!("Wallet database backend created"); - // give logging thread a moment to catch up - thread::sleep(Duration::from_millis(200)); - // we are done here with creating the wallet, so just return - return 0; - } - - // Recover a seed from a recovery phrase - if let ("recover", Some(r)) = wallet_args.subcommand() { - if !r.is_present("recovery_phrase") { - // only needed to display phrase - let passphrase = prompt_password(wallet_args); - let seed = match WalletSeed::from_file(&wallet_config, &passphrase) { - Ok(s) => s, - Err(e) => { - println!("Can't open wallet seed file (check password): {}", e); - std::process::exit(0); - } - }; - let _ = seed.show_recovery_phrase(); + // closure to instantiate wallet as needed by each subcommand + let inst_wallet = || { + let res = wallet_args::instantiate_wallet(wallet_config.clone(), &global_wallet_args); + res.unwrap_or_else(|e| { + println!("{}", e); std::process::exit(0); - } - let word_list = match r.value_of("recovery_phrase") { - Some(w) => w, - None => { - println!("Recovery word phrase must be provided (in quotes)"); - std::process::exit(0); - } - }; - // check word list is okay before asking for password - if WalletSeed::from_mnemonic(word_list).is_err() { - println!("Recovery word phrase is invalid"); - std::process::exit(0); - } - println!("Please provide a new password for the recovered wallet"); - let passphrase = prompt_password_confirm(); - let res = WalletSeed::recover_from_phrase(&wallet_config, word_list, &passphrase); - if let Err(e) = res { - thread::sleep(Duration::from_millis(200)); - error!("Error recovering seed with list '{}' - {}", word_list, e); - return 0; - } - - thread::sleep(Duration::from_millis(200)); - return 0; - } - - let account = match wallet_args.value_of("account") { - None => { - error!("Failed to read account."); - return 1; - } - Some(p) => p, + }) }; - // all further commands always need a password - let passphrase = prompt_password(wallet_args); - - // Handle listener startup commands - { - let api_secret = get_first_line(wallet_config.api_secret_path.clone()); - - let tls_conf = match wallet_config.tls_certificate_file.clone() { - None => None, - Some(file) => Some(TLSConfig::new( - file, - wallet_config - .tls_certificate_key - .clone() - .unwrap_or_else(|| { - panic!("Private key for certificate is not set"); - }), - )), - }; - match wallet_args.subcommand() { - ("listen", Some(listen_args)) => { - if let Some(port) = listen_args.value_of("port") { - wallet_config.api_listen_port = port.parse().unwrap(); - } - let mut params = HashMap::new(); - params.insert( - "api_listen_addr".to_owned(), - wallet_config.api_listen_addr(), - ); - if let Some(t) = tls_conf { - params.insert("certificate".to_owned(), t.certificate); - params.insert("private_key".to_owned(), t.private_key); - } - let adapter = match listen_args.value_of("method") { - Some("http") => HTTPWalletCommAdapter::new(), - Some("keybase") => KeybaseWalletCommAdapter::new(), - _ => { - std::process::exit(1); - } - }; - adapter - .listen( - params, - wallet_config.clone(), - &passphrase, - account, - node_api_secret.clone(), - ).unwrap_or_else(|e| { - if e.kind() == ErrorKind::WalletSeedDecryption { - println!("Error decrypting wallet seed (check provided password)"); - std::process::exit(0); - } - panic!( - "Error creating wallet listener: {:?} Config: {:?}", - e, wallet_config - ); - }); - } - ("owner_api", Some(_api_args)) => { - let wallet = instantiate_wallet( - wallet_config.clone(), - &passphrase, - account, - node_api_secret.clone(), - ).unwrap_or_else(|e| { - if e.kind() == grin_wallet::ErrorKind::Encryption { - println!("Error decrypting wallet seed (check provided password)"); - std::process::exit(0); - } - panic!( - "Error creating wallet listener: {:?} Config: {:?}", - e, wallet_config - ); - }); - // TLS is disabled because we bind to localhost - controller::owner_listener(wallet.clone(), "127.0.0.1:13420", api_secret, None) - .unwrap_or_else(|e| { - panic!( - "Error creating wallet api listener: {:?} Config: {:?}", - e, wallet_config - ); - }); - } - ("web", Some(_api_args)) => { - let wallet = instantiate_wallet( - wallet_config.clone(), - &passphrase, - account, - node_api_secret.clone(), - ).unwrap_or_else(|e| { - if e.kind() == grin_wallet::ErrorKind::Encryption { - println!("Error decrypting wallet seed (check provided password)"); - std::process::exit(0); - } - panic!( - "Error creating wallet listener: {:?} Config: {:?}", - e, wallet_config - ); - }); - // start owner listener and run static file server - start_webwallet_server(); - controller::owner_listener(wallet.clone(), "127.0.0.1:13420", api_secret, tls_conf) - .unwrap_or_else(|e| { - panic!( - "Error creating wallet api listener: {:?} Config: {:?}", - e, wallet_config - ); - }); - } - _ => {} - }; - } - - let wallet = instantiate_wallet( - wallet_config.clone(), - &passphrase, - account, - node_api_secret.clone(), - ).unwrap_or_else(|e| { - if e.kind() == grin_wallet::ErrorKind::Encryption { - println!("Error decrypting wallet seed (check provided password)"); - std::process::exit(0); + let res = match wallet_args.subcommand() { + ("init", Some(args)) => { + let a = arg_parse!(wallet_args::parse_init_args(&wallet_config, &args)); + command::init(&global_wallet_args, a) } - panic!( - "Error instantiating wallet: {:?} Config: {:?}", - e, wallet_config - ); - }); - - let res = controller::owner_single_use(wallet.clone(), |api| { - match wallet_args.subcommand() { - ("account", Some(acct_args)) => { - let create = acct_args.value_of("create"); - if create.is_none() { - let res = controller::owner_single_use(wallet, |api| { - let acct_mappings = api.accounts()?; - // give logging thread a moment to catch up - thread::sleep(Duration::from_millis(200)); - display::accounts(acct_mappings); - Ok(()) - }); - if let Err(e) = res { - error!("Error listing accounts: {}", e); - return Err(e); - } - } else { - let label = create.unwrap(); - let res = controller::owner_single_use(wallet, |api| { - api.create_account_path(label)?; - thread::sleep(Duration::from_millis(200)); - println!("Account: '{}' Created!", label); - Ok(()) - }); - if let Err(e) = res { - thread::sleep(Duration::from_millis(200)); - error!("Error creating account '{}': {}", label, e); - return Err(e); - } - } - Ok(()) - } - ("send", Some(send_args)) => { - let amount = send_args.value_of("amount").ok_or_else(|| { - ErrorKind::GenericError("Amount to send required".to_string()) - })?; - let amount = core::amount_from_hr_string(amount).map_err(|e| { - ErrorKind::GenericError(format!( - "Could not parse amount as a number with optional decimal point. e={:?}", - e - )) - })?; - let message = match send_args.is_present("message") { - true => Some(send_args.value_of("message").unwrap().to_owned()), - false => None, - }; - let minimum_confirmations: u64 = send_args - .value_of("minimum_confirmations") - .ok_or_else(|| { - ErrorKind::GenericError( - "Minimum confirmations to send required".to_string(), - ) - }).and_then(|v| { - v.parse().map_err(|e| { - ErrorKind::GenericError(format!( - "Could not parse minimum_confirmations as a whole number. e={:?}", - e - )) - }) - })?; - let selection_strategy = - send_args.value_of("selection_strategy").ok_or_else(|| { - ErrorKind::GenericError("Selection strategy required".to_string()) - })?; - let method = send_args.value_of("method").ok_or_else(|| { - ErrorKind::GenericError("Payment method required".to_string()) - })?; - let dest = { - if method == "self" { - match send_args.value_of("dest") { - Some(d) => d, - None => "default", - } - } else { - send_args.value_of("dest").ok_or_else(|| { - ErrorKind::GenericError( - "Destination wallet address required".to_string(), - ) - })? - } - }; - let change_outputs = send_args - .value_of("change_outputs") - .ok_or_else(|| ErrorKind::GenericError("Change outputs required".to_string())) - .and_then(|v| { - v.parse().map_err(|e| { - ErrorKind::GenericError(format!( - "Failed to parse number of change outputs. e={:?}", - e - )) - }) - })?; - let fluff = send_args.is_present("fluff"); - let max_outputs = 500; - if method == "http" && !dest.starts_with("http://") && !dest.starts_with("https://") - { - return Err(ErrorKind::GenericError(format!( - "HTTP Destination should start with http://: or https://: {}", - dest - )).into()); - } - let result = api.initiate_tx( - None, - amount, - minimum_confirmations, - max_outputs, - change_outputs, - selection_strategy == "all", - message, - ); - let (mut slate, lock_fn) = match result { - Ok(s) => { - info!( - "Tx created: {} grin to {} (strategy '{}')", - core::amount_to_hr_string(amount, false), - dest, - selection_strategy, - ); - s - } - Err(e) => { - error!("Tx not created: {}", e); - match e.kind() { - // user errors, don't backtrace - libwallet::ErrorKind::NotEnoughFunds { .. } => {} - libwallet::ErrorKind::FeeDispute { .. } => {} - libwallet::ErrorKind::FeeExceedsAmount { .. } => {} - _ => { - // otherwise give full dump - error!("Backtrace: {}", e.backtrace().unwrap()); - } - }; - return Err(e); - } - }; - let adapter = match method { - "http" => HTTPWalletCommAdapter::new(), - "file" => FileWalletCommAdapter::new(), - "self" => NullWalletCommAdapter::new(), - "keybase" => KeybaseWalletCommAdapter::new(), - _ => NullWalletCommAdapter::new(), - }; - if adapter.supports_sync() { - slate = adapter.send_tx_sync(dest, &slate)?; - if method == "self" { - controller::foreign_single_use(wallet, |api| { - api.receive_tx(&mut slate, Some(dest), None)?; - Ok(()) - })?; - } - api.tx_lock_outputs(&slate, lock_fn)?; - if let Err(e) = api.verify_slate_messages(&slate) { - error!("Error validating participant messages: {}", e); - return Err(e); - } - api.finalize_tx(&mut slate)?; - } else { - adapter.send_tx_async(dest, &slate)?; - api.tx_lock_outputs(&slate, lock_fn)?; - } - if adapter.supports_sync() { - let result = api.post_tx(&slate.tx, fluff); - match result { - Ok(_) => { - info!("Tx sent",); - println!("Tx sent",); - return Ok(()); - } - Err(e) => { - error!("Tx not sent: {}", e); - return Err(e); - } - } - } - Ok(()) - } - ("receive", Some(send_args)) => { - let mut receive_result: Result<(), grin_wallet::libwallet::Error> = Ok(()); - let message = match send_args.is_present("message") { - true => Some(send_args.value_of("message").unwrap().to_owned()), - false => None, - }; - let tx_file = send_args.value_of("input").ok_or_else(|| { - ErrorKind::GenericError("Transaction file required".to_string()) - })?; - if !Path::new(tx_file).is_file() { - return Err( - ErrorKind::GenericError(format!("File {} not found.", tx_file)).into(), - ); - } - let adapter = FileWalletCommAdapter::new(); - let mut slate = adapter.receive_tx_async(tx_file)?; - controller::foreign_single_use(wallet, |api| { - api.receive_tx(&mut slate, Some(account), message)?; - Ok(()) - })?; - let send_tx = format!("{}.response", tx_file); - adapter.send_tx_async(&send_tx, &slate)?; - info!( - "Response file {}.response generated, sending it back to the transaction originator.", - tx_file, - ); - receive_result - } - ("finalize", Some(send_args)) => { - let fluff = send_args.is_present("fluff"); - let tx_file = send_args.value_of("input").ok_or_else(|| { - ErrorKind::GenericError("Receiver's transaction file required".to_string()) - })?; - if !Path::new(tx_file).is_file() { - return Err( - ErrorKind::GenericError(format!("File {} not found.", tx_file)).into(), - ); - } - let adapter = FileWalletCommAdapter::new(); - let mut slate = adapter.receive_tx_async(tx_file)?; - if let Err(e) = api.verify_slate_messages(&slate) { - error!("Error validating participant messages: {}", e); - return Err(e); - } - let _ = api.finalize_tx(&mut slate).expect("Finalize failed"); - - let result = api.post_tx(&slate.tx, fluff); - match result { - Ok(_) => { - info!("Transaction sent successfully, check the wallet again for confirmation."); - Ok(()) - } - Err(e) => { - error!("Tx not sent: {}", e); - Err(e) - } - } - } - ("info", Some(args)) => { - let minimum_confirmations: u64 = args - .value_of("minimum_confirmations") - .ok_or_else(|| { - ErrorKind::GenericError("Minimum confirmations required".to_string()) - }).and_then(|v| { - v.parse().map_err(|e| { - ErrorKind::GenericError(format!( - "Could not parse minimum_confirmations as a whole number. e={:?}", - e - )) - }) - })?; - let (validated, wallet_info) = api - .retrieve_summary_info(true, minimum_confirmations) - .map_err(|e| { - ErrorKind::GenericError(format!( - "Error getting wallet info: {:?} Config: {:?}", - e, wallet_config - )) - })?; - display::info( - account, - &wallet_info, - validated, - wallet_config.dark_background_color_scheme.unwrap_or(true), - ); - Ok(()) - } - ("outputs", Some(_)) => { - let (height, _) = api.node_height()?; - let (validated, outputs) = api.retrieve_outputs(show_spent, true, None)?; - display::outputs( - account, - height, - validated, - outputs, - wallet_config.dark_background_color_scheme.unwrap_or(true), - ).map_err(|e| { - ErrorKind::GenericError(format!( - "Error getting wallet outputs: {:?} Config: {:?}", - e, wallet_config - )) - })?; - Ok(()) - } - ("txs", Some(txs_args)) => { - let tx_id = match txs_args.value_of("id") { - None => None, - Some(tx) => match tx.parse() { - Ok(t) => Some(t), - Err(_) => { - return Err(ErrorKind::GenericError( - "Unable to parse argument 'id' as a number".to_string(), - ).into()); - } - }, - }; - let (height, _) = api.node_height()?; - let (validated, txs) = api.retrieve_txs(true, tx_id, None)?; - let include_status = !tx_id.is_some(); - display::txs( - account, - height, - validated, - txs, - include_status, - wallet_config.dark_background_color_scheme.unwrap_or(true), - ).map_err(|e| { - ErrorKind::GenericError(format!( - "Error getting wallet outputs: {} Config: {:?}", - e, wallet_config - )) - })?; - // if given a particular transaction id, also get and display associated - // inputs/outputs - if tx_id.is_some() { - let (_, outputs) = api.retrieve_outputs(true, false, tx_id)?; - display::outputs( - account, - height, - validated, - outputs, - wallet_config.dark_background_color_scheme.unwrap_or(true), - ).map_err(|e| { - ErrorKind::GenericError(format!( - "Error getting wallet outputs: {} Config: {:?}", - e, wallet_config - )) - })?; - }; - Ok(()) - } - ("repost", Some(repost_args)) => { - let tx_id = repost_args - .value_of("id") - .ok_or_else(|| { - ErrorKind::GenericError("Transaction of a completed but unconfirmed transaction required (specify with --id=[id])".to_string()) - }).and_then(|v|{ - v.parse().map_err(|e| { - ErrorKind::GenericError(format!( - "Unable to parse argument 'id' as a number. e={:?}", - e - )) - })})?; - - let dump_file = repost_args.value_of("dumpfile"); - let fluff = repost_args.is_present("fluff"); - let (_, txs) = api.retrieve_txs(true, Some(tx_id), None)?; - let stored_tx = txs[0].get_stored_tx(); - if stored_tx.is_none() { - println!( - "Transaction with id {} does not have transaction data. Not reposting.", - tx_id - ); - std::process::exit(0); - } - match dump_file { - None => { - if txs[0].confirmed { - println!("Transaction with id {} is confirmed. Not reposting.", tx_id); - std::process::exit(0); - } - api.post_tx(&stored_tx.unwrap(), fluff)?; - info!("Reposted transaction at {}", tx_id); - println!("Reposted transaction at {}", tx_id); - Ok(()) - } - Some(f) => { - let mut tx_file = File::create(f)?; - tx_file.write_all(json::to_string(&stored_tx).unwrap().as_bytes())?; - tx_file.sync_all()?; - info!("Dumped transaction data for tx {} to {}", tx_id, f); - println!("Dumped transaction data for tx {} to {}", tx_id, f); - Ok(()) - } - } - } - ("cancel", Some(tx_args)) => { - let mut tx_id_string = ""; - let tx_id = match tx_args.value_of("id") { - None => None, - Some(tx) => match tx.parse() { - Ok(t) => { - tx_id_string = tx; - Some(t) - } - Err(e) => { - return Err(ErrorKind::GenericError(format!( - "Could not parse id parameter. e={:?}", - e, - )).into()); - } - }, - }; - let tx_slate_id = match tx_args.value_of("txid") { - None => None, - Some(tx) => match tx.parse() { - Ok(t) => { - tx_id_string = tx; - Some(t) - } - Err(e) => { - return Err(ErrorKind::GenericError(format!( - "Could not parse txid parameter. e={:?}", - e, - )).into()); - } - }, - }; - if (tx_id.is_none() && tx_slate_id.is_none()) - || (tx_id.is_some() && tx_slate_id.is_some()) - { - return Err(ErrorKind::GenericError(format!( - "'id' (-i) or 'txid' (-t) argument is required." - )).into()); - } - - let result = api.cancel_tx(tx_id, tx_slate_id); - match result { - Ok(_) => { - info!("Transaction {} Cancelled", tx_id_string); - Ok(()) - } - Err(e) => { - error!("TX Cancellation failed: {}", e); - Err(e) - } - } - } - ("restore", Some(_)) => { - let result = api.restore(); - match result { - Ok(_) => { - info!("Wallet restore complete",); - Ok(()) - } - Err(e) => { - error!("Wallet restore failed: {}", e); - error!("Backtrace: {}", e.backtrace().unwrap()); - Err(e) - } - } - } - _ => { - return Err(ErrorKind::GenericError( - "Unknown wallet command, use 'grin help wallet' for details".to_string(), - ).into()); - } + ("recover", Some(args)) => { + let a = arg_parse!(wallet_args::parse_recover_args(&global_wallet_args, &args)); + command::recover(&wallet_config, a) } - }); + ("listen", Some(args)) => { + let mut c = wallet_config.clone(); + let mut g = global_wallet_args.clone(); + arg_parse!(wallet_args::parse_listen_args(&mut c, &mut g, &args)); + command::listen(&wallet_config, &g) + } + ("owner_api", Some(_)) => { + let mut g = global_wallet_args.clone(); + g.tls_conf = None; + command::owner_api(inst_wallet(), &g) + } + ("web", Some(_)) => { + start_webwallet_server(); + command::owner_api(inst_wallet(), &global_wallet_args) + } + ("account", Some(args)) => { + let a = arg_parse!(wallet_args::parse_account_args(&args)); + command::account(inst_wallet(), a) + } + ("send", Some(args)) => { + let a = arg_parse!(wallet_args::parse_send_args(&args)); + command::send(inst_wallet(), a) + } + ("receive", Some(args)) => { + let a = arg_parse!(wallet_args::parse_receive_args(&args)); + command::receive(inst_wallet(), &global_wallet_args, a) + } + ("finalize", Some(args)) => { + let a = arg_parse!(wallet_args::parse_finalize_args(&args)); + command::finalize(inst_wallet(), a) + } + ("info", Some(args)) => { + let a = arg_parse!(wallet_args::parse_info_args(&args)); + command::info( + inst_wallet(), + &global_wallet_args, + a, + wallet_config.dark_background_color_scheme.unwrap_or(true), + ) + } + ("outputs", Some(_)) => command::outputs( + inst_wallet(), + &global_wallet_args, + wallet_config.dark_background_color_scheme.unwrap_or(true), + ), + ("txs", Some(args)) => { + let a = arg_parse!(wallet_args::parse_txs_args(&args)); + command::txs( + inst_wallet(), + &global_wallet_args, + a, + wallet_config.dark_background_color_scheme.unwrap_or(true), + ) + } + ("repost", Some(args)) => { + let a = arg_parse!(wallet_args::parse_repost_args(&args)); + command::repost(inst_wallet(), a) + } + ("cancel", Some(args)) => { + let a = arg_parse!(wallet_args::parse_cancel_args(&args)); + command::cancel(inst_wallet(), a) + } + ("restore", Some(_)) => command::restore(inst_wallet()), + _ => { + println!("Unknown wallet command, use 'grin help wallet' for details"); + return 0; + } + }; // we need to give log output a chance to catch up before exiting thread::sleep(Duration::from_millis(100)); @@ -771,6 +170,10 @@ pub fn wallet_command(wallet_args: &ArgMatches, config: GlobalWalletConfig) -> i println!("Wallet command failed: {}", e); 1 } else { + println!( + "Command '{}' completed successfully", + wallet_args.subcommand().0 + ); 0 } } diff --git a/src/bin/cmd/wallet_args.rs b/src/bin/cmd/wallet_args.rs new file mode 100644 index 000000000..8907a4760 --- /dev/null +++ b/src/bin/cmd/wallet_args.rs @@ -0,0 +1,393 @@ +// Copyright 2018 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// Argument parsing and error handling for wallet commands +use clap::ArgMatches; +use failure::Fail; + +use api::TLSConfig; +use core::core; +use grin_wallet::{self, command, WalletConfig, WalletSeed}; +use std::path::Path; +use util::file::get_first_line; + +/// Simple error definition, just so we can return errors from all commands +/// and let the caller figure out what to do +#[derive(Clone, Eq, PartialEq, Debug, Fail)] +pub enum Error { + #[fail(display = "Invalid Arguments: {}", _0)] + ArgumentError(String), +} + +pub fn prompt_password(password: &Option) -> String { + match password { + None => { + println!("Temporary note:"); + println!( + "If this is your first time running your wallet since BIP32 (word lists) \ + were implemented, your seed will be converted to \ + the new format. Please ensure the provided password is correct." + ); + println!("If this goes wrong, your old 'wallet.seed' file has been saved as 'wallet.seed.bak' \ + Rename this file to back to `wallet.seed` and try again"); + rpassword::prompt_password_stdout("Password: ").unwrap() + } + Some(p) => p.to_owned(), + } +} + +fn prompt_password_confirm() -> String { + let first = rpassword::prompt_password_stdout("Password: ").unwrap(); + let second = rpassword::prompt_password_stdout("Confirm Password: ").unwrap(); + if first != second { + println!("Passwords do not match"); + std::process::exit(0); + } + first +} + +// instantiate wallet (needed by most functions) + +pub fn instantiate_wallet( + config: WalletConfig, + g_args: &command::GlobalArgs, +) -> Result { + let passphrase = prompt_password(&g_args.password); + let res = grin_wallet::instantiate_wallet( + config.clone(), + &passphrase, + &g_args.account, + g_args.node_api_secret.clone(), + ); + match res { + Ok(p) => Ok(p), + Err(e) => { + let msg = { + match e.kind() { + grin_wallet::ErrorKind::Encryption => { + format!("Error decrypting wallet seed (check provided password)") + } + _ => format!("Error instantiating wallet: {}", e), + } + }; + Err(Error::ArgumentError(msg)) + } + } +} + +// parses a required value, or throws error with message otherwise +fn parse_required<'a>(args: &'a ArgMatches, name: &str) -> Result<&'a str, Error> { + let arg = args.value_of(name); + match arg { + Some(ar) => Ok(ar), + None => { + let msg = format!("Value for argument '{}' is required in this context", name,); + Err(Error::ArgumentError(msg)) + } + } +} + +// parses a number, or throws error with message otherwise +fn parse_u64(arg: &str, name: &str) -> Result { + let val = arg.parse::(); + match val { + Ok(v) => Ok(v), + Err(e) => { + let msg = format!("Could not parse {} as a whole number. e={}", name, e); + Err(Error::ArgumentError(msg)) + } + } +} + +pub fn parse_global_args( + config: &WalletConfig, + args: &ArgMatches, +) -> Result { + let account = parse_required(args, "account")?; + let mut show_spent = false; + if args.is_present("show_spent") { + show_spent = true; + } + let node_api_secret = get_first_line(config.node_api_secret_path.clone()); + let password = match args.value_of("pass") { + None => None, + Some(p) => Some(p.to_owned()), + }; + + let tls_conf = match config.tls_certificate_file.clone() { + None => None, + Some(file) => { + let key = match config.tls_certificate_key.clone() { + Some(k) => k, + None => { + let msg = format!("Private key for certificate is not set"); + return Err(Error::ArgumentError(msg)); + } + }; + Some(TLSConfig::new(file, key)) + } + }; + + Ok(command::GlobalArgs { + account: account.to_owned(), + show_spent: show_spent, + node_api_secret: node_api_secret, + password: password, + tls_conf: tls_conf, + }) +} + +pub fn parse_init_args( + config: &WalletConfig, + args: &ArgMatches, +) -> Result { + if let Err(e) = WalletSeed::seed_file_exists(config) { + let msg = format!("Not creating wallet - {}", e.inner); + return Err(Error::ArgumentError(msg)); + } + let list_length = match args.is_present("short_wordlist") { + false => 32, + true => 16, + }; + println!("Please enter a password for your new wallet"); + let password = prompt_password_confirm(); + Ok(command::InitArgs { + list_length: list_length, + password: password, + config: config.clone(), + }) +} + +pub fn parse_recover_args( + g_args: &command::GlobalArgs, + args: &ArgMatches, +) -> Result { + let (passphrase, recovery_phrase) = { + match args.value_of("recovery_phrase") { + None => (prompt_password(&g_args.password), None), + Some(l) => { + if WalletSeed::from_mnemonic(l).is_err() { + let msg = format!("Recovery word phrase is invalid"); + return Err(Error::ArgumentError(msg)); + } + println!("Please provide a new password for the recovered wallet"); + (prompt_password_confirm(), Some(l.to_owned())) + } + } + }; + Ok(command::RecoverArgs { + passphrase: passphrase, + recovery_phrase: recovery_phrase, + }) +} + +pub fn parse_listen_args( + config: &mut WalletConfig, + g_args: &mut command::GlobalArgs, + args: &ArgMatches, +) -> Result<(), Error> { + // listen args + let pass = match args.value_of("pass") { + Some(p) => Some(p.to_owned()), + None => Some(prompt_password(&None)), + }; + g_args.password = pass; + if let Some(port) = args.value_of("port") { + config.api_listen_port = port.parse().unwrap(); + } + Ok(()) +} + +pub fn parse_account_args(account_args: &ArgMatches) -> Result { + let create = match account_args.value_of("create") { + None => None, + Some(s) => Some(s.to_owned()), + }; + Ok(command::AccountArgs { create: create }) +} + +pub fn parse_send_args(args: &ArgMatches) -> Result { + // amount + let amount = parse_required(args, "amount")?; + let amount = core::amount_from_hr_string(amount); + let amount = match amount { + Ok(a) => a, + Err(e) => { + let msg = format!( + "Could not parse amount as a number with optional decimal point. e={}", + e + ); + return Err(Error::ArgumentError(msg)); + } + }; + + // message + let message = match args.is_present("message") { + true => Some(args.value_of("message").unwrap().to_owned()), + false => None, + }; + + // minimum_confirmations + let min_c = parse_required(args, "minimum_confirmations")?; + let min_c = parse_u64(min_c, "minimum_confirmations")?; + + // selection_strategy + let selection_strategy = parse_required(args, "selection_strategy")?; + + // method + let method = parse_required(args, "method")?; + + // dest + let dest = { + if method == "self" { + match args.value_of("dest") { + Some(d) => d, + None => "default", + } + } else { + parse_required(args, "dest")? + } + }; + if method == "http" && !dest.starts_with("http://") && !dest.starts_with("https://") { + let msg = format!( + "HTTP Destination should start with http://: or https://: {}", + dest, + ); + return Err(Error::ArgumentError(msg)); + } + + // change_outputs + let change_outputs = parse_required(args, "change_outputs")?; + let change_outputs = parse_u64(change_outputs, "change_outputs")? as usize; + + // fluff + let fluff = args.is_present("fluff"); + + // max_outputs + let max_outputs = 500; + + Ok(command::SendArgs { + amount: amount, + message: message, + minimum_confirmations: min_c, + selection_strategy: selection_strategy.to_owned(), + method: method.to_owned(), + dest: dest.to_owned(), + change_outputs: change_outputs, + fluff: fluff, + max_outputs: max_outputs, + }) +} + +pub fn parse_receive_args(receive_args: &ArgMatches) -> Result { + // message + let message = match receive_args.is_present("message") { + true => Some(receive_args.value_of("message").unwrap().to_owned()), + false => None, + }; + + // input + let tx_file = parse_required(receive_args, "input")?; + + // validate input + if !Path::new(&tx_file).is_file() { + let msg = format!("File {} not found.", &tx_file); + return Err(Error::ArgumentError(msg)); + } + + Ok(command::ReceiveArgs { + input: tx_file.to_owned(), + message: message, + }) +} + +pub fn parse_finalize_args(args: &ArgMatches) -> Result { + let fluff = args.is_present("fluff"); + let tx_file = parse_required(args, "input")?; + + if !Path::new(&tx_file).is_file() { + let msg = format!("File {} not found.", tx_file); + return Err(Error::ArgumentError(msg)); + } + Ok(command::FinalizeArgs { + input: tx_file.to_owned(), + fluff: fluff, + }) +} + +pub fn parse_info_args(args: &ArgMatches) -> Result { + // minimum_confirmations + let mc = parse_required(args, "minimum_confirmations")?; + let mc = parse_u64(mc, "minimum_confirmations")?; + Ok(command::InfoArgs { + minimum_confirmations: mc, + }) +} + +pub fn parse_txs_args(args: &ArgMatches) -> Result { + let tx_id = match args.value_of("id") { + None => None, + Some(tx) => Some(parse_u64(tx, "id")? as u32), + }; + Ok(command::TxsArgs { id: tx_id }) +} + +pub fn parse_repost_args(args: &ArgMatches) -> Result { + let tx_id = match args.value_of("id") { + None => None, + Some(tx) => Some(parse_u64(tx, "id")? as u32), + }; + + let fluff = args.is_present("fluff"); + let dump_file = match args.value_of("dumpfile") { + None => None, + Some(d) => Some(d.to_owned()), + }; + + Ok(command::RepostArgs { + id: tx_id.unwrap(), + dump_file: dump_file, + fluff: fluff, + }) +} + +pub fn parse_cancel_args(args: &ArgMatches) -> Result { + let mut tx_id_string = ""; + let tx_id = match args.value_of("id") { + None => None, + Some(tx) => Some(parse_u64(tx, "id")? as u32), + }; + let tx_slate_id = match args.value_of("txid") { + None => None, + Some(tx) => match tx.parse() { + Ok(t) => { + tx_id_string = tx; + Some(t) + } + Err(e) => { + let msg = format!("Could not parse txid parameter. e={}", e); + return Err(Error::ArgumentError(msg)); + } + }, + }; + if (tx_id.is_none() && tx_slate_id.is_none()) || (tx_id.is_some() && tx_slate_id.is_some()) { + let msg = format!("'id' (-i) or 'txid' (-t) argument is required."); + return Err(Error::ArgumentError(msg)); + } + Ok(command::CancelArgs { + tx_id: tx_id, + tx_slate_id: tx_slate_id, + tx_id_string: tx_id_string.to_owned(), + }) +} diff --git a/src/bin/grin.rs b/src/bin/grin.rs index 0294bd3be..377b3f688 100644 --- a/src/bin/grin.rs +++ b/src/bin/grin.rs @@ -25,8 +25,11 @@ extern crate serde; extern crate serde_json; #[macro_use] extern crate log; +extern crate failure; extern crate rpassword; extern crate term; +#[macro_use] +extern crate failure_derive; extern crate grin_api as api; extern crate grin_config as config; diff --git a/wallet/src/command.rs b/wallet/src/command.rs new file mode 100644 index 000000000..2d8ce7b92 --- /dev/null +++ b/wallet/src/command.rs @@ -0,0 +1,455 @@ +// Copyright 2018 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use std::collections::HashMap; +/// Grin wallet command-line function implementations +use std::fs::File; +use std::io::Write; +use std::sync::Arc; +use std::thread; +use std::time::Duration; +use util::Mutex; + +use serde_json as json; +use uuid::Uuid; + +use api::TLSConfig; +use core::core; +use keychain; + +use error::{Error, ErrorKind}; +use {controller, display, HTTPNodeClient, WalletConfig, WalletInst, WalletSeed}; +use {FileWalletCommAdapter, HTTPWalletCommAdapter, LMDBBackend, NullWalletCommAdapter}; + +pub type WalletRef = Arc>>; + +/// Arguments common to all wallet commands +#[derive(Clone)] +pub struct GlobalArgs { + pub account: String, + pub node_api_secret: Option, + pub show_spent: bool, + pub password: Option, + pub tls_conf: Option, +} + +/// Arguments for init command +pub struct InitArgs { + /// BIP39 recovery phrase length + pub list_length: usize, + pub password: String, + pub config: WalletConfig, +} + +pub fn init(g_args: &GlobalArgs, args: InitArgs) -> Result<(), Error> { + WalletSeed::init_file(&args.config, args.list_length, &args.password)?; + info!("Wallet seed file created"); + let client_n = HTTPNodeClient::new( + &args.config.check_node_api_http_addr, + g_args.node_api_secret.clone(), + ); + let _: LMDBBackend = + LMDBBackend::new(args.config.clone(), &args.password, client_n)?; + info!("Wallet database backend created"); + Ok(()) +} + +/// Argument for recover +pub struct RecoverArgs { + pub recovery_phrase: Option, + pub passphrase: String, +} + +pub fn recover(config: &WalletConfig, args: RecoverArgs) -> Result<(), Error> { + if args.recovery_phrase.is_none() { + let res = WalletSeed::from_file(config, &args.passphrase); + if let Err(e) = res { + error!("Error loading wallet seed (check password): {}", e); + return Err(e); + } + let _ = res.unwrap().show_recovery_phrase(); + } else { + let res = WalletSeed::recover_from_phrase( + &config, + &args.recovery_phrase.as_ref().unwrap(), + &args.passphrase, + ); + if let Err(e) = res { + error!( + "Error recovering seed with list '{}' - {}", + &args.recovery_phrase.as_ref().unwrap(), + e + ); + return Err(e); + } + } + Ok(()) +} + +/// Arguments for listen command +pub struct ListenArgs { + pub port: String, +} + +pub fn listen(config: &WalletConfig, g_args: &GlobalArgs) -> Result<(), Error> { + let mut params = HashMap::new(); + params.insert("api_listen_addr".to_owned(), config.api_listen_addr()); + if let Some(t) = g_args.tls_conf.as_ref() { + params.insert("certificate".to_owned(), t.certificate.clone()); + params.insert("private_key".to_owned(), t.private_key.clone()); + } + let adapter = HTTPWalletCommAdapter::new(); + let res = adapter.listen( + params, + config.clone(), + &g_args.password.clone().unwrap(), + &g_args.account, + g_args.node_api_secret.clone(), + ); + if let Err(e) = res { + return Err(ErrorKind::LibWallet(e.kind(), e.cause_string()).into()); + } + Ok(()) +} + +pub fn owner_api(wallet: WalletRef, g_args: &GlobalArgs) -> Result<(), Error> { + let res = controller::owner_listener( + wallet, + "127.0.0.1:13420", + g_args.node_api_secret.clone(), + g_args.tls_conf.clone(), + ); + if let Err(e) = res { + return Err(ErrorKind::LibWallet(e.kind(), e.cause_string()).into()); + } + Ok(()) +} + +/// Arguments for account command +pub struct AccountArgs { + pub create: Option, +} + +pub fn account(wallet: WalletRef, args: AccountArgs) -> Result<(), Error> { + if args.create.is_none() { + let res = controller::owner_single_use(wallet, |api| { + let acct_mappings = api.accounts()?; + // give logging thread a moment to catch up + thread::sleep(Duration::from_millis(200)); + display::accounts(acct_mappings); + Ok(()) + }); + if let Err(e) = res { + error!("Error listing accounts: {}", e); + return Err(ErrorKind::LibWallet(e.kind(), e.cause_string()).into()); + } + } else { + let label = args.create.unwrap(); + let res = controller::owner_single_use(wallet, |api| { + api.create_account_path(&label)?; + thread::sleep(Duration::from_millis(200)); + info!("Account: '{}' Created!", label); + Ok(()) + }); + if let Err(e) = res { + thread::sleep(Duration::from_millis(200)); + error!("Error creating account '{}': {}", label, e); + return Err(ErrorKind::LibWallet(e.kind(), e.cause_string()).into()); + } + } + Ok(()) +} + +/// Arguments for the send command +pub struct SendArgs { + pub amount: u64, + pub message: Option, + pub minimum_confirmations: u64, + pub selection_strategy: String, + pub method: String, + pub dest: String, + pub change_outputs: usize, + pub fluff: bool, + pub max_outputs: usize, +} + +pub fn send(wallet: WalletRef, args: SendArgs) -> Result<(), Error> { + controller::owner_single_use(wallet.clone(), |api| { + let result = api.initiate_tx( + None, + args.amount, + args.minimum_confirmations, + args.max_outputs, + args.change_outputs, + args.selection_strategy == "all", + args.message.clone(), + ); + let (mut slate, lock_fn) = match result { + Ok(s) => { + info!( + "Tx created: {} grin to {} (strategy '{}')", + core::amount_to_hr_string(args.amount, false), + args.dest, + args.selection_strategy, + ); + s + } + Err(e) => { + info!("Tx not created: {}", e); + return Err(e); + } + }; + let adapter = match args.method.as_str() { + "http" => HTTPWalletCommAdapter::new(), + "file" => FileWalletCommAdapter::new(), + "self" => NullWalletCommAdapter::new(), + _ => NullWalletCommAdapter::new(), + }; + if adapter.supports_sync() { + slate = adapter.send_tx_sync(&args.dest, &slate)?; + if args.method == "self" { + controller::foreign_single_use(wallet, |api| { + api.receive_tx(&mut slate, Some(&args.dest), None)?; + Ok(()) + })?; + } + api.tx_lock_outputs(&slate, lock_fn)?; + if let Err(e) = api.verify_slate_messages(&slate) { + error!("Error validating participant messages: {}", e); + return Err(e); + } + api.finalize_tx(&mut slate)?; + } else { + adapter.send_tx_async(&args.dest, &slate)?; + api.tx_lock_outputs(&slate, lock_fn)?; + } + if adapter.supports_sync() { + let result = api.post_tx(&slate.tx, args.fluff); + match result { + Ok(_) => { + info!("Tx sent",); + return Ok(()); + } + Err(e) => { + error!("Tx not sent: {}", e); + return Err(e); + } + } + } + Ok(()) + })?; + Ok(()) +} + +/// Receive command argument +pub struct ReceiveArgs { + pub input: String, + pub message: Option, +} + +pub fn receive(wallet: WalletRef, g_args: &GlobalArgs, args: ReceiveArgs) -> Result<(), Error> { + let adapter = FileWalletCommAdapter::new(); + let mut slate = adapter.receive_tx_async(&args.input)?; + controller::foreign_single_use(wallet, |api| { + api.receive_tx(&mut slate, Some(&g_args.account), args.message.clone())?; + Ok(()) + })?; + let send_tx = format!("{}.response", args.input); + adapter.send_tx_async(&send_tx, &slate)?; + info!( + "Response file {}.response generated, sending it back to the transaction originator.", + args.input + ); + Ok(()) +} + +/// Finalize command args +pub struct FinalizeArgs { + pub input: String, + pub fluff: bool, +} + +pub fn finalize(wallet: WalletRef, args: FinalizeArgs) -> Result<(), Error> { + let adapter = FileWalletCommAdapter::new(); + let mut slate = adapter.receive_tx_async(&args.input)?; + controller::owner_single_use(wallet.clone(), |api| { + if let Err(e) = api.verify_slate_messages(&slate) { + error!("Error validating participant messages: {}", e); + return Err(e); + } + let _ = api.finalize_tx(&mut slate).expect("Finalize failed"); + + let result = api.post_tx(&slate.tx, args.fluff); + match result { + Ok(_) => { + info!("Transaction sent successfully, check the wallet again for confirmation."); + Ok(()) + } + Err(e) => { + error!("Tx not sent: {}", e); + Err(e) + } + } + })?; + Ok(()) +} + +/// Info command args +pub struct InfoArgs { + pub minimum_confirmations: u64, +} + +pub fn info( + wallet: WalletRef, + g_args: &GlobalArgs, + args: InfoArgs, + dark_scheme: bool, +) -> Result<(), Error> { + controller::owner_single_use(wallet.clone(), |api| { + let (validated, wallet_info) = + api.retrieve_summary_info(true, args.minimum_confirmations)?; + display::info(&g_args.account, &wallet_info, validated, dark_scheme); + Ok(()) + })?; + Ok(()) +} + +pub fn outputs(wallet: WalletRef, g_args: &GlobalArgs, dark_scheme: bool) -> Result<(), Error> { + controller::owner_single_use(wallet.clone(), |api| { + let (height, _) = api.node_height()?; + let (validated, outputs) = api.retrieve_outputs(g_args.show_spent, true, None)?; + display::outputs(&g_args.account, height, validated, outputs, dark_scheme)?; + Ok(()) + })?; + Ok(()) +} + +/// Txs command args +pub struct TxsArgs { + pub id: Option, +} + +pub fn txs( + wallet: WalletRef, + g_args: &GlobalArgs, + args: TxsArgs, + dark_scheme: bool, +) -> Result<(), Error> { + controller::owner_single_use(wallet.clone(), |api| { + let (height, _) = api.node_height()?; + let (validated, txs) = api.retrieve_txs(true, args.id, None)?; + let include_status = !args.id.is_some(); + display::txs( + &g_args.account, + height, + validated, + txs, + include_status, + dark_scheme, + )?; + // if given a particular transaction id, also get and display associated + // inputs/outputs + if args.id.is_some() { + let (_, outputs) = api.retrieve_outputs(true, false, args.id)?; + display::outputs(&g_args.account, height, validated, outputs, dark_scheme)?; + }; + Ok(()) + })?; + Ok(()) +} + +/// Repost +pub struct RepostArgs { + pub id: u32, + pub dump_file: Option, + pub fluff: bool, +} + +pub fn repost(wallet: WalletRef, args: RepostArgs) -> Result<(), Error> { + controller::owner_single_use(wallet.clone(), |api| { + let (_, txs) = api.retrieve_txs(true, Some(args.id), None)?; + let stored_tx = txs[0].get_stored_tx(); + if stored_tx.is_none() { + error!( + "Transaction with id {} does not have transaction data. Not reposting.", + args.id + ); + return Ok(()); + } + match args.dump_file { + None => { + if txs[0].confirmed { + error!( + "Transaction with id {} is confirmed. Not reposting.", + args.id + ); + return Ok(()); + } + api.post_tx(&stored_tx.unwrap(), args.fluff)?; + info!("Reposted transaction at {}", args.id); + return Ok(()); + } + Some(f) => { + let mut tx_file = File::create(f.clone())?; + tx_file.write_all(json::to_string(&stored_tx).unwrap().as_bytes())?; + tx_file.sync_all()?; + info!("Dumped transaction data for tx {} to {}", args.id, f); + return Ok(()); + } + } + })?; + Ok(()) +} + +/// Cancel +pub struct CancelArgs { + pub tx_id: Option, + pub tx_slate_id: Option, + pub tx_id_string: String, +} + +pub fn cancel(wallet: WalletRef, args: CancelArgs) -> Result<(), Error> { + controller::owner_single_use(wallet.clone(), |api| { + let result = api.cancel_tx(args.tx_id, args.tx_slate_id); + match result { + Ok(_) => { + info!("Transaction {} Cancelled", args.tx_id_string); + Ok(()) + } + Err(e) => { + error!("TX Cancellation failed: {}", e); + Err(e) + } + } + })?; + Ok(()) +} + +pub fn restore(wallet: WalletRef) -> Result<(), Error> { + controller::owner_single_use(wallet.clone(), |api| { + let result = api.restore(); + match result { + Ok(_) => { + info!("Wallet restore complete",); + Ok(()) + } + Err(e) => { + error!("Wallet restore failed: {}", e); + error!("Backtrace: {}", e.backtrace().unwrap()); + Err(e) + } + } + })?; + Ok(()) +} diff --git a/wallet/src/controller.rs b/wallet/src/controller.rs index 6f8bcadd4..7d841a648 100644 --- a/wallet/src/controller.rs +++ b/wallet/src/controller.rs @@ -19,12 +19,12 @@ use adapters::{FileWalletCommAdapter, HTTPWalletCommAdapter, KeybaseWalletCommAd use api::{ApiServer, BasicAuthMiddleware, Handler, ResponseFuture, Router, TLSConfig}; use core::core; use core::core::Transaction; +use core::libtx::slate::Slate; use failure::ResultExt; use futures::future::{err, ok}; use futures::{Future, Stream}; use hyper::{Body, Request, Response, StatusCode}; use keychain::Keychain; -use core::libtx::slate::Slate; use libwallet::api::{APIForeign, APIOwner}; use libwallet::types::{ CbData, NodeClient, OutputData, SendTXArgs, TxLogEntry, WalletBackend, WalletInfo, diff --git a/wallet/src/error.rs b/wallet/src/error.rs index d7c4a8b43..b2c7bce9c 100644 --- a/wallet/src/error.rs +++ b/wallet/src/error.rs @@ -14,9 +14,10 @@ //! Implementation specific error types use api; -use keychain; use core::libtx; +use keychain; use libwallet; +use std::env; use std::fmt::{self, Display}; use core::core::transaction; @@ -36,8 +37,8 @@ pub enum ErrorKind { LibTX(libtx::ErrorKind), /// LibWallet Error - #[fail(display = "LibWallet Error")] - LibWallet(libwallet::ErrorKind), + #[fail(display = "LibWallet Error: {}", _1)] + LibWallet(libwallet::ErrorKind, String), /// Keychain error #[fail(display = "Keychain error")] @@ -80,7 +81,7 @@ pub enum ErrorKind { DuplicateTransactionId, /// Wallet seed already exists - #[fail(display = "{}", _0)] + #[fail(display = "Wallet seed file exists: {}", _0)] WalletSeedExists(String), /// Wallet seed doesn't exist @@ -88,7 +89,7 @@ pub enum ErrorKind { WalletSeedDoesntExist, /// Enc/Decryption Error - #[fail(display = "Enc/Decryption error")] + #[fail(display = "Enc/Decryption error (check password?)")] Encryption, /// BIP 39 word list @@ -112,18 +113,24 @@ impl Fail for Error { impl Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let cause = match self.cause() { - Some(c) => format!("{}", c), - None => String::from("Unknown"), + let show_bt = match env::var("RUST_BACKTRACE") { + Ok(r) => if r == "1" { + true + } else { + false + }, + Err(_) => false, }; let backtrace = match self.backtrace() { Some(b) => format!("{}", b), None => String::from("Unknown"), }; - let output = format!( - "{} \n Cause: {} \n Backtrace: {}", - self.inner, cause, backtrace - ); + let inner_output = format!("{}", self.inner,); + let backtrace_output = format!("\nBacktrace: {}", backtrace); + let mut output = inner_output.clone(); + if show_bt { + output.push_str(&backtrace_output); + } Display::fmt(&output, f) } } @@ -184,7 +191,7 @@ impl From for Error { impl From for Error { fn from(error: libwallet::Error) -> Error { Error { - inner: Context::new(ErrorKind::LibWallet(error.kind())), + inner: Context::new(ErrorKind::LibWallet(error.kind(), format!("{}", error))), } } } diff --git a/wallet/src/lib.rs b/wallet/src/lib.rs index 8533522e2..943cedbcb 100644 --- a/wallet/src/lib.rs +++ b/wallet/src/lib.rs @@ -48,6 +48,7 @@ extern crate grin_store as store; extern crate grin_util as util; mod adapters; +pub mod command; pub mod controller; pub mod display; mod error; diff --git a/wallet/src/libwallet/api.rs b/wallet/src/libwallet/api.rs index 72db0f932..0664d834d 100644 --- a/wallet/src/libwallet/api.rs +++ b/wallet/src/libwallet/api.rs @@ -36,9 +36,9 @@ use uuid::Uuid; use core::core::hash::Hashed; use core::core::Transaction; +use core::libtx::slate::Slate; use core::ser; use keychain::{Identifier, Keychain}; -use core::libtx::slate::Slate; use libwallet::internal::{keys, tx, updater}; use libwallet::types::{ AcctPathMapping, BlockFees, CbData, NodeClient, OutputData, TxLogEntry, TxWrapper, diff --git a/wallet/src/libwallet/error.rs b/wallet/src/libwallet/error.rs index 93557d185..f2cd0bc38 100644 --- a/wallet/src/libwallet/error.rs +++ b/wallet/src/libwallet/error.rs @@ -14,6 +14,7 @@ //! Error types for libwallet +use std::env; use std::fmt::{self, Display}; use std::io; @@ -21,8 +22,8 @@ use failure::{Backtrace, Context, Fail}; use core; use core::core::transaction; -use keychain; use core::libtx; +use keychain; /// Error definition #[derive(Debug, Fail)] @@ -195,18 +196,24 @@ pub enum ErrorKind { impl Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let cause = match self.cause() { - Some(c) => format!("{}", c), - None => String::from("Unknown"), + let show_bt = match env::var("RUST_BACKTRACE") { + Ok(r) => if r == "1" { + true + } else { + false + }, + Err(_) => false, }; let backtrace = match self.backtrace() { Some(b) => format!("{}", b), None => String::from("Unknown"), }; - let output = format!( - "{} \n Cause: {} \n Backtrace: {}", - self.inner, cause, backtrace - ); + let inner_output = format!("{}", self.inner,); + let backtrace_output = format!("\n Backtrace: {}", backtrace); + let mut output = inner_output.clone(); + if show_bt { + output.push_str(&backtrace_output); + } Display::fmt(&output, f) } } @@ -216,6 +223,13 @@ impl Error { pub fn kind(&self) -> ErrorKind { self.inner.get_context().clone() } + /// get cause string + pub fn cause_string(&self) -> String { + match self.cause() { + Some(k) => format!("{}", k), + None => format!("Unknown"), + } + } /// get cause pub fn cause(&self) -> Option<&Fail> { self.inner.cause() diff --git a/wallet/src/libwallet/internal/restore.rs b/wallet/src/libwallet/internal/restore.rs index c16172c41..4563f7602 100644 --- a/wallet/src/libwallet/internal/restore.rs +++ b/wallet/src/libwallet/internal/restore.rs @@ -14,8 +14,8 @@ //! Functions to restore a wallet's outputs from just the master seed use core::global; -use keychain::{ExtKeychain, Identifier, Keychain}; use core::libtx::proof; +use keychain::{ExtKeychain, Identifier, Keychain}; use libwallet::internal::keys; use libwallet::types::*; use libwallet::Error; diff --git a/wallet/src/libwallet/internal/selection.rs b/wallet/src/libwallet/internal/selection.rs index 6ec6b3f2a..e86aebcf4 100644 --- a/wallet/src/libwallet/internal/selection.rs +++ b/wallet/src/libwallet/internal/selection.rs @@ -14,8 +14,8 @@ //! Selection of inputs for building transactions -use keychain::{Identifier, Keychain}; use core::libtx::{build, slate::Slate, tx_fee}; +use keychain::{Identifier, Keychain}; use libwallet::error::{Error, ErrorKind}; use libwallet::internal::keys; use libwallet::types::*; diff --git a/wallet/src/libwallet/internal/tx.rs b/wallet/src/libwallet/internal/tx.rs index 8408855c2..57cd81ced 100644 --- a/wallet/src/libwallet/internal/tx.rs +++ b/wallet/src/libwallet/internal/tx.rs @@ -17,9 +17,9 @@ use util; use uuid::Uuid; +use core::libtx::slate::Slate; use core::ser; use keychain::{Identifier, Keychain}; -use core::libtx::slate::Slate; use libwallet::internal::{selection, updater}; use libwallet::types::{Context, NodeClient, TxLogEntryType, WalletBackend}; use libwallet::{Error, ErrorKind}; @@ -233,8 +233,8 @@ where #[cfg(test)] mod test { - use keychain::{ExtKeychain, ExtKeychainPath, Keychain}; use core::libtx::build; + use keychain::{ExtKeychain, ExtKeychainPath, Keychain}; #[test] // demonstrate that input.commitment == referenced output.commitment diff --git a/wallet/src/libwallet/internal/updater.rs b/wallet/src/libwallet/internal/updater.rs index 850159097..4eb2319e9 100644 --- a/wallet/src/libwallet/internal/updater.rs +++ b/wallet/src/libwallet/internal/updater.rs @@ -21,9 +21,9 @@ use uuid::Uuid; use core::consensus::reward; use core::core::{Output, TxKernel}; +use core::libtx::reward; use core::{global, ser}; use keychain::{Identifier, Keychain}; -use core::libtx::reward; use libwallet; use libwallet::error::{Error, ErrorKind}; use libwallet::internal::keys; diff --git a/wallet/tests/common/testclient.rs b/wallet/tests/common/testclient.rs index 0ef47bf9d..56d37eee3 100644 --- a/wallet/tests/common/testclient.rs +++ b/wallet/tests/common/testclient.rs @@ -41,8 +41,8 @@ use core::global::{set_mining_mode, ChainTypes}; use core::{pow, ser}; use keychain::Keychain; -use util::secp::pedersen; use core::libtx::slate::Slate; +use util::secp::pedersen; use wallet::libwallet::types::*; use wallet::{controller, libwallet, WalletCommAdapter, WalletConfig}; diff --git a/wallet/tests/libwallet.rs b/wallet/tests/libwallet.rs index 62c55d5dd..d48572615 100644 --- a/wallet/tests/libwallet.rs +++ b/wallet/tests/libwallet.rs @@ -21,10 +21,10 @@ extern crate rand; extern crate uuid; use core::core::transaction::kernel_sig_msg; +use core::libtx::{aggsig, proof}; use keychain::{BlindSum, BlindingFactor, ExtKeychain, Keychain}; use util::secp; use util::secp::key::{PublicKey, SecretKey}; -use core::libtx::{aggsig, proof}; use wallet::libwallet::types::Context; use wallet::{EncryptedWalletSeed, WalletSeed}; diff --git a/wallet/tests/repost.rs b/wallet/tests/repost.rs index e25ec53e8..28455f753 100644 --- a/wallet/tests/repost.rs +++ b/wallet/tests/repost.rs @@ -34,8 +34,8 @@ use std::time::Duration; use core::global; use core::global::ChainTypes; -use keychain::ExtKeychain; use core::libtx::slate::Slate; +use keychain::ExtKeychain; use wallet::{libwallet, FileWalletCommAdapter}; fn clean_output_dir(test_dir: &str) { diff --git a/wallet/tests/restore.rs b/wallet/tests/restore.rs index d9ba8cc01..ecf18f579 100644 --- a/wallet/tests/restore.rs +++ b/wallet/tests/restore.rs @@ -34,8 +34,8 @@ use std::time::Duration; use core::global; use core::global::ChainTypes; -use keychain::{ExtKeychain, Identifier, Keychain}; use core::libtx::slate::Slate; +use keychain::{ExtKeychain, Identifier, Keychain}; use wallet::libwallet; use wallet::libwallet::types::AcctPathMapping; diff --git a/wallet/tests/transaction.rs b/wallet/tests/transaction.rs index 7b3c5a3c2..f1ccc0dac 100644 --- a/wallet/tests/transaction.rs +++ b/wallet/tests/transaction.rs @@ -34,8 +34,8 @@ use std::time::Duration; use core::global; use core::global::ChainTypes; -use keychain::ExtKeychain; use core::libtx::slate::Slate; +use keychain::ExtKeychain; use wallet::libwallet; use wallet::libwallet::types::OutputStatus;