From 47ee03cadd338b6a5e1c48570f3b081604bab25a Mon Sep 17 00:00:00 2001 From: Yeastplume Date: Tue, 23 Apr 2019 11:29:59 +0100 Subject: [PATCH] V2 slate versioning enablement (#85) * fix for command line listener port override * reduce parameter query size * Add slate versioning * rustfmt * bump version number * Add tests for slate version conversion * rustfmt * Updates and test addition based on bdap's review * rustfmt --- Cargo.lock | 443 +++--- Cargo.toml | 14 +- api/Cargo.toml | 10 +- api/src/foreign_rpc.rs | 15 +- api/src/lib.rs | 1 + api/tests/slate_versioning.rs | 131 ++ api/tests/slates/v1_req.slate | 1037 ++++++++++++++ api/tests/slates/v1_res.slate | 1955 +++++++++++++++++++++++++++ config/Cargo.toml | 4 +- controller/Cargo.toml | 12 +- impls/Cargo.toml | 8 +- impls/src/adapters/http.rs | 3 + libwallet/Cargo.toml | 6 +- libwallet/src/lib.rs | 2 + libwallet/src/slate.rs | 303 ++++- libwallet/src/slate_versions/mod.rs | 83 ++ util/Cargo.toml | 38 +- 17 files changed, 3787 insertions(+), 278 deletions(-) create mode 100644 api/tests/slate_versioning.rs create mode 100644 api/tests/slates/v1_req.slate create mode 100644 api/tests/slates/v1_res.slate diff --git a/Cargo.lock b/Cargo.lock index cc5c452..6c6ebcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,7 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -28,7 +28,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "arc-swap" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -69,7 +69,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.51 (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)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -79,15 +79,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -95,7 +95,7 @@ name = "backtrace-sys" version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -116,14 +116,14 @@ dependencies = [ "cexpr 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "clang-sys 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -197,7 +197,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -220,7 +220,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -236,14 +236,14 @@ dependencies = [ [[package]] name = "clap" -version = "2.32.0" +version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -293,7 +293,7 @@ version = "0.3.8" 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.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -369,7 +369,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -392,7 +392,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "redox_users 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -408,7 +408,7 @@ dependencies = [ "easy-jsonrpc-proc-macro 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -419,8 +419,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -444,7 +444,7 @@ dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -453,7 +453,7 @@ name = "failure" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -463,8 +463,8 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -554,28 +554,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "grin_api" -version = "1.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.0-beta.2" +source = "git+https://github.com/mimblewimble/grin#865b9b6b467d6aa0bfad1dee3df052b141ca3eab" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_chain 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_core 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_p2p 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_pool 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_store 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_util 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "grin_chain 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_core 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_p2p 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_pool 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_store 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_util 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.19 (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.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (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.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -586,8 +586,8 @@ dependencies = [ [[package]] name = "grin_chain" -version = "1.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.0-beta.2" +source = "git+https://github.com/mimblewimble/grin#865b9b6b467d6aa0bfad1dee3df052b141ca3eab" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -595,22 +595,22 @@ dependencies = [ "croaring 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_core 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_keychain 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_store 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_util 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "grin_core 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_keychain 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_store 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_util 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "grin_core" -version = "1.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.0-beta.2" +source = "git+https://github.com/mimblewimble/grin#865b9b6b467d6aa0bfad1dee3df052b141ca3eab" dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -619,37 +619,37 @@ dependencies = [ "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_keychain 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_util 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "grin_keychain 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_util 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "grin_keychain" -version = "1.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.0-beta.2" +source = "git+https://github.com/mimblewimble/grin#865b9b6b467d6aa0bfad1dee3df052b141ca3eab" dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_util 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "grin_util 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", "hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "ripemd160 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -657,41 +657,42 @@ dependencies = [ [[package]] name = "grin_p2p" -version = "1.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.0-beta.2" +source = "git+https://github.com/mimblewimble/grin#865b9b6b467d6aa0bfad1dee3df052b141ca3eab" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (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 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_store 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_util 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "grin_chain 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_core 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_store 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_util 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", "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)", "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "grin_pool" -version = "1.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.0-beta.2" +source = "git+https://github.com/mimblewimble/grin#865b9b6b467d6aa0bfad1dee3df052b141ca3eab" dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_core 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_keychain 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_store 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_util 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "grin_core 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_keychain 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_store 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_util 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -704,36 +705,36 @@ dependencies = [ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (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.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "grin_store" -version = "1.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.0-beta.2" +source = "git+https://github.com/mimblewimble/grin#865b9b6b467d6aa0bfad1dee3df052b141ca3eab" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "croaring 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_core 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_util 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "grin_core 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_util 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", "libc 0.2.51 (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)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "grin_util" -version = "1.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "1.1.0-beta.2" +source = "git+https://github.com/mimblewimble/grin#865b9b6b467d6aa0bfad1dee3df052b141ca3eab" dependencies = [ - "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "grin_secp256k1zkp 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -742,8 +743,8 @@ dependencies = [ "log4rs 0.8.3 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "zeroize 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "zip 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -751,19 +752,19 @@ dependencies = [ [[package]] name = "grin_wallet" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" dependencies = [ "built 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "ctrlc 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_api 1.1.0-beta.1", - "grin_wallet_config 1.1.0-beta.1", - "grin_wallet_controller 1.1.0-beta.1", - "grin_wallet_impls 1.1.0-beta.1", - "grin_wallet_libwallet 1.1.0-beta.1", - "grin_wallet_util 1.1.0-beta.1", + "grin_wallet_api 1.1.0-beta.2", + "grin_wallet_config 1.1.0-beta.2", + "grin_wallet_controller 1.1.0-beta.2", + "grin_wallet_impls 1.1.0-beta.2", + "grin_wallet_libwallet 1.1.0-beta.2", + "grin_wallet_util 1.1.0-beta.2", "linefeed 0.5.4 (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)", @@ -772,16 +773,16 @@ dependencies = [ [[package]] name = "grin_wallet_api" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "easy-jsonrpc 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_config 1.1.0-beta.1", - "grin_wallet_impls 1.1.0-beta.1", - "grin_wallet_libwallet 1.1.0-beta.1", - "grin_wallet_util 1.1.0-beta.1", + "grin_wallet_config 1.1.0-beta.2", + "grin_wallet_impls 1.1.0-beta.2", + "grin_wallet_libwallet 1.1.0-beta.2", + "grin_wallet_util 1.1.0-beta.2", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -790,39 +791,39 @@ dependencies = [ [[package]] name = "grin_wallet_config" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" dependencies = [ "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_util 1.1.0-beta.1", + "grin_wallet_util 1.1.0-beta.2", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "grin_wallet_controller" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "easy-jsonrpc 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_api 1.1.0-beta.1", - "grin_wallet_config 1.1.0-beta.1", - "grin_wallet_impls 1.1.0-beta.1", - "grin_wallet_libwallet 1.1.0-beta.1", - "grin_wallet_util 1.1.0-beta.1", + "grin_wallet_api 1.1.0-beta.2", + "grin_wallet_config 1.1.0-beta.2", + "grin_wallet_impls 1.1.0-beta.2", + "grin_wallet_libwallet 1.1.0-beta.2", + "grin_wallet_util 1.1.0-beta.2", "hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "prettytable-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (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.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -834,21 +835,21 @@ dependencies = [ [[package]] name = "grin_wallet_impls" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_config 1.1.0-beta.1", - "grin_wallet_libwallet 1.1.0-beta.1", - "grin_wallet_util 1.1.0-beta.1", + "grin_wallet_config 1.1.0-beta.2", + "grin_wallet_libwallet 1.1.0-beta.2", + "grin_wallet_util 1.1.0-beta.2", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (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.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -858,51 +859,51 @@ dependencies = [ [[package]] name = "grin_wallet_libwallet" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_config 1.1.0-beta.1", - "grin_wallet_util 1.1.0-beta.1", + "grin_wallet_config 1.1.0-beta.2", + "grin_wallet_util 1.1.0-beta.2", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "grin_wallet_util" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" dependencies = [ "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_api 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_chain 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_core 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_keychain 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_store 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_util 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "grin_api 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_chain 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_core 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_keychain 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_store 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", + "grin_util 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -929,7 +930,7 @@ dependencies = [ [[package]] name = "http" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -958,8 +959,8 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (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.17 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (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)", @@ -983,7 +984,7 @@ 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.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.19 (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)", @@ -1030,8 +1031,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1064,7 +1065,7 @@ name = "libgit2-sys" version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (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)", @@ -1084,8 +1085,8 @@ name = "libloading" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1093,7 +1094,7 @@ name = "libz-sys" version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (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)", @@ -1106,7 +1107,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "mortal 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1140,7 +1141,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1154,7 +1155,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "arc-swap 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1162,14 +1163,14 @@ dependencies = [ "libc 0.2.51 (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.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (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.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (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)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1204,7 +1205,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1217,7 +1218,7 @@ name = "miniz-sys" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1234,7 +1235,7 @@ name = "miniz_oxide_c_api" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (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.51 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1291,7 +1292,7 @@ dependencies = [ "terminfo 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1300,7 +1301,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1310,7 +1311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1332,7 +1333,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1530,7 +1531,7 @@ dependencies = [ "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1542,7 +1543,7 @@ dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1667,7 +1668,7 @@ dependencies = [ [[package]] name = "quote" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1691,7 +1692,7 @@ dependencies = [ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1703,7 +1704,7 @@ dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1721,7 +1722,7 @@ dependencies = [ "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1769,7 +1770,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1782,7 +1783,7 @@ dependencies = [ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1812,7 +1813,7 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.52" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1820,7 +1821,7 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1831,12 +1832,12 @@ dependencies = [ "argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1859,7 +1860,7 @@ name = "remove_dir_all" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1867,7 +1868,7 @@ name = "ring" version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1895,7 +1896,7 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1994,10 +1995,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.89" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2006,17 +2007,17 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.89" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2026,7 +2027,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2036,7 +2037,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2086,7 +2087,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "strsim" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2096,11 +2097,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.30" +version = "0.15.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2110,8 +2111,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2123,9 +2124,9 @@ dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (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)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2135,7 +2136,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2163,13 +2164,13 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "textwrap" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2181,8 +2182,8 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2199,8 +2200,8 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2422,7 +2423,7 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2519,7 +2520,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2528,7 +2529,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2557,7 +2558,7 @@ version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2604,7 +2605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2626,7 +2627,7 @@ name = "winapi-util" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2639,7 +2640,7 @@ name = "wincolor" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2685,14 +2686,14 @@ dependencies = [ "checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" "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.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c79e383ce3e5b88b123589fe774221be2240a9936866f4f2286cbfe555ef36e8" +"checksum arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "bc4662175ead9cd84451d5c35070517777949a2ed84551764129cedb88384841" "checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392" "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.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" -"checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" +"checksum backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f106c02a3604afcdc0df5d36cc47b44b55917dbaf3d808f71c163a0ddba64637" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bindgen 0.37.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1b25ab82877ea8fe6ce1ce1f8ac54361f0218bad900af9eb11803994bf67c221" @@ -2706,12 +2707,12 @@ dependencies = [ "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "30f813bf45048a18eda9190fd3c6b78644146056740c43172a5a3699118588fd" +"checksum cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "5e5f3fee5eeb60324c2781f1e41286bdee933850fff9b3c672587fed5ec58c83" "checksum cexpr 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42aac45e9567d97474a834efdee3081b3c942b2205be932092f53354ce503d6c" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum clang-sys 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d7f7c04e52c35222fffcc3a115b5daf5f7e2bfb71c13c4e2321afe1fc71859c2" -"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" +"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" @@ -2749,19 +2750,19 @@ dependencies = [ "checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" "checksum git2 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "591f8be1674b421644b6c030969520bc3fa12114d2eb467471982ed3e9584e71" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum grin_api 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8acfd77294b90e56bef4ed20a1b1dfd79a0e91f195cbafe4b828c6e5e3336ed2" -"checksum grin_chain 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80e67abf851f851e62a85c18edd100478fea8b96aa3113c54f44f6eeb0221afe" -"checksum grin_core 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4a5080a20dd53809dbfbaeb69eca5dd26f26f00300abf91a2f6cc298f3976524" -"checksum grin_keychain 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbe3297e29423f6fccd2427245f43a7c7b33b3261965fd6f4a9d6004b17f6fc" -"checksum grin_p2p 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a4198a5b11aba1f51dababa3fab99d49e102fbc9594cb69b21f11ee38f5c9dd" -"checksum grin_pool 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44176deddf87495e7f0eb534de2848d50b1a09fbdfe61ef62d517650a4e902af" +"checksum grin_api 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)" = "" +"checksum grin_chain 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)" = "" +"checksum grin_core 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)" = "" +"checksum grin_keychain 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)" = "" +"checksum grin_p2p 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)" = "" +"checksum grin_pool 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)" = "" "checksum grin_secp256k1zkp 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "75e9a265f3eeea4c204470f7262e2c6fe18f3d8ddf5fb24340cb550ac4f909c5" -"checksum grin_store 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8229ec3e60f4571292a373159cc3af76391ec830d7dcfc2db48e3da177ab172f" -"checksum grin_util 1.1.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afe8186fffdebab979bf2d0bf5fdc870c02a274672505204f6022d21e53e6bfe" -"checksum h2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "910a5e7be6283a9c91b3982fa5188368c8719cce2a3cf3b86048673bf9d9c36b" +"checksum grin_store 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)" = "" +"checksum grin_util 1.1.0-beta.2 (git+https://github.com/mimblewimble/grin)" = "" +"checksum h2 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "85ab6286db06040ddefb71641b50017c06874614001a134b423783e2db2920bd" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "733e1b3ac906631ca01ebb577e9bb0f5e37a454032b9036b5eaea4013ed6f99a" -"checksum http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fe67e3678f2827030e89cc4b9e7ecd16d52f132c0b940ab5005f88e821500f6a" +"checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)" = "f1ebec079129e43af5e234ef36ee3d7e6085687d145b7ea653b262d16c6b65f1" @@ -2841,7 +2842,7 @@ dependencies = [ "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" "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.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" @@ -2856,16 +2857,16 @@ dependencies = [ "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.52 (registry+https://github.com/rust-lang/crates.io-index)" = "d32b3053e5ced86e4bc0411fec997389532bf56b000e66cb4884eeeb41413d69" +"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum redox_users 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe5204c3a17e97dde73f285d49be585df59ed84b50a872baf416e73b62c3828" -"checksum regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "559008764a17de49a3146b234641644ed37d118d1ef641a0bb573d146edc6ce0" +"checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" "checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "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.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37473170aedbe66ffa3ad3726939ba677d83c646ad4fd99e5b4bc38712f45ec" -"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" +"checksum rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ccc78bfd5acd7bf3e89cffcf899e5cb1a52d6fafa8dec2739ad70c9577a57288" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" @@ -2880,9 +2881,9 @@ dependencies = [ "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "92514fb95f900c9b5126e32d020f5c6d40564c27a5ea6d1d7d9f157a96623560" +"checksum serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "aa5f7c20820475babd2c077c3ab5f8c77a31c15e16ea38687b4c02d3e48680f4" "checksum serde-value 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7a663f873dedc4eac1a559d4c6bc0d0b2c34dc5ac4702e105014b8281489e44f" -"checksum serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6eabf4b5914e88e24eea240bb7c9f9a2cbc1bbbe8d961d381975ec3c6b806c" +"checksum serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "58fc82bec244f168b23d1963b45c8bf5726e9a15a9d146a067f9081aeed2de79" "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" "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" @@ -2892,16 +2893,16 @@ dependencies = [ "checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" +"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum supercow 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "171758edb47aa306a78dfa4ab9aeb5167405bd4e3dc2b64e88f6a84bbe98bd63" -"checksum syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)" = "66c8865bf5a7cbb662d8b011950060b3c8743dca141b054bf7195b20d314d8e2" +"checksum syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)" = "846620ec526c1599c070eff393bfeeeb88a93afa2513fc3b49f1fea84cf7b0ed" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b86c784c88d98c801132806dadd3819ed29d8600836c4088e855cdf3e178ed8a" "checksum term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" "checksum terminfo 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8e51065bafd2abe106b6036483b69d1741f4a1ec56ce8a2378de341637de689e" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" -"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" +"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "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.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" @@ -2949,7 +2950,7 @@ dependencies = [ "checksum webpki-roots 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "85d1f408918fd590908a70d36b7ac388db2edc221470333e4d6e5b598e44cabf" "checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" diff --git a/Cargo.toml b/Cargo.toml index bfa6ee2..0122a88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grin_wallet" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" authors = ["Grin Developers "] description = "Simple, private and scalable cryptocurrency implementation based on the MimbleWimble chain format." license = "Apache-2.0" @@ -29,13 +29,13 @@ prettytable-rs = "0.7" log = "0.4" linefeed = "0.5" -grin_wallet_api = { path = "./api", version = "1.1.0-beta.1" } -grin_wallet_impls = { path = "./impls", version = "1.1.0-beta.1" } -grin_wallet_libwallet = { path = "./libwallet", version = "1.1.0-beta.1" } -grin_wallet_controller = { path = "./controller", version = "1.1.0-beta.1" } -grin_wallet_config = { path = "./config", version = "1.1.0-beta.1" } +grin_wallet_api = { path = "./api", version = "1.1.0-beta.2" } +grin_wallet_impls = { path = "./impls", version = "1.1.0-beta.2" } +grin_wallet_libwallet = { path = "./libwallet", version = "1.1.0-beta.2" } +grin_wallet_controller = { path = "./controller", version = "1.1.0-beta.2" } +grin_wallet_config = { path = "./config", version = "1.1.0-beta.2" } -grin_wallet_util = { path = "./util", version = "1.1.0-beta.1" } +grin_wallet_util = { path = "./util", version = "1.1.0-beta.2" } [build-dependencies] built = "0.3" diff --git a/api/Cargo.toml b/api/Cargo.toml index e659532..ce09c33 100644 --- a/api/Cargo.toml +++ b/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grin_wallet_api" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" authors = ["Grin Developers "] description = "Grin Wallet API" license = "Apache-2.0" @@ -18,11 +18,11 @@ serde_json = "1" easy-jsonrpc = "0.4.1" chrono = { version = "0.4.4", features = ["serde"] } -grin_wallet_libwallet = { path = "../libwallet", version = "1.1.0-beta.1" } -grin_wallet_config = { path = "../config", version = "1.1.0-beta.1" } -grin_wallet_impls = { path = "../impls", version = "1.1.0-beta.1" } +grin_wallet_libwallet = { path = "../libwallet", version = "1.1.0-beta.2" } +grin_wallet_config = { path = "../config", version = "1.1.0-beta.2" } +grin_wallet_impls = { path = "../impls", version = "1.1.0-beta.2" } -grin_wallet_util = { path = "../util", version = "1.1.0-beta.1" } +grin_wallet_util = { path = "../util", version = "1.1.0-beta.2" } [dev-dependencies] serde_json = "1" diff --git a/api/src/foreign_rpc.rs b/api/src/foreign_rpc.rs index 7e7e48e..64d6604 100644 --- a/api/src/foreign_rpc.rs +++ b/api/src/foreign_rpc.rs @@ -15,9 +15,9 @@ //! JSON-RPC Stub generation for the Foreign API use crate::keychain::Keychain; -use crate::libwallet::slate::Slate; use crate::libwallet::types::{BlockFees, CbData, InitTxArgs, NodeClient, WalletBackend}; use crate::libwallet::ErrorKind; +use crate::libwallet::{Slate, VersionedSlate}; use crate::Foreign; use easy_jsonrpc; @@ -310,10 +310,10 @@ pub trait ForeignRpc { */ fn receive_tx( &self, - slate: Slate, + slate: VersionedSlate, dest_acct_name: Option, message: Option, - ) -> Result; + ) -> Result; } impl ForeignRpc for Foreign @@ -332,10 +332,12 @@ where fn receive_tx( &self, - slate: Slate, + slate: VersionedSlate, dest_acct_name: Option, message: Option, - ) -> Result { + ) -> Result { + let version = slate.version(); + let slate: Slate = slate.into(); let slate = Foreign::receive_tx( self, &slate, @@ -343,7 +345,8 @@ where message, ) .map_err(|e| e.kind())?; - Ok(slate) + + Ok(VersionedSlate::into_version(slate, version)) } } diff --git a/api/src/lib.rs b/api/src/lib.rs index 43174e8..dea8156 100644 --- a/api/src/lib.rs +++ b/api/src/lib.rs @@ -43,5 +43,6 @@ pub use crate::foreign_rpc::ForeignRpc; pub use crate::owner::Owner; pub use crate::owner_rpc::OwnerRpc; +pub use crate::foreign_rpc::foreign_rpc as foreign_rpc_client; pub use crate::foreign_rpc::run_doctest_foreign; pub use crate::owner_rpc::run_doctest_owner; diff --git a/api/tests/slate_versioning.rs b/api/tests/slate_versioning.rs new file mode 100644 index 0000000..38c2493 --- /dev/null +++ b/api/tests/slate_versioning.rs @@ -0,0 +1,131 @@ +// Copyright 2019 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. + +//! core::libtx specific tests +use grin_wallet_api::foreign_rpc_client; +use grin_wallet_api::run_doctest_foreign; +use grin_wallet_libwallet::{Slate, SlateVersion, VersionedSlate}; +use serde_json; +use serde_json::Value; +use tempfile::tempdir; +//use grin_wallet_libwallet::slate_versions::v1::SlateV1; +//use grin_wallet_libwallet::slate_versions::v2::SlateV2; + +// test all slate conversions +#[test] +fn receive_versioned_slate() { + // as in doctests, except exercising versioning functionality + // by accepting and responding with a V1 slate + + let dir = tempdir().map_err(|e| format!("{:#?}", e)).unwrap(); + let dir = dir + .path() + .to_str() + .ok_or("Failed to convert tmpdir path to string.".to_owned()) + .unwrap(); + + let v1_req = include_str!("slates/v1_req.slate"); + let v1_resp = include_str!("slates/v1_res.slate"); + + // leave here for the ability to create earlier slate versions + // for test input + /*let v: Value = serde_json::from_str(v1_req).unwrap(); + let v2_slate = v["params"][0].clone(); + println!("{}", v2_slate); + let v2_slate_str = v2_slate.to_string(); + println!("{}", v2_slate_str); + let v2: SlateV2 = serde_json::from_str(&v2_slate.to_string()).unwrap(); + let v1 = SlateV1::from(v2); + let v1_str = serde_json::to_string_pretty(&v1).unwrap(); + panic!("{}", v1_str);*/ + + let request_val: Value = serde_json::from_str(v1_req).unwrap(); + let expected_response: Value = serde_json::from_str(v1_resp).unwrap(); + + let response = run_doctest_foreign(request_val, dir, 5, true) + .unwrap() + .unwrap(); + + if response != expected_response { + panic!( + "(left != right) \nleft: {}\nright: {}", + serde_json::to_string_pretty(&response).unwrap(), + serde_json::to_string_pretty(&expected_response).unwrap() + ); + } +} + +/// call ForeignRpc::receive_tx on vs and return the result +fn receive_tx(vs: VersionedSlate) -> VersionedSlate { + let dir = tempdir().map_err(|e| format!("{:#?}", e)).unwrap(); + let dir = dir + .path() + .to_str() + .ok_or("Failed to convert tmpdir path to string.".to_owned()) + .unwrap(); + let bound_method = foreign_rpc_client::receive_tx( + vs, + None, + Some("Thanks for saving my dog from that tree, bddap.".into()), + ) + .unwrap(); + let (call, tracker) = bound_method.call(); + let json_response = run_doctest_foreign(call.as_request(), dir, 5, false) + .unwrap() + .unwrap(); + let mut response = easy_jsonrpc::Response::from_json_response(json_response).unwrap(); + tracker.get_return(&mut response).unwrap().unwrap() +} + +#[test] +fn version_unchanged() { + let req: Value = serde_json::from_str(include_str!("slates/v1_req.slate")).unwrap(); + let slate: VersionedSlate = serde_json::from_value(req["params"][0].clone()).unwrap(); + let slate_req: Slate = slate.into(); + + assert_eq!( + receive_tx(VersionedSlate::into_version( + slate_req.clone(), + SlateVersion::V0 + )) + .version(), + SlateVersion::V0 + ); + + assert_eq!( + receive_tx(VersionedSlate::into_version( + slate_req.clone(), + SlateVersion::V1 + )) + .version(), + SlateVersion::V1 + ); + + assert_eq!( + receive_tx(VersionedSlate::into_version( + slate_req.clone(), + SlateVersion::V2 + )) + .version(), + SlateVersion::V2 + ); + + // compile time test will remind us to update these tests when updating slate format + fn _all_versions_tested(vs: VersionedSlate) { + match vs { + VersionedSlate::V0(_) => (), + VersionedSlate::V1(_) => (), + VersionedSlate::V2(_) => (), + } + } +} diff --git a/api/tests/slates/v1_req.slate b/api/tests/slates/v1_req.slate new file mode 100644 index 0000000..d3ff7a5 --- /dev/null +++ b/api/tests/slates/v1_req.slate @@ -0,0 +1,1037 @@ +{ + "jsonrpc": "2.0", + "method": "receive_tx", + "id": 1, + "params": [ + { + "num_participants": 2, + "id": "0436430c-2b02-624c-2032-570501212b00", + "tx": { + "offset": [ + 210, + 2, + 150, + 73, + 0, + 0, + 0, + 0, + 211, + 2, + 150, + 73, + 0, + 0, + 0, + 0, + 212, + 2, + 150, + 73, + 0, + 0, + 0, + 0, + 213, + 2, + 150, + 73, + 0, + 0, + 0, + 0 + ], + "body": { + "inputs": [ + { + "features": "Coinbase", + "commit": [ + 8, + 125, + 243, + 35, + 4, + 197, + 212, + 174, + 139, + 42, + 240, + 188, + 49, + 231, + 0, + 1, + 157, + 114, + 41, + 16, + 239, + 135, + 221, + 78, + 236, + 49, + 151, + 184, + 11, + 32, + 126, + 48, + 69 + ] + }, + { + "features": "Coinbase", + "commit": [ + 8, + 225, + 218, + 158, + 109, + 196, + 214, + 232, + 8, + 167, + 24, + 178, + 241, + 16, + 169, + 145, + 221, + 119, + 93, + 101, + 206, + 90, + 228, + 8, + 164, + 225, + 240, + 2, + 164, + 150, + 26, + 169, + 231 + ] + } + ], + "outputs": [ + { + "features": "Plain", + "commit": [ + 8, + 18, + 39, + 108, + 199, + 136, + 230, + 135, + 6, + 18, + 41, + 109, + 146, + 108, + 186, + 159, + 14, + 123, + 152, + 16, + 103, + 7, + 16, + 181, + 166, + 230, + 241, + 186, + 0, + 109, + 57, + 87, + 116 + ], + "proof": [ + 220, + 255, + 97, + 117, + 57, + 12, + 96, + 43, + 250, + 146, + 194, + 255, + 209, + 169, + 178, + 216, + 77, + 204, + 158, + 169, + 65, + 246, + 243, + 23, + 189, + 208, + 248, + 117, + 36, + 78, + 242, + 62, + 105, + 111, + 209, + 124, + 113, + 223, + 121, + 118, + 12, + 229, + 206, + 26, + 150, + 170, + 177, + 209, + 93, + 208, + 87, + 53, + 141, + 200, + 53, + 233, + 114, + 254, + 190, + 184, + 109, + 80, + 204, + 236, + 13, + 173, + 124, + 254, + 2, + 70, + 215, + 66, + 235, + 117, + 60, + 247, + 184, + 140, + 4, + 93, + 21, + 188, + 113, + 35, + 248, + 207, + 113, + 85, + 100, + 124, + 207, + 102, + 63, + 202, + 146, + 168, + 60, + 154, + 101, + 208, + 237, + 117, + 110, + 167, + 235, + 255, + 210, + 202, + 201, + 12, + 56, + 10, + 16, + 46, + 217, + 202, + 170, + 53, + 93, + 23, + 94, + 208, + 191, + 88, + 211, + 172, + 47, + 94, + 144, + 157, + 108, + 68, + 125, + 252, + 107, + 96, + 94, + 4, + 146, + 92, + 43, + 23, + 195, + 62, + 189, + 25, + 8, + 201, + 101, + 165, + 84, + 30, + 165, + 210, + 237, + 69, + 160, + 149, + 142, + 100, + 2, + 248, + 157, + 122, + 86, + 223, + 25, + 146, + 224, + 54, + 216, + 54, + 231, + 64, + 23, + 231, + 60, + 202, + 213, + 203, + 58, + 130, + 184, + 225, + 57, + 227, + 9, + 121, + 42, + 49, + 177, + 95, + 63, + 253, + 114, + 237, + 3, + 50, + 83, + 66, + 140, + 21, + 108, + 43, + 151, + 153, + 69, + 138, + 37, + 193, + 218, + 101, + 183, + 25, + 120, + 10, + 34, + 222, + 127, + 231, + 244, + 55, + 174, + 47, + 204, + 210, + 44, + 247, + 234, + 53, + 122, + 181, + 170, + 102, + 165, + 239, + 125, + 113, + 251, + 13, + 198, + 74, + 160, + 181, + 118, + 31, + 104, + 39, + 128, + 98, + 187, + 57, + 187, + 41, + 108, + 120, + 126, + 76, + 171, + 197, + 226, + 162, + 147, + 58, + 65, + 108, + 225, + 201, + 169, + 105, + 97, + 96, + 56, + 100, + 73, + 196, + 55, + 233, + 18, + 15, + 123, + 178, + 110, + 91, + 14, + 116, + 209, + 242, + 231, + 213, + 188, + 215, + 170, + 251, + 42, + 146, + 184, + 125, + 21, + 72, + 241, + 249, + 17, + 251, + 6, + 175, + 123, + 214, + 204, + 19, + 206, + 226, + 159, + 124, + 156, + 183, + 144, + 33, + 174, + 209, + 129, + 134, + 39, + 42, + 240, + 233, + 209, + 137, + 236, + 16, + 124, + 129, + 168, + 163, + 174, + 180, + 120, + 43, + 13, + 149, + 14, + 72, + 129, + 170, + 81, + 183, + 118, + 187, + 104, + 68, + 178, + 91, + 206, + 151, + 3, + 91, + 72, + 169, + 189, + 178, + 174, + 163, + 96, + 134, + 135, + 188, + 221, + 71, + 157, + 79, + 169, + 152, + 181, + 168, + 57, + 255, + 136, + 85, + 142, + 74, + 41, + 223, + 240, + 237, + 19, + 181, + 89, + 0, + 171, + 181, + 212, + 57, + 183, + 7, + 147, + 217, + 2, + 174, + 154, + 211, + 69, + 135, + 177, + 140, + 145, + 159, + 107, + 135, + 92, + 145, + 209, + 77, + 238, + 177, + 195, + 115, + 245, + 231, + 101, + 112, + 213, + 154, + 101, + 73, + 117, + 143, + 101, + 95, + 17, + 40, + 165, + 79, + 22, + 45, + 254, + 136, + 104, + 225, + 88, + 112, + 40, + 226, + 106, + 217, + 30, + 82, + 140, + 90, + 231, + 238, + 147, + 53, + 250, + 88, + 251, + 89, + 2, + 43, + 93, + 226, + 157, + 128, + 240, + 118, + 74, + 153, + 23, + 57, + 13, + 70, + 219, + 137, + 154, + 204, + 106, + 91, + 65, + 110, + 37, + 236, + 201, + 220, + 203, + 113, + 83, + 100, + 106, + 221, + 204, + 129, + 202, + 219, + 95, + 0, + 120, + 254, + 188, + 126, + 5, + 215, + 115, + 90, + 186, + 73, + 79, + 57, + 239, + 5, + 105, + 123, + 188, + 201, + 180, + 123, + 44, + 204, + 121, + 89, + 93, + 117, + 252, + 19, + 200, + 6, + 120, + 181, + 226, + 55, + 237, + 206, + 88, + 215, + 49, + 243, + 76, + 5, + 177, + 221, + 202, + 166, + 73, + 172, + 242, + 216, + 101, + 187, + 188, + 60, + 237, + 161, + 5, + 8, + 188, + 221, + 41, + 208, + 73, + 103, + 68, + 100, + 75, + 241, + 195, + 81, + 111, + 102, + 135, + 223, + 238, + 245, + 100, + 156, + 125, + 255, + 144, + 98, + 125, + 100, + 39, + 57, + 165, + 157, + 145, + 168, + 209, + 208, + 196, + 220, + 85, + 215, + 74, + 148, + 158, + 16, + 116, + 66, + 118, + 100, + 180, + 103, + 153, + 44, + 158, + 15, + 125, + 58, + 249, + 214, + 234, + 121, + 81, + 62, + 137, + 70, + 221, + 192, + 211, + 86, + 186, + 196, + 152, + 120, + 230, + 78, + 106, + 149, + 176, + 163, + 2, + 20, + 33, + 79, + 175, + 44, + 227, + 23, + 250, + 98, + 47, + 243, + 38, + 107, + 50, + 168, + 22, + 225, + 10, + 24, + 230, + 215, + 137, + 165, + 218, + 31, + 35, + 230, + 123, + 79, + 151, + 10, + 104, + 167, + 188, + 217, + 225, + 136, + 37, + 238, + 39, + 75, + 4, + 131, + 137, + 106, + 64 + ] + } + ], + "kernels": [ + { + "features": "Plain", + "fee": 7000000, + "lock_height": 0, + "excess": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "excess_sig": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + ] + } + }, + "amount": 60000000000, + "fee": 7000000, + "height": 5, + "lock_height": 0, + "participant_data": [ + { + "id": 0, + "public_blind_excess": [ + 3, + 58, + 194, + 21, + 143, + 160, + 7, + 127, + 8, + 125, + 230, + 12, + 25, + 216, + 228, + 49, + 117, + 59, + 170, + 91, + 99, + 182, + 225, + 71, + 127, + 5, + 162, + 166, + 231, + 25, + 13, + 69, + 146 + ], + "public_nonce": [ + 3, + 27, + 132, + 197, + 86, + 123, + 18, + 100, + 64, + 153, + 93, + 62, + 213, + 170, + 186, + 5, + 101, + 215, + 30, + 24, + 52, + 96, + 72, + 25, + 255, + 156, + 23, + 245, + 233, + 213, + 221, + 7, + 143 + ], + "part_sig": null, + "message": null, + "message_sig": null + } + ], + "version": 1 + }, + null, + "Thanks, Yeastplume" + ] +} diff --git a/api/tests/slates/v1_res.slate b/api/tests/slates/v1_res.slate new file mode 100644 index 0000000..86a3e94 --- /dev/null +++ b/api/tests/slates/v1_res.slate @@ -0,0 +1,1955 @@ +{ + "id": 1, + "jsonrpc": "2.0", + "result": { + "Ok": { + "amount": 60000000000, + "fee": 7000000, + "height": 5, + "id": "0436430c-2b02-624c-2032-570501212b00", + "lock_height": 0, + "num_participants": 2, + "participant_data": [ + { + "id": 0, + "message": null, + "message_sig": null, + "part_sig": null, + "public_blind_excess": [ + 3, + 58, + 194, + 21, + 143, + 160, + 7, + 127, + 8, + 125, + 230, + 12, + 25, + 216, + 228, + 49, + 117, + 59, + 170, + 91, + 99, + 182, + 225, + 71, + 127, + 5, + 162, + 166, + 231, + 25, + 13, + 69, + 146 + ], + "public_nonce": [ + 3, + 27, + 132, + 197, + 86, + 123, + 18, + 100, + 64, + 153, + 93, + 62, + 213, + 170, + 186, + 5, + 101, + 215, + 30, + 24, + 52, + 96, + 72, + 25, + 255, + 156, + 23, + 245, + 233, + 213, + 221, + 7, + 143 + ] + }, + { + "id": 1, + "message": "Thanks, Yeastplume", + "message_sig": [ + 143, + 7, + 221, + 213, + 233, + 245, + 23, + 156, + 255, + 25, + 72, + 96, + 52, + 24, + 30, + 215, + 101, + 5, + 186, + 170, + 213, + 62, + 93, + 153, + 64, + 100, + 18, + 123, + 86, + 197, + 132, + 27, + 48, + 161, + 241, + 178, + 30, + 173, + 225, + 180, + 189, + 33, + 30, + 31, + 19, + 127, + 189, + 188, + 161, + 183, + 141, + 196, + 61, + 162, + 27, + 22, + 149, + 246, + 160, + 237, + 242, + 67, + 127, + 249 + ], + "part_sig": [ + 143, + 7, + 221, + 213, + 233, + 245, + 23, + 156, + 255, + 25, + 72, + 96, + 52, + 24, + 30, + 215, + 101, + 5, + 186, + 170, + 213, + 62, + 93, + 153, + 64, + 100, + 18, + 123, + 86, + 197, + 132, + 27, + 43, + 53, + 189, + 40, + 223, + 210, + 38, + 158, + 6, + 112, + 224, + 207, + 146, + 112, + 189, + 109, + 242, + 208, + 63, + 189, + 100, + 82, + 62, + 228, + 174, + 98, + 35, + 150, + 5, + 91, + 150, + 252 + ], + "public_blind_excess": [ + 3, + 143, + 224, + 68, + 50, + 67, + 218, + 177, + 115, + 192, + 104, + 239, + 95, + 168, + 145, + 178, + 66, + 210, + 181, + 235, + 137, + 14, + 160, + 148, + 117, + 230, + 227, + 129, + 23, + 4, + 66, + 238, + 22 + ], + "public_nonce": [ + 3, + 27, + 132, + 197, + 86, + 123, + 18, + 100, + 64, + 153, + 93, + 62, + 213, + 170, + 186, + 5, + 101, + 215, + 30, + 24, + 52, + 96, + 72, + 25, + 255, + 156, + 23, + 245, + 233, + 213, + 221, + 7, + 143 + ] + } + ], + "tx": { + "body": { + "inputs": [ + { + "commit": [ + 8, + 125, + 243, + 35, + 4, + 197, + 212, + 174, + 139, + 42, + 240, + 188, + 49, + 231, + 0, + 1, + 157, + 114, + 41, + 16, + 239, + 135, + 221, + 78, + 236, + 49, + 151, + 184, + 11, + 32, + 126, + 48, + 69 + ], + "features": "Coinbase" + }, + { + "commit": [ + 8, + 225, + 218, + 158, + 109, + 196, + 214, + 232, + 8, + 167, + 24, + 178, + 241, + 16, + 169, + 145, + 221, + 119, + 93, + 101, + 206, + 90, + 228, + 8, + 164, + 225, + 240, + 2, + 164, + 150, + 26, + 169, + 231 + ], + "features": "Coinbase" + } + ], + "kernels": [ + { + "excess": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "excess_sig": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "features": "Plain", + "fee": 7000000, + "lock_height": 0 + } + ], + "outputs": [ + { + "commit": [ + 8, + 78, + 233, + 125, + 239, + 168, + 195, + 113, + 36, + 212, + 198, + 155, + 170, + 117, + 62, + 37, + 50, + 83, + 95, + 170, + 129, + 247, + 158, + 165, + 224, + 72, + 157, + 178, + 82, + 151, + 213, + 190, + 184 + ], + "features": "Plain", + "proof": [ + 191, + 251, + 38, + 231, + 223, + 75, + 247, + 83, + 244, + 216, + 232, + 16, + 198, + 127, + 181, + 16, + 107, + 23, + 70, + 193, + 135, + 15, + 92, + 185, + 101, + 133, + 83, + 126, + 184, + 226, + 246, + 107, + 55, + 46, + 208, + 95, + 211, + 90, + 225, + 140, + 110, + 133, + 21, + 205, + 159, + 42, + 170, + 232, + 93, + 90, + 118, + 85, + 54, + 28, + 106, + 133, + 115, + 226, + 15, + 189, + 253, + 218, + 110, + 10, + 11, + 37, + 129, + 127, + 192, + 219, + 35, + 220, + 37, + 41, + 115, + 130, + 175, + 55, + 150, + 89, + 216, + 70, + 189, + 128, + 68, + 248, + 7, + 196, + 103, + 114, + 39, + 8, + 211, + 163, + 121, + 123, + 132, + 252, + 235, + 9, + 235, + 41, + 241, + 28, + 119, + 183, + 156, + 124, + 147, + 197, + 120, + 208, + 109, + 149, + 181, + 141, + 132, + 89, + 48, + 83, + 30, + 92, + 172, + 99, + 70, + 209, + 55, + 62, + 225, + 197, + 219, + 105, + 193, + 77, + 10, + 161, + 169, + 194, + 46, + 24, + 125, + 195, + 70, + 21, + 108, + 70, + 133, + 64, + 173, + 22, + 106, + 4, + 144, + 45, + 63, + 175, + 53, + 126, + 211, + 26, + 80, + 119, + 93, + 39, + 73, + 19, + 204, + 201, + 186, + 151, + 108, + 163, + 151, + 126, + 24, + 243, + 131, + 178, + 15, + 12, + 208, + 42, + 8, + 102, + 183, + 180, + 72, + 71, + 191, + 187, + 163, + 92, + 9, + 159, + 94, + 186, + 156, + 151, + 71, + 202, + 217, + 97, + 3, + 51, + 33, + 146, + 95, + 62, + 10, + 212, + 62, + 53, + 122, + 174, + 204, + 80, + 152, + 155, + 187, + 203, + 91, + 68, + 234, + 213, + 143, + 227, + 89, + 197, + 153, + 3, + 83, + 12, + 88, + 191, + 28, + 154, + 111, + 159, + 177, + 32, + 163, + 73, + 46, + 131, + 95, + 171, + 192, + 27, + 184, + 179, + 27, + 82, + 177, + 90, + 206, + 71, + 133, + 160, + 140, + 62, + 169, + 168, + 43, + 209, + 92, + 65, + 199, + 68, + 84, + 66, + 134, + 177, + 20, + 177, + 190, + 115, + 63, + 166, + 35, + 115, + 0, + 207, + 45, + 201, + 158, + 138, + 246, + 248, + 85, + 123, + 217, + 160, + 131, + 186, + 89, + 204, + 26, + 80, + 11, + 223, + 186, + 34, + 139, + 83, + 120, + 90, + 127, + 219, + 245, + 118, + 247, + 220, + 224, + 53, + 118, + 144, + 88, + 188, + 118, + 68, + 4, + 30, + 197, + 115, + 20, + 133, + 229, + 100, + 30, + 172, + 92, + 117, + 166, + 235, + 87, + 228, + 171, + 194, + 135, + 176, + 190, + 142, + 171, + 119, + 199, + 232, + 165, + 18, + 46, + 232, + 212, + 159, + 2, + 241, + 3, + 163, + 175, + 111, + 227, + 139, + 143, + 206, + 205, + 26, + 169, + 187, + 52, + 43, + 62, + 17, + 15, + 64, + 3, + 238, + 108, + 119, + 30, + 217, + 52, + 1, + 202, + 52, + 56, + 220, + 240, + 215, + 81, + 163, + 109, + 187, + 122, + 122, + 69, + 211, + 39, + 9, + 82, + 86, + 134, + 243, + 210, + 229, + 245, + 66, + 199, + 71, + 201, + 199, + 69, + 254, + 80, + 205, + 120, + 154, + 10, + 165, + 84, + 25, + 147, + 74, + 255, + 243, + 99, + 4, + 77, + 60, + 63, + 95, + 118, + 105, + 235, + 185, + 242, + 36, + 91, + 68, + 155, + 253, + 196, + 224, + 157, + 251, + 22, + 97, + 85, + 36, + 133, + 16, + 122, + 251, + 217, + 162, + 181, + 113, + 160, + 100, + 123, + 31, + 195, + 48, + 8, + 154, + 101, + 228, + 181, + 223, + 7, + 245, + 143, + 26, + 156, + 17, + 195, + 218, + 81, + 213, + 108, + 216, + 84, + 242, + 39, + 197, + 17, + 29, + 37, + 202, + 140, + 75, + 236, + 75, + 176, + 251, + 203, + 74, + 35, + 252, + 50, + 136, + 65, + 132, + 35, + 221, + 6, + 73, + 215, + 49, + 182, + 166, + 192, + 136, + 81, + 149, + 78, + 169, + 32, + 4, + 108, + 230, + 122, + 65, + 20, + 211, + 92, + 56, + 118, + 194, + 83, + 97, + 231, + 169, + 148, + 116, + 170, + 4, + 53, + 74, + 78, + 208, + 85, + 95, + 155, + 239, + 82, + 125, + 144, + 47, + 187, + 13, + 29, + 92, + 43, + 66, + 245, + 238, + 165, + 206, + 211, + 89, + 0, + 81, + 33, + 22, + 127, + 153, + 8, + 114, + 153, + 57, + 219, + 166, + 16, + 205, + 171, + 202, + 65, + 247, + 20, + 225, + 68, + 171, + 20, + 143, + 174, + 199, + 127, + 77, + 112, + 86, + 98, + 135, + 103, + 30, + 103, + 134, + 69, + 155, + 215, + 209, + 103, + 135, + 162, + 78, + 18, + 242, + 50, + 139, + 159, + 170, + 177, + 199, + 172, + 128, + 169, + 22, + 210, + 248, + 63, + 18, + 167, + 53, + 26, + 43, + 237, + 255, + 97, + 13, + 51, + 223, + 178, + 223, + 125, + 142, + 87, + 182, + 143, + 180, + 165, + 220, + 192, + 216, + 228, + 250, + 128, + 123, + 32, + 119, + 135, + 122, + 169, + 107, + 167, + 188, + 34, + 230, + 39, + 164, + 246, + 163, + 8, + 211, + 171, + 192, + 145, + 245, + 109, + 81, + 130, + 88, + 240, + 115, + 204, + 27, + 112, + 239, + 129 + ] + }, + { + "commit": [ + 8, + 18, + 39, + 108, + 199, + 136, + 230, + 135, + 6, + 18, + 41, + 109, + 146, + 108, + 186, + 159, + 14, + 123, + 152, + 16, + 103, + 7, + 16, + 181, + 166, + 230, + 241, + 186, + 0, + 109, + 57, + 87, + 116 + ], + "features": "Plain", + "proof": [ + 220, + 255, + 97, + 117, + 57, + 12, + 96, + 43, + 250, + 146, + 194, + 255, + 209, + 169, + 178, + 216, + 77, + 204, + 158, + 169, + 65, + 246, + 243, + 23, + 189, + 208, + 248, + 117, + 36, + 78, + 242, + 62, + 105, + 111, + 209, + 124, + 113, + 223, + 121, + 118, + 12, + 229, + 206, + 26, + 150, + 170, + 177, + 209, + 93, + 208, + 87, + 53, + 141, + 200, + 53, + 233, + 114, + 254, + 190, + 184, + 109, + 80, + 204, + 236, + 13, + 173, + 124, + 254, + 2, + 70, + 215, + 66, + 235, + 117, + 60, + 247, + 184, + 140, + 4, + 93, + 21, + 188, + 113, + 35, + 248, + 207, + 113, + 85, + 100, + 124, + 207, + 102, + 63, + 202, + 146, + 168, + 60, + 154, + 101, + 208, + 237, + 117, + 110, + 167, + 235, + 255, + 210, + 202, + 201, + 12, + 56, + 10, + 16, + 46, + 217, + 202, + 170, + 53, + 93, + 23, + 94, + 208, + 191, + 88, + 211, + 172, + 47, + 94, + 144, + 157, + 108, + 68, + 125, + 252, + 107, + 96, + 94, + 4, + 146, + 92, + 43, + 23, + 195, + 62, + 189, + 25, + 8, + 201, + 101, + 165, + 84, + 30, + 165, + 210, + 237, + 69, + 160, + 149, + 142, + 100, + 2, + 248, + 157, + 122, + 86, + 223, + 25, + 146, + 224, + 54, + 216, + 54, + 231, + 64, + 23, + 231, + 60, + 202, + 213, + 203, + 58, + 130, + 184, + 225, + 57, + 227, + 9, + 121, + 42, + 49, + 177, + 95, + 63, + 253, + 114, + 237, + 3, + 50, + 83, + 66, + 140, + 21, + 108, + 43, + 151, + 153, + 69, + 138, + 37, + 193, + 218, + 101, + 183, + 25, + 120, + 10, + 34, + 222, + 127, + 231, + 244, + 55, + 174, + 47, + 204, + 210, + 44, + 247, + 234, + 53, + 122, + 181, + 170, + 102, + 165, + 239, + 125, + 113, + 251, + 13, + 198, + 74, + 160, + 181, + 118, + 31, + 104, + 39, + 128, + 98, + 187, + 57, + 187, + 41, + 108, + 120, + 126, + 76, + 171, + 197, + 226, + 162, + 147, + 58, + 65, + 108, + 225, + 201, + 169, + 105, + 97, + 96, + 56, + 100, + 73, + 196, + 55, + 233, + 18, + 15, + 123, + 178, + 110, + 91, + 14, + 116, + 209, + 242, + 231, + 213, + 188, + 215, + 170, + 251, + 42, + 146, + 184, + 125, + 21, + 72, + 241, + 249, + 17, + 251, + 6, + 175, + 123, + 214, + 204, + 19, + 206, + 226, + 159, + 124, + 156, + 183, + 144, + 33, + 174, + 209, + 129, + 134, + 39, + 42, + 240, + 233, + 209, + 137, + 236, + 16, + 124, + 129, + 168, + 163, + 174, + 180, + 120, + 43, + 13, + 149, + 14, + 72, + 129, + 170, + 81, + 183, + 118, + 187, + 104, + 68, + 178, + 91, + 206, + 151, + 3, + 91, + 72, + 169, + 189, + 178, + 174, + 163, + 96, + 134, + 135, + 188, + 221, + 71, + 157, + 79, + 169, + 152, + 181, + 168, + 57, + 255, + 136, + 85, + 142, + 74, + 41, + 223, + 240, + 237, + 19, + 181, + 89, + 0, + 171, + 181, + 212, + 57, + 183, + 7, + 147, + 217, + 2, + 174, + 154, + 211, + 69, + 135, + 177, + 140, + 145, + 159, + 107, + 135, + 92, + 145, + 209, + 77, + 238, + 177, + 195, + 115, + 245, + 231, + 101, + 112, + 213, + 154, + 101, + 73, + 117, + 143, + 101, + 95, + 17, + 40, + 165, + 79, + 22, + 45, + 254, + 136, + 104, + 225, + 88, + 112, + 40, + 226, + 106, + 217, + 30, + 82, + 140, + 90, + 231, + 238, + 147, + 53, + 250, + 88, + 251, + 89, + 2, + 43, + 93, + 226, + 157, + 128, + 240, + 118, + 74, + 153, + 23, + 57, + 13, + 70, + 219, + 137, + 154, + 204, + 106, + 91, + 65, + 110, + 37, + 236, + 201, + 220, + 203, + 113, + 83, + 100, + 106, + 221, + 204, + 129, + 202, + 219, + 95, + 0, + 120, + 254, + 188, + 126, + 5, + 215, + 115, + 90, + 186, + 73, + 79, + 57, + 239, + 5, + 105, + 123, + 188, + 201, + 180, + 123, + 44, + 204, + 121, + 89, + 93, + 117, + 252, + 19, + 200, + 6, + 120, + 181, + 226, + 55, + 237, + 206, + 88, + 215, + 49, + 243, + 76, + 5, + 177, + 221, + 202, + 166, + 73, + 172, + 242, + 216, + 101, + 187, + 188, + 60, + 237, + 161, + 5, + 8, + 188, + 221, + 41, + 208, + 73, + 103, + 68, + 100, + 75, + 241, + 195, + 81, + 111, + 102, + 135, + 223, + 238, + 245, + 100, + 156, + 125, + 255, + 144, + 98, + 125, + 100, + 39, + 57, + 165, + 157, + 145, + 168, + 209, + 208, + 196, + 220, + 85, + 215, + 74, + 148, + 158, + 16, + 116, + 66, + 118, + 100, + 180, + 103, + 153, + 44, + 158, + 15, + 125, + 58, + 249, + 214, + 234, + 121, + 81, + 62, + 137, + 70, + 221, + 192, + 211, + 86, + 186, + 196, + 152, + 120, + 230, + 78, + 106, + 149, + 176, + 163, + 2, + 20, + 33, + 79, + 175, + 44, + 227, + 23, + 250, + 98, + 47, + 243, + 38, + 107, + 50, + 168, + 22, + 225, + 10, + 24, + 230, + 215, + 137, + 165, + 218, + 31, + 35, + 230, + 123, + 79, + 151, + 10, + 104, + 167, + 188, + 217, + 225, + 136, + 37, + 238, + 39, + 75, + 4, + 131, + 137, + 106, + 64 + ] + } + ] + }, + "offset": [ + 210, + 2, + 150, + 73, + 0, + 0, + 0, + 0, + 211, + 2, + 150, + 73, + 0, + 0, + 0, + 0, + 212, + 2, + 150, + 73, + 0, + 0, + 0, + 0, + 213, + 2, + 150, + 73, + 0, + 0, + 0, + 0 + ] + }, + "version": 1 + } + } +} diff --git a/config/Cargo.toml b/config/Cargo.toml index 6ccb8ad..d435421 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grin_wallet_config" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" authors = ["Grin Developers "] description = "Configuration for grin wallet , a simple, private and scalable cryptocurrency implementation based on the MimbleWimble chain format." license = "Apache-2.0" @@ -16,7 +16,7 @@ serde_derive = "1" toml = "0.4" dirs = "1.0.3" -grin_wallet_util = { path = "../util", version = "1.1.0-beta.1" } +grin_wallet_util = { path = "../util", version = "1.1.0-beta.2" } [dev-dependencies] pretty_assertions = "0.5.1" diff --git a/controller/Cargo.toml b/controller/Cargo.toml index 07f95ca..0631035 100644 --- a/controller/Cargo.toml +++ b/controller/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grin_wallet_controller" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" authors = ["Grin Developers "] description = "Controllers for grin wallet instantiation" license = "Apache-2.0" @@ -32,9 +32,9 @@ chrono = { version = "0.4.4", features = ["serde"] } easy-jsonrpc = "0.4.1" lazy_static = "1" -grin_wallet_util = { path = "../util", version = "1.1.0-beta.1" } +grin_wallet_util = { path = "../util", version = "1.1.0-beta.2" } -grin_wallet_api = { path = "../api", version = "1.1.0-beta.1" } -grin_wallet_impls = { path = "../impls", version = "1.1.0-beta.1" } -grin_wallet_libwallet = { path = "../libwallet", version = "1.1.0-beta.1" } -grin_wallet_config = { path = "../config", version = "1.1.0-beta.1" } +grin_wallet_api = { path = "../api", version = "1.1.0-beta.2" } +grin_wallet_impls = { path = "../impls", version = "1.1.0-beta.2" } +grin_wallet_libwallet = { path = "../libwallet", version = "1.1.0-beta.2" } +grin_wallet_config = { path = "../config", version = "1.1.0-beta.2" } diff --git a/impls/Cargo.toml b/impls/Cargo.toml index 631bb15..982c2a8 100644 --- a/impls/Cargo.toml +++ b/impls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grin_wallet_impls" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" authors = ["Grin Developers "] description = "Concrete types derived from libwallet traits" license = "Apache-2.0" @@ -26,7 +26,7 @@ tokio-retry = "0.1" uuid = { version = "0.7", features = ["serde", "v4"] } chrono = { version = "0.4.4", features = ["serde"] } -grin_wallet_util = { path = "../util", version = "1.1.0-beta.1" } +grin_wallet_util = { path = "../util", version = "1.1.0-beta.2" } -grin_wallet_libwallet = { path = "../libwallet", version = "1.1.0-beta.1" } -grin_wallet_config = { path = "../config", version = "1.1.0-beta.1" } +grin_wallet_libwallet = { path = "../libwallet", version = "1.1.0-beta.2" } +grin_wallet_config = { path = "../config", version = "1.1.0-beta.2" } diff --git a/impls/src/adapters/http.rs b/impls/src/adapters/http.rs index 5d93ae5..107c689 100644 --- a/impls/src/adapters/http.rs +++ b/impls/src/adapters/http.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//TODO: Update to V2 API when after Hard fork + /// HTTP Wallet 'plugin' implementation use crate::api; use crate::libwallet::slate::Slate; @@ -48,6 +50,7 @@ impl WalletCommAdapter for HTTPWalletCommAdapter { } let url = format!("{}/v1/wallet/foreign/receive_tx", dest); debug!("Posting transaction slate to {}", url); + //TODO: Use VersionedSlate when converting to V2 API let slate = slate.serialize_to_version(Some(slate.version_info.orig_version))?; // For compatibility with older clients let res: Slate = { diff --git a/libwallet/Cargo.toml b/libwallet/Cargo.toml index 2cfc938..83c9391 100644 --- a/libwallet/Cargo.toml +++ b/libwallet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grin_wallet_libwallet" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" authors = ["Grin Developers "] description = "Simple, private and scalable cryptocurrency implementation based on the MimbleWimble chain format." license = "Apache-2.0" @@ -23,7 +23,7 @@ uuid = { version = "0.7", features = ["serde", "v4"] } chrono = { version = "0.4.4", features = ["serde"] } lazy_static = "1" -grin_wallet_util = { path = "../util", version = "1.1.0-beta.1" } +grin_wallet_util = { path = "../util", version = "1.1.0-beta.2" } [dev-dependencies] -grin_wallet_config = { path = "../config", version = "1.1.0-beta.1" } +grin_wallet_config = { path = "../config", version = "1.1.0-beta.2" } diff --git a/libwallet/src/lib.rs b/libwallet/src/lib.rs index 23a6f2a..655d032 100644 --- a/libwallet/src/lib.rs +++ b/libwallet/src/lib.rs @@ -47,4 +47,6 @@ pub mod slate_versions; pub mod types; pub use crate::error::{Error, ErrorKind}; +pub use crate::slate::Slate; +pub use crate::slate_versions::{SlateVersion, VersionedSlate}; pub use internal::restore::{check_repair, restore}; diff --git a/libwallet/src/slate.rs b/libwallet/src/slate.rs index 4f882ce..9e15859 100644 --- a/libwallet/src/slate.rs +++ b/libwallet/src/slate.rs @@ -20,10 +20,12 @@ use crate::error::{Error, ErrorKind}; use crate::grin_core::core::amount_to_hr_string; use crate::grin_core::core::committed::Committed; use crate::grin_core::core::transaction::{ - kernel_features, kernel_sig_msg, Transaction, Weighting, + kernel_features, kernel_sig_msg, Input, Output, Transaction, TransactionBody, TxKernel, + Weighting, }; use crate::grin_core::core::verifier_cache::LruVerifierCache; use crate::grin_core::libtx::{aggsig, build, secp_ser, tx_fee}; +use crate::grin_core::map_vec; use crate::grin_keychain::{BlindSum, BlindingFactor, Keychain}; use crate::grin_util::secp; use crate::grin_util::secp::key::{PublicKey, SecretKey}; @@ -38,12 +40,13 @@ use uuid::Uuid; use crate::slate_versions::v0::SlateV0; use crate::slate_versions::v1::SlateV1; -use crate::slate_versions::v2::SlateV2; - -const CURRENT_SLATE_VERSION: u16 = 2; +use crate::slate_versions::v2::{ + InputV2, OutputV2, ParticipantDataV2, SlateV2, TransactionBodyV2, TransactionV2, TxKernelV2, + VersionCompatInfoV2, +}; +use crate::slate_versions::CURRENT_SLATE_VERSION; /// Public data for each participant in the slate - #[derive(Serialize, Deserialize, Debug, Clone)] pub struct ParticipantData { /// Id of participant in the transaction. (For now, 0=sender, 1=rec) @@ -661,3 +664,293 @@ impl Slate { Ok(()) } } + +// Current slate version to versioned conversions + +// Slate to versioned +impl From for SlateV2 { + fn from(slate: Slate) -> SlateV2 { + let Slate { + num_participants, + id, + tx, + amount, + fee, + height, + lock_height, + participant_data, + version_info, + } = slate; + let participant_data = map_vec!(participant_data, |data| ParticipantDataV2::from(data)); + let version_info = VersionCompatInfoV2::from(&version_info); + let tx = TransactionV2::from(tx); + SlateV2 { + num_participants, + id, + tx, + amount, + fee, + height, + lock_height, + participant_data, + version_info, + } + } +} + +impl From<&ParticipantData> for ParticipantDataV2 { + fn from(data: &ParticipantData) -> ParticipantDataV2 { + let ParticipantData { + id, + public_blind_excess, + public_nonce, + part_sig, + message, + message_sig, + } = data; + let id = *id; + let public_blind_excess = *public_blind_excess; + let public_nonce = *public_nonce; + let part_sig = *part_sig; + let message: Option = message.as_ref().map(|t| String::from(&**t)); + let message_sig = *message_sig; + ParticipantDataV2 { + id, + public_blind_excess, + public_nonce, + part_sig, + message, + message_sig, + } + } +} + +impl From<&VersionCompatInfo> for VersionCompatInfoV2 { + fn from(data: &VersionCompatInfo) -> VersionCompatInfoV2 { + let VersionCompatInfo { + version, + orig_version, + min_compat_version, + } = data; + let version = *version; + let orig_version = *orig_version; + let min_compat_version = *min_compat_version; + VersionCompatInfoV2 { + version, + orig_version, + min_compat_version, + } + } +} + +impl From for TransactionV2 { + fn from(tx: Transaction) -> TransactionV2 { + let Transaction { offset, body } = tx; + let body = TransactionBodyV2::from(&body); + TransactionV2 { offset, body } + } +} + +impl From<&TransactionBody> for TransactionBodyV2 { + fn from(body: &TransactionBody) -> TransactionBodyV2 { + let TransactionBody { + inputs, + outputs, + kernels, + } = body; + + let inputs = map_vec!(inputs, |inp| InputV2::from(inp)); + let outputs = map_vec!(outputs, |out| OutputV2::from(out)); + let kernels = map_vec!(kernels, |kern| TxKernelV2::from(kern)); + TransactionBodyV2 { + inputs, + outputs, + kernels, + } + } +} + +impl From<&Input> for InputV2 { + fn from(input: &Input) -> InputV2 { + let Input { features, commit } = *input; + InputV2 { features, commit } + } +} + +impl From<&Output> for OutputV2 { + fn from(output: &Output) -> OutputV2 { + let Output { + features, + commit, + proof, + } = *output; + OutputV2 { + features, + commit, + proof, + } + } +} + +impl From<&TxKernel> for TxKernelV2 { + fn from(kernel: &TxKernel) -> TxKernelV2 { + let TxKernel { + features, + fee, + lock_height, + excess, + excess_sig, + } = *kernel; + TxKernelV2 { + features, + fee, + lock_height, + excess, + excess_sig, + } + } +} + +// Versioned to current slate +impl From for Slate { + fn from(slate: SlateV2) -> Slate { + let SlateV2 { + num_participants, + id, + tx, + amount, + fee, + height, + lock_height, + participant_data, + version_info, + } = slate; + let participant_data = map_vec!(participant_data, |data| ParticipantData::from(data)); + let version_info = VersionCompatInfo::from(&version_info); + let tx = Transaction::from(tx); + Slate { + num_participants, + id, + tx, + amount, + fee, + height, + lock_height, + participant_data, + version_info, + } + } +} + +impl From<&ParticipantDataV2> for ParticipantData { + fn from(data: &ParticipantDataV2) -> ParticipantData { + let ParticipantDataV2 { + id, + public_blind_excess, + public_nonce, + part_sig, + message, + message_sig, + } = data; + let id = *id; + let public_blind_excess = *public_blind_excess; + let public_nonce = *public_nonce; + let part_sig = *part_sig; + let message: Option = message.as_ref().map(|t| String::from(&**t)); + let message_sig = *message_sig; + ParticipantData { + id, + public_blind_excess, + public_nonce, + part_sig, + message, + message_sig, + } + } +} + +impl From<&VersionCompatInfoV2> for VersionCompatInfo { + fn from(data: &VersionCompatInfoV2) -> VersionCompatInfo { + let VersionCompatInfoV2 { + version, + orig_version, + min_compat_version, + } = data; + let version = *version; + let orig_version = *orig_version; + let min_compat_version = *min_compat_version; + VersionCompatInfo { + version, + orig_version, + min_compat_version, + } + } +} + +impl From for Transaction { + fn from(tx: TransactionV2) -> Transaction { + let TransactionV2 { offset, body } = tx; + let body = TransactionBody::from(&body); + Transaction { offset, body } + } +} + +impl From<&TransactionBodyV2> for TransactionBody { + fn from(body: &TransactionBodyV2) -> TransactionBody { + let TransactionBodyV2 { + inputs, + outputs, + kernels, + } = body; + + let inputs = map_vec!(inputs, |inp| Input::from(inp)); + let outputs = map_vec!(outputs, |out| Output::from(out)); + let kernels = map_vec!(kernels, |kern| TxKernel::from(kern)); + TransactionBody { + inputs, + outputs, + kernels, + } + } +} + +impl From<&InputV2> for Input { + fn from(input: &InputV2) -> Input { + let InputV2 { features, commit } = *input; + Input { features, commit } + } +} + +impl From<&OutputV2> for Output { + fn from(output: &OutputV2) -> Output { + let OutputV2 { + features, + commit, + proof, + } = *output; + Output { + features, + commit, + proof, + } + } +} + +impl From<&TxKernelV2> for TxKernel { + fn from(kernel: &TxKernelV2) -> TxKernel { + let TxKernelV2 { + features, + fee, + lock_height, + excess, + excess_sig, + } = *kernel; + TxKernel { + features, + fee, + lock_height, + excess, + excess_sig, + } + } +} diff --git a/libwallet/src/slate_versions/mod.rs b/libwallet/src/slate_versions/mod.rs index 5aaf179..d92037a 100644 --- a/libwallet/src/slate_versions/mod.rs +++ b/libwallet/src/slate_versions/mod.rs @@ -14,9 +14,92 @@ //! This module contains old slate versions and conversions to the newest slate version //! Used for serialization and deserialization of slates in a backwards compatible way. +use crate::slate::Slate; +use crate::slate_versions::v0::SlateV0; +use crate::slate_versions::v1::SlateV1; +use crate::slate_versions::v2::SlateV2; + #[allow(missing_docs)] pub mod v0; #[allow(missing_docs)] pub mod v1; #[allow(missing_docs)] pub mod v2; + +/// The most recent version of the slate +pub const CURRENT_SLATE_VERSION: u16 = 2; + +/// Existing versions of the slate +#[derive(Debug, PartialEq, PartialOrd, Eq, Ord)] +pub enum SlateVersion { + /// V0 + V0, + /// V1 + V1, + /// V2 (most current) + V2, +} + +#[derive(Serialize, Deserialize)] +#[serde(untagged)] +/// Versions are ordered newest to oldest so serde attempts to +/// deserialize newer versions first, then falls back to older versions. +pub enum VersionedSlate { + /// Current + V2(SlateV2), + /// V1 - Grin 1.0.1 - 1.0.3) + V1(SlateV1), + /// V0 - Grin 1.0.0 + V0(SlateV0), +} + +impl VersionedSlate { + /// Return slate version + pub fn version(&self) -> SlateVersion { + match *self { + VersionedSlate::V2(_) => SlateVersion::V2, + VersionedSlate::V1(_) => SlateVersion::V1, + VersionedSlate::V0(_) => SlateVersion::V0, + } + } + + /// convert this slate type to a specified older version + pub fn into_version(slate: Slate, version: SlateVersion) -> VersionedSlate { + match version { + SlateVersion::V2 => VersionedSlate::V2(slate.into()), + SlateVersion::V1 => { + let s = SlateV2::from(slate); + let s = SlateV1::from(s); + VersionedSlate::V1(s) + } + SlateVersion::V0 => { + let s = SlateV2::from(slate); + let s = SlateV1::from(s); + let s = SlateV0::from(s); + VersionedSlate::V0(s) + } + } + } +} + +impl From for Slate { + fn from(slate: VersionedSlate) -> Slate { + match slate { + VersionedSlate::V2(s) => { + let s = SlateV2::from(s); + Slate::from(s) + } + VersionedSlate::V1(s) => { + let s = SlateV1::from(s); + let s = SlateV2::from(s); + Slate::from(s) + } + VersionedSlate::V0(s) => { + let s = SlateV0::from(s); + let s = SlateV1::from(s); + let s = SlateV2::from(s); + Slate::from(s) + } + } + } +} diff --git a/util/Cargo.toml b/util/Cargo.toml index 105dcdb..19a7998 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grin_wallet_util" -version = "1.1.0-beta.1" +version = "1.1.0-beta.2" authors = ["Grin Developers "] description = "Util, for generic utilities and to re-export grin crates" license = "Apache-2.0" @@ -17,28 +17,28 @@ toml = "0.4" dirs = "1.0.3" # For Release -grin_core = "1.1.0-beta.1" -grin_keychain = "1.1.0-beta.1" -grin_chain = "1.1.0-beta.1" -grin_util = "1.1.0-beta.1" -grin_api = "1.1.0-beta.1" -grin_store = "1.1.0-beta.1" +#grin_core = "1.1.0-beta.1" +#grin_keychain = "1.1.0-beta.1" +#grin_chain = "1.1.0-beta.1" +#grin_util = "1.1.0-beta.1" +#grin_api = "1.1.0-beta.1" +#grin_store = "1.1.0-beta.1" # For bleeding edge -#grin_core = { git = "https://github.com/mimblewimble/grin", branch = "milestone/1.1.0" } -#grin_keychain = { git = "https://github.com/mimblewimble/grin", branch = "milestone/1.1.0" } -#grin_chain = { git = "https://github.com/mimblewimble/grin", branch = "milestone/1.1.0" } -#grin_util = { git = "https://github.com/mimblewimble/grin", branch = "milestone/1.1.0" } -#grin_api = { git = "https://github.com/mimblewimble/grin", branch = "milestone/1.1.0" } -#grin_store = { git = "https://github.com/mimblewimble/grin", branch = "milestone/1.1.0" } +grin_core = { git = "https://github.com/mimblewimble/grin", branch = "master" } +grin_keychain = { git = "https://github.com/mimblewimble/grin", branch = "master" } +grin_chain = { git = "https://github.com/mimblewimble/grin", branch = "master" } +grin_util = { git = "https://github.com/mimblewimble/grin", branch = "master" } +grin_api = { git = "https://github.com/mimblewimble/grin", branch = "master" } +grin_store = { git = "https://github.com/mimblewimble/grin", branch = "master" } # For local testing -#grin_core = { path = "../../grin/core", version= "1.1.0"} -#grin_keychain = { path = "../../grin/keychain", version= "1.1.0"} -#grin_chain = { path = "../../grin/chain", version= "1.1.0"} -#grin_util = { path = "../../grin/util", version= "1.1.0"} -#grin_api = { path = "../../grin/api", version= "1.1.0"} -#grin_store = { path = "../../grin/store", version= "1.1.0"} +#grin_core = { path = "../../grin/core", version= "1.1.0-beta.2"} +#grin_keychain = { path = "../../grin/keychain", version= "1.1.0-beta.2"} +#grin_chain = { path = "../../grin/chain", version= "1.1.0-beta.2"} +#grin_util = { path = "../../grin/util", version= "1.1.0-beta.2"} +#grin_api = { path = "../../grin/api", version= "1.1.0-beta.2"} +#grin_store = { path = "../../grin/store", version= "1.1.0-beta.2"} [dev-dependencies] pretty_assertions = "0.5.1"