diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..df0dea378 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/protocol-eth"] + path = lib/protocol-eth + url = https://github.com/AdExNetwork/adex-protocol-eth diff --git a/Cargo.lock b/Cargo.lock index ba5907cd6..ca4248220 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,14 +4,21 @@ name = "adapter" version = "0.1.0" dependencies = [ + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "eth_checksum 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ethkey 0.3.0 (git+https://github.com/paritytech/parity.git)", + "ethstore 0.2.1 (git+https://github.com/paritytech/parity.git)", "futures-preview 0.3.0-alpha.16 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "primitives 0.1.0", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde-hex 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "web3 0.8.0 (git+https://github.com/tomusdrw/rust-web3)", @@ -19,7 +26,7 @@ dependencies = [ [[package]] name = "adler32" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -29,10 +36,59 @@ dependencies = [ "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "primitives 0.1.0", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "aes" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aes-ctr" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aes-soft" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aesni" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ahash" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "aho-corasick" version = "0.7.6" @@ -49,6 +105,17 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "app_dirs" +version = "1.2.1" +source = "git+https://github.com/paritytech/app-dirs-rs#0b37f9481ce29e9d5174ad185bca695b206368eb" +dependencies = [ + "ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "array-init" version = "0.0.4" @@ -100,7 +167,7 @@ name = "backtrace-sys" version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -141,6 +208,47 @@ dependencies = [ "constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-cipher-trait" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-modes" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-padding" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" version = "0.5.3" @@ -157,7 +265,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -172,7 +280,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.45" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -188,7 +296,7 @@ dependencies = [ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -214,6 +322,24 @@ dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "const-random" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "const-random-macro" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "constant_time_eq" version = "0.1.4" @@ -238,7 +364,7 @@ dependencies = [ "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "publicsuffix 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -306,11 +432,34 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crunchy" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "crunchy" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ctr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "derive_more" version = "0.15.0" @@ -324,6 +473,25 @@ dependencies = [ "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "dir" +version = "0.1.2" +source = "git+https://github.com/paritytech/parity.git#2627288311e952ff3b6b9675dfeda24f75b8249e" +dependencies = [ + "app_dirs 1.2.1 (git+https://github.com/paritytech/app-dirs-rs)", + "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "home 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "journaldb 0.2.0 (git+https://github.com/paritytech/parity.git)", +] + [[package]] name = "dirs" version = "1.0.5" @@ -349,14 +517,27 @@ name = "dtoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "edit-distance" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "either" -version = "1.5.2" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "elastic-array" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "encoding_rs" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -371,6 +552,17 @@ dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "eth-secp256k1" +version = "0.5.7" +source = "git+https://github.com/paritytech/rust-secp256k1#72c93ab592267d7848f00301009de36d349024b3" +dependencies = [ + "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "eth_checksum" version = "0.1.1" @@ -388,8 +580,8 @@ dependencies = [ "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -419,6 +611,52 @@ dependencies = [ "uint 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ethkey" +version = "0.3.0" +source = "git+https://github.com/paritytech/parity.git#2627288311e952ff3b6b9675dfeda24f75b8249e" +dependencies = [ + "edit-distance 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "eth-secp256k1 0.5.7 (git+https://github.com/paritytech/rust-secp256k1)", + "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-crypto 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wordlist 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ethstore" +version = "0.2.1" +source = "git+https://github.com/paritytech/parity.git#2627288311e952ff3b6b9675dfeda24f75b8249e" +dependencies = [ + "dir 0.1.2 (git+https://github.com/paritytech/parity.git)", + "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethkey 0.3.0 (git+https://github.com/paritytech/parity.git)", + "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-crypto 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wordlist 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "failure" version = "0.1.5" @@ -448,6 +686,20 @@ dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "fastmap" +version = "0.1.0" +source = "git+https://github.com/paritytech/parity.git#2627288311e952ff3b6b9675dfeda24f75b8249e" +dependencies = [ + "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "plain_hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fixed-hash" version = "0.3.2" @@ -597,6 +849,14 @@ name = "gcc" version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "getrandom" version = "0.1.12" @@ -624,6 +884,20 @@ dependencies = [ "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "hashbrown" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ahash 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "heapsize" version = "0.4.2" @@ -637,6 +911,24 @@ name = "hex" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "home" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "http" version = "0.1.18" @@ -683,7 +975,7 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.34" +version = "0.12.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -717,7 +1009,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.34 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -763,7 +1055,7 @@ name = "impl-serde" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -780,23 +1072,60 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "itertools" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "itoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "journaldb" +version = "0.2.0" +source = "git+https://github.com/paritytech/parity.git#2627288311e952ff3b6b9675dfeda24f75b8249e" +dependencies = [ + "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fastmap 0.1.0 (git+https://github.com/paritytech/parity.git)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.1.1 (git+https://github.com/paritytech/parity.git)", + "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memory-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rlp 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "jsonrpc-core" -version = "13.1.0" +version = "13.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "keccak-hasher" +version = "0.1.1" +source = "git+https://github.com/paritytech/parity.git#2627288311e952ff3b6b9675dfeda24f75b8249e" +dependencies = [ + "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "plain_hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -806,6 +1135,15 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "kvdb" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "language-tags" version = "0.2.2" @@ -830,6 +1168,14 @@ dependencies = [ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lock_api" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "lock_api" version = "0.3.1" @@ -854,6 +1200,16 @@ dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "malloc_size_of_derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "matches" version = "0.1.8" @@ -881,6 +1237,21 @@ dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "memory-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "memzero" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "merkletree" version = "0.10.0" @@ -920,7 +1291,7 @@ name = "miniz_oxide" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -972,7 +1343,7 @@ dependencies = [ "openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1014,7 +1385,7 @@ dependencies = [ "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1082,6 +1453,20 @@ dependencies = [ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ole32-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "openssl" version = "0.10.24" @@ -1106,7 +1491,7 @@ version = "0.9.49" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1120,13 +1505,59 @@ dependencies = [ "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parity-bytes" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "parity-codec" version = "3.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parity-crypto" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aes 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-modes 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memzero 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ripemd160 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scrypt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parity-util-mem" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parity-wordlist" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1138,6 +1569,16 @@ dependencies = [ "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot" version = "0.9.0" @@ -1160,6 +1601,21 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot_core" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (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.56 (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.10 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot_core" version = "0.6.2" @@ -1174,6 +1630,20 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pbkdf2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "percent-encoding" version = "1.0.1" @@ -1194,6 +1664,14 @@ name = "pkg-config" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "plain_hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "positioned-io" version = "0.2.2" @@ -1237,7 +1715,7 @@ dependencies = [ "num-derive 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (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.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde-hex 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1245,6 +1723,16 @@ dependencies = [ "toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "proc-macro2" version = "0.4.30" @@ -1273,6 +1761,11 @@ dependencies = [ "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "quick-error" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "quote" version = "0.6.13" @@ -1342,7 +1835,7 @@ dependencies = [ [[package]] name = "rand" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1461,7 +1954,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "rayon-core 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1534,17 +2027,17 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.19 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.34 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1558,6 +2051,16 @@ dependencies = [ "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ripemd160" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rlp" version = "0.4.2" @@ -1593,6 +2096,11 @@ name = "rustc-demangle" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rustc-hex" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rustc-hex" version = "2.0.1" @@ -1623,7 +2131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "schannel" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1645,6 +2153,18 @@ name = "scopeguard" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scrypt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "security-framework" version = "0.3.1" @@ -1679,10 +2199,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.100" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1691,13 +2211,13 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "array-init 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.100" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1712,7 +2232,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1722,7 +2242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1731,6 +2251,26 @@ name = "sha1" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "sha2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "shell32-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "slab" version = "0.3.0" @@ -1783,6 +2323,14 @@ name = "static_assertions" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "stream-cipher" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "string" version = "0.2.1" @@ -1796,6 +2344,16 @@ name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "subtle" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "syn" version = "0.15.44" @@ -1832,6 +2390,15 @@ name = "take_mut" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "tempdir" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tempfile" version = "3.1.0" @@ -1839,7 +2406,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1919,7 +2486,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2135,7 +2702,7 @@ name = "toml" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2161,6 +2728,11 @@ name = "typeable" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "typenum" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "uint" version = "0.7.1" @@ -2264,7 +2836,7 @@ dependencies = [ "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "primitives 0.1.0", "reqwest 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2306,7 +2878,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "web3" version = "0.8.0" -source = "git+https://github.com/tomusdrw/rust-web3#db4443ee16765c0754a87d9359d8f6b9e0c04d3a" +source = "git+https://github.com/tomusdrw/rust-web3#48267cbb5f7d86fe777a07566fe2cbb1102f2ed1" dependencies = [ "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2314,14 +2886,14 @@ dependencies = [ "ethabi 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.34 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 13.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 13.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2398,10 +2970,40 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "xdg" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "zeroize" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "zeroize_derive 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "zeroize_derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [metadata] -"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" +"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" +"checksum aes 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "54eb1d8fe354e5fc611daf4f2ea97dd45a765f4f1e4512306ec183ae2e8f20c9" +"checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" +"checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" +"checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" +"checksum ahash 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b58aeefd9396419a4f4f2b9778f2d832a11851b55010e231c5390cf2b1c416b4" "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum app_dirs 1.2.1 (git+https://github.com/paritytech/app-dirs-rs)" = "" "checksum array-init 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "23589ecb866b460d3a0f1278834750268c607e8e28a1b982c907219f3178cd72" "checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" "checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" @@ -2414,15 +3016,22 @@ dependencies = [ "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" "checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" "checksum blake2b_simd 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "5850aeee1552f495dd0250014cf64b82b7c8879a89d83b33bbdace2cc4f63182" +"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +"checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" +"checksum block-modes 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "31aa8410095e39fdb732909fb5730a48d5bd7c2e3cd76bd1b07b3dbea130c529" +"checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09" +"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be" +"checksum cc 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "8dae9c4b8fedcae85592ba623c4fd08cfdab3e3b72d6df780c6ead964a69bfff" "checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" "checksum chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e8493056968583b0193c1bb04d6f7684586f3726992d6c573261941a895dbd68" "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 const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7b641a8c9867e341f3295564203b1c250eb8ce6cb6126e007941f78c4d2ed7fe" +"checksum const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c750ec12b83377637110d5a57f5ae08e895b06c4b16e2bdbf1a94ef717428c59" "checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120" "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" "checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" @@ -2433,21 +3042,33 @@ dependencies = [ "checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +"checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" "checksum crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +"checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +"checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" "checksum derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a141330240c921ec6d074a3e188a7c7ef95668bb95e7d44fa0e5778ec2a7afe" +"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +"checksum dir 0.1.2 (git+https://github.com/paritytech/parity.git)" = "" "checksum dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" "checksum dotenv 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4424bad868b0ffe6ae351ee463526ba625bbca817978293bbe6bb7dc1804a175" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" -"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" -"checksum encoding_rs 0.8.19 (registry+https://github.com/rust-lang/crates.io-index)" = "79906e1ad1f7f8bc48864fcc6ffd58336fb5992e627bf61928099cb25fdf4314" +"checksum edit-distance 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bbbaaaf38131deb9ca518a274a45bfdb8771f139517b073b16c2d3d32ae5037b" +"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +"checksum elastic-array 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073be79b6538296faf81c631872676600616073817dd9a440c477ad09b408983" +"checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" +"checksum eth-secp256k1 0.5.7 (git+https://github.com/paritytech/rust-secp256k1)" = "" "checksum eth_checksum 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1c5e7f0000586455a608cd0e995d13a92ebd1dc893405e535b024a317002a96d" "checksum ethabi 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ebdeeea85a6d217b9fcc862906d7e283c047e04114165c433756baf5dce00a6c" "checksum ethbloom 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3932e82d64d347a045208924002930dc105a138995ccdc1479d0f05f0359f17c" "checksum ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "62d1bc682337e2c5ec98930853674dd2b4bd5d0d246933a9e98e5280f7c76c5f" +"checksum ethkey 0.3.0 (git+https://github.com/paritytech/parity.git)" = "" +"checksum ethstore 0.2.1 (git+https://github.com/paritytech/parity.git)" = "" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum fake 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b7e5932b40ab216d69bca7d228fa0bf754c44b70ed97fcc70fdc1b66d6214f51" +"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +"checksum fastmap 0.1.0 (git+https://github.com/paritytech/parity.git)" = "" "checksum fixed-hash 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d1a683d1234507e4f3bf2736eeddf0de1dc65996dc0164d57eba0a74bcf29489" "checksum flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "2adaffba6388640136149e18ed080b77a78611c1e1d6de75aedcdf78df5d4682" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" @@ -2466,15 +3087,20 @@ dependencies = [ "checksum futures-sink-preview 0.3.0-alpha.16 (registry+https://github.com/rust-lang/crates.io-index)" = "49dcfdacd6b5974ca0b9b78bc38ffd1071da0206179735c3df82e279f5b784e4" "checksum futures-util-preview 0.3.0-alpha.16 (registry+https://github.com/rust-lang/crates.io-index)" = "f7a0451b9c5047c2b9ab93425ffd0793165511e93c04b977cd45fbd41c6e34b2" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" +"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +"checksum hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +"checksum hashbrown 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bcea5b597dd98e6d1f1ec171744cc5dee1a30d1c23c5b98e3cf9d4fbdf8a526" "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" +"checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +"checksum home 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "29302b90cfa76231a757a887d1e3153331a63c7f80b6c75f86366334cbe70708" "checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" -"checksum hyper 0.12.34 (registry+https://github.com/rust-lang/crates.io-index)" = "898a87371a3999b2f731b9af636cd76aa20de10e69c2daf3e71388326b619fe0" +"checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" "checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" @@ -2483,20 +3109,28 @@ dependencies = [ "checksum impl-serde 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bbb1ea6188aca47a0eaeeb330d8a82f16cd500f30b897062d23922568727333a" "checksum indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a61202fbe46c4a951e9404a720a0180bcf3212c750d735cb5c4ba4dc551299f3" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" +"checksum itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4833d6978da405305126af4ac88569b5d71ff758581ce5a987dbfa3755f694fc" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum jsonrpc-core 13.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd42951eb35079520ee29b7efbac654d85821b397ef88c8151600ef7e2d00217" +"checksum journaldb 0.2.0 (git+https://github.com/paritytech/parity.git)" = "" +"checksum jsonrpc-core 13.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91d767c183a7e58618a609499d359ce3820700b3ebb4823a18c343b4a2a41a0d" +"checksum keccak-hasher 0.1.1 (git+https://github.com/paritytech/parity.git)" = "" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "72ae89206cea31c32014b39d5a454b96135894221610dbfd19cf4d2d044fa546" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" +"checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" "checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +"checksum malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "35adee9ed962cf7d07d62cb58bc45029f3227f5b5b86246caa8632f06c187bc3" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" "checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" +"checksum memory-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ef49315991403ba5fa225a70399df5e115f57b274cb0b1b4bcd6e734fa5bd783" +"checksum memzero 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "93c0d11ac30a033511ae414355d80f70d9f29a44a49140face477117a1ee90db" "checksum merkletree 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "73ed63b0cad3acefa6d5227bb34375afee744ecc2e89504438d0a8d8df8be05b" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" @@ -2517,32 +3151,44 @@ dependencies = [ "checksum num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2885278d5fe2adc2f75ced642d52d879bffaceb5a2e0b1d4309ffdfb239b454" "checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" "checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" +"checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" +"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" "checksum openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)" = "8152bb5a9b5b721538462336e3bef9a539f892715e5037fda0f984577311af15" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)" = "f4fad9e54bd23bd4cbbe48fdc08a1b8091707ac869ef8508edea2fec77dcc884" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" +"checksum parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5168b4cf41f3835e4bc6ffb32f51bc9365dc50cb351904595b3931d917fd0c" "checksum parity-codec 3.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2b9df1283109f542d8852cd6b30e9341acc2137481eb6157d2e62af68b0afec9" +"checksum parity-crypto 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ded773d0b20caeb099708dcfddf85d75d34ecdba80fcdb573a69af334535d51d" +"checksum parity-util-mem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2005637ccf93dbb60c85081ccaaf3f945f573da48dcc79f27f9646caa3ec1dc" +"checksum parity-wordlist 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "573d08f0d3bc8a6ffcdac1de2725b5daeed8db26345a9c12d91648e2d6457f3e" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" +"checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" "checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" +"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +"checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" "checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "72d5370d90f49f70bd033c3d75e87fc529fbfff9d6f7cccef07d6170079d91ea" +"checksum plain_hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "95fa6386b1d34aaf0adb9b7dd2885dbe7c34190e6263785e5a7ec2b19044a90f" "checksum positioned-io 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c405a565f48a728dbb07fa1770e30791b0fa3e6344c1e5615225ce84049354d6" "checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" "checksum primitive-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2288eb2a39386c4bc817974cc413afe173010dc80e470fcb1e9a35580869f024" +"checksum proc-macro-hack 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e688f31d92ffd7c1ddc57a1b4e6d773c0f2a14ee437a4b0a4f5a69c80eb221c8" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e98a83a9f9b331f54b924e68a66acb1bb35cb01fb0a23645139967abefb697e8" "checksum publicsuffix 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9bf259a81de2b2eb9850ec990ec78e6a25319715584fd7652b9b26f96fcb1510" +"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "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" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" +"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" @@ -2564,29 +3210,34 @@ dependencies = [ "checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" "checksum reqwest 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)" = "0f6d896143a583047512e59ac54a215cb203c29cc941917343edea3be8df9c78" +"checksum ripemd160 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad5112e0dbbb87577bfbc56c42450235e3012ce336e29c5befd7807bd626da4a" "checksum rlp 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fa2f7f9c612d133da9101ef7bcd3e603ca7098901eca852e71f87a83dd3e6b59" "checksum rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf" "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +"checksum rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ceb8ce7a5e520de349e1fa172baeba4a9e8d5ef06c47471863530bc4972ee1e" "checksum rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "403bb3a286107a04825a5f82e1270acc1e14028d3d554d7a1e08914549575ab8" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" "checksum safemem 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b08423011dae9a5ca23f07cf57dac3857f5c885d352b76f6d95f4aea9434d0" -"checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" +"checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" +"checksum scrypt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "656c79d0e90d0ab28ac86bf3c3d10bfbbac91450d3f190113b4e76d9fec3cfdd" "checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" "checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" "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.100 (registry+https://github.com/rust-lang/crates.io-index)" = "f4473e8506b213730ff2061073b48fa51dcc66349219e2e7c5608f0296a1d95a" +"checksum serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd" "checksum serde-hex 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca37e3e4d1b39afd7ff11ee4e947efae85adfddf4841787bfa47c470e96dc26d" -"checksum serde_derive 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)" = "11e410fde43e157d789fc290d26bc940778ad0fdd47836426fbac36573710dbb" +"checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e" "checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" "checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" +"checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cc9c640a4adbfbcc11ffb95efe5aa7af7309e002adab54b185507dbf2377b99" @@ -2595,12 +3246,16 @@ dependencies = [ "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" +"checksum stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8131256a5896cabcf5eb04f4d6dacbe1aefda854b0d9896e09cb58829ec5638c" "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" +"checksum subtle 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "01f40907d9ffc762709e4ff3eb4a6f6b41b650375a3f09ac92b641942b7fb082" "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" "checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" @@ -2631,6 +3286,7 @@ dependencies = [ "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" +"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" "checksum uint 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2143cded94692b156c356508d92888acc824db5bffc0b4089732264c6fcf86d4" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2e2e6bd1e59e56598518beb94fd6db628ded570326f0a98c679a304bd9f00150" @@ -2656,3 +3312,6 @@ dependencies = [ "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +"checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" +"checksum zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" +"checksum zeroize_derive 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "080616bd0e31f36095288bb0acdf1f78ef02c2fa15527d7e993f2a6c7591643e" diff --git a/adapter/Cargo.toml b/adapter/Cargo.toml index 4859619cc..43747ea9d 100644 --- a/adapter/Cargo.toml +++ b/adapter/Cargo.toml @@ -14,11 +14,18 @@ time = "0.1.42" # To/From Hex hex = "0.3.2" serde = {version = "^1.0", features = ['derive']} +serde_json = "1.0" +serde-hex = "0.1.0" # Ethereum web3 = { git = "https://github.com/tomusdrw/rust-web3" } eth_checksum = "0.1.1" ethabi = "8.0.1" tiny-keccak = "1.5" +ethkey = { git = "https://github.com/paritytech/parity.git" } +ethstore = { git = "https://github.com/paritytech/parity.git" } +sha2 = "0.8.0" +base64 = "0.10.1" +lazy_static = "1.4.0" [dev-dependencies] byteorder = "1.3" \ No newline at end of file diff --git a/adapter/src/dummy.rs b/adapter/src/dummy.rs index 6acba9b31..b102d09dd 100644 --- a/adapter/src/dummy.rs +++ b/adapter/src/dummy.rs @@ -1,17 +1,17 @@ -#![deny(clippy::all)] -#![deny(rust_2018_idioms)] - -use primitives::adapter::{Adapter, AdapterOptions, AdapterResult}; +use primitives::adapter::{Adapter, AdapterError, AdapterOptions, AdapterResult, Session}; use primitives::channel_validator::ChannelValidator; use primitives::config::Config; -use primitives::{Channel, ValidatorDesc}; +use primitives::Channel; use std::collections::HashMap; #[derive(Debug, Clone)] pub struct DummyAdapter { identity: String, - auth_tokens: HashMap, - verified_auth: HashMap, + config: Config, + // Auth tokens that we have verified (tokenId => session) + session_tokens: HashMap, + // Auth tokens that we've generated to authenticate with someone (address => token) + authorization_tokens: HashMap, } // Enables DummyAdapter to be able to @@ -21,26 +21,34 @@ impl ChannelValidator for DummyAdapter {} impl Adapter for DummyAdapter { type Output = DummyAdapter; - fn init(opts: AdapterOptions, _config: &Config) -> DummyAdapter { - // opts.dummy_identity.expect("dummyIdentity required"); - // opts.dummy_auth.expect("dummy auth required"); - // opts.dummy_auth_tokens.expect("dummy auth tokens required"); - // self.identity = opts.dummy_identity.unwrap(); - // self.authTokens = opts.dummy_auth.unwrap(); - // self.verifiedAuth = opts.dummy_auth_tokens.unwrap(); - Self { - identity: opts.dummy_identity.unwrap(), - auth_tokens: HashMap::new(), - verified_auth: HashMap::new(), - } + fn init(opts: AdapterOptions, config: &Config) -> AdapterResult { + let (identity, authorization_tokens, session_tokens) = match opts { + AdapterOptions::DummAdapter { + dummy_identity, + dummy_auth, + dummy_auth_tokens, + } => (dummy_identity, dummy_auth, dummy_auth_tokens), + _ => { + return Err(AdapterError::Configuration( + "dummy_identity, dummy_auth, dummy_auth_tokens required".to_string(), + )) + } + }; + + Ok(Self { + identity, + config: config.to_owned(), + session_tokens, + authorization_tokens, + }) } - fn unlock(&self) -> AdapterResult { - Ok(true) + fn unlock(&mut self) -> AdapterResult<()> { + Ok(()) } fn whoami(&self) -> String { - self.identity.to_string() + self.identity.clone() } fn sign(&self, state_root: &str) -> AdapterResult { @@ -63,27 +71,46 @@ impl Adapter for DummyAdapter { Ok(is_same) } - fn validate_channel(&self, _channel: &Channel) -> AdapterResult { - // @TODO - Ok(true) + fn validate_channel(&self, channel: &Channel) -> AdapterResult { + match DummyAdapter::is_channel_valid(&self.config, channel) { + Ok(_) => Ok(true), + Err(e) => Err(AdapterError::InvalidChannel(e.to_string())), + } } - fn session_from_token(&self, _token: &str) -> AdapterResult { - // @TODO - Ok("hello".to_string()) + fn session_from_token(&mut self, token: &str) -> AdapterResult { + let identity = self + .authorization_tokens + .iter() + .find(|(_, id)| *id == token); + + match identity { + Some((id, _)) => Ok(Session { + uid: id.to_owned(), + era: 0, + }), + None => Err(AdapterError::Authentication(format!( + "no session token for this auth: {}", + token + ))), + } } - fn get_auth(&self, _validator: &ValidatorDesc) -> AdapterResult { - // let participant = self - // .participants - // .iter() - // .find(|&(_, participant)| participant.identity == validator); - // let future = match participant { - // Some((_, participant)) => ok(participant.token.to_string()), - // None => err(AdapterError::Authentication( - // "Identity not found".to_string(), - // )), - // }; - Ok("auth".to_string()) + fn get_auth(&mut self, _validator: &str) -> AdapterResult { + let who = self + .session_tokens + .iter() + .find(|(_, id)| *id == &self.identity); + + match who { + Some((id, _)) => { + let auth = self.authorization_tokens.get(id).expect("id should exist"); + Ok(auth.to_owned()) + } + None => Err(AdapterError::Authentication(format!( + "no auth token for this identity: {}", + self.identity + ))), + } } } diff --git a/adapter/src/ethereum.rs b/adapter/src/ethereum.rs index 74f53da76..e34a150b2 100644 --- a/adapter/src/ethereum.rs +++ b/adapter/src/ethereum.rs @@ -1,101 +1,493 @@ -#![deny(clippy::all)] -#![deny(rust_2018_idioms)] - -use futures::future::{ok, FutureExt}; -use primitives::adapter::{Adapter, AdapterOptions, AdapterResult}; -use primitives::channel_validator::ChannelValidator; -use primitives::config::Config; -use primitives::{Channel, ValidatorDesc}; +use crate::EthereumChannel; +use chrono::Utc; +use ethkey::{public_to_address, recover, verify_address, Address, Message, Password, Signature}; +use ethstore::SafeAccount; +use lazy_static::lazy_static; +use primitives::{ + adapter::{Adapter, AdapterError, AdapterOptions, AdapterResult, Session}, + channel_validator::ChannelValidator, + config::Config, + Channel, +}; +use serde::{Deserialize, Serialize}; +use serde_json::Value; use std::collections::HashMap; -use web3::types::Address; +use std::convert::TryFrom; +use std::error::Error; +use std::fs; +use tiny_keccak::Keccak; +use web3::transports::Http; +use web3::{ + contract::{Contract, Options}, + futures::Future, + types::U256, +}; + +lazy_static! { + static ref ADEXCORE_ABI: &'static [u8] = + include_bytes!("../../lib/protocol-eth/abi/AdExCore.json"); + static ref IDENTITY_ABI: &'static [u8] = + include_bytes!("../../lib/protocol-eth/abi/Identity.json"); + static ref CHANNEL_STATE_ACTIVE: U256 = 1.into(); + static ref PRIVILEGE_LEVEL_NONE: U256 = 0.into(); +} #[derive(Debug, Clone)] pub struct EthereumAdapter { - address: Option
, - keystore_json: String, - keystore_pwd: String, - auth_tokens: HashMap, - verified_auth: HashMap, - wallet: Option
, + address: String, + keystore_json: Value, + keystore_pwd: Password, + config: Config, + // Auth tokens that we have verified (tokenId => session) + session_tokens: HashMap, + // Auth tokens that we've generated to authenticate with someone (address => token) + authorization_tokens: HashMap, + wallet: Option, } // Enables EthereumAdapter to be able to // check if a channel is valid impl ChannelValidator for EthereumAdapter {} -// @TODO impl Adapter for EthereumAdapter { type Output = EthereumAdapter; - fn init(opts: AdapterOptions, _config: &Config) -> EthereumAdapter { - // opts.dummy_identity.expect("dummyIdentity required"); - // opts.dummy_auth.expect("dummy auth required"); - // opts.dummy_auth_tokens.expect("dummy auth tokens required"); - // self.identity = opts.dummy_identity.unwrap(); - // self.authTokens = opts.dummy_auth.unwrap(); - // self.verifiedAuth = opts.dummy_auth_tokens.unwrap(); - let keystore_json = opts.keystore_file.unwrap(); - let keystore_pwd = opts.keystore_pwd.unwrap(); - - Self { - address: None, + fn init(opts: AdapterOptions, config: &Config) -> AdapterResult { + let (keystore_file, keystore_pwd) = match opts { + AdapterOptions::EthereumAdapter(keystore_opts) => { + (keystore_opts.keystore_file, keystore_opts.keystore_pwd) + } + _ => { + return Err(AdapterError::Configuration( + "Missing keystore json file or password".to_string(), + )) + } + }; + + let keystore_contents = fs::read_to_string(&keystore_file) + .map_err(|_| map_error("Invalid keystore location provided"))?; + + let keystore_json: Value = serde_json::from_str(&keystore_contents) + .map_err(|_| map_error("Invalid keystore json provided"))?; + + let address = match keystore_json["address"].as_str() { + Some(addr) => eth_checksum::checksum(&addr), + None => { + return Err(AdapterError::Failed( + "address missing in keystore json".to_string(), + )) + } + }; + + Ok(Self { + address, keystore_json, - keystore_pwd, - auth_tokens: HashMap::new(), - verified_auth: HashMap::new(), + keystore_pwd: keystore_pwd.into(), + session_tokens: HashMap::new(), + authorization_tokens: HashMap::new(), wallet: None, - } + config: config.to_owned(), + }) } - fn unlock(&self) -> AdapterResult { - Ok(true) + fn unlock(&mut self) -> AdapterResult<()> { + let account = SafeAccount::from_file( + serde_json::from_value(self.keystore_json.clone()) + .map_err(|_| map_error("Invalid keystore json provided"))?, + None, + &Some(self.keystore_pwd.clone()), + ) + .map_err(|_| map_error("Failed to create account"))?; + + self.wallet = Some(account); + + Ok(()) } fn whoami(&self) -> String { - self.address.unwrap().to_string() + self.address.clone() } fn sign(&self, state_root: &str) -> AdapterResult { - let signature = format!( - "Dummy adapter signature for {} by {}", - state_root, - self.whoami() - ); - Ok(signature) + if let Some(wallet) = &self.wallet { + let message = Message::from_slice(&hash_message(state_root)); + let wallet_sign = wallet + .sign(&self.keystore_pwd, &message) + .map_err(|_| map_error("failed to sign messages"))?; + let signature: Signature = wallet_sign.into_electrum().into(); + + Ok(format!("0x{}", signature)) + } else { + Err(AdapterError::Configuration( + "Unlock the wallet before signing".to_string(), + )) + } } - fn verify(&self, signer: &str, _state_root: &str, signature: &str) -> AdapterResult { - // select the `identity` and compare it to the signer - // for empty string this will return array with 1 element - an empty string `[""]` - let is_same = match signature.rsplit(' ').take(1).next() { - Some(from) => from == signer, - None => false, + fn verify(&self, signer: &str, state_root: &str, sig: &str) -> AdapterResult { + let (decoded_adress, decoded_signature) = match (hex::decode(signer), hex::decode(sig)) { + (Ok(address), Ok(sig)) => (address, sig), + _ => { + return Err(AdapterError::Signature( + "invalid signature or address".to_string(), + )) + } }; - Ok(is_same) + let address = Address::from_slice(&decoded_adress); + let signature = Signature::from_electrum(&decoded_signature); + let message = Message::from_slice(&hash_message(state_root)); + + verify_address(&address, &signature, &message).or_else(|_| Ok(false)) } - fn validate_channel(&self, _channel: &Channel) -> AdapterResult { - // @TODO + fn validate_channel(&self, channel: &Channel) -> AdapterResult { + if check_validator_id_checksum(channel) { + return Err(AdapterError::Configuration( + "channel.validators: all addresses are checksummed".to_string(), + )); + } + // check if channel is valid + if let Err(e) = EthereumAdapter::is_channel_valid(&self.config, channel) { + return Err(AdapterError::InvalidChannel(e.to_string())); + } + + let eth_channel = EthereumChannel::try_from(channel) + .map_err(|e| AdapterError::InvalidChannel(e.to_string()))?; + + let channel_id = eth_channel + .hash_hex(&self.config.ethereum_core_address) + .map_err(|_| map_error("Failed to hash the channel id"))?; + + if channel_id != channel.id { + return Err(AdapterError::Configuration( + "channel.id is not valid".to_string(), + )); + } + + // query the blockchain for the channel status + let contract_address = Address::from_slice(self.config.ethereum_core_address.as_bytes()); + let contract = get_contract(&self.config, contract_address, &ADEXCORE_ABI) + .map_err(|_| map_error("failed to init core contract"))?; + + let channel_status: U256 = contract + .query("states", channel_id, None, Options::default(), None) + .wait() + .map_err(|_| map_error("contract channel status query failed"))?; + + if channel_status != *CHANNEL_STATE_ACTIVE { + return Err(AdapterError::Configuration( + "channel is not Active on the ethereum network".to_string(), + )); + } + Ok(true) } - fn session_from_token(&self, _token: &str) -> AdapterResult { - // @TODO - Ok("hello".to_string()) + fn session_from_token(&mut self, token: &str) -> AdapterResult { + if token.len() < 16 { + return Err(AdapterError::Failed("invaild token id".to_string())); + } + + let token_id = token[token.len() - 16..].to_string(); + + if let Some(token) = self.session_tokens.get(&token_id) { + return Ok(token.to_owned()); + } + + let parts: Vec<&str> = token.split('.').collect(); + let (header_encoded, payload_encoded, token_encoded) = + match (parts.get(0), parts.get(1), parts.get(2)) { + (Some(header_encoded), Some(payload_encoded), Some(token_encoded)) => { + (header_encoded, payload_encoded, token_encoded) + } + _ => { + return Err(AdapterError::Failed(format!( + "{} token string is incorrect", + token + ))) + } + }; + + let verified = ewt_verify(header_encoded, payload_encoded, token_encoded) + .map_err(|e| map_error(&e.to_string()))?; + + if self.whoami() != verified.payload.id { + return Err(AdapterError::Configuration( + "token payload.id !== whoami(): token was not intended for us".to_string(), + )); + } + + let sess = match &verified.payload.identity { + Some(identity) => { + let contract_address = Address::from_slice(identity.as_bytes()); + let contract = get_contract(&self.config, contract_address, &IDENTITY_ABI) + .map_err(|_| map_error("failed to init identity contract"))?; + + let priviledge_level: U256 = contract + .query("privileges", verified.from, None, Options::default(), None) + .wait() + .map_err(|_| map_error("failed query priviledge level on contract"))?; + + if priviledge_level == *PRIVILEGE_LEVEL_NONE { + return Err(AdapterError::Authorization( + "insufficient privilege".to_string(), + )); + } + Session { + era: verified.payload.era, + uid: identity.to_owned(), + } + } + None => Session { + era: verified.payload.era, + uid: verified.from, + }, + }; + + self.session_tokens.insert(token_id, sess.clone()); + Ok(sess) + } + + fn get_auth(&mut self, validator_id: &str) -> AdapterResult { + let validator = validator_id.to_owned(); + match (&self.wallet, self.authorization_tokens.get(&validator)) { + (Some(_), Some(token)) => Ok(token.to_owned()), + (Some(wallet), None) => { + let era = Utc::now().timestamp() as f64 / 60000.0; + let payload = Payload { + id: validator.clone(), + era: era.floor() as i64, + identity: None, + address: None, + }; + let token = ewt_sign(wallet, &self.keystore_pwd, &payload) + .map_err(|_| map_error("Failed to sign token"))?; + + self.authorization_tokens + .insert(validator.clone(), token.clone()); + + Ok(token) + } + (_, _) => Err(AdapterError::Configuration( + "failed to unlock wallet".to_string(), + )), + } } +} + +fn check_validator_id_checksum(channel: &Channel) -> bool { + channel + .spec + .validators + .into_iter() + .any(|v| v.id != eth_checksum::checksum(&v.id)) +} + +fn hash_message(message: &str) -> [u8; 32] { + let eth = "\x19Ethereum Signed Message:\n"; + let message_length = message.len(); + + let encoded = format!("{}{}{}", eth, message_length, message); - fn get_auth(&self, _validator: &ValidatorDesc) -> AdapterResult { - // let participant = self - // .participants - // .iter() - // .find(|&(_, participant)| participant.identity == validator); - // let future = match participant { - // Some((_, participant)) => ok(participant.token.to_string()), - // None => err(AdapterError::Authentication( - // "Identity not found".to_string(), - // )), - // }; - Ok("auth".to_string()) + let mut result = Keccak::new_keccak256(); + result.update(&encoded.as_bytes()); + + let mut res: [u8; 32] = [0; 32]; + result.finalize(&mut res); + + res +} + +fn map_error(err: &str) -> AdapterError { + AdapterError::Failed(err.to_string()) +} + +fn get_contract( + config: &Config, + contract_address: Address, + abi: &[u8], +) -> Result, Box> { + let (_eloop, transport) = web3::transports::Http::new(&config.ethereum_network)?; + let web3 = web3::Web3::new(transport); + let contract = Contract::from_json(web3.eth(), contract_address, abi)?; + + Ok(contract) +} + +// Ethereum Web Tokens +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct Payload { + pub id: String, + pub era: i64, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub address: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub identity: Option, +} + +#[derive(Clone, Debug)] +pub struct VerifyPayload { + pub from: String, + pub payload: Payload, +} + +#[derive(Serialize, Deserialize)] +struct Header { + #[serde(rename = "type")] + header_type: String, + alg: String, +} + +pub fn ewt_sign( + signer: &SafeAccount, + password: &Password, + payload: &Payload, +) -> Result> { + let header = Header { + header_type: "JWT".to_string(), + alg: "ETH".to_string(), + }; + + let header_encoded = + base64::encode_config(&serde_json::to_string(&header)?, base64::URL_SAFE_NO_PAD); + + let payload_encoded = + base64::encode_config(&serde_json::to_string(payload)?, base64::URL_SAFE_NO_PAD); + + let message = Message::from_slice(&hash_message(&format!( + "{}.{}", + header_encoded, payload_encoded + ))); + let signature: Signature = signer + .sign(password, &message) + .map_err(|_| map_error("sign message"))? + .into_electrum() + .into(); + + let token = base64::encode_config( + &hex::decode(format!("{}", signature))?, + base64::URL_SAFE_NO_PAD, + ); + + Ok(format!("{}.{}.{}", header_encoded, payload_encoded, token)) +} + +pub fn ewt_verify( + header_encoded: &str, + payload_encoded: &str, + token: &str, +) -> Result> { + let message = Message::from_slice(&hash_message(&format!( + "{}.{}", + header_encoded, payload_encoded + ))); + + let decoded_signature = base64::decode_config(&token, base64::URL_SAFE_NO_PAD)?; + let signature = Signature::from_electrum(&decoded_signature); + + let address = public_to_address(&recover(&signature, &message)?); + + let payload_string = String::from_utf8(base64::decode_config( + &payload_encoded, + base64::URL_SAFE_NO_PAD, + )?)?; + let payload: Payload = serde_json::from_str(&payload_string)?; + + let verified_payload = VerifyPayload { + from: eth_checksum::checksum(&format!("{:?}", address)), + payload, + }; + + Ok(verified_payload) +} + +#[cfg(test)] +mod test { + use super::*; + use primitives::adapter::KeystoreOptions; + use primitives::config::configuration; + + fn setup_eth_adapter() -> EthereumAdapter { + let config = configuration("development", None).expect("failed parse config"); + let keystore_options = KeystoreOptions { + keystore_file: "./test/resources/keystore.json".to_string(), + keystore_pwd: "adexvalidator".to_string(), + }; + let adapter_options = AdapterOptions::EthereumAdapter(keystore_options); + + EthereumAdapter::init(adapter_options, &config).expect("should init ethereum adapter") + } + + #[test] + fn should_init_and_unlock_ethereum_adapter() { + let mut eth_adapter = setup_eth_adapter(); + let unlock = eth_adapter.unlock().expect("should unlock eth adapter"); + + assert_eq!((), unlock, "failed to unlock eth adapter"); + } + + #[test] + fn should_get_whoami_sign_and_verify_messages() { + // whoami + let mut eth_adapter = setup_eth_adapter(); + let whoami = eth_adapter.whoami(); + assert_eq!( + whoami, "0x2bDeAFAE53940669DaA6F519373f686c1f3d3393", + "failed to get correct whoami" + ); + + eth_adapter.unlock().expect("should unlock eth adapter"); + + // Sign + let expected_response = + "0xce654de0b3d14d63e1cb3181eee7a7a37ef4a06c9fabc204faf96f26357441b625b1be460fbe8f5278cc02aa88a5d0ac2f238e9e3b8e4893760d33bccf77e47f1b"; + let message = "2bdeafae53940669daa6f519373f686c"; + let response = eth_adapter.sign(message).expect("failed to sign message"); + assert_eq!(expected_response, response, "invalid signature"); + + // Verify + let signature = + "ce654de0b3d14d63e1cb3181eee7a7a37ef4a06c9fabc204faf96f26357441b625b1be460fbe8f5278cc02aa88a5d0ac2f238e9e3b8e4893760d33bccf77e47f1b"; + let verify = eth_adapter + .verify( + "2bDeAFAE53940669DaA6F519373f686c1f3d3393", + "2bdeafae53940669daa6f519373f686c", + &signature, + ) + .expect("Failed to verify signatures"); + assert_eq!(verify, true, "invalid signature verification"); + } + + #[test] + fn should_generate_correct_ewt_sign_and_verify() { + let mut eth_adapter = setup_eth_adapter(); + eth_adapter.unlock().expect("should unlock eth adapter"); + + let payload = Payload { + id: "awesomeValidator".to_string(), + era: 100_000, + address: Some(eth_adapter.whoami()), + identity: None, + }; + let wallet = eth_adapter.wallet.clone(); + let response = ewt_sign(&wallet.unwrap(), ð_adapter.keystore_pwd, &payload) + .expect("failed to generate ewt signature"); + let expected = + "eyJ0eXBlIjoiSldUIiwiYWxnIjoiRVRIIn0.eyJpZCI6ImF3ZXNvbWVWYWxpZGF0b3IiLCJlcmEiOjEwMDAwMCwiYWRkcmVzcyI6IjB4MmJEZUFGQUU1Mzk0MDY2OURhQTZGNTE5MzczZjY4NmMxZjNkMzM5MyJ9.gGw_sfnxirENdcX5KJQWaEt4FVRvfEjSLD4f3OiPrJIltRadeYP2zWy9T2GYcK5xxD96vnqAw4GebAW7rMlz4xw"; + assert_eq!(response, expected, "generated wrong ewt signature"); + + let expected_verification_response = + r#"VerifyPayload { from: "0x2bDeAFAE53940669DaA6F519373f686c1f3d3393", payload: Payload { id: "awesomeValidator", era: 100000, address: Some("0x2bDeAFAE53940669DaA6F519373f686c1f3d3393"), identity: None } }"#; + + let parts: Vec<&str> = expected.split('.').collect(); + let verification = + ewt_verify(parts[0], parts[1], parts[2]).expect("Failed to verify ewt token"); + + assert_eq!( + expected_verification_response, + format!("{:?}", verification), + "generated wrong verification payload" + ); } } diff --git a/adapter/src/lib.rs b/adapter/src/lib.rs index 2ae17819b..e045749be 100644 --- a/adapter/src/lib.rs +++ b/adapter/src/lib.rs @@ -1,17 +1,15 @@ -#![feature(async_await, await_macro)] -#![deny(rust_2018_idioms)] -#![deny(clippy::all)] -#![deny(clippy::match_bool)] -#![doc(test(attr(feature(async_await, await_macro))))] - use std::error::Error; +use chrono::{DateTime, Utc}; use ethabi::encode; use ethabi::param_type::ParamType; use ethabi::token::{LenientTokenizer, StrictTokenizer, Tokenizer}; -use tiny_keccak::Keccak; - +use primitives::channel::ChannelError; use primitives::BigNum; +use primitives::Channel; +use sha2::{Digest, Sha256}; +use std::convert::TryFrom; +use tiny_keccak::Keccak; pub use self::dummy::DummyAdapter; pub use self::ethereum::EthereumAdapter; @@ -20,8 +18,8 @@ pub mod dummy; pub mod ethereum; pub enum AdapterTypes { - DummyAdapter(DummyAdapter), - EthereumAdapter(EthereumAdapter), + DummyAdapter(Box), + EthereumAdapter(Box), } pub fn get_signable_state_root( @@ -64,29 +62,87 @@ pub struct EthereumChannel { pub creator: String, pub token_addr: String, pub token_amount: String, - pub valid_until: String, + pub valid_until: i64, pub validators: String, pub spec: String, } +impl TryFrom<&Channel> for EthereumChannel { + type Error = ChannelError; + + fn try_from(channel: &Channel) -> Result { + let spec = serde_json::to_string(&channel.spec) + .map_err(|e| ChannelError::InvalidArgument(e.to_string()))?; + + let mut hash = Sha256::new(); + hash.input(spec); + + let spec_hash = format!("{:02x}", hash.result()); + + let validators = channel + .spec + .validators + .into_iter() + .map(|v| v.id.clone()) + .collect(); + + EthereumChannel::new( + &channel.creator, + &channel.deposit_asset, + &channel.deposit_amount.to_string(), + channel.valid_until, + validators, + &spec_hash, + ) + } +} + impl EthereumChannel { pub fn new( creator: &str, token_addr: &str, - token_amount: String, - valid_until: String, - validators: String, - spec: String, - ) -> Self { - //@TODO some validation - Self { + token_amount: &str, + valid_until: DateTime, + validators: Vec, + spec: &str, + ) -> Result { + // check creator addres + if creator != eth_checksum::checksum(creator) { + return Err(ChannelError::InvalidArgument( + "Invalid creator address".into(), + )); + } + + if token_addr != eth_checksum::checksum(token_addr) { + return Err(ChannelError::InvalidArgument( + "invalid token addresss".into(), + )); + } + + if let Err(_) = BigNum::try_from(token_amount) { + return Err(ChannelError::InvalidArgument("invalid token amount".into())); + } + + if spec.len() != 32 { + return Err(ChannelError::InvalidArgument( + "32 len string expected".into(), + )); + } + + if validators.iter().any(|v| *v != eth_checksum::checksum(v)) { + return Err(ChannelError::InvalidArgument( + "invalid validator address: must start with a 0x and be 42 characters long".into(), + )); + } + + Ok(Self { creator: creator.to_owned(), token_addr: token_addr.to_owned(), token_amount: token_amount.to_owned(), - valid_until, - validators, - spec, - } + valid_until: valid_until.timestamp(), + validators: format!("[{}]", validators.join(",")), + spec: spec.to_owned(), + }) } pub fn hash(&self, contract_addr: &str) -> Result<[u8; 32], Box> { @@ -95,7 +151,7 @@ impl EthereumChannel { (ParamType::Address, &self.creator), (ParamType::Address, &self.token_addr), (ParamType::Uint(256), &self.token_amount), - (ParamType::Uint(256), &self.valid_until), + (ParamType::Uint(256), &self.valid_until.to_string()), ( ParamType::Array(Box::new(ParamType::Address)), &self.validators, diff --git a/adapter/test/resources/keystore.json b/adapter/test/resources/keystore.json new file mode 100644 index 000000000..2426eae07 --- /dev/null +++ b/adapter/test/resources/keystore.json @@ -0,0 +1,21 @@ +{ + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "3342933f7ccd85e1954e57e27ac0af58" + }, + "ciphertext": "a90cce7c6f2f34cc55436eeaad8f2d494cd954fe905fcb348a89d8a0c0c6fcd3", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 8192, + "p": 1, + "r": 8, + "salt": "4adc39a89cfded9144a30348c1ce30bcfe1690afe32aa0810fc2a0865db315f7" + }, + "mac": "d1c9a64cf4cc03d14c5ed8f0a76e74e2d1e08d7fca38c42f1e7c975becf07337" + }, + "address": "2bdeafae53940669daa6f519373f686c1f3d3393", + "id": "3274239f-eaa0-44b5-b34e-350eac945d81", + "version": 3 +} \ No newline at end of file diff --git a/lib/protocol-eth b/lib/protocol-eth new file mode 160000 index 000000000..40f2c57fa --- /dev/null +++ b/lib/protocol-eth @@ -0,0 +1 @@ +Subproject commit 40f2c57fad7aafcd09e15ca99a1513d278e51340 diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index f7dd33c5d..d20442bc4 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -30,3 +30,4 @@ rand = { version = "^0.6" } lazy_static = "1.4.0" merkletree = "0.10.0" tiny-keccak = "1.5" + diff --git a/primitives/src/adapter.rs b/primitives/src/adapter.rs index 65b17e667..afbf18a13 100644 --- a/primitives/src/adapter.rs +++ b/primitives/src/adapter.rs @@ -1,16 +1,20 @@ use crate::channel_validator::ChannelValidator; -use crate::validator::ValidatorDesc; use crate::{Channel, Config}; use std::collections::HashMap; use std::error::Error; use std::fmt; use std::fmt::Debug; - pub type AdapterResult = Result; #[derive(Debug, Eq, PartialEq)] pub enum AdapterError { Authentication(String), + EwtVerifyFailed(String), + Authorization(String), + Configuration(String), + Signature(String), + InvalidChannel(String), + Failed(String), } impl Error for AdapterError {} @@ -19,27 +23,46 @@ impl fmt::Display for AdapterError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { AdapterError::Authentication(error) => write!(f, "Authentication error: {}", error), + AdapterError::EwtVerifyFailed(error) => write!(f, "Ewt verification error: {}", error), + AdapterError::Authorization(error) => write!(f, "Authorization error: {}", error), + AdapterError::Configuration(error) => write!(f, "Configuration error: {}", error), + AdapterError::Signature(error) => write!(f, "Signature error: {}", error), + AdapterError::InvalidChannel(error) => write!(f, "Invalid Channel error: {}", error), + AdapterError::Failed(error) => write!(f, "error: {}", error), } } } #[derive(Debug, Clone)] -pub struct AdapterOptions { - pub dummy_identity: Option, - pub dummy_auth: Option>, - pub dummy_auth_tokens: Option>, - pub keystore_file: Option, - pub keystore_pwd: Option, +pub enum AdapterOptions { + DummAdapter { + dummy_identity: String, + dummy_auth: HashMap, + dummy_auth_tokens: HashMap, + }, + EthereumAdapter(KeystoreOptions), +} + +#[derive(Debug, Clone)] +pub struct KeystoreOptions { + pub keystore_file: String, + pub keystore_pwd: String, +} + +#[derive(Debug, Clone)] +pub struct Session { + pub era: i64, + pub uid: String, } -pub trait Adapter: ChannelValidator + Clone + Debug + Send + Sync { +pub trait Adapter: ChannelValidator + Clone + Debug { type Output; /// Initialize adapter - fn init(opts: AdapterOptions, config: &Config) -> Self::Output; + fn init(opts: AdapterOptions, config: &Config) -> AdapterResult; /// Unlock adapter - fn unlock(&self) -> AdapterResult; + fn unlock(&mut self) -> AdapterResult<()>; /// Get Adapter whoami fn whoami(&self) -> String; @@ -54,8 +77,8 @@ pub trait Adapter: ChannelValidator + Clone + Debug + Send + Sync { fn validate_channel(&self, channel: &Channel) -> AdapterResult; /// Get user session from token - fn session_from_token(&self, token: &str) -> AdapterResult; + fn session_from_token(&mut self, token: &str) -> AdapterResult; /// Gets authentication for specific validator - fn get_auth(&self, validator: &ValidatorDesc) -> AdapterResult; + fn get_auth(&mut self, validator_id: &str) -> AdapterResult; } diff --git a/primitives/src/util/tests/prep_db.rs b/primitives/src/util/tests/prep_db.rs index 371c9737e..b1fab4111 100644 --- a/primitives/src/util/tests/prep_db.rs +++ b/primitives/src/util/tests/prep_db.rs @@ -5,30 +5,30 @@ use lazy_static::lazy_static; use std::collections::HashMap; lazy_static! { - pub static ref IDS: HashMap<&'static str, String> = { + pub static ref IDS: HashMap = { let mut ids = HashMap::new(); - ids.insert("leader", "awesomeLeader".into()); - ids.insert("follower", "awesomeFollower".into()); - ids.insert("user", "awesomeTestUser".into()); - ids.insert("publisher", "b7d3f81e857692d13e9d63b232a90f4a1793189e".into()); - ids.insert("publisher2", "myAwesomePublisher2".into()); - ids.insert("creator", "awesomeCreator".into()); - ids.insert("tester", "2892f6C41E0718eeeDd49D98D648C789668cA67d".into()); + ids.insert("leader".into(), "awesomeLeader".into()); + ids.insert("follower".into(), "awesomeFollower".into()); + ids.insert("user".into(), "awesomeTestUser".into()); + ids.insert("publisher".into(), "b7d3f81e857692d13e9d63b232a90f4a1793189e".into()); + ids.insert("publisher2".into(), "myAwesomePublisher2".into()); + ids.insert("creator".into(), "awesomeCreator".into()); + ids.insert("tester".into(), "2892f6C41E0718eeeDd49D98D648C789668cA67d".into()); ids }; - pub static ref AUTH: HashMap<&'static str, String> = { + pub static ref AUTH: HashMap = { let mut auth = HashMap::new(); - auth.insert("leader", "AUTH_awesomeLeader".into()); - auth.insert("follower", "AUTH_awesomeLeader".into()); - auth.insert("user", "x8c9v1b2".into()); - auth.insert("publisher", "testing".into()); - auth.insert("publisher2", "testing2".into()); - auth.insert("creator", "awesomeCreator".into()); - auth.insert("tester", "AUTH_awesomeTester".into()); + auth.insert("leader".into(), "AUTH_awesomeLeader".into()); + auth.insert("follower".into(), "AUTH_awesomeLeader".into()); + auth.insert("user".into(), "x8c9v1b2".into()); + auth.insert("publisher".into(), "testing".into()); + auth.insert("publisher2".into(), "testing2".into()); + auth.insert("creator".into(), "awesomeCreator".into()); + auth.insert("tester".into(), "AUTH_awesomeTester".into()); auth }; diff --git a/validator_worker/src/error.rs b/validator_worker/src/error.rs index 2ae2ab66e..a86094fef 100644 --- a/validator_worker/src/error.rs +++ b/validator_worker/src/error.rs @@ -1,9 +1,20 @@ -#![deny(clippy::all)] - use serde::{Deserialize, Serialize}; +use std::error::Error; +use std::fmt::{Display, Formatter, Result}; + +#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)] +pub enum ValidatorWorker { + Configuration(String), + Failed(String), +} + +impl Error for ValidatorWorker {} -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ValidatorWorkerError { - ConfigurationError(String), - InvalidValidatorEntry(String), +impl Display for ValidatorWorker { + fn fmt(&self, f: &mut Formatter<'_>) -> Result { + match self { + ValidatorWorker::Configuration(error) => write!(f, "Configuration error: {}", error), + ValidatorWorker::Failed(error) => write!(f, "error: {}", error), + } + } } diff --git a/validator_worker/src/follower.rs b/validator_worker/src/follower.rs index 6d39759b1..d43588926 100644 --- a/validator_worker/src/follower.rs +++ b/validator_worker/src/follower.rs @@ -72,7 +72,12 @@ async fn on_new_state<'a, A: Adapter + 'static>( ))); } - if !iface.adapter.verify( + let adapter = iface + .adapter + .read() + .expect("on_new_state: failed to acquire read lock adapter"); + + if !adapter.verify( &iface.channel.spec.validators.leader().id, &proposed_state_root, &new_state.signature, @@ -98,7 +103,7 @@ async fn on_new_state<'a, A: Adapter + 'static>( ))); } - let signature = iface.adapter.sign(&new_state.state_root)?; + let signature = adapter.sign(&new_state.state_root)?; let health_threshold = u64::from(iface.config.health_threshold_promilles).into(); iface.propagate(&[&MessageTypes::ApproveState(ApproveState { diff --git a/validator_worker/src/heartbeat.rs b/validator_worker/src/heartbeat.rs index d4adee763..d704c17fe 100644 --- a/validator_worker/src/heartbeat.rs +++ b/validator_worker/src/heartbeat.rs @@ -23,7 +23,11 @@ async fn send_heartbeat(iface: &SentryApi) -> Result<() let state_root_raw = get_signable_state_root(&iface.channel.id, &info_root_raw)?; let state_root = hex::encode(state_root_raw); - let signature = iface.adapter.sign(&state_root)?; + let signature = iface + .adapter + .read() + .expect("send_heartbeat: failed to acquire adapter read lock") + .sign(&state_root)?; let message_types = MessageTypes::Heartbeat(Heartbeat { signature, diff --git a/validator_worker/src/leader.rs b/validator_worker/src/leader.rs index 273d20c03..59613d28a 100644 --- a/validator_worker/src/leader.rs +++ b/validator_worker/src/leader.rs @@ -25,7 +25,11 @@ fn on_new_accounting( let state_root_raw = get_state_root_hash(&iface, &balances)?; let state_root = hex::encode(state_root_raw); - let signature = iface.adapter.sign(&state_root)?; + let signature = iface + .adapter + .read() + .expect("on_new_accounting: failed to acquire read lock") + .sign(&state_root)?; iface.propagate(&[&MessageTypes::NewState(NewState { state_root, diff --git a/validator_worker/src/lib.rs b/validator_worker/src/lib.rs index 3d0f1781c..980c7648c 100644 --- a/validator_worker/src/lib.rs +++ b/validator_worker/src/lib.rs @@ -5,13 +5,12 @@ use std::error::Error; +use crate::sentry_interface::SentryApi; use adapter::{get_balance_leaf, get_signable_state_root}; use primitives::adapter::Adapter; use primitives::merkle_tree::MerkleTree; use primitives::BalancesMap; -use crate::sentry_interface::SentryApi; - pub use self::sentry_interface::all_channels; pub mod error; @@ -52,21 +51,26 @@ mod test { use adapter::DummyAdapter; use primitives::adapter::AdapterOptions; use primitives::config::configuration; - use primitives::util::tests::prep_db::{DUMMY_CHANNEL, IDS}; + use primitives::util::tests::prep_db::{AUTH, DUMMY_CHANNEL, IDS}; use primitives::{BalancesMap, Channel}; + use std::sync::{Arc, RwLock}; fn setup_iface(channel: &Channel) -> SentryApi { - let adapter_options = AdapterOptions { - dummy_identity: Some(IDS["leader"].clone()), - dummy_auth: None, - dummy_auth_tokens: None, - keystore_file: None, - keystore_pwd: None, + let adapter_options = AdapterOptions::DummAdapter { + dummy_identity: IDS["leader"].clone(), + dummy_auth: IDS.clone(), + dummy_auth_tokens: AUTH.clone(), }; let config = configuration("development", None).expect("Dev config should be available"); - let dummy_adapter = DummyAdapter::init(adapter_options, &config); - - SentryApi::new(dummy_adapter, &channel, &config, false).expect("should succeed") + let dummy_adapter = DummyAdapter::init(adapter_options, &config).expect("init adadpter"); + + SentryApi::new( + Arc::new(RwLock::new(dummy_adapter)), + &channel, + &config, + false, + ) + .expect("should succeed") } #[test] diff --git a/validator_worker/src/main.rs b/validator_worker/src/main.rs index 40354814b..787202c15 100644 --- a/validator_worker/src/main.rs +++ b/validator_worker/src/main.rs @@ -5,8 +5,9 @@ use clap::{App, Arg}; use adapter::{AdapterTypes, DummyAdapter, EthereumAdapter}; -use primitives::adapter::{Adapter, AdapterOptions}; +use primitives::adapter::{Adapter, AdapterOptions, KeystoreOptions}; use primitives::config::{configuration, Config}; +use primitives::util::tests::prep_db::{AUTH, IDS}; fn main() { let cli = App::new("Validator worker") @@ -60,30 +61,29 @@ fn main() { let adapter = match cli.value_of("adapter").unwrap() { "ethereum" => { - let keystore_file = cli.value_of("keystoreFile").unwrap(); - let keystore_pwd = std::env::var("KEYSTORE_PWD").unwrap(); - - let options = AdapterOptions { - keystore_file: Some(keystore_file.to_string()), - keystore_pwd: Some(keystore_pwd), - dummy_identity: None, - dummy_auth: None, - dummy_auth_tokens: None, + let keystore_file = cli + .value_of("keystoreFile") + .expect("unable to get keystore file"); + let keystore_pwd = std::env::var("KEYSTORE_PWD").expect("unable to get keystore pwd"); + let keystore_options = KeystoreOptions { + keystore_file: keystore_file.to_string(), + keystore_pwd, }; - AdapterTypes::EthereumAdapter(EthereumAdapter::init(options, &config)) + let options = AdapterOptions::EthereumAdapter(keystore_options); + AdapterTypes::EthereumAdapter(Box::new( + EthereumAdapter::init(options, &config).expect("failed to init adapter"), + )) } "dummy" => { let dummy_identity = cli.value_of("dummyIdentity").unwrap(); - let options = AdapterOptions { - dummy_identity: Some(dummy_identity.to_string()), - // this should be prefilled using fixtures - // - dummy_auth: None, - dummy_auth_tokens: None, - keystore_file: None, - keystore_pwd: None, + let options = AdapterOptions::DummAdapter { + dummy_identity: dummy_identity.to_string(), + dummy_auth: IDS.clone(), + dummy_auth_tokens: AUTH.clone(), }; - AdapterTypes::DummyAdapter(DummyAdapter::init(options, &config)) + AdapterTypes::DummyAdapter(Box::new( + DummyAdapter::init(options, &config).expect("failed to init adapter"), + )) } // @TODO exit gracefully _ => panic!("We don't have any other adapters implemented yet!"), @@ -91,10 +91,10 @@ fn main() { match adapter { AdapterTypes::EthereumAdapter(ethadapter) => { - run(is_single_tick, &sentry_url, &config, ethadapter) + run(is_single_tick, &sentry_url, &config, *ethadapter) } AdapterTypes::DummyAdapter(dummyadapter) => { - run(is_single_tick, &sentry_url, &config, dummyadapter) + run(is_single_tick, &sentry_url, &config, *dummyadapter) } } } diff --git a/validator_worker/src/sentry_interface.rs b/validator_worker/src/sentry_interface.rs index c96bf2eef..83473fc38 100644 --- a/validator_worker/src/sentry_interface.rs +++ b/validator_worker/src/sentry_interface.rs @@ -1,4 +1,4 @@ -use crate::error::ValidatorWorkerError; +use crate::error::ValidatorWorker; use chrono::{DateTime, Utc}; use futures::compat::Future01CompatExt; use futures::future::try_join_all; @@ -12,26 +12,32 @@ use primitives::validator::MessageTypes; use primitives::{Channel, Config, ValidatorDesc}; use reqwest::header::AUTHORIZATION; use reqwest::r#async::{Client, Response}; +use std::sync::{Arc, RwLock}; use std::time::Duration; -#[derive(Clone, Debug)] +#[derive(Debug, Clone)] pub struct SentryApi { - pub adapter: T, + pub adapter: Arc>, pub validator_url: String, pub client: Client, pub logging: bool, pub channel: Channel, pub config: Config, + pub whoami: String, } impl SentryApi { pub fn new( - adapter: T, + adapter: Arc>, channel: &Channel, config: &Config, logging: bool, - ) -> Result { - let whoami = adapter.whoami(); + ) -> Result { + let whoami = adapter + .read() + .expect("new: failed to acquire read lock") + .whoami(); + let client = Client::builder() .timeout(Duration::from_secs(config.fetch_timeout.into())) .build() @@ -54,9 +60,10 @@ impl SentryApi { logging, channel: channel.to_owned(), config: config.to_owned(), + whoami, }) } - None => Err(ValidatorWorkerError::InvalidValidatorEntry( + None => Err(ValidatorWorker::Failed( "we can not find validator entry for whoami".to_string(), )), } @@ -65,22 +72,29 @@ impl SentryApi { pub fn propagate(&self, messages: &[&MessageTypes]) { let serialised_messages: Vec = messages .iter() - .map(|message| serde_json::to_string(message).unwrap()) + .map(|message| serde_json::to_string(message).expect("failed to serialise message")) .collect(); + let mut adapter = self + .adapter + .write() + .expect("propagate: failed to get write lock"); + for validator in self.channel.spec.validators.into_iter() { - let auth_token = self - .adapter - .get_auth(&validator) - .expect("Failed to get user auth token"); - match propagate_to( - &auth_token, + let auth_token = adapter.get_auth(&validator.id); + + if let Err(e) = auth_token { + println!("propagate error: get auth failed {}", e); + continue; + } + + if let Err(e) = propagate_to( + &auth_token.unwrap(), self.config.propagation_timeout, &validator, &serialised_messages, ) { - Ok(_) => {} - Err(e) => handle_http_error(e, &validator.url), + handle_http_error(e, &validator.url) } } } @@ -107,8 +121,7 @@ impl SentryApi { &self, message_type: String, ) -> Result { - let whoami = self.adapter.whoami(); - await!(self.get_latest_msg(whoami, message_type)) + await!(self.get_latest_msg(self.whoami.clone(), message_type)) } pub async fn get_last_approved(&self) -> Result { @@ -137,30 +150,29 @@ impl SentryApi { pub async fn get_event_aggregates( &self, after: DateTime, - ) -> Result { - let whoami = self.adapter.whoami(); - let validator = self - .channel - .spec - .validators - .into_iter() - .find(|&v| v.id == whoami); - let auth_token = self + ) -> Result> { + let mut adapter = self .adapter - .get_auth(validator.unwrap()) - .expect("Failed to get user auth token"); + .write() + .expect("get_event_aggregates: Failed to acquire adapter"); + + let auth_token = adapter + .get_auth(&self.whoami) + .map_err(|e| Box::new(ValidatorWorker::Failed(e.to_string())))?; let url = format!( "{}/events-aggregates?after={}", self.validator_url, after.timestamp() ); + let future = self .client .get(&url) .header(AUTHORIZATION, auth_token.to_string()) .send() - .and_then(|mut res: Response| res.json::()); + .and_then(|mut res: Response| res.json::()) + .map_err(|e| Box::new(ValidatorWorker::Failed(e.to_string()))); await!(future.compat()) }