diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6eb9dae --- /dev/null +++ b/.travis.yml @@ -0,0 +1,65 @@ +# Based on the "trust" template v0.1.2 +# https://github.com/japaric/trust/tree/v0.1.2 + +dist: trusty +language: rust +services: docker +sudo: required +rust: nightly-2018-04-19 +cache: cargo + +env: + global: + - CRATE_NAME=poa-ballot-stats + - RUST_BACKTRACE=1 + - RUSTFLAGS="-D warnings" + +matrix: + include: + - env: TARGET=x86_64-unknown-linux-gnu + - env: TARGET=x86_64-apple-darwin + os: osx + +before_install: + - set -e + - rustup self update + - rustup component add rustfmt-preview + # - cargo install clippy -f --vers=0.0.195 + +install: + - sh ci/install.sh + - source ~/.cargo/env || true + +script: + - bash ci/script.sh + +after_script: set +e + +before_deploy: + - sh ci/before_deploy.sh + +deploy: + api_key: + secure: mj9bnqoc/lbsLv5Wiek37YY7BvOp+CN/Ier/uXC32uSRsJp5ue5/aru181oEhMI+6yeRPQyCrzzpoqMHcM5ARAp0GFW1YOkwqsnzaaiTMYTLGdLxtYBVNCrcLlUU474fvw92GCjhX2Ag8NpaQRYAaD1DMrkBTJ2qYJfm5zaXwByVu1bP1JX2zQl5mx6+/5j2DtrzQwMzRNBGzrJDuodRaeZ+/+cZvTLKkP4JaV7/iSuQ19NptSkLfflvB28J/XOnZ6m4mHbqGAfeNOB9YtH2ag70bvM1qfz4Y1fbphh8NJ4tngslxptOQ2oktAglebmthjiUAu8rhE1V63YioY2e/GaLIq3GSWOCleU6/1IvAac6VjjPBpaw6RqQgCVUCc+w6+CxmaY1CZZII2whM5FqE9AC22oTvK2SUfIzRXolYqUVYZsHI+75DBqExyE3QwW1T7IMTzqK25uokdSZBHdvC5yxZQVjDsuD+TukCOyPDmKW8Dlnn6B5XVTWruF+qALzQA1T8qy++QPz1O5i2lM61SR+iYlQQ/+IEr/je0rw1cpC9zp2/FFb/FAOyXFrGk5UGRSsewBz7j0gsqDin5zrqqBuRv+/hlEgXBJ7xFpOQVPJDk7n/Wz86whQLu7VUcKB3w/3+MO20i0DhXI4Rx8otrVWgDMq8cJ1mGN8bZhl0k8= + file_glob: true + file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.* + on: + condition: $TRAVIS_RUST_VERSION = nightly-2018-04-19 + tags: true + provider: releases + skip_cleanup: true + +cache: cargo +before_cache: + # Travis can't cache files that are not readable by "others" + - chmod -R a+r $HOME/.cargo + +branches: + only: + # release tags + - /^v\d+\.\d+\.\d+.*$/ + - master + +notifications: + email: + on_success: never diff --git a/Cargo.lock b/Cargo.lock index f13ac0c..7b992e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,7 +16,7 @@ dependencies = [ [[package]] name = "atty" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -26,13 +26,13 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -41,7 +41,7 @@ name = "backtrace-sys" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -50,7 +50,7 @@ name = "base64" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -58,16 +58,16 @@ name = "base64" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base64" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -78,31 +78,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.9" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -111,8 +111,8 @@ version = "2.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -146,11 +146,11 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-epoch 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -159,27 +159,19 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "crossbeam-utils" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "crossbeam-utils" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -197,7 +189,7 @@ name = "error-chain" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -206,14 +198,30 @@ version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.1 (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.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ethabi-contract" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ethabi-derive" +version = "5.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ethbloom" version = "0.5.0" @@ -221,22 +229,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" 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.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "fixed-hash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ethereum-types" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "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.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fixed-hash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "uint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -245,12 +253,12 @@ name = "ethereum-types-serialize" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fixed-hash" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -277,7 +285,7 @@ name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -288,7 +296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -296,7 +304,7 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -308,6 +316,14 @@ dependencies = [ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "heck" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "httparse" version = "1.2.4" @@ -333,22 +349,23 @@ dependencies = [ [[package]] name = "hyper" -version = "0.11.24" +version = "0.11.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (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.2.4 (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.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.16 (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.6 (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)", @@ -360,10 +377,10 @@ name = "hyper-tls" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.26 (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.16 (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.6 (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)", @@ -376,7 +393,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -398,11 +415,11 @@ name = "jsonrpc-core" version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (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.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -452,7 +469,7 @@ name = "log" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -475,7 +492,7 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -501,9 +518,10 @@ dependencies = [ [[package]] name = "mio-uds" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -527,7 +545,7 @@ dependencies = [ "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (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.11 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.12 (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)", @@ -538,7 +556,7 @@ name = "net2" version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -548,11 +566,6 @@ name = "nodrop" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "num-traits" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "num_cpus" version = "1.8.0" @@ -570,18 +583,18 @@ dependencies = [ "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.27 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-sys" -version = "0.9.27" +version = "0.9.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -594,21 +607,21 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot_core" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -619,7 +632,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pkg-config" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -630,15 +643,17 @@ dependencies = [ "colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi-contract 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi-derive 5.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", "web3 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro2" -version = "0.2.3" +version = "0.3.8" 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)", @@ -646,10 +661,10 @@ dependencies = [ [[package]] name = "quote" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -690,12 +705,12 @@ name = "relay" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "remove_dir_all" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -703,7 +718,7 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -726,7 +741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "schannel" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -735,7 +750,7 @@ dependencies = [ [[package]] name = "scoped-tls" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -778,38 +793,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.36" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.36" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive_internals" -version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.15 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.13" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -834,7 +838,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -849,11 +853,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.12.15" +version = "0.13.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -868,7 +872,7 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -909,43 +913,55 @@ dependencies = [ [[package]] name = "tokio" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-core" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (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.1 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", - "scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.1 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-executor" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-fs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -953,8 +969,8 @@ name = "tokio-io" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -963,14 +979,14 @@ name = "tokio-proto" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (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.32 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "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.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -980,11 +996,11 @@ name = "tokio-reactor" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -993,7 +1009,7 @@ name = "tokio-service" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1001,8 +1017,8 @@ name = "tokio-tcp" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (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.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1011,15 +1027,15 @@ dependencies = [ [[package]] name = "tokio-threadpool" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-deque 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (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.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1027,18 +1043,27 @@ name = "tokio-timer" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (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.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-tls" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (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.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1047,8 +1072,8 @@ name = "tokio-udp" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1060,14 +1085,14 @@ name = "tokio-uds" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (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.40 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.6 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1086,7 +1111,7 @@ name = "uint" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1118,7 +1143,12 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.5" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicode-segmentation" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1143,7 +1173,7 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1164,19 +1194,19 @@ dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.11.24 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.26 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.5.4 (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.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.17 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1190,14 +1220,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.21 (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.16 (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.6 (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)", @@ -1245,44 +1275,46 @@ dependencies = [ [metadata] "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" -"checksum atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "af80143d6f7608d746df1520709e5d141c96f240b0e62b0aa41bdfb53374d9d4" -"checksum backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2" +"checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1" +"checksum backtrace 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea58cd16fd6c9d120b5bcb01d63883ae4cc7ba2aed35c1841b862a3c7ef6639" "checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" "checksum base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557" "checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" -"checksum base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "229d032f1a99302697f10b27167ae6d03d49d032e6a8e2550e8d3fc13356d2b4" +"checksum base64 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9263aa6a38da271eec5c91a83ce1e800f093c8535788d403d626d8d5c3f8f007" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" -"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" -"checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" -"checksum cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2b4911e4bdcb4100c7680e7e854ff38e23f1b34d4d9e079efae3da2801341ffc" -"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" +"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" +"checksum byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "73b5bdfe7ee3ad0b99c9801d58807a9dbc9e09196365b0203853b99889ab3c87" +"checksum bytes 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "2f1d50c876fb7545f5f289cd8b2aee3f359d073ae819eed5d6373638e2c61e59" +"checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba" +"checksum cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "405216fd8fe65f718daa7102ea808a946b6ce40c742998fbfd3463645552de18" "checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536" "checksum colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0aa3473e85a3161b59845d6096b289bb577874cafeaf75ea1b1beaa6572c7fc" "checksum core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67" "checksum core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "065a5d7ffdcbc8fa145d6f0746f3555025b9097a9e9cda59f7467abae670c78d" -"checksum crossbeam-deque 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c1bdc73742c36f7f35ebcda81dbb33a7e0d33757d03a06d9ddca762712ec5ea2" +"checksum crossbeam-deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fe8153ef04a7594ded05b427ffad46ddeaf22e63fd48d42b3e1e3bb4db07cae7" "checksum crossbeam-epoch 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9b4e2817eb773f770dcb294127c011e22771899c21d18fce7dd739c0b9832e81" -"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d636a8b3bcc1b409d7ffd3facef8f21dcb4009626adbd0c5e6c4305c07253c7b" "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05e33a914b94b763f0a92333e4e5c95c095563f06ef7d6b295b3d3c2cf31e21f" +"checksum ethabi-contract 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "210c9e21d164c15b6ef64fe601e0e12a3c84a031d5ef558e38463e53edbd22ed" +"checksum ethabi-derive 5.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2bc7099baa147187aedaecd9fe04a6c0541c82bc43ff317cb6900fe2b983d74" "checksum ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a93a43ce2e9f09071449da36bfa7a1b20b950ee344b6904ff23de493b03b386" -"checksum ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "53eabbad504e438e20b6559fd070d79b92cb31c02f994c7ecb05e9b2df716013" +"checksum ethereum-types 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a3ae691a36ce5d25b433e63128ce5579f4a18457b6a9c849832b2c9e0fec92a" "checksum ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ac59a21a9ce98e188f3dace9eb67a6c4a3c67ec7fbc7218cb827852679dc002" -"checksum fixed-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "362f32e2fbc5ed45f01a23ca074f936bb3aee4122a66e7118e8c3e965d96104c" +"checksum fixed-hash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18d6fd718fb4396e7a9c93ac59ba7143501467ca7a143c145b5555a571d5576" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "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.20 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5a3176836efa0b37f0e321b86672dfada1564aeb516fbed67b7c24050a0263" +"checksum futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "1a70b146671de62ec8c8ed572219ca5d594d9b06c0b364d5e67b722fc559b48c" "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.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" "checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2" -"checksum hyper 0.11.24 (registry+https://github.com/rust-lang/crates.io-index)" = "df4dd5dae401458087396b6db7fabc4d6760aa456a5fa8e92bda549f39cae661" +"checksum hyper 0.11.26 (registry+https://github.com/rust-lang/crates.io-index)" = "66b16eb6213713f3c72d0ed14ce56423ae84dced8df73d2a2c8675f0495ae7ea" "checksum hyper-tls 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a5aa51f6ae9842239b0fac14af5f22123b8432b4cc774a44ff059fcba0f675ca" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" @@ -1299,69 +1331,69 @@ dependencies = [ "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" "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.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e2e00e17be181010a91dbfefb01660b17311059dc8c7f48b9017677721e732bd" +"checksum mime 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0b28683d0b09bbc20be1c9b3f6f24854efb1356ffcffee08ea3f6e65596e85fa" "checksum mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "6d771e3ef92d58a8da8df7d6976bfca9371ed1de6619d9d5a5ce5b1f29b85bfe" -"checksum mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1731a873077147b626d89cc6c2a0db6288d607496c5d10c0cfcf3adc697ec673" +"checksum mio-uds 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "84c7b5caa3a118a6e34dbac36504503b1e8dc5835e833306b9d6af0e05929f79" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0" "checksum net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "9044faf1413a1057267be51b5afba8eb1090bd2231c693664aa1db716fe1eae0" "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" -"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" "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.27 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdc5c4a02e69ce65046f1763a0181107038e02176233acb0b3351d7cc588f9" +"checksum openssl-sys 0.9.30 (registry+https://github.com/rust-lang/crates.io-index)" = "73ae718c3562989cd3a0a5c26610feca02f8116822f6f195e6cf4887481e57f5" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" -"checksum parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd9d732f2de194336fb02fe11f9eed13d9e76f13f4315b4d88a14ca411750cd" -"checksum parking_lot_core 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "538ef00b7317875071d5e00f603f24d16f0b474c1a5fc0ccb8b454ca72eafa79" +"checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac" +"checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" -"checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" -"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" +"checksum pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "110d5ee3593dbb73f56294327fe5668bcc997897097cbc76b51e7aed3f52452f" +"checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" +"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" -"checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" -"checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb" +"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" +"checksum rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "76d7ba1feafada44f2d38eed812bd2489a03c0f5abb975799251518b68848649" "checksum rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ceb8ce7a5e520de349e1fa172baeba4a9e8d5ef06c47471863530bc4972ee1e" "checksum rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a54aa04a10c68c1c4eacb4337fd883b435997ede17a9385784b990777686b09a" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" -"checksum schannel 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "fbaffce35eb61c5b00846e73128b0cd62717e7c0ec46abbec132370d013975b4" -"checksum scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8674d439c964889e2476f474a3bf198cc9e199e77499960893bac5de7e9218a4" +"checksum schannel 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "85fd9df495640643ad2d00443b3d78aae69802ad488debab4f1dd52fc1806ade" +"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.36 (registry+https://github.com/rust-lang/crates.io-index)" = "c70142ae874a42c70e03c63c6a49abe2ea0079b090bf6e136e99252fc1974bd6" -"checksum serde_derive 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "6fffe22d41dbddcead5b2c380c4714d44f2eb39292f7e7a0d966d2d45bf56408" -"checksum serde_derive_internals 0.22.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2f04ed291686ce195a5c8f554aaf36e50a721fbf829ee3b6151e6f85eccf945" -"checksum serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "5c508584d9913df116b91505eec55610a2f5b16e9ed793c46e4d0152872b3e74" +"checksum serde 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "c9bc5ad5d354bc43e8ba78885f81650e6d4467a55716271b49d7ceeba739e21e" +"checksum serde_derive 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "a0b9c70a763b79f976e7147322d6c523da0705b3d20e57fd764172d0741c50f2" +"checksum serde_json 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f3ad6d546e765177cf3dded3c2e424a8040f870083a0e64064746b958ece9cb1" "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.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d" "checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" -"checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9" +"checksum smallvec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03dab98ab5ded3a8b43b2c80751194608d0b2aa0f1d46cf95d1c35e192844aa7" "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum syn 0.12.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c97c05b8ebc34ddd6b967994d5c6e9852fa92f8b82b3858c39451f97346dcce5" +"checksum syn 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "61b8f1b737f929c6516ba46a3133fd6d5215ad8a62f66760f851f7048aebedfb" "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" "checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" "checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" "checksum tiny-keccak 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "58911ed5eb275a8fd2f1f0418ed360a42f59329864b64e1e95377a9024498c01" -"checksum tokio 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "65bd27f59c223e7c9e406bcdadb453e143bcf1242e162ae6c0f0eb6d14487306" -"checksum tokio-core 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "799492ccba3d8ed5e41f2520a7cfd504cb65bbfe5fbbbd0012e335ae5f188051" -"checksum tokio-executor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3aca092a94dc6e736819347a990a86ed734a6543a9d6f817929fa4dc8c4334e2" +"checksum tokio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d00555353b013e170ed8bc4e13f648a317d1fd12157dbcae13f7013f6cf29f5" +"checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" +"checksum tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8cac2a7883ff3567e9d66bb09100d09b33d90311feca0206c7ca034bc0c55113" +"checksum tokio-fs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "76766830bbf9a2d5bfb50c95350d56a2e79e2c80f675967fff448bc615899708" "checksum tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6af9eb326f64b2d6b68438e1953341e00ab3cf54de7e35d92bfc73af8555313a" "checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" "checksum tokio-reactor 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3cedc8e5af5131dc3423ffa4f877cce78ad25259a9a62de0613735a13ebc64b" "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" "checksum tokio-tcp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ec9b094851aadd2caf83ba3ad8e8c4ce65a42104f7b94d9e6550023f0407853f" -"checksum tokio-threadpool 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2057ff8a75d33639f9ea1b4b85cb113c7bbf4e06d132f148521d12cb6daa1a22" +"checksum tokio-threadpool 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5783254b10c7c84a56f62c74766ef7e5b83d1f13053218c7cab8d3f2c826fa0e" "checksum tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6131e780037787ff1b3f8aad9da83bca02438b72277850dd6ad0d455e0e20efc" +"checksum tokio-timer 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535fed0ccee189f3d48447587697ba3fd234b3dbbb091f0ec4613ddfec0a7c4c" "checksum tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "772f4b04e560117fe3b0a53e490c16ddc8ba6ec437015d91fa385564996ed913" "checksum tokio-udp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "137bda266504893ac4774e0ec4c2108f7ccdbcb7ac8dced6305fe9e4e0b5041a" "checksum tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "65ae5d255ce739e8537221ed2942e0445f4b3b813daebac1c0050ddaaa3587f9" @@ -1371,11 +1403,12 @@ dependencies = [ "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 unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" +"checksum unicode-normalization 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90d662d111b0dbb08a180f2761026cba648c258023c355954a7c00e00e354636" +"checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" -"checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" +"checksum vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed0f6789c8a85ca41bbc1c9d175422116a9869bd1cf31bb08e1493ecce60380" "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" "checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" "checksum web3 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a806fc4a6fe10166a083806e3c06b21c7aa5e6f2cf8094416835f1070844e13a" diff --git a/Cargo.toml b/Cargo.toml index e2ac3a1..174a8e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,8 @@ clap = "2.31.2" colored = "1.6.0" error-chain = { version = "0.11", default-features = false } ethabi = "5.1.1" +ethabi-contract = "5.1.0" +ethabi-derive = "5.1.2" serde = "1.0.36" serde_derive = "1.0.36" serde_json = "1.0.13" diff --git a/README.md b/README.md index f67130b..56f56ac 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,28 @@ # POA ballot stats -**Note**: This is still work in progress. It doesn't yet correctly determine the initial set of -validators. - A command line tool that displays voting statistics for the [POA network](https://poa.network/). It requires a recent version of [Rust](https://www.rust-lang.org/), and needs to communicate with a fully synchronized node that is connected to the network: [POA installation](https://github.com/poanetwork/wiki/wiki/POA-Installation). +Note that `poa-ballot-stats` needs access to the network's full logs, so the node must run with +`--pruning=archive --no-warp`. You can view the command line options with `-h`, and specify a different endpoint if your node e.g. -uses a non-standard port. The `-c` option takes a map with the POA contracts' addresses in JSON -format. You can find the current maps for the main and test network in -[poa-chain-spec](https://github.com/poanetwork/poa-chain-spec)'s `core` and `sokol` branches. +uses a non-standard port. By default, it tries to connect to a local node `http://127.0.0.1:8545`. +In verbose mode, with `-v`, the complete list of collected events is displayed. + +The `-c` option takes a map with the POA contracts' addresses in JSON format. You can find the +current maps for the main and test network the `contracts` folder. By default, it uses `core.json`, +for the main network. + +Examples: ```bash $ cargo run -- -h -$ cargo run -- -c ../poa-chain-spec/contracts.json http://127.0.0.1:8545 +$ cargo run +$ cargo run -- -c contracts/sokol.json https://sokol.poa.network -v ``` +## Screenshot + +![Screenshot](screenshot.png) diff --git a/abi/ValidatorMetadata.abi.json b/abi/ValidatorMetadata.abi.json index 54325b7..3c65a01 100644 --- a/abi/ValidatorMetadata.abi.json +++ b/abi/ValidatorMetadata.abi.json @@ -3,7 +3,7 @@ "constant": true, "inputs": [ { - "name": "", + "name": "_miningKey", "type": "address" } ], @@ -31,7 +31,7 @@ }, { "name": "zipcode", - "type": "uint256" + "type": "bytes32" }, { "name": "expirationDate", @@ -58,7 +58,7 @@ "constant": true, "inputs": [ { - "name": "", + "name": "_newProxyAddress", "type": "address" } ], @@ -67,12 +67,54 @@ { "name": "count", "type": "uint256" + }, + { + "name": "voters", + "type": "address[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, + { + "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" + }, { "constant": true, "inputs": [], @@ -105,7 +147,7 @@ "constant": true, "inputs": [ { - "name": "", + "name": "_miningKey", "type": "address" } ], @@ -114,6 +156,10 @@ { "name": "count", "type": "uint256" + }, + { + "name": "voters", + "type": "address[]" } ], "payable": false, @@ -134,6 +180,20 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "version", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -149,50 +209,17 @@ "type": "function" }, { - "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": "uint256" - }, - { - "name": "_expirationDate", - "type": "uint256" - }, - { - "name": "_miningKey", - "type": "address" - } - ], - "name": "changeRequestForValidator", + "constant": true, + "inputs": [], + "name": "implementation", "outputs": [ { "name": "", - "type": "bool" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -239,20 +266,31 @@ }, { "name": "_zipcode", - "type": "uint256" + "type": "bytes32" }, { "name": "_expirationDate", "type": "uint256" - } - ], - "name": "changeRequest", - "outputs": [ + }, { - "name": "", - "type": "bool" + "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" @@ -313,6 +351,96 @@ "stateMutability": "view", "type": "function" }, + { + "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": "_miningKey", + "type": "address" + } + ], + "name": "changeRequestForValidator", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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" + }, { "constant": true, "inputs": [ @@ -408,37 +536,8 @@ }, { "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": "uint256" - }, - { - "name": "_expirationDate", - "type": "uint256" - } - ], - "name": "createMetadata", + "inputs": [], + "name": "initMetadataDisable", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -462,7 +561,7 @@ "constant": true, "inputs": [ { - "name": "", + "name": "_miningKey", "type": "address" } ], @@ -490,7 +589,7 @@ }, { "name": "zipcode", - "type": "uint256" + "type": "bytes32" }, { "name": "expirationDate", @@ -513,17 +612,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "name": "_proxyStorage", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, { "anonymous": false, "inputs": [ diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh new file mode 100644 index 0000000..1fe7eef --- /dev/null +++ b/ci/before_deploy.sh @@ -0,0 +1,32 @@ +# This script takes care of building your crate and packaging it for release + +set -ex + +main() { + local src=$(pwd) \ + stage= + + case $TRAVIS_OS_NAME in + linux) + stage=$(mktemp -d) + ;; + osx) + stage=$(mktemp -d -t tmp) + ;; + esac + + test -f Cargo.lock || cargo generate-lockfile + + cross rustc --bin poa-ballot-stats --target $TARGET --release -- -C lto + + cp target/$TARGET/release/poa-ballot-stats $stage/ + cp -r contracts $stage/ + + cd $stage + tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz * + cd $src + + rm -rf $stage +} + +main diff --git a/ci/install.sh b/ci/install.sh new file mode 100644 index 0000000..748ad9a --- /dev/null +++ b/ci/install.sh @@ -0,0 +1,27 @@ +set -ex + +main() { + local target= + if [ $TRAVIS_OS_NAME = linux ]; then + target=x86_64-unknown-linux-musl + sort=sort + else + target=x86_64-apple-darwin + sort=gsort # for `sort --sort-version`, from brew's coreutils. + fi + + # This fetches latest stable release + local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \ + | cut -d/ -f3 \ + | grep -E '^v[0.1.0-9.]+$' \ + | $sort --version-sort \ + | tail -n1) + curl -LSfs https://japaric.github.io/trust/install.sh | \ + sh -s -- \ + --force \ + --git japaric/cross \ + --tag $tag \ + --target $target +} + +main diff --git a/ci/script.sh b/ci/script.sh new file mode 100644 index 0000000..d56a9cf --- /dev/null +++ b/ci/script.sh @@ -0,0 +1,22 @@ +set -ex + +main() { + cargo fmt -- --write-mode=diff + + cross build --target $TARGET + cross build --target $TARGET --release + + if [ ! -z $DISABLE_TESTS ]; then + return + fi + + cross test --target $TARGET + cross test --target $TARGET --release + + cross build --target $TARGET --release +} + +# we don't run the "test phase" when doing deploys +if [ -z $TRAVIS_TAG ]; then + main +fi diff --git a/contracts/core.json b/contracts/core.json new file mode 100644 index 0000000..77244d3 --- /dev/null +++ b/contracts/core.json @@ -0,0 +1,11 @@ +{ + "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 diff --git a/contracts/sokol.json b/contracts/sokol.json new file mode 100644 index 0000000..7617ead --- /dev/null +++ b/contracts/sokol.json @@ -0,0 +1,11 @@ +{ + "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 diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..21392be Binary files /dev/null and b/screenshot.png differ diff --git a/src/error.rs b/src/error.rs index 6dff5bf..714b432 100644 --- a/src/error.rs +++ b/src/error.rs @@ -12,5 +12,9 @@ error_chain! { UnexpectedLogParams { description("Unexpected parameter types in log"), } + NoEventsFound { + description("No events found. \ + Make sure your node is running in 'full' mode, not 'light'."), + } } } diff --git a/src/events.rs b/src/events.rs deleted file mode 100644 index aae6164..0000000 --- a/src/events.rs +++ /dev/null @@ -1,119 +0,0 @@ -use error::{ErrorKind, Result}; -use ethabi::{Address, FixedBytes, Log, RawTopicFilter, Token, Topic, Uint}; -use util::LogExt; - -/// An event that is logged when the current set of validators has changed. -#[derive(Debug)] -pub struct ChangeFinalized { - /// The new set of validators. - pub new_set: Vec
, -} - -impl ChangeFinalized { - /// Parses the log and returns a `ChangeFinalized`, if the log corresponded to such an event. - pub fn from_log(log: &Log) -> Result { - log.param(0, "newSet") - .cloned() - .and_then(Token::to_array) - .map(|tokens| ChangeFinalized { - new_set: tokens.into_iter().filter_map(Token::to_address).collect(), - }) - .ok_or_else(|| ErrorKind::UnexpectedLogParams.into()) - } -} - -#[derive(Debug)] -pub struct InitiateChange { - /// The previous voter set's hash. - parent_hash: FixedBytes, - /// The new set of validators. - pub new_set: Vec
, -} - -impl InitiateChange { - /// Parses the log and returns a `InitiateChange`, if the log corresponded to such an event. - pub fn from_log(log: &Log) -> Result { - match ( - log.param(0, "parentHash") - .cloned() - .and_then(Token::to_fixed_bytes), - log.param(1, "newSet").cloned().and_then(Token::to_array), - ) { - (Some(parent_hash), Some(tokens)) => Ok(InitiateChange { - parent_hash, - new_set: tokens.into_iter().filter_map(Token::to_address).collect(), - }), - _ => Err(ErrorKind::UnexpectedLogParams.into()), - } - } -} - -/// An event that is logged when a new ballot is started. -#[derive(Debug)] -pub struct BallotCreated { - /// The ballot ID. - pub id: Uint, - /// The ballot type. - ballot_type: Uint, - /// The creator's voting key. - creator: Address, -} - -impl BallotCreated { - /// Parses the log and returns a `BallotCreated`, if the log corresponded to such an event. - pub fn from_log(log: &Log) -> Result { - match ( - log.uint_param(0, "id"), - log.uint_param(1, "ballotType"), - log.address_param(2, "creator"), - ) { - (Some(&id), Some(&ballot_type), Some(&creator)) => Ok(BallotCreated { - id, - ballot_type, - creator, - }), - _ => Err(ErrorKind::UnexpectedLogParams.into()), - } - } - - /// Returns a topic filter to find the votes corresponding to this ballot. - pub fn vote_topic_filter(&self) -> RawTopicFilter { - RawTopicFilter { - topic0: Topic::This(Token::Uint(self.id)), - ..RawTopicFilter::default() - } - } -} - -/// An event that is logged whenever someone casts a vote in a ballot. -#[derive(Debug)] -pub struct Vote { - /// The ballot ID. - id: Uint, - /// The decision this vote is for. - decision: Uint, - /// The voter's voting key. - pub voter: Address, - /// The timestamp of this vote. - time: Uint, -} - -impl Vote { - /// Parses the log and returns a `Vote`, if the log corresponded to such an event. - pub fn from_log(log: &Log) -> Result { - match ( - log.uint_param(0, "id"), - log.uint_param(1, "decision"), - log.address_param(2, "voter"), - log.uint_param(3, "time"), - ) { - (Some(&id), Some(&decision), Some(&voter), Some(&time)) => Ok(Vote { - id, - decision, - voter, - time, - }), - _ => Err(ErrorKind::UnexpectedLogParams.into()), - } - } -} diff --git a/src/main.rs b/src/main.rs index 35546e8..affaca0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,33 +3,50 @@ extern crate colored; #[macro_use] extern crate error_chain; extern crate ethabi; +#[macro_use(EthabiContract)] +extern crate ethabi_derive; +#[macro_use(use_contract)] +extern crate ethabi_contract; extern crate serde; -#[macro_use] +#[macro_use(Deserialize)] extern crate serde_derive; extern crate serde_json; extern crate web3; mod cli; mod error; -mod events; mod stats; mod util; mod validator; use error::{Error, ErrorKind}; -use events::{BallotCreated, ChangeFinalized, InitiateChange, Vote}; +use ethabi::Address; use stats::Stats; use std::default::Default; use std::fs::File; -use util::{ContractExt, TopicFilterExt, Web3LogExt}; +use std::time::{SystemTime, UNIX_EPOCH}; +use util::{HexBytes, HexList, TopicFilterExt, Web3LogExt}; use web3::futures::Future; -// TODO: `ethabi_derive` produces unparseable tokens. -// mod voting_to_change_keys { -// #[derive(EthabiContract)] -// #[ethabi_contract_options(name = "VotingToChangeKeys", path = "abi/VotingToChangeKeys.json")] -// struct _Dummy; -// } +/// The maximum age in seconds of the latest block. +const MAX_BLOCK_AGE: u64 = 60 * 60; + +use_contract!( + net_con, + "NetworkConsensus", + "abi/PoaNetworkConsensus.abi.json" +); +use_contract!( + voting, + "VotingToChangeKeys", + "abi/VotingToChangeKeys.abi.json" +); +use_contract!( + val_meta, + "ValidatorMetadata", + "abi/ValidatorMetadata.abi.json" +); +use_contract!(key_mgr, "KeysManager", "abi/KeysManager.abi.json"); #[derive(Deserialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] @@ -38,12 +55,15 @@ struct ContractAddresses { keys_manager_address: String, } -impl Default for ContractAddresses { - fn default() -> ContractAddresses { - ContractAddresses { - metadata_address: "0x4c0eb450d8dfa6e89eb14ac154867bc86b3c559c".to_string(), - keys_manager_address: "0x2b1dbc7390a65dc40f7d64d67ea11b4d627dd1bf".to_string(), - } +/// Shows a warning if the node's latest block is outdated. +fn check_synced(web3: &web3::Web3) { + let id = web3::types::BlockId::Number(web3::types::BlockNumber::Latest); + let block = web3.eth().block(id).wait().expect("get latest block"); + let now = SystemTime::now() + .duration_since(UNIX_EPOCH) + .expect("Current timestamp is earlier than the Unix epoch!"); + if block.timestamp < (now.as_secs() - MAX_BLOCK_AGE).into() { + eprintln!("WARNING: The node is not fully synchronized. Stats may be inaccurate."); } } @@ -53,105 +73,112 @@ fn count_votes( verbose: bool, contract_addrs: &ContractAddresses, ) -> Result { + // Calls `println!` if `verbose` is `true`. + macro_rules! vprintln { ($($arg:tt)*) => { if verbose { println!($($arg)*); } } } + let (_eloop, transport) = web3::transports::Http::new(url).unwrap(); let web3 = web3::Web3::new(transport); - let voting_abi = File::open("abi/VotingToChangeKeys.abi.json").expect("read voting abi"); - let net_con_abi = File::open("abi/PoaNetworkConsensus.abi.json").expect("read consensus abi"); - let val_meta_abi = File::open("abi/ValidatorMetadata.abi.json").expect("read val meta abi"); - let key_mgr_abi = File::open("abi/KeysManager.abi.json").expect("read key mgr abi"); + check_synced(&web3); - let voting_contract = ethabi::Contract::load(voting_abi)?; - let net_con_contract = ethabi::Contract::load(net_con_abi)?; - let val_meta_contract = ethabi::Contract::load(val_meta_abi)?; - let key_mgr_contract = ethabi::Contract::load(key_mgr_abi)?; + let voting_contract = voting::VotingToChangeKeys::default(); + let net_con_contract = net_con::NetworkConsensus::default(); + let val_meta_contract = val_meta::ValidatorMetadata::default(); + let key_mgr_contract = key_mgr::KeysManager::default(); - let val_meta_addr = util::parse_address(&contract_addrs.metadata_address).unwrap(); - let web3_val_meta = web3::contract::Contract::new(web3.eth(), val_meta_addr, val_meta_contract); - let key_mgr_addr = util::parse_address(&contract_addrs.keys_manager_address).unwrap(); - let web3_key_mgr = web3::contract::Contract::new(web3.eth(), key_mgr_addr, key_mgr_contract); + let val_meta_addr = + util::parse_address(&contract_addrs.metadata_address).expect("parse contract address"); + let key_mgr_addr = + util::parse_address(&contract_addrs.keys_manager_address).expect("parse contract address"); - let ballot_event = voting_contract.event("BallotCreated")?; - let vote_event = voting_contract.event("Vote")?; - let change_event = net_con_contract.event("ChangeFinalized")?; - let init_change_event = net_con_contract.event("InitiateChange")?; + let ballot_event = voting_contract.events().ballot_created(); + let vote_event = voting_contract.events().vote(); + let change_event = net_con_contract.events().change_finalized(); + let init_change_event = net_con_contract.events().initiate_change(); // Find all ballots and voter changes. - let ballot_or_change_filter = ethabi::TopicFilter { - topic0: ethabi::Topic::OneOf(vec![ - ballot_event.signature(), - change_event.signature(), - init_change_event.signature(), - ]), - ..ethabi::TopicFilter::default() - }.to_filter_builder() - .build(); - let ballot_change_logs_filter = web3.eth_filter() - .create_logs_filter(ballot_or_change_filter) - .wait()?; + let ballot_or_change_filter = (ballot_event.create_filter(None, None, None)) + .or(change_event.create_filter()) + .or(init_change_event.create_filter(None)); // FIXME: Find out why we see no `ChangeFinalized` events, and how to obtain the initial voters. - let mut voters: Vec = Vec::new(); + let mut voters: Vec
= Vec::new(); let mut stats = Stats::default(); - let mut prev_init_change: Option = None; + let mut prev_init_change: Option = None; + + vprintln!("Collecting events…"); + let mut event_found = false; // Iterate over all ballot and voter change events. - for log in ballot_change_logs_filter.logs().wait()? { - if let Ok(change_log) = change_event.parse_log(log.clone().into_raw()) { + for log in ballot_or_change_filter.logs(&web3)? { + event_found = true; + if let Ok(change) = change_event.parse_log(log.clone().into_raw()) { // If it is a `ChangeFinalized`, update the current set of voters. - let change = ChangeFinalized::from_log(&change_log)?; - if verbose { - println!("{:?}", change); - } + vprintln!( + "• ChangeFinalized {{ new_set: {} }}", + HexList(&change.new_set) + ); voters = change.new_set; - } else if let Ok(init_change_log) = init_change_event.parse_log(log.clone().into_raw()) { + } else if let Ok(init_change) = init_change_event.parse_log(log.clone().into_raw()) { // If it is an `InitiateChange`, update the current set of voters. - let init_change = InitiateChange::from_log(&init_change_log)?; - if verbose { - println!("{:?}", init_change); - } + vprintln!( + "• InitiateChange {{ parent_hash: {}, new_set: {} }}", + HexBytes(&init_change.parent_hash), + HexList(&init_change.new_set) + ); if let Some(prev) = prev_init_change.take() { + let raw_call = util::raw_call(key_mgr_addr, web3.eth()); + let get_voting_by_mining_fn = key_mgr_contract.functions().get_voting_by_mining(); voters = vec![]; for mining_key in prev.new_set { - let voter = web3_key_mgr.simple_query("getVotingByMining", mining_key)?; - if voter != ethabi::Address::zero() { + let voter = get_voting_by_mining_fn.call(mining_key, &*raw_call)?; + if voter != Address::zero() { voters.push(voter); } } } prev_init_change = Some(init_change); - } else if let Ok(ballot_log) = ballot_event.parse_log(log.into_raw()) { + } else if let Ok(ballot) = ballot_event.parse_log(log.into_raw()) { // If it is a `BallotCreated`, find the corresponding votes and update the stats. - let ballot = BallotCreated::from_log(&ballot_log)?; - if verbose { - println!("{:?}", ballot); - } - let vote_filter = vote_event - .create_filter(ballot.vote_topic_filter())? - .to_filter_builder() - .build(); - let vote_logs_filter = web3.eth_filter().create_logs_filter(vote_filter).wait()?; - let mut votes: Vec = Vec::new(); - for vote_log in vote_logs_filter.logs().wait()? { - let vote = Vote::from_log(&vote_event.parse_log(vote_log.into_raw())?)?; - if !voters.contains(&vote.voter) { - if verbose { - eprintln!("Unexpected voter {} for ballot {}", vote.voter, ballot.id); + vprintln!("• {:?}", ballot); + let votes = vote_event + .create_filter(ballot.id, None) + .logs(&web3)? + .into_iter() + .map(|vote_log| { + let vote = vote_event.parse_log(vote_log.into_raw())?; + if !voters.contains(&vote.voter) { + vprintln!(" Unexpected voter {}", vote.voter); + voters.push(vote.voter); } - voters.push(vote.voter); - } - votes.push(vote); - } + Ok(vote) + }) + .collect::, Error>>()?; stats.add_ballot(&voters, &votes); } else { return Err(ErrorKind::UnexpectedLogParams.into()); } } + if !event_found { + return Err(ErrorKind::NoEventsFound.into()); + } + + vprintln!(""); // Add a new line between event log and table. + // Finally, gather the metadata for all voters. + let raw_call = util::raw_call(val_meta_addr, web3.eth()); + let get_mining_by_voting_key_fn = val_meta_contract.functions().get_mining_by_voting_key(); + let validators_fn = val_meta_contract.functions().validators(); for voter in voters { - let mining_key = web3_val_meta.simple_query("getMiningByVotingKey", voter)?; - let validator = web3_val_meta.simple_query("validators", mining_key)?; + let mining_key = match get_mining_by_voting_key_fn.call(voter, &*raw_call) { + Err(err) => { + eprintln!("Failed to find mining key for voter {}: {:?}", voter, err); + continue; + } + Ok(key) => key, + }; + let validator = validators_fn.call(mining_key, &*raw_call)?.into(); stats.set_metadata(&voter, mining_key, validator); } Ok(stats) @@ -161,13 +188,11 @@ fn main() { let matches = cli::get_matches(); let url = matches.value_of("url").unwrap_or("http://127.0.0.1:8545"); let verbose = matches.is_present("verbose"); - let contract_addrs = matches + let contract_file = matches .value_of("contracts") - .map(|filename| { - let file = File::open(filename).expect("open contracts file"); - serde_json::from_reader(file).expect("parse contracts file") - }) - .unwrap_or_default(); + .unwrap_or("contracts/core.json"); + let file = File::open(contract_file).expect("open contracts file"); + let contract_addrs = serde_json::from_reader(file).expect("parse contracts file"); let stats = count_votes(url, verbose, &contract_addrs).expect("count votes"); println!("{}", stats); } diff --git a/src/stats.rs b/src/stats.rs index 01d7904..882098e 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -1,9 +1,9 @@ use colored::{Color, Colorize}; use ethabi::Address; -use events::Vote; use std::collections::HashMap; use std::fmt::{self, Display, Formatter}; use validator::Validator; +use voting; /// The count of ballots and cast votes, as well as metadata for a particular voter. #[derive(Clone, Default)] @@ -27,7 +27,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(&mut self, voters: &[Address], votes: &[Vote]) { + pub fn add_ballot(&mut self, voters: &[Address], votes: &[voting::logs::Vote]) { for voter in voters { let mut vs = self.voter_stats .entry(voter.clone()) diff --git a/src/util.rs b/src/util.rs index 4f6cc26..d49cb81 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,75 +1,124 @@ -use ethabi; -use std::u8; +use ethabi::{self, Address, Bytes}; +use std::str::FromStr; +use std::{fmt, u8}; use web3; use web3::futures::Future; // TODO: Evaluate whether any of these would make sense to include in `web3`. -/// Converts the bytes to a string, interpreting them as null-terminated UTF-8. -pub fn bytes_to_string(bytes: &[u8]) -> String { - let zero = bytes - .iter() - .position(|b| *b == 0) - .unwrap_or_else(|| bytes.len()); - String::from_utf8_lossy(&bytes[..zero]).to_string() -} - /// Parses the string as a 40-digit hexadecimal number, and returns the corresponding `Address`. -pub fn parse_address(mut s: &str) -> Option { - let mut bytes = [0u8; 20]; +pub fn parse_address(mut s: &str) -> Option
{ if &s[..2] == "0x" { s = &s[2..]; } - for i in 0..20 { - match u8::from_str_radix(&s[(2 * i)..(2 * i + 2)], 16) { - Ok(b) => bytes[i] = b, - Err(_) => return None, + Address::from_str(s).ok() +} + +/// Returns a wrapper of a contract address, to make function calls using the latest block. +pub fn raw_call( + to: Address, + eth: web3::api::Eth, +) -> Box Result> { + Box::new(move |bytes: Bytes| -> Result { + let req = web3::types::CallRequest { + from: None, + to, + gas: None, + gas_price: None, + value: None, + data: Some(bytes.into()), + }; + eth.call(req, Some(web3::types::BlockNumber::Latest)) + .wait() + .map(|bytes| bytes.0) + .map_err(|err| err.to_string()) + }) +} + +trait TopicExt { + /// Returns the union of the two topics. + fn or(self, other: Self) -> Self; + + /// Converts this topic into an `Option>`, where `Any` corresponds to `None`, + /// `This` to a vector with one element, and `OneOf` to any vector. + fn to_opt_vec(self) -> Option>; +} + +impl TopicExt for ethabi::Topic { + fn or(self, other: Self) -> Self { + match (self.to_opt_vec(), other.to_opt_vec()) { + (Some(mut v0), Some(v1)) => { + for e in v1 { + if !v0.contains(&e) { + v0.push(e); + } + } + if v0.len() == 1 { + ethabi::Topic::This(v0.into_iter().next().expect("has a single element; qed")) + } else { + ethabi::Topic::OneOf(v0) + } + } + (_, _) => ethabi::Topic::Any, } } - Some(ethabi::Address::from_slice(&bytes)) -} -pub trait ContractExt { - fn simple_query(&self, func: &str, params: P) -> Result - where - R: web3::contract::tokens::Detokenize, - P: web3::contract::tokens::Tokenize; -} - -impl ContractExt for web3::contract::Contract { - /// Calls a constant function with the latest block and default parameters. - fn simple_query(&self, func: &str, params: P) -> Result - where - R: web3::contract::tokens::Detokenize, - P: web3::contract::tokens::Tokenize, - { - self.query( - func, - params, - None, - web3::contract::Options::default(), - web3::types::BlockNumber::Latest, - ).wait() + fn to_opt_vec(self) -> Option> { + match self { + ethabi::Topic::Any => None, + ethabi::Topic::OneOf(v) => Some(v), + ethabi::Topic::This(t) => Some(vec![t]), + } } } pub trait TopicFilterExt { /// Returns a `web3::types::FilterBuilder` with these topics, starting from the first block. fn to_filter_builder(self) -> web3::types::FilterBuilder; + + /// Returns the "disjunction" of the two filters, i.e. it filters for everything that matches + /// at least one of the two in every topic. + fn or(self, other: ethabi::TopicFilter) -> ethabi::TopicFilter; + + /// Returns the vector of logs that match this filter. + fn logs( + self, + web3: &web3::Web3, + ) -> Result, web3::error::Error>; } impl TopicFilterExt for ethabi::TopicFilter { fn to_filter_builder(self) -> web3::types::FilterBuilder { web3::types::FilterBuilder::default() .topics( - to_topic(self.topic0), - to_topic(self.topic1), - to_topic(self.topic2), - to_topic(self.topic3), + self.topic0.to_opt_vec(), + self.topic1.to_opt_vec(), + self.topic2.to_opt_vec(), + self.topic3.to_opt_vec(), ) .from_block(web3::types::BlockNumber::Earliest) .to_block(web3::types::BlockNumber::Latest) } + + fn or(self, other: ethabi::TopicFilter) -> ethabi::TopicFilter { + ethabi::TopicFilter { + topic0: self.topic0.or(other.topic0), + topic1: self.topic1.or(other.topic1), + topic2: self.topic2.or(other.topic2), + topic3: self.topic3.or(other.topic3), + } + } + + fn logs( + self, + web3: &web3::Web3, + ) -> Result, web3::error::Error> { + web3.eth_filter() + .create_logs_filter(self.to_filter_builder().build()) + .wait()? + .logs() + .wait() + } } pub trait Web3LogExt { @@ -82,50 +131,51 @@ impl Web3LogExt for web3::types::Log { } } -/// Converts an `ethabi::Topic` into an `Option>`, where `Any` corresponds to `None`, -/// `This` to a vector with one element, and `OneOf` to any vector. -fn to_topic(topic: ethabi::Topic) -> Option> { - match topic { - ethabi::Topic::Any => None, - ethabi::Topic::OneOf(v) => Some(v), - ethabi::Topic::This(t) => Some(vec![t]), +/// Wrapper for a byte array, whose `Display` implementation outputs shortened hexadecimal strings. +pub struct HexBytes<'a>(pub &'a [u8]); + +impl<'a> fmt::Display for HexBytes<'a> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "0x")?; + for i in &self.0[..2] { + write!(f, "{:02x}", i)?; + } + write!(f, "…")?; + for i in &self.0[(self.0.len() - 2)..] { + write!(f, "{:02x}", i)?; + } + Ok(()) } } -pub trait LogExt { - /// Returns the `i`-th parameter, if it has the given name, otherwise `None`. - fn param(&self, i: usize, name: &str) -> Option<ðabi::Token>; +/// Wrapper for a list of byte arrays, whose `Display` implementation outputs shortened hexadecimal +/// strings. +pub struct HexList<'a, T: 'a>(pub &'a [T]); - /// Returns the `i`-th parameter, if it is an `Address` and has the given name, otherwise - /// `None`. - fn address_param(&self, i: usize, name: &str) -> Option<ðabi::Address>; - - /// Returns the `i`-th parameter, if it is a `Uint` and has the given name, otherwise `None`. - fn uint_param(&self, i: usize, name: &str) -> Option<ðabi::Uint>; -} - -impl LogExt for ethabi::Log { - fn param(&self, i: usize, name: &str) -> Option<ðabi::Token> { - self.params.get(i).and_then(|param| { - if param.name == name { - Some(¶m.value) - } else { - None +impl<'a, T: 'a> fmt::Display for HexList<'a, T> +where + T: AsRef<[u8]>, +{ + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "[")?; + for (i, item) in self.0.iter().enumerate() { + if i > 0 { + write!(f, ", ")?; } - }) - } - - fn address_param(&self, i: usize, name: &str) -> Option<ðabi::Address> { - match self.param(i, name) { - Some(ðabi::Token::Address(ref address)) => Some(address), - _ => None, - } - } - - fn uint_param(&self, i: usize, name: &str) -> Option<ðabi::Uint> { - match self.param(i, name) { - Some(ðabi::Token::Uint(ref i)) => Some(i), - _ => None, + write!(f, "{}", HexBytes(item.as_ref()))?; } + write!(f, "]") + } +} + +#[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)); } } diff --git a/src/validator.rs b/src/validator.rs index b4ebe1e..c589da4 100644 --- a/src/validator.rs +++ b/src/validator.rs @@ -1,6 +1,4 @@ -use ethabi::Token; -use util; -use web3::contract::{tokens, Error, ErrorKind}; +use ethabi; /// Validator metadata. #[derive(Clone, Debug)] @@ -17,17 +15,28 @@ pub struct Validator { // uint256 minThreshold, } -impl tokens::Detokenize for Validator { - /// Returns a `Validator` if the token's types match the fields. - fn from_tokens(tokens: Vec) -> Result { - match (tokens.get(0), tokens.get(1)) { - (Some(&Token::FixedBytes(ref first)), Some(&Token::FixedBytes(ref last))) => { - Ok(Validator { - first_name: util::bytes_to_string(first), - last_name: util::bytes_to_string(last), - }) - } - _ => Err(ErrorKind::InvalidOutputType("Validator".to_string()).into()), +type ValidatorTuple = ( + ethabi::Hash, + ethabi::Hash, + ethabi::Hash, + String, + ethabi::Hash, + ethabi::Hash, + ethabi::Uint, + ethabi::Uint, + ethabi::Uint, + ethabi::Uint, +); + +impl From for Validator { + fn from((first_name_h, last_name_h, ..): ValidatorTuple) -> Validator { + Validator { + first_name: String::from_utf8_lossy(&*first_name_h) + .to_owned() + .to_string(), + last_name: String::from_utf8_lossy(&*last_name_h) + .to_owned() + .to_string(), } } }