From a1a98c20261d22f8981522782a016f882dc41251 Mon Sep 17 00:00:00 2001 From: Andreas Fackler Date: Mon, 15 Oct 2018 10:32:03 +0200 Subject: [PATCH] Support hard fork 2 contracts. --- Cargo.lock | 330 +++++---- abi/{ => v1}/KeysManager.abi.json | 0 abi/{ => v1}/ValidatorMetadata.abi.json | 0 abi/{ => v1}/VotingToChangeKeys.abi.json | 0 abi/v2/KeysManager.abi.json | 898 +++++++++++++++++++++++ abi/v2/ValidatorMetadata.abi.json | 579 +++++++++++++++ abi/v2/VotingToChangeKeys.abi.json | 661 +++++++++++++++++ contracts/core.json | 38 +- contracts/sokol.json | 36 +- src/contracts.rs | 47 ++ src/counter.rs | 138 ++-- src/main.rs | 14 +- src/stats.rs | 7 +- src/util.rs | 33 +- 14 files changed, 2509 insertions(+), 272 deletions(-) rename abi/{ => v1}/KeysManager.abi.json (100%) rename abi/{ => v1}/ValidatorMetadata.abi.json (100%) rename abi/{ => v1}/VotingToChangeKeys.abi.json (100%) create mode 100644 abi/v2/KeysManager.abi.json create mode 100644 abi/v2/ValidatorMetadata.abi.json create mode 100644 abi/v2/VotingToChangeKeys.abi.json create mode 100644 src/contracts.rs diff --git a/Cargo.lock b/Cargo.lock index a2de6df..0155149 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,7 +3,7 @@ name = "aho-corasick" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -11,7 +11,7 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -29,7 +29,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -41,7 +41,7 @@ dependencies = [ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -208,9 +208,9 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.4.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.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -226,9 +226,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ethabi 6.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -239,7 +239,7 @@ dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "fixed-hash 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -252,7 +252,7 @@ dependencies = [ "ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "fixed-hash 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "uint 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -261,7 +261,7 @@ name = "ethereum-types-serialize" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -304,7 +304,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -312,7 +312,7 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -321,7 +321,7 @@ name = "heapsize" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -334,7 +334,7 @@ dependencies = [ [[package]] name = "httparse" -version = "1.3.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -343,7 +343,7 @@ version = "0.10.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -362,9 +362,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -374,10 +374,10 @@ dependencies = [ "relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -386,11 +386,11 @@ name = "hyper-tls" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.5 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -424,11 +424,11 @@ name = "jsonrpc-core" version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -455,12 +455,12 @@ name = "lazy_static" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lazycell" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -470,7 +470,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lock_api" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -500,10 +500,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -524,7 +526,7 @@ name = "mime" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -536,7 +538,7 @@ dependencies = [ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -574,7 +576,7 @@ dependencies = [ "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -587,7 +589,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -678,12 +680,12 @@ dependencies = [ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.36 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.37 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-sys" -version = "0.9.36" +version = "0.9.37" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -714,7 +716,7 @@ name = "parking_lot" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -726,7 +728,7 @@ dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -738,7 +740,7 @@ dependencies = [ "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -772,15 +774,15 @@ dependencies = [ "ethabi-contract 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 6.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "parse_duration 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", "web3 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro2" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -791,7 +793,7 @@ name = "quote" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -811,7 +813,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -822,13 +824,21 @@ dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_core" -version = "0.2.1" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -850,7 +860,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -869,7 +879,7 @@ name = "relay" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -877,7 +887,7 @@ name = "remove_dir_all" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -925,11 +935,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "schannel" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -977,27 +987,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.27" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1040,10 +1050,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.4" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1095,7 +1105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1108,32 +1118,33 @@ dependencies = [ [[package]] name = "tokio" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-uds 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-codec" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1142,33 +1153,33 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-current-thread" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-executor" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1176,18 +1187,18 @@ name = "tokio-fs" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1196,7 +1207,7 @@ name = "tokio-proto" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1204,25 +1215,25 @@ dependencies = [ "smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "take 0.1.0 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-reactor" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1230,34 +1241,34 @@ name = "tokio-service" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-tcp" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1265,19 +1276,19 @@ name = "tokio-timer" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-timer" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1285,10 +1296,10 @@ name = "tokio-tls" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.5 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1297,28 +1308,28 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-uds" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1357,15 +1368,15 @@ name = "unicase" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicase" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1431,7 +1442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "version_check" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1444,7 +1455,7 @@ name = "want" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1458,7 +1469,7 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi 6.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1466,9 +1477,9 @@ dependencies = [ "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.5.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.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1484,13 +1495,13 @@ dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1503,7 +1514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1571,11 +1582,11 @@ dependencies = [ "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "0c84b40c7e2de99ffd70602db314a7a8c26b2b3d830e6f7f7a142a8860ab3ca4" +"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82" -"checksum httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7b6288d7db100340ca12873fd4d08ad1b8f206a9457798dfb17c018a33fee540" +"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" "checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2" "checksum hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)" = "34a590ca09d341e94cddf8e5af0bbccde205d5fbc2fa3c09dd67c7f85cea59d7" "checksum hyper-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ffb1bd5e518d3065840ab315dbbf44e4420e5f7d80e2cb93fa6ffffc50522378" @@ -1587,13 +1598,13 @@ dependencies = [ "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" -"checksum lazycell 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e26d4c411b39f0afcf2ba6fe502be90e6c9b299c952dbd86124782520a13cffd" +"checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" -"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54" +"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a3b4142ab8738a78c51896f704f83c11df047ff1bda9a92a661aa6361552d93d" +"checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "4b082692d3f6cf41b453af73839ce3dfc212c4411cbb2441dff80a716e38bd79" @@ -1612,7 +1623,7 @@ dependencies = [ "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" "checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985" -"checksum openssl-sys 0.9.36 (registry+https://github.com/rust-lang/crates.io-index)" = "409d77eeb492a1aebd6eb322b2ee72ff7c7496b4434d98b3bf8be038755de65e" +"checksum openssl-sys 0.9.37 (registry+https://github.com/rust-lang/crates.io-index)" = "d4edbc8dfa63f557aee3a498179af2cc6a989e12ba1751840046c79afc9e615a" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac" "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" @@ -1621,12 +1632,13 @@ dependencies = [ "checksum parse_duration 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca8b00aeb69499982e44b00b8859fb573ee8dcfd92dd8d34179a3ac8dc8e9e0" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" -"checksum proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe022fb8c8bd254524b0b3305906c1921fa37a84a644e29079a9e62200c3901" +"checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee" "checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" -"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2" +"checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" +"checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" @@ -1641,16 +1653,16 @@ dependencies = [ "checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" -"checksum schannel 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "dc1fabf2a7b6483a141426e1afd09ad543520a77ac49bd03c286e7696ccfd77f" +"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" "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 security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "dfa44ee9c54ce5eecc9de7d5acbad112ee58755239381f687e564004ba4a2332" "checksum security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "5421621e836278a0b139268f36eee0dc7e389b784dc3f79d8f11aabadf41bead" "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.79 (registry+https://github.com/rust-lang/crates.io-index)" = "84257ccd054dc351472528c8587b4de2dbf0dc0fe2e634030c1a90bfdacebaa9" -"checksum serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)" = "31569d901045afbff7a9479f793177fe9259819aff10ab4f89ef69bbc5f567fe" -"checksum serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "59790990c5115d16027f00913e2e66de23a51f70422e549d2ad68c8c5f268f1c" +"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" +"checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" +"checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" @@ -1658,7 +1670,7 @@ dependencies = [ "checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum syn 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9056ebe7f2d6a38bc63171816fd1d3430da5a43896de21676dc5c0a4b8274a11" +"checksum syn 0.15.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b036b7b35e846707c0e55c2c9441fa47867c0f87fca416921db3261b1d8c741a" "checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" @@ -1666,30 +1678,30 @@ dependencies = [ "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" -"checksum tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fbb6a6e9db2702097bfdfddcb09841211ad423b86c75b5ddaca1d62842ac492c" -"checksum tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "881e9645b81c2ce95fcb799ded2c29ffb9f25ef5bef909089a420e5961dd8ccb" +"checksum tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6e93c78d23cc61aa245a8acd2c4a79c4d7fa7fb5c3ca90d5737029f043a84895" +"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" -"checksum tokio-current-thread 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fdfb899688ac16f618076bd09215edbfda0fd5dfecb375b6942636cb31fa8a7" -"checksum tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "84823b932d566bc3c6aa644df4ca36cb38593c50b7db06011fd4e12e31e4047e" +"checksum tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f90fcd90952f0a496d438a976afba8e5c205fb12123f813d8ab3aa1c8436638c" +"checksum tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c117b6cf86bb730aab4834f10df96e4dd586eff2c3c27d3781348da49e255bde" "checksum tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5cbe4ca6e71cb0b62a66e4e6f53a8c06a6eefe46cc5f665ad6f274c9906f135" -"checksum tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6cc2de7725863c86ac71b0b9068476fec50834f055a243558ef1655bbd34cb" +"checksum tokio-io 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "8b8a85fffbec3c5ab1ab62324570230dcd37ee5996a7859da5caf7b9d45e3e8c" "checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" -"checksum tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4bfbaf9f260635649ec26b6fb4aded03887295ffcd999f6e43fd2c4758f758ea" +"checksum tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4b26fd37f1125738b2170c80b551f69ff6fecb277e6e5ca885e53eec2b005018" "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" -"checksum tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5b4c329b47f071eb8a746040465fa751bd95e4716e98daef6a9b4e434c17d565" -"checksum tokio-threadpool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a5758cecb6e0633cea5d563ac07c975e04961690b946b04fd84e7d6445a8f6af" +"checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" +"checksum tokio-threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bbd8a8b911301c60cbfaa2a6588fb210e5c1038375b8bdecc47aa09a94c3c05f" "checksum tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6131e780037787ff1b3f8aad9da83bca02438b72277850dd6ad0d455e0e20efc" -"checksum tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d03fa701f9578a01b7014f106b47f0a363b4727a7f3f75d666e312ab7acbbf1c" +"checksum tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3a52f00c97fedb6d535d27f65cccb7181c8dd4c6edc3eda9ea93f6d45d05168e" "checksum tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "772f4b04e560117fe3b0a53e490c16ddc8ba6ec437015d91fa385564996ed913" "checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c" -"checksum tokio-uds 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "424c1ed15a0132251813ccea50640b224c809d6ceafb88154c1a8775873a0e89" +"checksum tokio-uds 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22e3aa6d1fcc19e635418dc0a30ab5bd65d347973d6f43f1a37bf8d9d1335fc9" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" "checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" "checksum uint 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "754ba11732b9161b94c41798e5197e5e75388d012f760c42adb5000353e98646" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" +"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" @@ -1700,13 +1712,13 @@ dependencies = [ "checksum utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd70f467df6810094968e2fce0ee1bd0e87157aceb026a8c083bcf5e25b9efe4" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" -"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum want 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a05d9d966753fa4b5c8db73fcab5eed4549cfe0e1e4e66911e5564a0085c35d1" "checksum web3 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a618ea95d1f68185720c8a8f778f4a8371bba36e2370d3a331167fdf28dd5135" "checksum websocket 0.20.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9234b4e667c19995475227172446884f516ec0963380afa960d962ab9f4c0bfa" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/abi/KeysManager.abi.json b/abi/v1/KeysManager.abi.json similarity index 100% rename from abi/KeysManager.abi.json rename to abi/v1/KeysManager.abi.json diff --git a/abi/ValidatorMetadata.abi.json b/abi/v1/ValidatorMetadata.abi.json similarity index 100% rename from abi/ValidatorMetadata.abi.json rename to abi/v1/ValidatorMetadata.abi.json diff --git a/abi/VotingToChangeKeys.abi.json b/abi/v1/VotingToChangeKeys.abi.json similarity index 100% rename from abi/VotingToChangeKeys.abi.json rename to abi/v1/VotingToChangeKeys.abi.json diff --git a/abi/v2/KeysManager.abi.json b/abi/v2/KeysManager.abi.json new file mode 100644 index 0000000..a7c05f2 --- /dev/null +++ b/abi/v2/KeysManager.abi.json @@ -0,0 +1,898 @@ +[ + { + "constant": true, + "inputs": [ + { + "name": "_initialKey", + "type": "address" + } + ], + "name": "getInitialKeyStatus", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x17706507" + }, + { + "constant": false, + "inputs": [ + { + "name": "_previousKeysManager", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x19ab453c" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "successfulValidatorClone", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x1e48e146" + }, + { + "constant": false, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "removePayoutKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x1e534e71" + }, + { + "constant": false, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "removeVotingKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x2a968f49" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "getVotingByMining", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x2befe2e1" + }, + { + "constant": true, + "inputs": [ + { + "name": "_votingKey", + "type": "address" + } + ], + "name": "getMiningKeyByVoting", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x2d260227" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "address" + } + ], + "name": "addMiningKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x38949514" + }, + { + "constant": true, + "inputs": [], + "name": "poaNetworkConsensus", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x4433418f" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "miningKeyHistory", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x458779da" + }, + { + "constant": true, + "inputs": [], + "name": "getVotingToChangeKeys", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x49285b58" + }, + { + "constant": true, + "inputs": [], + "name": "initDisabled", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x52a36938" + }, + { + "constant": true, + "inputs": [], + "name": "getTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x557ed1ba" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "validatorKeys", + "outputs": [ + { + "name": "validatorVotingKey", + "type": "address" + }, + { + "name": "validatorPayoutKey", + "type": "address" + }, + { + "name": "isValidatorMiningActive", + "type": "bool" + }, + { + "name": "isValidatorVotingActive", + "type": "bool" + }, + { + "name": "isValidatorPayoutActive", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x5c0569f8" + }, + { + "constant": true, + "inputs": [], + "name": "previousKeysManager", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x62907170" + }, + { + "constant": true, + "inputs": [ + { + "name": "_votingKey", + "type": "address" + } + ], + "name": "isVotingActive", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x62b46d64" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "address" + }, + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "addPayoutKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x651ebb5f" + }, + { + "constant": true, + "inputs": [ + { + "name": "_currentKey", + "type": "address" + }, + { + "name": "_newKey", + "type": "address" + } + ], + "name": "checkIfMiningExisted", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x731fcb9a" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "address" + }, + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "swapPayoutKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x771ae299" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "getPayoutByMining", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x7cded930" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "address" + } + ], + "name": "removeMiningKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x7ebf43fc" + }, + { + "constant": true, + "inputs": [], + "name": "maxLimitValidators", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function", + "signature": "0x81b03427" + }, + { + "constant": false, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "migrateMiningKey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x85b84ccb" + }, + { + "constant": false, + "inputs": [ + { + "name": "_initialKey", + "type": "address" + } + ], + "name": "initiateKeys", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x8743e882" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "address" + }, + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "addVotingKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x9503ab72" + }, + { + "constant": false, + "inputs": [ + { + "name": "_initialKey", + "type": "address" + } + ], + "name": "migrateInitialKey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x98943eb6" + }, + { + "constant": true, + "inputs": [ + { + "name": "_key", + "type": "address" + } + ], + "name": "isMiningActive", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x9bc91c22" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "getMiningKeyHistory", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xa5a36dee" + }, + { + "constant": true, + "inputs": [], + "name": "proxyStorage", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xae4b1b5b" + }, + { + "constant": true, + "inputs": [], + "name": "maxOldMiningKeysDeepCheck", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function", + "signature": "0xb9bdaa07" + }, + { + "constant": true, + "inputs": [ + { + "name": "_payoutKey", + "type": "address" + } + ], + "name": "miningKeyByPayout", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xc04455b5" + }, + { + "constant": false, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + }, + { + "name": "_votingKey", + "type": "address" + }, + { + "name": "_payoutKey", + "type": "address" + } + ], + "name": "createKeys", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc6232a15" + }, + { + "constant": true, + "inputs": [], + "name": "initialKeysCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xd2acbc12" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "address" + }, + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "swapVotingKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xd33eb5ae" + }, + { + "constant": false, + "inputs": [ + { + "name": "_key", + "type": "address" + }, + { + "name": "_oldMiningKey", + "type": "address" + } + ], + "name": "swapMiningKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xd44379cf" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "isVotingActiveByMiningKey", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xdb7cf00b" + }, + { + "constant": true, + "inputs": [], + "name": "maxNumberOfInitialKeys", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function", + "signature": "0xe7f57c83" + }, + { + "constant": true, + "inputs": [ + { + "name": "_votingKey", + "type": "address" + } + ], + "name": "miningKeyByVoting", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xfa46eacd" + }, + { + "constant": true, + "inputs": [], + "name": "masterOfCeremony", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xfa81b200" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "isPayoutActive", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xfee09285" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "key", + "type": "address" + }, + { + "indexed": false, + "name": "action", + "type": "string" + } + ], + "name": "MiningKeyChanged", + "type": "event", + "signature": "0x31511048ccdf9fbe46c149f8f729923c1232debeff658d242292f37365b45718" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "key", + "type": "address" + }, + { + "indexed": true, + "name": "miningKey", + "type": "address" + }, + { + "indexed": false, + "name": "action", + "type": "string" + } + ], + "name": "VotingKeyChanged", + "type": "event", + "signature": "0x3c12ed73d04c6ac636caa62bedf7896dc1452a189bd7fcdbcae6e9765233ca55" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "key", + "type": "address" + }, + { + "indexed": true, + "name": "miningKey", + "type": "address" + }, + { + "indexed": false, + "name": "action", + "type": "string" + } + ], + "name": "PayoutKeyChanged", + "type": "event", + "signature": "0x568d585fdb4f8eee3a22e8b798c49e9d6ac5fbfced5bc1b872a74808e3be7c7d" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "miningKey", + "type": "address" + }, + { + "indexed": true, + "name": "votingKey", + "type": "address" + }, + { + "indexed": true, + "name": "payoutKey", + "type": "address" + } + ], + "name": "ValidatorInitialized", + "type": "event", + "signature": "0x09b714df46e3a39ff284866b80612984e10c731561c157cd03aca91e436808a5" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "initialKey", + "type": "address" + }, + { + "indexed": false, + "name": "time", + "type": "uint256" + }, + { + "indexed": false, + "name": "initialKeysCount", + "type": "uint256" + } + ], + "name": "InitialKeyCreated", + "type": "event", + "signature": "0x8f0993529f6c865998786a88a06fce1f0261f632bf90ee1b50fa640338d5e936" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "name", + "type": "string" + }, + { + "indexed": false, + "name": "key", + "type": "address" + } + ], + "name": "Migrated", + "type": "event", + "signature": "0x495f7fdbe153771103489f5c94591c07cd8e655814d1f12739f591b94411ec07" + } +] \ No newline at end of file diff --git a/abi/v2/ValidatorMetadata.abi.json b/abi/v2/ValidatorMetadata.abi.json new file mode 100644 index 0000000..90915d6 --- /dev/null +++ b/abi/v2/ValidatorMetadata.abi.json @@ -0,0 +1,579 @@ +[ + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "pendingChanges", + "outputs": [ + { + "name": "firstName", + "type": "bytes32" + }, + { + "name": "lastName", + "type": "bytes32" + }, + { + "name": "licenseId", + "type": "bytes32" + }, + { + "name": "fullAddress", + "type": "string" + }, + { + "name": "state", + "type": "bytes32" + }, + { + "name": "zipcode", + "type": "bytes32" + }, + { + "name": "expirationDate", + "type": "uint256" + }, + { + "name": "createdDate", + "type": "uint256" + }, + { + "name": "updatedDate", + "type": "uint256" + }, + { + "name": "minThreshold", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x022c254a" + }, + { + "constant": false, + "inputs": [ + { + "name": "_firstName", + "type": "bytes32" + }, + { + "name": "_lastName", + "type": "bytes32" + }, + { + "name": "_licenseId", + "type": "bytes32" + }, + { + "name": "_fullAddress", + "type": "string" + }, + { + "name": "_state", + "type": "bytes32" + }, + { + "name": "_zipcode", + "type": "bytes32" + }, + { + "name": "_expirationDate", + "type": "uint256" + } + ], + "name": "createMetadata", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x334460a4" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "confirmations", + "outputs": [ + { + "name": "count", + "type": "uint256" + }, + { + "name": "voters", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x4ecb35c4" + }, + { + "constant": false, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "finalize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x4ef39b75" + }, + { + "constant": true, + "inputs": [], + "name": "getTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x557ed1ba" + }, + { + "constant": false, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "clearMetadata", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x885c69b5" + }, + { + "constant": false, + "inputs": [ + { + "name": "_firstName", + "type": "bytes32" + }, + { + "name": "_lastName", + "type": "bytes32" + }, + { + "name": "_licenseId", + "type": "bytes32" + }, + { + "name": "_fullAddress", + "type": "string" + }, + { + "name": "_state", + "type": "bytes32" + }, + { + "name": "_zipcode", + "type": "bytes32" + }, + { + "name": "_expirationDate", + "type": "uint256" + }, + { + "name": "_createdDate", + "type": "uint256" + }, + { + "name": "_updatedDate", + "type": "uint256" + }, + { + "name": "_minThreshold", + "type": "uint256" + }, + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "initMetadata", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x8ae881a6" + }, + { + "constant": false, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "confirmPendingChange", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x9c715535" + }, + { + "constant": true, + "inputs": [], + "name": "initMetadataDisabled", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xa6662a3c" + }, + { + "constant": true, + "inputs": [], + "name": "proxyStorage", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xae4b1b5b" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "getValidatorName", + "outputs": [ + { + "name": "firstName", + "type": "bytes32" + }, + { + "name": "lastName", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xaf2e2da9" + }, + { + "constant": false, + "inputs": [ + { + "name": "_oldMiningKey", + "type": "address" + }, + { + "name": "_newMiningKey", + "type": "address" + } + ], + "name": "moveMetadata", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc2d0916f" + }, + { + "constant": false, + "inputs": [ + { + "name": "_firstName", + "type": "bytes32" + }, + { + "name": "_lastName", + "type": "bytes32" + }, + { + "name": "_licenseId", + "type": "bytes32" + }, + { + "name": "_fullAddress", + "type": "string" + }, + { + "name": "_state", + "type": "bytes32" + }, + { + "name": "_zipcode", + "type": "bytes32" + }, + { + "name": "_expirationDate", + "type": "uint256" + } + ], + "name": "changeRequest", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc3f1b0ea" + }, + { + "constant": true, + "inputs": [], + "name": "getMinThreshold", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xe6bbe9dd" + }, + { + "constant": false, + "inputs": [], + "name": "initMetadataDisable", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf0174a25" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + }, + { + "name": "_voterMiningKey", + "type": "address" + } + ], + "name": "isValidatorAlreadyVoted", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf73294b8" + }, + { + "constant": false, + "inputs": [], + "name": "cancelPendingChange", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf94c12cb" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "validators", + "outputs": [ + { + "name": "firstName", + "type": "bytes32" + }, + { + "name": "lastName", + "type": "bytes32" + }, + { + "name": "licenseId", + "type": "bytes32" + }, + { + "name": "fullAddress", + "type": "string" + }, + { + "name": "state", + "type": "bytes32" + }, + { + "name": "zipcode", + "type": "bytes32" + }, + { + "name": "expirationDate", + "type": "uint256" + }, + { + "name": "createdDate", + "type": "uint256" + }, + { + "name": "updatedDate", + "type": "uint256" + }, + { + "name": "minThreshold", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xfa52c7d8" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "miningKey", + "type": "address" + } + ], + "name": "MetadataCleared", + "type": "event", + "signature": "0x1928e25e316bab82325e01eaf5b4a29f7b2d5e3d77fc0b6ac959eb95112f3ee9" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "miningKey", + "type": "address" + } + ], + "name": "MetadataCreated", + "type": "event", + "signature": "0x76a10cc0839d166c55eec8dba39ff22f75470574ede5014b744b45cebea5fc7e" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "oldMiningKey", + "type": "address" + }, + { + "indexed": true, + "name": "newMiningKey", + "type": "address" + } + ], + "name": "MetadataMoved", + "type": "event", + "signature": "0x6a3e5f5cc14de86bb3be87bc976b74890ecd0c8fa0cfca2fe3fefe55c9b47dde" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "miningKey", + "type": "address" + } + ], + "name": "ChangeRequestInitiated", + "type": "event", + "signature": "0x6ec0e3afd4b29a1fe1c688cb1e6474d9e2c6a1032858c3add0ff32b7ba95f32f" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "miningKey", + "type": "address" + } + ], + "name": "CancelledRequest", + "type": "event", + "signature": "0x5a1dcc05b2a41ad121a798e749b9ba9584177c68a4047ee52ef37d4ca76ce08c" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "miningKey", + "type": "address" + }, + { + "indexed": false, + "name": "votingSender", + "type": "address" + }, + { + "indexed": false, + "name": "votingSenderMiningKey", + "type": "address" + } + ], + "name": "Confirmed", + "type": "event", + "signature": "0x603c57ecb4a9802537649ceb6523e5d48c939e7856768ce6f9b3128a889a5cfe" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "miningKey", + "type": "address" + } + ], + "name": "FinalizedChange", + "type": "event", + "signature": "0xccf0f685803f0fba33ec88246b35d75b758b1e77c3d65ef5658f7e630f36b85b" + } +] \ No newline at end of file diff --git a/abi/v2/VotingToChangeKeys.abi.json b/abi/v2/VotingToChangeKeys.abi.json new file mode 100644 index 0000000..b7bf5dc --- /dev/null +++ b/abi/v2/VotingToChangeKeys.abi.json @@ -0,0 +1,661 @@ +[ + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "canBeFinalizedNow", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x009b38fa" + }, + { + "constant": true, + "inputs": [], + "name": "minBallotDuration", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x02a99b9d" + }, + { + "constant": false, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "finalize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x05261aea" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "getQuorumState", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x08dbb18e" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "getBallotInfo", + "outputs": [ + { + "name": "startTime", + "type": "uint256" + }, + { + "name": "endTime", + "type": "uint256" + }, + { + "name": "affectedKey", + "type": "address" + }, + { + "name": "affectedKeyType", + "type": "uint256" + }, + { + "name": "newVotingKey", + "type": "address" + }, + { + "name": "newPayoutKey", + "type": "address" + }, + { + "name": "miningKey", + "type": "address" + }, + { + "name": "totalVoters", + "type": "uint256" + }, + { + "name": "progress", + "type": "int256" + }, + { + "name": "isFinalized", + "type": "bool" + }, + { + "name": "ballotType", + "type": "uint256" + }, + { + "name": "creator", + "type": "address" + }, + { + "name": "memo", + "type": "string" + }, + { + "name": "canBeFinalizedNow", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x141bd92a" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + }, + { + "name": "_votingKey", + "type": "address" + } + ], + "name": "isValidVote", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x288fa739" + }, + { + "constant": true, + "inputs": [ + { + "name": "_index", + "type": "uint256" + } + ], + "name": "activeBallots", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x3bf05e95" + }, + { + "constant": false, + "inputs": [ + { + "name": "_startTime", + "type": "uint256" + }, + { + "name": "_endTime", + "type": "uint256" + }, + { + "name": "_memo", + "type": "string" + }, + { + "name": "_newMiningKey", + "type": "address" + }, + { + "name": "_newVotingKey", + "type": "address" + }, + { + "name": "_newPayoutKey", + "type": "address" + } + ], + "name": "createBallotToAddNewValidator", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x47e82f31" + }, + { + "constant": true, + "inputs": [], + "name": "initDisabled", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x52a36938" + }, + { + "constant": true, + "inputs": [], + "name": "getTime", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x557ed1ba" + }, + { + "constant": true, + "inputs": [], + "name": "activeBallotsLength", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x6ccc0234" + }, + { + "constant": false, + "inputs": [ + { + "name": "_id", + "type": "uint256" + }, + { + "name": "_prevVotingToChange", + "type": "address" + }, + { + "name": "_voters", + "type": "address[]" + } + ], + "name": "migrateBasicOne", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x73ece100" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "isActive", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x82afd23b" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "getIndex", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x8e7cb6e1" + }, + { + "constant": true, + "inputs": [], + "name": "maxBallotDuration", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function", + "signature": "0x96bc6ef0" + }, + { + "constant": true, + "inputs": [], + "name": "migrateDisabled", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x9fc18d4b" + }, + { + "constant": false, + "inputs": [], + "name": "migrateDisable", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa3ac1eb1" + }, + { + "constant": false, + "inputs": [ + { + "name": "_startTime", + "type": "uint256" + }, + { + "name": "_endTime", + "type": "uint256" + }, + { + "name": "_ballotType", + "type": "uint256" + }, + { + "name": "_affectedKeyType", + "type": "uint256" + }, + { + "name": "_memo", + "type": "string" + }, + { + "name": "_affectedKey", + "type": "address" + }, + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "createBallot", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa896f64b" + }, + { + "constant": true, + "inputs": [], + "name": "proxyStorage", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xae4b1b5b" + }, + { + "constant": false, + "inputs": [ + { + "name": "_id", + "type": "uint256" + }, + { + "name": "_choice", + "type": "uint256" + } + ], + "name": "vote", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xb384abef" + }, + { + "constant": false, + "inputs": [ + { + "name": "_minBallotDuration", + "type": "uint256" + } + ], + "name": "init", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xb7b0422d" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + } + ], + "name": "getMinThresholdOfVoters", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xc088003d" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + }, + { + "name": "_votingKey", + "type": "address" + } + ], + "name": "hasAlreadyVoted", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xc14bfd29" + }, + { + "constant": true, + "inputs": [ + { + "name": "_id", + "type": "uint256" + }, + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "areOldMiningKeysVoted", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xc7dea777" + }, + { + "constant": true, + "inputs": [], + "name": "nextBallotId", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xdc6bfbb5" + }, + { + "constant": true, + "inputs": [ + { + "name": "_miningKey", + "type": "address" + } + ], + "name": "validatorActiveBallots", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf49774ee" + }, + { + "constant": false, + "inputs": [ + { + "name": "_prevVotingToChange", + "type": "address" + } + ], + "name": "migrateBasicAll", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf71de2ed" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "name": "ballotType", + "type": "uint256" + }, + { + "indexed": true, + "name": "creator", + "type": "address" + } + ], + "name": "BallotCreated", + "type": "event", + "signature": "0xd1ba591c76ef71222e2d30b8277758713cc6eef1de29efaf98a716744ac2420b" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "name": "voter", + "type": "address" + } + ], + "name": "BallotFinalized", + "type": "event", + "signature": "0x3b208472607d900e1f689c976139d1147afc463fa00df525e9aff8b0604d2984" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "name": "decision", + "type": "uint256" + }, + { + "indexed": true, + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "name": "time", + "type": "uint256" + }, + { + "indexed": false, + "name": "voterMiningKey", + "type": "address" + } + ], + "name": "Vote", + "type": "event", + "signature": "0x1fad44b452b708aff155b3190058d690f8a0f2e2463fc757b96d1ce1877d0ccc" + } +] \ No newline at end of file diff --git a/contracts/core.json b/contracts/core.json index 77244d3..55129a8 100644 --- a/contracts/core.json +++ b/contracts/core.json @@ -1,11 +1,29 @@ { - "VOTING_TO_CHANGE_KEYS_ADDRESS": "0x215794efe4b86a2fbcbf706bc9ade63663f1eae1", - "VOTING_TO_CHANGE_MIN_THRESHOLD_ADDRESS": "0xca863b0d12193a87b5173fd51fa4aa1703fb8a32", - "VOTING_TO_CHANGE_PROXY_ADDRESS": "0x9c8a06f0197ee718cd820adeb48a88ea2a9b5c48", - "BALLOTS_STORAGE_ADDRESS": "0x3a28ecc276d222829f78c98d43d719eafda0a6fe", - "KEYS_MANAGER_ADDRESS": "0x2b1dbc7390a65dc40f7d64d67ea11b4d627dd1bf", - "METADATA_ADDRESS": "0x4c0eb450d8dfa6e89eb14ac154867bc86b3c559c", - "PROXY_ADDRESS": "0x6f4aadbb17789b4f5e9e97d456dc4e01b117ccb3", - "POA_ADDRESS": "0x83451c8bc04d4ee9745ccc58edfab88037bc48cc", - "MOC": "0xCf260eA317555637C55F70e55dbA8D5ad8414Cb0" -} \ No newline at end of file + "V2": { + "VOTING_TO_CHANGE_KEYS_ADDRESS": "0xA4508af18F1005943678769dB3D95223C062258D", + "VOTING_TO_CHANGE_MIN_THRESHOLD_ADDRESS": "0xa45e35472693AE60a95DB8cB1cE73eEa22ab5328", + "VOTING_TO_CHANGE_PROXY_ADDRESS": "0x468758926C796722D85BdeD792d1831F0839cAA6", + "VOTING_TO_MANAGE_EMISSION_FUNDS_ADDRESS": "0x7E9B90B22cdD1F6aA206f0D852aC96212217d60E", + "BALLOTS_STORAGE_ADDRESS": "0x94156F378C34d85eEe63f0654DAbB08352Ec3aB0", + "KEYS_MANAGER_ADDRESS": "0xCd9D0C11b0b3C91280CB70F2356d948f2BA93d88", + "METADATA_ADDRESS": "0x0bc0EB3a1Ddc4ACC2515b72B7eB8A2F276EDa00F", + "PROXY_ADDRESS": "0x82716162Cd02a2C82ad4a65CCF84e22075B13296", + "POA_ADDRESS": "0xa105Db0e6671C7B5f4f350ff1Af6460E6C696e71", + "EMISSION_FUNDS_ADDRESS": "0x548806F2215F44571431292F2314480c3F519044", + "REWARD_BY_BLOCK_ADDRESS": "0x4d0153D434384128D17243409e02fca1B3EE21D6", + "MOC": "0xCf260eA317555637C55F70e55dbA8D5ad8414Cb0", + "PROOF_OF_PHYSICAL_ADDRESS": "0x03ebcfd4ffc4aefbcb36e4824b6c18494c144493" + }, + "V1": { + "VOTING_TO_CHANGE_KEYS_ADDRESS": "0x215794efe4b86a2fbcbf706bc9ade63663f1eae1", + "VOTING_TO_CHANGE_MIN_THRESHOLD_ADDRESS": "0xca863b0d12193a87b5173fd51fa4aa1703fb8a32", + "VOTING_TO_CHANGE_PROXY_ADDRESS": "0x9c8a06f0197ee718cd820adeb48a88ea2a9b5c48", + "BALLOTS_STORAGE_ADDRESS": "0x3a28ecc276d222829f78c98d43d719eafda0a6fe", + "KEYS_MANAGER_ADDRESS": "0x2b1dbc7390a65dc40f7d64d67ea11b4d627dd1bf", + "METADATA_ADDRESS": "0x4c0eb450d8dfa6e89eb14ac154867bc86b3c559c", + "PROXY_ADDRESS": "0x6f4aadbb17789b4f5e9e97d456dc4e01b117ccb3", + "POA_ADDRESS": "0x83451c8bc04d4ee9745ccc58edfab88037bc48cc", + "MOC": "0xCf260eA317555637C55F70e55dbA8D5ad8414Cb0", + "PROOF_OF_PHYSICAL_ADDRESS": "0x03ebcfd4ffc4aefbcb36e4824b6c18494c144493" + } +} diff --git a/contracts/sokol.json b/contracts/sokol.json index 7617ead..fcd0ea8 100644 --- a/contracts/sokol.json +++ b/contracts/sokol.json @@ -1,11 +1,27 @@ { - "VOTING_TO_CHANGE_KEYS_ADDRESS": "0xc40cdf254a4a35498aa84f35e9842c110729a2a0", - "VOTING_TO_CHANGE_MIN_THRESHOLD_ADDRESS": "0x700db8ba3128087f3b23f60de4bc3179bafa467d", - "VOTING_TO_CHANGE_PROXY_ADDRESS": "0x0aa4a75549757a90f62f88b3b96b69bead2db0ff", - "BALLOTS_STORAGE_ADDRESS": "0x27e7d2572aa37bec2ed30795f2fabccda4781f86", - "KEYS_MANAGER_ADDRESS": "0x1aa02bd52fe418ac70263351282f66f1dacf898c", - "METADATA_ADDRESS": "0xf71dd3797e4f173c2c08f2cebe8a6801d8191b42", - "PROXY_ADDRESS": "0x3f918617a055d48e90f9fe06c168a75134565190", - "POA_ADDRESS": "0x03048F666359CFD3C74a1A5b9a97848BF71d5038", - "MOC": "0xe8ddc5c7a2d2f0d7a9798459c0104fdf5e987aca" -} \ No newline at end of file + "V2": { + "VOTING_TO_CHANGE_KEYS_ADDRESS": "0xB974DF531c1b27324618175B442edF95f7F7a621", + "VOTING_TO_CHANGE_MIN_THRESHOLD_ADDRESS": "0xD75ad6E3840A18DaCC67bF3Cd2080B24be409F79", + "VOTING_TO_CHANGE_PROXY_ADDRESS": "0x604CDC518F3EB0446E15Fc05A22923C82d8a8e21", + "VOTING_TO_MANAGE_EMISSION_FUNDS_ADDRESS": "0x7CFa6f2C0d032f9ddE652996E989a4d385B8b9D7", + "BALLOTS_STORAGE_ADDRESS": "0x64CaA6bDE0f8C9E2f0502F5Cc19351D7a5A43b53", + "KEYS_MANAGER_ADDRESS": "0x3F6BA50D5A6Af3786af656eA76B33EFDEd51a819", + "METADATA_ADDRESS": "0xFFD6eEBda850E4a20b6d9C9e98Ee631f8d7cA950", + "PROXY_ADDRESS": "0xe04779F3e9f6352232284784a14f6Aa54546224B", + "POA_ADDRESS": "0x4c6a159659CCcb033F4b2e2Be0C16ACC62b89DDB", + "EMISSION_FUNDS_ADDRESS": "0x523B6539Ff08d72A6C8Bb598Af95bF50c1EA839C", + "REWARD_BY_BLOCK_ADDRESS": "0x3145197AD50D7083D0222DE4fCCf67d9BD05C30D", + "MOC": "0xE8DDc5c7A2d2F0D7a9798459c0104fDf5E987ACA" + }, + "V1": { + "VOTING_TO_CHANGE_KEYS_ADDRESS": "0xc40cdf254a4a35498aa84f35e9842c110729a2a0", + "VOTING_TO_CHANGE_MIN_THRESHOLD_ADDRESS": "0x700db8ba3128087f3b23f60de4bc3179bafa467d", + "VOTING_TO_CHANGE_PROXY_ADDRESS": "0x0aa4a75549757a90f62f88b3b96b69bead2db0ff", + "BALLOTS_STORAGE_ADDRESS": "0x27e7d2572aa37bec2ed30795f2fabccda4781f86", + "KEYS_MANAGER_ADDRESS": "0x1aa02bd52fe418ac70263351282f66f1dacf898c", + "METADATA_ADDRESS": "0xf71dd3797e4f173c2c08f2cebe8a6801d8191b42", + "PROXY_ADDRESS": "0x3f918617a055d48e90f9fe06c168a75134565190", + "POA_ADDRESS": "0x03048F666359CFD3C74a1A5b9a97848BF71d5038", + "MOC": "0xe8ddc5c7a2d2f0d7a9798459c0104fdf5e987aca" + } +} diff --git a/src/contracts.rs b/src/contracts.rs new file mode 100644 index 0000000..6776238 --- /dev/null +++ b/src/contracts.rs @@ -0,0 +1,47 @@ +use ethabi::Address; + +// The `use_contract!` macro triggers several Clippy warnings. +#[cfg_attr( + feature = "cargo-clippy", + allow(too_many_arguments, redundant_closure, needless_update) +)] +pub mod v2 { + use_contract!(key_mgr, "abi/v2/KeysManager.abi.json"); + use_contract!(val_meta, "abi/v2/ValidatorMetadata.abi.json"); + use_contract!(voting, "abi/v2/VotingToChangeKeys.abi.json"); +} + +// The `use_contract!` macro triggers several Clippy warnings. +#[cfg_attr( + feature = "cargo-clippy", + allow(too_many_arguments, redundant_closure, needless_update) +)] +pub mod v1 { + use_contract!(voting, "abi/v1/VotingToChangeKeys.abi.json"); +} + +#[derive(Deserialize)] +#[serde(rename_all = "SCREAMING_SNAKE_CASE")] +pub struct ContractV1V2Addresses { + pub metadata_address: Address, + pub keys_manager_address: Address, + pub voting_to_change_keys_address: Address, +} + +#[derive(Deserialize)] +#[serde(rename_all = "SCREAMING_SNAKE_CASE")] +pub struct ContractAddresses { + pub v1: ContractV1V2Addresses, + pub v2: ContractV1V2Addresses, +} + +impl ContractAddresses { + pub fn is_keys_manager(&self, addr: &Address) -> bool { + *addr == self.v1.keys_manager_address || *addr == self.v2.keys_manager_address + } + + pub fn is_voting(&self, addr: &Address) -> bool { + *addr == self.v1.voting_to_change_keys_address + || *addr == self.v2.voting_to_change_keys_address + } +} diff --git a/src/counter.rs b/src/counter.rs index d02a8c8..467b952 100644 --- a/src/counter.rs +++ b/src/counter.rs @@ -1,14 +1,17 @@ use colored::{Color, Colorize}; -use contracts::key_mgr::events::voting_key_changed; -use contracts::val_meta::functions::{get_mining_by_voting_key, validators as validators_fn}; -use contracts::voting::events::{ballot_created, vote}; +use contracts::v1::voting::events::{ballot_created as ballot_created_v1, vote as vote_v1}; +use contracts::v2::key_mgr::events::voting_key_changed; +use contracts::v2::key_mgr::functions::get_mining_key_by_voting; +use contracts::v2::val_meta::functions::validators as validators_fn; +use contracts::v2::voting::events::{ballot_created, vote}; +use contracts::ContractAddresses; use error::{Error, ErrorKind}; -use ethabi::{Address, Bytes, FunctionOutputDecoder}; +use ethabi::{Address, Bytes, FunctionOutputDecoder, Uint}; use stats::Stats; use std::collections::BTreeSet; use std::default::Default; use std::time::{Duration, SystemTime, UNIX_EPOCH}; -use util::{self, HexList, TopicFilterExt, Web3LogExt}; +use util::{self, HexList, IntoBallot, TopicFilterExt, Web3LogExt}; use web3; use web3::futures::Future; @@ -16,49 +19,30 @@ use web3::futures::Future; const MAX_BLOCK_AGE: u64 = 60 * 60; const ERR_BLOCK_NUM: &str = "event is missing block number"; -const ERR_ADDR: &str = "parse contract address"; const ERR_EPOCH: &str = "current timestamp is earlier than the Unix epoch"; const ERR_BLOCK: &str = "failed to retrieve block"; -#[derive(Deserialize)] -#[serde(rename_all = "SCREAMING_SNAKE_CASE")] -pub struct ContractAddresses { - metadata_address: String, - keys_manager_address: String, - voting_to_change_keys_address: String, -} - /// A vote counter, to read ballot statistics from the blockchain. pub struct Counter { verbose: bool, start_time: SystemTime, start_block: u64, - val_meta_addr: Address, - key_mgr_addr: Address, - voting_addr: Address, + addrs: ContractAddresses, web3: web3::Web3, _eloop: web3::transports::EventLoopHandle, } impl Counter { /// Creates a new vote counter. - pub fn new(url: &str, contract_addrs: &ContractAddresses) -> Counter { + pub fn new(url: &str, addrs: ContractAddresses) -> Counter { let (_eloop, transport) = web3::transports::Http::new(url).unwrap(); let web3 = web3::Web3::new(transport); - let val_meta_addr = util::parse_address(&contract_addrs.metadata_address).expect(ERR_ADDR); - let key_mgr_addr = - util::parse_address(&contract_addrs.keys_manager_address).expect(ERR_ADDR); - let voting_addr = - util::parse_address(&contract_addrs.voting_to_change_keys_address).expect(ERR_ADDR); - Counter { verbose: false, start_time: UNIX_EPOCH, start_block: 0, - val_meta_addr, - key_mgr_addr, - voting_addr, + addrs, web3, _eloop, } @@ -88,8 +72,9 @@ impl Counter { // Find all ballots and voter changes. We don't filter by contract address, so we can make // a single pass. Contract addresses are checked inside the loop. - let ballot_or_change_filter = - (ballot_created::filter(None, None, None)).or(voting_key_changed::filter(None)); + let ballot_or_change_filter = ballot_created::filter(None, None, None) + .or(ballot_created_v1::filter(None, None, None)) + .or(voting_key_changed::filter(None)); let mut voters: BTreeSet
= BTreeSet::new(); let mut stats = Stats::default(); @@ -99,12 +84,12 @@ impl Counter { // Iterate over all ballot and voter change events. for log in ballot_or_change_filter.logs(&self.web3)? { - event_found = true; let block_num = log.block_number.expect(ERR_BLOCK_NUM).into(); if let Ok(change) = voting_key_changed::parse_log(log.clone().into_raw()) { - if log.address != self.key_mgr_addr { + if !self.addrs.is_keys_manager(&log.address) { continue; // Event from another contract instance. } + event_found = true; // If it is a `VotingKeyChanged`, update the current set of voters. vprintln!("• {} {:?}", format!("#{}", block_num).bold(), change); match change.action.as_str() { @@ -116,10 +101,14 @@ impl Counter { } _ => vprintln!(" Unexpected key change action."), } - } else if let Ok(ballot) = ballot_created::parse_log(log.clone().into_raw()) { - if log.address != self.voting_addr { + } else if let Ok(ballot) = + ballot_created::parse_log(log.clone().into_raw()).or_else(|_| { + ballot_created_v1::parse_log(log.clone().into_raw()).map(IntoBallot::into) + }) { + if !self.addrs.is_voting(&log.address) { continue; // Event from another contract instance. } + event_found = true; if block_num < self.start_block || self.is_block_too_old(block_num) { let num = format!("#{}", block_num); vprintln!("• {} Ballot too old; skipping: {:?}", num.bold(), ballot); @@ -127,31 +116,12 @@ impl Counter { } // If it is a `BallotCreated`, find the corresponding votes and update the stats. vprintln!("• {} {:?}", format!("#{}", block_num).bold(), ballot); - let mut unexpected = BTreeSet::new(); - let mut voted = BTreeSet::new(); - let mut votes = Vec::new(); - for vote_log in vote::filter(ballot.id, None).logs(&self.web3)? { - let vote = vote::parse_log(vote_log.into_raw())?; - if voters.insert(vote.voter) { - unexpected.insert(vote.voter); - } else { - voted.insert(vote.voter); - } - votes.push(vote); + let voted = self.voters_for_ballot(ballot.id)?; + if self.verbose { + self.print_ballot_details(&voters, &voted); } - let missed_filter = - |voter: &&Address| !votes.iter().any(|vote| vote.voter == **voter); - let missed: BTreeSet<_> = voters.iter().filter(missed_filter).collect(); - if !missed.is_empty() { - vprintln!(" Missed: {}", HexList(&missed, Color::Red)); - } - if !voted.is_empty() { - vprintln!(" Voted: {}", HexList(&voted, Color::Green)); - } - if !unexpected.is_empty() { - vprintln!(" Unexpected: {}", HexList(&unexpected, Color::Yellow)); - } - stats.add_ballot(&voters, &votes); + voters.extend(voted.iter().cloned()); + stats.add_ballot(&voters, &voted); } else { return Err(ErrorKind::UnexpectedLogParams.into()); } @@ -165,7 +135,7 @@ impl Counter { // Finally, gather the metadata for all voters. for voter in voters { - let mining_key = match self.call_val_meta(get_mining_by_voting_key::call(voter)) { + let mining_key = match self.call_key_mgr(get_mining_key_by_voting::call(voter)) { Err(err) => { eprintln!("Failed to find mining key for voter {}: {:?}", voter, err); continue; @@ -182,12 +152,62 @@ impl Counter { Ok(stats) } + fn print_ballot_details(&self, voters: &BTreeSet
, voted: &[Address]) { + let mut unexpected = BTreeSet::new(); + let mut expected = BTreeSet::new(); + for voter in voted { + if voters.contains(voter) { + expected.insert(*voter); + } else { + unexpected.insert(*voter); + } + } + let missed_filter = |voter: &&Address| !voted.contains(voter); + let missed: BTreeSet<_> = voters.iter().filter(missed_filter).collect(); + if !missed.is_empty() { + println!(" Missed: {}", HexList(&missed, Color::Red)); + } + if !expected.is_empty() { + println!(" Voted: {}", HexList(voted, Color::Green)); + } + if !unexpected.is_empty() { + println!(" Unexpected: {}", HexList(&unexpected, Color::Yellow)); + } + } + /// Calls a function of the `ValidatorMetadata` contract and returns the decoded result. fn call_val_meta(&self, fn_call: (Bytes, D)) -> Result where D: FunctionOutputDecoder, { - util::raw_call(self.val_meta_addr, &self.web3.eth(), fn_call) + util::raw_call(self.addrs.v2.metadata_address, &self.web3.eth(), fn_call) + } + + /// Calls a function of the `KeysManager` contract and returns the decoded result. + fn call_key_mgr(&self, fn_call: (Bytes, D)) -> Result + where + D: FunctionOutputDecoder, + { + util::raw_call( + self.addrs.v2.keys_manager_address, + &self.web3.eth(), + fn_call, + ) + } + + fn voters_for_ballot(&self, id: Uint) -> Result, Error> { + let vote_filter = vote::filter(id, None).or(vote_v1::filter(id, None)); + let is_voting = |log: &web3::types::Log| self.addrs.is_voting(&log.address); + vote_filter + .logs(&self.web3)? + .into_iter() + .filter(is_voting) + .map(|vote_log| { + vote::parse_log(vote_log.clone().into_raw()) + .map(|vote| vote.voter) + .or_else(|_| vote_v1::parse_log(vote_log.into_raw()).map(|vote| vote.voter)) + .map_err(Error::from) + }).collect() } /// Returns `true` if the block with the given number is older than `start_time`. diff --git a/src/main.rs b/src/main.rs index 69f30b4..9796614 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ extern crate serde_json; extern crate web3; mod cli; +mod contracts; mod counter; mod error; mod stats; @@ -24,17 +25,6 @@ mod validator; use std::fs::File; use std::time::SystemTime; -// The `use_contract!` macro triggers several Clippy warnings. -#[cfg_attr( - feature = "cargo-clippy", - allow(too_many_arguments, redundant_closure, needless_update) -)] -mod contracts { - use_contract!(voting, "abi/VotingToChangeKeys.abi.json"); - use_contract!(val_meta, "abi/ValidatorMetadata.abi.json"); - use_contract!(key_mgr, "abi/KeysManager.abi.json"); -} - fn main() { let matches = cli::get_matches(); @@ -45,7 +35,7 @@ fn main() { let file = File::open(contract_file).expect("open contracts file"); let contract_addrs = serde_json::from_reader(file).expect("parse contracts file"); - let mut counter = counter::Counter::new(url, &contract_addrs); + let mut counter = counter::Counter::new(url, contract_addrs); if matches.is_present("verbose") { counter.set_verbose(); diff --git a/src/stats.rs b/src/stats.rs index 18ae767..183a2c2 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -1,5 +1,4 @@ use colored::{Color, Colorize}; -use contracts::voting; use ethabi::Address; use std::collections::HashMap; use std::fmt::{self, Display, Formatter}; @@ -27,7 +26,7 @@ pub struct Stats { impl Stats { /// Adds a ballot: `voters` are the voting keys of everyone who was allowed to cast a vote, and /// `votes` are the ones that were actually cast. - pub fn add_ballot<'a, I>(&mut self, voters: I, votes: &[voting::logs::Vote]) + pub fn add_ballot<'a, I>(&mut self, voters: I, voted: &[Address]) where I: IntoIterator, { @@ -37,7 +36,7 @@ impl Stats { .entry(voter.clone()) .or_insert_with(VoterStats::default); vs.ballots += 1; - if votes.iter().any(|vote| vote.voter == *voter) { + if voted.contains(voter) { vs.voted += 1; } } @@ -116,7 +115,7 @@ struct DisplayLine { impl Display for DisplayLine { fn fmt(&self, f: &mut Formatter) -> fmt::Result { let text = format!( - "{:>7}, {:4.1}% {} {} {}", + "{:>7},{:5.1}% {} {} {}", format!("{}/{}", self.ballots - self.voted, self.ballots), 100.0 - (self.votes_per_thousand as f32) / 10.0, self.voting_address, diff --git a/src/util.rs b/src/util.rs index a96295a..454d969 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,6 +1,7 @@ use colored::{Color, Colorize}; +use contracts::v1::voting::logs::BallotCreated as BallotCreatedV1; +use contracts::v2::voting::logs::BallotCreated; use ethabi::{self, Address, Bytes, FunctionOutputDecoder}; -use std::str::FromStr; use std::{fmt, u8}; use web3; use web3::futures::Future; @@ -8,14 +9,6 @@ use web3::helpers::CallFuture; // TODO: Evaluate whether any of these would make sense to include in `web3`. -/// Parses the string as a 40-digit hexadecimal number, and returns the corresponding `Address`. -pub fn parse_address(mut s: &str) -> Option
{ - if &s[..2] == "0x" { - s = &s[2..]; - } - Address::from_str(s).ok() -} - /// Executes a function call on the latest block and returns the decoded output. pub fn raw_call( to: Address, @@ -167,14 +160,18 @@ where } } -#[cfg(test)] -mod tests { - #[test] - fn test_parse_address() { - let addr_str = "0x2b1dbc7390a65dc40f7d64d67ea11b4d627dd1bf"; - let addr = super::parse_address(addr_str).expect("parse address with 0x"); - let addr2 = super::parse_address(&addr_str[2..]).expect("parse address without 0x"); - assert_eq!(addr, addr2); - assert_eq!(addr_str, &format!("{:?}", addr)); +/// Conversion into a `BallotCreated` event. +pub trait IntoBallot { + /// Converts a `BallotCreated` event from earlier contract types into the current one. + fn into(self) -> BallotCreated; +} + +impl IntoBallot for BallotCreatedV1 { + fn into(self) -> BallotCreated { + BallotCreated { + id: self.id, + ballot_type: self.ballot_type, + creator: self.creator, + } } }