diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca07def655f..a52e70c4335 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,14 @@ stages: - test - build - - package - publish - - docs + - optional image: parity/rust:gitlab-ci variables: CI_SERVER_NAME: "GitLab CI" - CARGO_HOME: "${CI_PROJECT_DIR}/cargo" - + CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" BUILD_TARGET: ubuntu BUILD_ARCH: amd64 CARGO_TARGET: x86_64-unknown-linux-gnu @@ -18,20 +16,15 @@ variables: cache: key: "${CI_JOB_NAME}" paths: - - ${CI_PROJECT_DIR}/target/ - - ${CI_PROJECT_DIR}/cargo/ + - ./target + - ./.cargo .releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries") only: &releaseable_branches - - master - stable - beta - tags - -.publishable_branches: # list of git refs for publishing builds to the "production" locations - only: &publishable_branches - - nightly # Our nightly builds from schedule, on `master` - - "v2*" # Our version tags + - schedules .collect_artifacts: &collect_artifacts artifacts: @@ -41,68 +34,24 @@ cache: paths: - artifacts/ -.determine_version: - before_script: &determine_version - - > - VERSION="$(sed -r -n '1,/^version/s/^version = "([^"]+)".*$/\1/p' < Cargo.toml)"; - if [ "${CI_COMMIT_REF_NAME}" = "nightly" ]; then - COMMIT_REF_SHORT="echo ${CI_COMMIT_REF} | grep -oE '^.{7}')"; - DATE_STRING="$(date +%Y%m%d)"; - export VERSION="${VERSION}-${COMMIT_REF_SHORT}-${DATE_STRING}"; - fi; - export VERSION; - echo "Version: $VERSION" - - -#### stage: test +.determine_version: &determine_version + - VERSION="$(sed -r -n '1,/^version/s/^version = "([^"]+)".*$/\1/p' Cargo.toml)" + - DATE_STR="$(date +%Y%m%d)" + - ID_SHORT="$(echo ${CI_COMMIT_SHA} | cut -c 1-7)" + - test "${CI_COMMIT_REF_NAME}" = "nightly" && VERSION="${VERSION}-${ID_SHORT}-${DATE_STR}" + - export VERSION + - echo "Version = ${VERSION}" -test-rust-stable: &test +test-linux: stage: test + variables: + RUN_TESTS: all script: - - scripts/gitlab/test.sh stable + - scripts/gitlab/test-all.sh stable tags: - rust-stable -.optional_test: &optional_test - <<: *test - allow_failure: true - only: - - master - -test-rust-beta: - <<: *optional_test - script: - - scripts/gitlab/test.sh beta - -test-rust-nightly: - <<: *optional_test - script: - - scripts/gitlab/test.sh nightly - -test-lint-rustfmt: - <<: *optional_test - script: - - scripts/gitlab/rustfmt.sh - -test-lint-clippy: - <<: *optional_test - script: - - scripts/gitlab/clippy.sh - -test-coverage-kcov: - stage: test - only: - - master - script: - - scripts/gitlab/coverage.sh - tags: - - shell - allow_failure: true - - -#### stage: build - -build-linux-ubuntu-amd64: &build +build-linux: stage: build only: *releaseable_branches variables: @@ -112,59 +61,23 @@ build-linux-ubuntu-amd64: &build <<: *collect_artifacts tags: - rust-stable - allow_failure: true - -build-linux-ubuntu-i386: - <<: *build - image: parity/rust-i686:gitlab-ci - variables: - CARGO_TARGET: i686-unknown-linux-gnu - tags: - - rust-i686 - -build-linux-ubuntu-arm64: - <<: *build - image: parity/rust-arm64:gitlab-ci - variables: - CARGO_TARGET: aarch64-unknown-linux-gnu - tags: - - rust-arm - -build-linux-ubuntu-armhf: - <<: *build - image: parity/rust-armv7:gitlab-ci - variables: - CARGO_TARGET: armv7-unknown-linux-gnueabihf - tags: - - rust-arm - -build-linux-android-armhf: - <<: *build - image: parity/rust-android:gitlab-ci - variables: - CARGO_TARGET: armv7-linux-androideabi - tags: - - rust-arm -build-darwin-macos-x86_64: - <<: *build +build-darwin: + stage: build + only: *releaseable_branches variables: CARGO_TARGET: x86_64-apple-darwin CC: gcc CXX: g++ + script: + - scripts/gitlab/build-unix.sh tags: - - osx + - rust-osx <<: *collect_artifacts -build-windows-msvc-x86_64: +build-windows: stage: build only: *releaseable_branches - cache: - key: "%CI_JOB_NAME%" - paths: - - "%CI_PROJECT_DIR%/target/" - - "%CI_PROJECT_DIR%/cargo/" - # No cargo caching, since fetch-locking on Windows gets stuck variables: CARGO_TARGET: x86_64-pc-windows-msvc script: @@ -173,131 +86,74 @@ build-windows-msvc-x86_64: - rust-windows <<: *collect_artifacts - -#### stage: package - -package-linux-snap-amd64: &package_snap - stage: package +publish-docker: + stage: publish only: *releaseable_branches cache: {} - before_script: *determine_version - variables: - CARGO_TARGET: x86_64-unknown-linux-gnu dependencies: - - build-linux-ubuntu-amd64 - script: - - scripts/gitlab/package-snap.sh + - build-linux tags: - - rust-stable - <<: *collect_artifacts - -package-linux-snap-i386: - <<: *package_snap - variables: - BUILD_ARCH: i386 - CARGO_TARGET: i686-unknown-linux-gnu - dependencies: - - build-linux-ubuntu-i386 - -package-linux-snap-arm64: - <<: *package_snap - variables: - BUILD_ARCH: arm64 - CARGO_TARGET: aarch64-unknown-linux-gnu - dependencies: - - build-linux-ubuntu-arm64 - -package-linux-snap-armhf: - <<: *package_snap - variables: - BUILD_ARCH: armhf - CARGO_TARGET: armv7-unknown-linux-gnueabihf - dependencies: - - build-linux-ubuntu-armhf - - -#### stage: publish + - shell + script: + - scripts/gitlab/publish-docker.sh parity -publish-linux-snap-amd64: &publish_snap +publish-awss3: stage: publish - only: *publishable_branches - image: snapcore/snapcraft:stable + only: *releaseable_branches cache: {} - before_script: *determine_version - variables: - BUILD_ARCH: amd64 dependencies: - - package-linux-snap-amd64 + - build-linux + - build-darwin + - build-windows + before_script: *determine_version script: - - scripts/gitlab/publish-snap.sh + - scripts/gitlab/publish-awss3.sh tags: - - rust-stable - -publish-linux-snap-i386: - <<: *publish_snap - variables: - BUILD_ARCH: i386 - dependencies: - - package-linux-snap-i386 - -publish-linux-snap-arm64: - <<: *publish_snap - variables: - BUILD_ARCH: arm64 - dependencies: - - package-linux-snap-arm64 - -publish-linux-snap-armhf: - <<: *publish_snap - variables: - BUILD_ARCH: armhf - dependencies: - - package-linux-snap-armhf + - shell -publish-docker-parity-amd64: &publish_docker - stage: publish - only: *publishable_branches +docs-jsonrpc: + stage: optional + only: + - tags + except: + - nightly cache: {} - dependencies: - - build-linux-ubuntu-amd64 + script: + - scripts/gitlab/docs-jsonrpc.sh tags: - shell - allow_failure: true - script: - - scripts/gitlab/publish-docker.sh parity -publish-docker-parityevm-amd64: - <<: *publish_docker +cargo-audit: + stage: optional script: - - scripts/gitlab/publish-docker.sh parity-evm + - scripts/gitlab/cargo-audit.sh + tags: + - rust-stable -publish-github-and-s3: - stage: publish - only: *publishable_branches - cache: {} - dependencies: - - build-linux-ubuntu-amd64 - - build-linux-ubuntu-i386 - - build-linux-ubuntu-armhf - - build-linux-ubuntu-arm64 - - build-darwin-macos-x86_64 - - build-windows-msvc-x86_64 - before_script: *determine_version +build-android: + stage: optional + image: parity/rust-android:gitlab-ci + variables: + CARGO_TARGET: armv7-linux-androideabi script: - - scripts/gitlab/push.sh + - scripts/gitlab/build-unix.sh tags: - - shell - allow_failure: true - + - rust-arm -####stage: docs +test-beta: + stage: optional + variables: + RUN_TESTS: cargo + script: + - scripts/gitlab/test-all.sh beta + tags: + - rust-beta -docs-rpc-json: - stage: docs - only: - - tags - cache: {} +test-nightly: + stage: optional + variables: + RUN_TESTS: all script: - - scripts/gitlab/rpc-docs.sh + - scripts/gitlab/test-all.sh nightly tags: - - shell + - rust-nightly diff --git a/Cargo.lock b/Cargo.lock index 70da9d14a88..0394db446aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,7 +75,7 @@ name = "backtrace-sys" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -109,7 +109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -146,7 +146,7 @@ version = "0.1.0" dependencies = [ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -168,7 +168,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -177,7 +177,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.22" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -196,7 +196,7 @@ version = "0.1.0" dependencies = [ "ethjson 0.1.0", "serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -246,16 +246,19 @@ name = "cmake" version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "combine" -version = "2.5.2" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -393,8 +396,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -423,9 +426,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -450,7 +453,7 @@ version = "0.5.7" source = "git+https://github.com/paritytech/rust-secp256k1#db81cfea59014b4d176f10f86ed52e1a130b6822" dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -462,9 +465,9 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -492,9 +495,9 @@ dependencies = [ "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "primal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -507,7 +510,7 @@ dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "fixed-hash 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -547,9 +550,9 @@ dependencies = [ "keccak-hasher 0.1.1", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-rocksdb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "macros 0.1.0", "memory-cache 0.1.0", @@ -560,8 +563,8 @@ dependencies = [ "parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-machine 0.1.0", "parity-snappy 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "patricia-trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "patricia-trie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "patricia-trie-ethereum 0.1.0", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -596,12 +599,12 @@ version = "1.12.0" name = "ethcore-io" version = "1.12.0" dependencies = [ - "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "timer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -619,7 +622,7 @@ dependencies = [ "ethcore-transaction 0.1.0", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fastmap 0.1.0", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -627,18 +630,18 @@ dependencies = [ "keccak-hasher 0.1.1", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "memory-cache 0.1.0", "memorydb 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "patricia-trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "patricia-trie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "patricia-trie-ethereum 0.1.0", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "rlp_derive 0.1.0", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "stats 0.1.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -655,8 +658,8 @@ dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -673,15 +676,15 @@ dependencies = [ "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "fetch 0.1.0", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-reactor 0.1.0", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "price-info 1.12.0", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -712,7 +715,7 @@ version = "1.12.0" dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-io 1.12.0", "ethcore-logger 1.12.0", @@ -723,20 +726,20 @@ dependencies = [ "ipnetwork 0.12.8 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-snappy 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (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.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -759,22 +762,22 @@ dependencies = [ "ethjson 0.1.0", "ethkey 0.3.0", "fetch 0.1.0", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "patricia-trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "patricia-trie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "patricia-trie-ethereum 0.1.0", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "rlp_derive 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "transaction-pool 1.13.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -794,21 +797,21 @@ dependencies = [ "ethcore-transaction 0.1.0", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-rocksdb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (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.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -831,8 +834,8 @@ dependencies = [ "ethcore-sync 1.12.0", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-rocksdb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "stop-guard 0.1.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "trace-time 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -849,8 +852,8 @@ dependencies = [ "jsonrpc-macros 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-tcp-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -878,10 +881,10 @@ dependencies = [ "keccak-hasher 0.1.1", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "macros 0.1.0", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -915,7 +918,7 @@ dependencies = [ "ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "fixed-hash 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", "uint 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -924,7 +927,7 @@ name = "ethereum-types-serialize" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -933,9 +936,9 @@ version = "0.1.0" dependencies = [ "ethereum-types 0.4.0 (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.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -947,15 +950,15 @@ dependencies = [ "eth-secp256k1 0.5.7 (git+https://github.com/paritytech/rust-secp256k1)", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mem 0.1.0", "parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wordlist 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (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.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -969,8 +972,8 @@ dependencies = [ "panic_hook 0.1.0", "parity-wordlist 1.2.0 (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.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -983,16 +986,16 @@ dependencies = [ "ethkey 0.3.0", "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wordlist 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (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.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1008,10 +1011,10 @@ dependencies = [ "ethstore 0.2.0", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "panic_hook 0.1.0", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (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.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1024,10 +1027,10 @@ dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "memory-cache 0.1.0", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", ] @@ -1047,8 +1050,8 @@ dependencies = [ "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.1.2 (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.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", ] @@ -1058,7 +1061,7 @@ name = "fake-fetch" version = "0.0.1" dependencies = [ "fetch 0.1.0", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1090,11 +1093,11 @@ dependencies = [ name = "fetch" version = "0.1.0" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-rustls 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1123,7 +1126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "fs-swap" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1148,7 +1151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1156,7 +1159,7 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1198,8 +1201,8 @@ dependencies = [ "ethkey 0.3.0", "hidapi 0.3.1 (git+https://github.com/paritytech/hidapi-rs)", "libusb 0.3.0 (git+https://github.com/paritytech/libusb-rs)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 1.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1240,7 +1243,7 @@ name = "hidapi" version = "0.3.1" source = "git+https://github.com/paritytech/hidapi-rs#d4d323767d6f27cf5a3d73fbae0b0f2134d579bf" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1272,13 +1275,13 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "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.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1298,7 +1301,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ct-logs 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "rustls 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1324,7 +1327,7 @@ name = "igd" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1369,19 +1372,19 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jni" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "combine 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "combine 3.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1403,29 +1406,29 @@ dependencies = [ "keccak-hasher 0.1.1", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "memorydb 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-core" version = "8.0.1" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972b5fd34ada4a7de6aed1a8c92475a907732d" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#a1b2bb742ce16d1168669ffb13ffe856e8131228" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (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.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-http-server" version = "8.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972b5fd34ada4a7de6aed1a8c92475a907732d" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#a1b2bb742ce16d1168669ffb13ffe856e8131228" dependencies = [ "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", @@ -1438,70 +1441,71 @@ dependencies = [ [[package]] name = "jsonrpc-ipc-server" version = "8.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972b5fd34ada4a7de6aed1a8c92475a907732d" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#a1b2bb742ce16d1168669ffb13ffe856e8131228" dependencies = [ "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-server-utils 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-tokio-ipc 0.1.5 (git+https://github.com/nikvolf/parity-tokio-ipc)", + "parity-tokio-ipc 0.1.5 (git+https://github.com/nikvolf/parity-tokio-ipc?rev=c0f80b40399d7f08ef1e6869569640eb28645f56)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-macros" version = "8.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972b5fd34ada4a7de6aed1a8c92475a907732d" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#a1b2bb742ce16d1168669ffb13ffe856e8131228" dependencies = [ "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-pubsub 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-pubsub" version = "8.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972b5fd34ada4a7de6aed1a8c92475a907732d" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#a1b2bb742ce16d1168669ffb13ffe856e8131228" dependencies = [ "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-server-utils" version = "8.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972b5fd34ada4a7de6aed1a8c92475a907732d" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#a1b2bb742ce16d1168669ffb13ffe856e8131228" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-tcp-server" version = "8.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972b5fd34ada4a7de6aed1a8c92475a907732d" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#a1b2bb742ce16d1168669ffb13ffe856e8131228" dependencies = [ "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-server-utils 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-ws-server" version = "8.0.0" -source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972b5fd34ada4a7de6aed1a8c92475a907732d" +source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#a1b2bb742ce16d1168669ffb13ffe856e8131228" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-server-utils 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ws 0.7.5 (git+https://github.com/tomusdrw/ws-rs)", ] @@ -1549,22 +1553,22 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "kvdb-rocksdb" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fs-swap 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-rocksdb 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1588,7 +1592,7 @@ dependencies = [ [[package]] name = "lazycell" -version = "0.6.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1601,7 +1605,7 @@ name = "libloading" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1620,7 +1624,7 @@ name = "libusb-sys" version = "0.2.4" source = "git+https://github.com/paritytech/libusb-sys#14bdb698003731b6344a79e1d814704e44363e7c" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1658,12 +1662,12 @@ name = "log" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1742,8 +1746,8 @@ name = "migration-rocksdb" version = "0.1.0" dependencies = [ "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-rocksdb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "macros 0.1.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1769,16 +1773,16 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.15" +version = "0.6.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1788,22 +1792,22 @@ dependencies = [ [[package]] name = "mio-named-pipes" version = "0.1.6" -source = "git+https://github.com/alexcrichton/mio-named-pipes#57a6298769fce2c66531d4085bdaf8c48ce64bce" +source = "git+https://github.com/alexcrichton/mio-named-pipes#2072ae0de5b3632dbb065fcd9c8be6c6a2fc39ae" dependencies = [ - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio-uds" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1822,7 +1826,7 @@ name = "miow" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "socket2 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1871,9 +1875,9 @@ dependencies = [ "ethcore-network-devp2p 1.12.0", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1900,7 +1904,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1966,11 +1970,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ordered-float" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2002,9 +2006,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "parity-clib" version = "1.12.0" dependencies = [ - "jni 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jni 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "panic_hook 0.1.0", - "parity-ethereum 2.1.0", + "parity-ethereum 2.1.6", ] [[package]] @@ -2020,7 +2024,7 @@ dependencies = [ [[package]] name = "parity-ethereum" -version = "2.1.0" +version = "2.1.6" dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2046,15 +2050,15 @@ dependencies = [ "ethkey 0.3.0", "fake-fetch 0.0.1", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "ipnetwork 0.12.8 (registry+https://github.com/rust-lang/crates.io-index)", "journaldb 0.2.0", "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-rocksdb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mem 0.1.0", "migration-rocksdb 0.1.0", "node-filter 1.12.0", @@ -2070,9 +2074,9 @@ dependencies = [ "parity-rpc 1.12.0", "parity-rpc-client 1.4.0", "parity-updater 1.12.0", - "parity-version 2.1.0", + "parity-version 2.1.6", "parity-whisper 0.1.0", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "registrar 0.0.1", @@ -2082,9 +2086,9 @@ dependencies = [ "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2102,16 +2106,16 @@ dependencies = [ "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fake-fetch 0.0.1", "fetch 0.1.0", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-reactor 0.1.0", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "registrar 0.0.1", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2142,11 +2146,11 @@ dependencies = [ "ethkey 0.3.0", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2165,7 +2169,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "parity-reactor" version = "0.1.0" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2176,12 +2180,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "local-encoding 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-rocksdb-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-rocksdb-sys 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parity-rocksdb-sys" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2215,7 +2219,7 @@ dependencies = [ "fake-hardware-wallet 0.0.1", "fastmap 0.1.0", "fetch 0.1.0", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "hardware-wallet 1.12.0", "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2227,7 +2231,7 @@ dependencies = [ "jsonrpc-ws-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "macros 0.1.0", "multihash 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "order-stat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2235,17 +2239,17 @@ dependencies = [ "parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-reactor 0.1.0", "parity-updater 1.12.0", - "parity-version 2.1.0", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "patricia-trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-version 2.1.6", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "patricia-trie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "stats 0.1.0", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2259,16 +2263,16 @@ dependencies = [ name = "parity-rpc-client" version = "1.4.0" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-ws-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-rpc 1.12.0", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2293,11 +2297,11 @@ dependencies = [ [[package]] name = "parity-tokio-ipc" version = "0.1.5" -source = "git+https://github.com/nikvolf/parity-tokio-ipc#c0f80b40399d7f08ef1e6869569640eb28645f56" +source = "git+https://github.com/nikvolf/parity-tokio-ipc?rev=c0f80b40399d7f08ef1e6869569640eb28645f56#c0f80b40399d7f08ef1e6869569640eb28645f56" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mio-named-pipes 0.1.6 (git+https://github.com/alexcrichton/mio-named-pipes)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2320,13 +2324,13 @@ dependencies = [ "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-hash-fetch 1.12.0", "parity-path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-version 2.1.0", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-version 2.1.6", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2335,7 +2339,7 @@ dependencies = [ [[package]] name = "parity-version" -version = "2.1.0" +version = "2.1.6" dependencies = [ "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2366,16 +2370,16 @@ dependencies = [ "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-macros 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-pubsub 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mem 0.1.0", - "ordered-float 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ordered-float 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2393,22 +2397,23 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot_core" -version = "0.2.14" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2416,7 +2421,7 @@ dependencies = [ [[package]] name = "patricia-trie" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2437,7 +2442,7 @@ dependencies = [ "keccak-hasher 0.1.1", "memorydb 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "patricia-trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "patricia-trie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2512,12 +2517,12 @@ version = "1.12.0" dependencies = [ "fake-fetch 0.0.1", "fetch 0.1.0", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2580,7 +2585,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.13" +version = "0.4.19" 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)", @@ -2608,9 +2613,9 @@ dependencies = [ "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", "wasm 0.1.0", ] @@ -2621,7 +2626,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2651,7 +2656,7 @@ name = "quote" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2739,7 +2744,7 @@ dependencies = [ [[package]] name = "regex" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2772,7 +2777,7 @@ dependencies = [ "ethabi 5.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-contract 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 5.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2781,7 +2786,7 @@ name = "relay" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2797,7 +2802,7 @@ name = "ring" version = "0.12.1" source = "git+https://github.com/paritytech/ring#bae475e9f7ea7dd4ae671bef4b576089a9b06731" dependencies = [ - "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2849,7 +2854,7 @@ dependencies = [ name = "rpc-cli" version = "1.4.0" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "parity-rpc 1.12.0", "parity-rpc-client 1.4.0", "rpassword 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2965,17 +2970,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.75" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.75" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2983,17 +2988,17 @@ name = "serde_ignored" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3067,7 +3072,7 @@ dependencies = [ [[package]] name = "socket2" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3085,7 +3090,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "stats" version = "0.1.0" dependencies = [ - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3124,10 +3129,10 @@ dependencies = [ [[package]] name = "syn" -version = "0.14.9" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3175,7 +3180,7 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3264,14 +3269,14 @@ name = "tokio" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-threadpool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3284,8 +3289,8 @@ name = "tokio-codec" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3294,16 +3299,16 @@ name = "tokio-core" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3312,7 +3317,7 @@ name = "tokio-current-thread" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3321,7 +3326,7 @@ name = "tokio-executor" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3329,7 +3334,7 @@ name = "tokio-fs" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-threadpool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3339,9 +3344,9 @@ name = "tokio-io" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3349,8 +3354,8 @@ name = "tokio-named-pipes" version = "0.1.0" source = "git+https://github.com/nikvolf/tokio-named-pipes#0b9b728eaeb0a6673c287ac7692be398fd651752" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "mio-named-pipes 0.1.6 (git+https://github.com/alexcrichton/mio-named-pipes)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3361,7 +3366,7 @@ name = "tokio-proto" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3375,16 +3380,16 @@ dependencies = [ [[package]] name = "tokio-reactor" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3395,7 +3400,7 @@ name = "tokio-retry" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3406,7 +3411,7 @@ name = "tokio-rustls" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "rustls 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3417,7 +3422,7 @@ name = "tokio-service" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3425,12 +3430,12 @@ name = "tokio-tcp" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3440,8 +3445,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3452,7 +3457,7 @@ name = "tokio-timer" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3462,7 +3467,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3472,13 +3477,13 @@ name = "tokio-udp" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3486,13 +3491,13 @@ name = "tokio-uds" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3502,15 +3507,15 @@ name = "tokio-uds" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3518,7 +3523,7 @@ name = "toml" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3526,7 +3531,7 @@ name = "trace-time" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3535,7 +3540,7 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "trace-time 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3652,14 +3657,6 @@ name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unreachable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "unreachable" version = "1.0.0" @@ -3720,9 +3717,9 @@ dependencies = [ "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "patricia-trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "patricia-trie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "patricia-trie-ethereum 0.1.0", "rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3747,8 +3744,8 @@ name = "want" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3760,7 +3757,7 @@ dependencies = [ "ethcore-logger 1.12.0", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", @@ -3807,11 +3804,11 @@ dependencies = [ "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-http-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-pubsub 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", - "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "panic_hook 0.1.0", "parity-whisper 0.1.0", - "serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3866,10 +3863,10 @@ version = "0.7.5" source = "git+https://github.com/tomusdrw/ws-rs#f12d19c4c19422fc79af28a3181f598bc07ecd1e" dependencies = [ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.2 (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.15 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (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)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3928,8 +3925,8 @@ dependencies = [ "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum bn 0.4.4 (git+https://github.com/paritytech/bn)" = "" "checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" -"checksum bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e178b8e0e239e844b083d5a0d4a156b2654e67f9f80144d48398fcd736a24fb8" -"checksum cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "4a6007c146fdd28d4512a794b07ffe9d8e89e6bf86e2e0c4ddff2e1fb54a0007" +"checksum bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0ce55bd354b095246fc34caf4e9e242f5297a7fd938b090cadfea6eee614aa62" +"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" "checksum cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" @@ -3937,7 +3934,7 @@ dependencies = [ "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "704fbf3bb5149daab0afb255dbea24a1f08d2f4099cedb9baab6d470d4c5eefb" -"checksum combine 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1645a65a99c7c8d345761f4b75a6ffe5be3b3b27a93ee731fccc5050ba6be97c" +"checksum combine 3.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "54cedd8056314afe0d844a37a207007edf8a45f2cc452fd77629cd63c221740e" "checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3486aefc4c0487b9cb52372c97df0a48b8c249514af1ee99703bf70d2f2ceda1" @@ -3969,10 +3966,10 @@ dependencies = [ "checksum fixed-hash 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d5ec8112f00ea8a483e04748a85522184418fd1cf02890b626d8fc28683f7de" "checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum fs-swap 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67f816b2a5f8a6628764a4323d1a8d9ad5303266c4e4e4486ba680f477ba7e62" +"checksum fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb" "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.23 (registry+https://github.com/rust-lang/crates.io-index)" = "884dbe32a6ae4cd7da5c6db9b78114449df9953b8d490c9d7e1b51720b922c62" +"checksum futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "0c84b40c7e2de99ffd70602db314a7a8c26b2b3d830e6f7f7a142a8860ab3ca4" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797" @@ -3995,8 +3992,8 @@ dependencies = [ "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum ipnetwork 0.12.8 (registry+https://github.com/rust-lang/crates.io-index)" = "70783119ac90828aaba91eae39db32c6c1b8838deea3637e5238efa0130801ab" "checksum itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4833d6978da405305126af4ac88569b5d71ff758581ce5a987dbfa3755f694fc" -"checksum itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5adb58558dcd1d786b5f0bd15f3226ee23486e24b7b58304b60f64dc68e62606" -"checksum jni 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5479b540809575c4d6e3e68be5cdc33e03e0ab3d2108479a65d0374f2e82c1b9" +"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum jni 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ecfa3b81afc64d9a6539c4eece96ac9a93c551c713a313800dade8e33d7b5c1" "checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" "checksum jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)" = "" "checksum jsonrpc-http-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)" = "" @@ -4010,11 +4007,11 @@ dependencies = [ "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "72ae89206cea31c32014b39d5a454b96135894221610dbfd19cf4d2d044fa546" "checksum kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45bcdf5eb083602cff61a6f8438dce2a7900d714e893fc48781c39fb119d37aa" -"checksum kvdb-rocksdb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e731661c9e7409857d73ac574da418cef6f9605e967bed0aeb93182ef8d4b1c7" +"checksum kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "06cf755dc587839ba34d3cbe3f12b6ad55850fbcdfe67336157a021a1a5c43ae" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" -"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" +"checksum lazycell 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e26d4c411b39f0afcf2ba6fe502be90e6c9b299c952dbd86124782520a13cffd" "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum libusb 0.3.0 (git+https://github.com/paritytech/libusb-rs)" = "" @@ -4024,7 +4021,7 @@ dependencies = [ "checksum local-encoding 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1ceb20f39ff7ae42f3ff9795f3986b1daad821caaa1e1732a0944103a5a1a66" "checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -"checksum log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cba860f648db8e6f269df990180c2217f333472b4a6e901e97446858487971e2" +"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" "checksum lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d06ff7ff06f729ce5f4e227876cb88d10bc59cd4ae1e09fbb2bde15c850dc21" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a3b4142ab8738a78c51896f704f83c11df047ff1bda9a92a661aa6361552d93d" @@ -4034,9 +4031,9 @@ dependencies = [ "checksum memorydb 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f72c93304ad51e21230ecbd0d2b58a3f94703bf9339d14aed88c3aaf5e8b7a56" "checksum mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "4b082692d3f6cf41b453af73839ce3dfc212c4411cbb2441dff80a716e38bd79" "checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" -"checksum mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)" = "4fcfcb32d63961fb6f367bfd5d21e4600b92cd310f71f9dca25acae196eb1560" +"checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" "checksum mio-named-pipes 0.1.6 (git+https://github.com/alexcrichton/mio-named-pipes)" = "" -"checksum mio-uds 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "84c7b5caa3a118a6e34dbac36504503b1e8dc5835e833306b9d6af0e05929f79" +"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" "checksum multibase 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9c35dac080fd6e16a99924c8dfdef0af89d797dd851adab25feaffacf7850d6" @@ -4054,22 +4051,22 @@ dependencies = [ "checksum number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf9993e59c894e3c08aa1c2712914e9e6bf1fcbfc6bef283e2183df345a4fee" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" "checksum order-stat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "efa535d5117d3661134dbf1719b6f0ffe06f2375843b13935db186cd094105eb" -"checksum ordered-float 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "58d25b6c0e47b20d05226d288ff434940296e7e2f8b877975da32f862152241f" +"checksum ordered-float 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7004d4db808c6db5a9f54ec5c85918ad01a1ef9b35bf4dfa1e2ccba28de0c1b4" "checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5168b4cf41f3835e4bc6ffb32f51bc9365dc50cb351904595b3931d917fd0c" "checksum parity-crypto 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c1117f6574377d21309bfa1f7d69ff734120685d92b02c3f362b122585758840" "checksum parity-path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5962540f99d3895d9addf535f37ab1397886bc2c68e59efd040ef458e5f8c3f7" "checksum parity-rocksdb 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cd55d2d6d6000ec99f021cf52c9acc7d2a402e14f95ced4c5de230696fabe00b" -"checksum parity-rocksdb-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ae07d4bfb2759541957c19f471996b807fc09ef3a5bdce14409b57f038de49f" +"checksum parity-rocksdb-sys 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0e59eda423021494a6cf1be74f6989add403f53157409993f794e17b123cab51" "checksum parity-snappy 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2c5f9d149b13134b8b354d93a92830efcbee6fe5b73a2e6e540fe70d4dd8a63" "checksum parity-snappy-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c2086caac40c79289cb70d7e1c64f5888e1c53f5d38399d3e95101493739f423" -"checksum parity-tokio-ipc 0.1.5 (git+https://github.com/nikvolf/parity-tokio-ipc)" = "" +"checksum parity-tokio-ipc 0.1.5 (git+https://github.com/nikvolf/parity-tokio-ipc?rev=c0f80b40399d7f08ef1e6869569640eb28645f56)" = "" "checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc" "checksum parity-wordlist 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0dec124478845b142f68b446cbee953d14d4b41f1bc0425024417720dce693" -"checksum parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "69376b761943787ebd5cc85a5bc95958651a22609c5c1c2b65de21786baec72b" -"checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" -"checksum patricia-trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fa27fc4a972a03d64e5170d7facd2c84c6ed425b38ce62ad98dcfee2f7845b3b" +"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" +"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" +"checksum patricia-trie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46be3bf26e050bcaac60d0a8373f912a4734bb8bd4bf5ecda66ee997b86bddfc" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" "checksum phf 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "cec29da322b242f4c3098852c77a0ca261c9c01b806cae85a5572a1eb94db9a6" @@ -4085,7 +4082,7 @@ dependencies = [ "checksum primal-sieve 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "da2d6ed369bb4b0273aeeb43f07c105c0117717cbae827b20719438eb2eb798c" "checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" "checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" -"checksum proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ee5697238f0d893c7f0ecc59c0999f18d2af85e424de441178bcacc9f9e6cf67" +"checksum proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe022fb8c8bd254524b0b3305906c1921fa37a84a644e29079a9e62200c3901" "checksum protobuf 1.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "52fbc45bf6709565e44ef31847eb7407b3c3c80af811ee884a04da071dcca12b" "checksum pulldown-cmark 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8361e81576d2e02643b04950e487ec172b687180da65c731c03cf336784e6c07" "checksum pwasm-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "90d2b3c5bf24275fc77db6b14ec00a7a085d8ff9d1c4215fb6f6263e8d7b01bc" @@ -4102,7 +4099,7 @@ dependencies = [ "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" -"checksum regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "67d0301b0c6804eca7e3c275119d0b01ff3b7ab9258a65709e608a66312a1025" +"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" "checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" "checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" @@ -4126,10 +4123,10 @@ dependencies = [ "checksum sct 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1137b767bbe1c4d30656993bdd97422ed41255d9400b105d735f8c7d9e800632" "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.75 (registry+https://github.com/rust-lang/crates.io-index)" = "22d340507cea0b7e6632900a176101fea959c7065d93ba555072da90aaaafc87" -"checksum serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)" = "234fc8b737737b148ccd625175fc6390f5e4dacfdaa543cb93a3430d984a9119" +"checksum serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)" = "92ec94e2754699adddbbc4f555791bd3acc2a2f5574cba16c93a4a9cf4a04415" +"checksum serde_derive 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)" = "0fb622d85245add5327d4f08b2d24fd51fa5d35fe1bba19ee79a1f211e9ac0ff" "checksum serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "190e9765dcedb56be63b6e0993a006c7e3b071a016a304736e4a315dc01fb142" -"checksum serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "44dd2cfde475037451fa99b7e5df77aa3cfd1536575fa8e7a538ab36dcde49ae" +"checksum serde_json 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "59790990c5115d16027f00913e2e66de23a51f70422e549d2ad68c8c5f268f1c" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" "checksum siphasher 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "833011ca526bd88f16778d32c699d325a9ad302fa06381cd66f7be63351d3f6d" @@ -4141,19 +4138,19 @@ dependencies = [ "checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" "checksum smallvec 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f90c5e5fe535e48807ab94fc611d323935f39d4660c52b26b96446a7b33aef10" "checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d" -"checksum socket2 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "962a516af4d3a7c272cb3a1d50a8cc4e5b41802e4ad54cfb7bee8ba61d37d703" +"checksum socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d11a52082057d87cb5caa31ad812f4504b97ab44732cd8359df2e9ff9f48e7" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" "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.11 (registry+https://github.com/rust-lang/crates.io-index)" = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" -"checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" +"checksum syn 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9056ebe7f2d6a38bc63171816fd1d3430da5a43896de21676dc5c0a4b8274a11" "checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" "checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11ce2fe9db64b842314052e2421ac61a73ce41b898dc8e3750398b219c5fc1e0" "checksum term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327" -"checksum termcolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3390f44f1f706d8870297b6a2c4f92d9ab65a37c265fbbc6ac4ee72bcc2f3698" +"checksum termcolor 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3bac0e465b59f194e7037ed404b0326e56ff234d767edc4c5cc9cd49e7a2c7" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" "checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" @@ -4172,7 +4169,7 @@ dependencies = [ "checksum tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6cc2de7725863c86ac71b0b9068476fec50834f055a243558ef1655bbd34cb" "checksum tokio-named-pipes 0.1.0 (git+https://github.com/nikvolf/tokio-named-pipes)" = "" "checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" -"checksum tokio-reactor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "df6a7ea7d65e0fc1398de28959de8be96909986a7d2e01d4f86d3433dfb91aed" +"checksum tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4bfbaf9f260635649ec26b6fb4aded03887295ffcd999f6e43fd2c4758f758ea" "checksum tokio-retry 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f05746ae87dca83a2016b4f5dba5b237b897dd12fd324f60afe282112f16969a" "checksum tokio-rustls 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9263e472d976e4345e50c6cce4cfe6b17c71593ea593cce1df26f1efd36debb" "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" @@ -4200,7 +4197,6 @@ dependencies = [ "checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f392d7819dbe58833e26872f5f6f0d68b7bbbe90fc3667e98731c4a15ad9a7ae" "checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" diff --git a/Cargo.toml b/Cargo.toml index 2cec37067b1..989cf31e4eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ description = "Parity Ethereum client" name = "parity-ethereum" # NOTE Make sure to update util/version/Cargo.toml as well -version = "2.1.0" +version = "2.1.6" license = "GPL-3.0" authors = ["Parity Technologies "] diff --git a/README.md b/README.md index 291b4b3746d..d72e5bc3edc 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,7 @@

» Download the latest release «

-

- - +

**Built for mission-critical use**: Miners, service providers, and exchanges need fast synchronisation and maximum uptime. Parity Ethereum provides the core infrastructure essential for speedy and reliable services. @@ -25,11 +23,11 @@ By default, Parity Ethereum runs a JSON-RPC HTTP server on port `:8545` and a We If you run into problems while using Parity Ethereum, check out the [wiki for documentation](https://wiki.parity.io/), feel free to [file an issue in this repository](https://github.com/paritytech/parity-ethereum/issues/new), or hop on our [Gitter](https://gitter.im/paritytech/parity) or [Riot](https://riot.im/app/#/group/+parity:matrix.parity.io) chat room to ask a question. We are glad to help! **For security-critical issues**, please refer to the security policy outlined in [SECURITY.md](SECURITY.md). -Parity Ethereum's current beta-release is 2.0. You can download it at [the releases page](https://github.com/paritytech/parity-ethereum/releases) or follow the instructions below to build from source. Please, mind the [CHANGELOG.md](CHANGELOG.md) for a list of all changes between different versions. +Parity Ethereum's current beta-release is 2.1. You can download it at [the releases page](https://github.com/paritytech/parity-ethereum/releases) or follow the instructions below to build from source. Please, mind the [CHANGELOG.md](CHANGELOG.md) for a list of all changes between different versions. ## Build Dependencies -Parity Ethereum requires **Rust version 1.28.x** to build. +Parity Ethereum requires **Rust version 1.29.x** to build. We recommend installing Rust through [rustup](https://www.rustup.rs/). If you don't already have `rustup`, you can install it like this: @@ -60,26 +58,6 @@ Once you have `rustup` installed, then you need to install: Make sure that these binaries are in your `PATH`. After that, you should be able to build Parity Ethereum from source. -## Install from the Snapcraft Store - -In any of the [supported Linux distros](https://snapcraft.io/docs/core/install): - -```bash -sudo snap install parity -``` - -Alternatively, if you want to contribute testing the upcoming release: - -```bash -sudo snap install parity --beta -``` - -Moreover, to test the latest code from the master branch: - -```bash -sudo snap install parity --edge -``` - ## Build from Source Code ```bash diff --git a/docker/android/Dockerfile b/docker/android/Dockerfile deleted file mode 100644 index 1dbf15fac7d..00000000000 --- a/docker/android/Dockerfile +++ /dev/null @@ -1,61 +0,0 @@ -FROM ubuntu:xenial -LABEL maintainer="Parity Technologies " - -RUN apt-get update && \ - apt-get install -yq sudo curl file build-essential wget git g++ cmake pkg-config bison flex \ - unzip lib32stdc++6 lib32z1 python autotools-dev automake autoconf libtool \ - gperf xsltproc docbook-xsl - -# Rust & Cargo -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y -ENV PATH /root/.cargo/bin:$PATH -RUN rustup toolchain install stable -RUN rustup target add --toolchain stable arm-linux-androideabi -RUN rustup target add --toolchain stable armv7-linux-androideabi - -# Android NDK and toolchain -RUN cd /usr/local && \ - wget -q https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && \ - unzip -q android-ndk-r16b-linux-x86_64.zip && \ - rm android-ndk-r16b-linux-x86_64.zip -ENV NDK_HOME /usr/local/android-ndk-r16b -RUN /usr/local/android-ndk-r16b/build/tools/make-standalone-toolchain.sh \ - --arch=arm --install-dir=/opt/ndk-standalone --stl=libc++ --platform=android-26 -ENV PATH $PATH:/opt/ndk-standalone/bin - -# Compiling libudev for Android -# This is the most hacky part of the process, as we need to apply a patch and pass specific -# options that the compiler environment doesn't define. -RUN cd /root && \ - git clone https://github.com/gentoo/eudev.git -ADD libudev.patch /root -RUN cd /root/eudev && \ - git checkout 83d918449f22720d84a341a05e24b6d109e6d3ae && \ - ./autogen.sh && \ - ./configure --disable-introspection --disable-programs --disable-hwdb \ - --host=arm-linux-androideabi --prefix=/opt/ndk-standalone/sysroot/usr/ \ - --enable-shared=false CC=arm-linux-androideabi-clang \ - CFLAGS="-D LINE_MAX=2048 -D RLIMIT_NLIMITS=15 -D IPTOS_LOWCOST=2 -std=gnu99" \ - CXX=arm-linux-androideabi-clang++ && \ - git apply - < /root/libudev.patch && \ - make && \ - make install -RUN rm -rf /root/eudev -RUN rm /root/libudev.patch - -# Rust-related configuration -ADD cargo-config.toml /root/.cargo/config -ENV ARM_LINUX_ANDROIDEABI_OPENSSL_DIR /opt/ndk-standalone/sysroot/usr -ENV ARMV7_LINUX_ANDROIDEABI_OPENSSL_DIR /opt/ndk-standalone/sysroot/usr -ENV CC_arm_linux_androideabi arm-linux-androideabi-clang -ENV CC_armv7_linux_androideabi arm-linux-androideabi-clang -ENV CXX_arm_linux_androideabi arm-linux-androideabi-clang++ -ENV CXX_armv7_linux_androideabi arm-linux-androideabi-clang++ -ENV AR_arm_linux_androideabi arm-linux-androideabi-ar -ENV AR_armv7_linux_androideabi arm-linux-androideabi-ar -ENV CFLAGS_arm_linux_androideabi -std=gnu11 -fPIC -D OS_ANDROID -ENV CFLAGS_armv7_linux_androideabi -std=gnu11 -fPIC -D OS_ANDROID -ENV CXXFLAGS_arm_linux_androideabi -std=gnu++11 -fPIC -fexceptions -frtti -static-libstdc++ -D OS_ANDROID -ENV CXXFLAGS_armv7_linux_androideabi -std=gnu++11 -fPIC -fexceptions -frtti -static-libstdc++ -D OS_ANDROID -ENV CXXSTDLIB_arm_linux_androideabi "" -ENV CXXSTDLIB_armv7_linux_androideabi "" diff --git a/docker/android/cargo-config.toml b/docker/android/cargo-config.toml deleted file mode 100644 index 7373a7e143d..00000000000 --- a/docker/android/cargo-config.toml +++ /dev/null @@ -1,9 +0,0 @@ -[target.armv7-linux-androideabi] -linker = "arm-linux-androideabi-clang" -ar = "arm-linux-androideabi-ar" -rustflags = ["-C", "link-arg=-lc++_static", "-C", "link-arg=-lc++abi", "-C", "link-arg=-landroid_support"] - -[target.arm-linux-androideabi] -linker = "arm-linux-androideabi-clang" -ar = "arm-linux-androideabi-ar" -rustflags = ["-C", "link-arg=-lc++_static", "-C", "link-arg=-lc++abi", "-C", "link-arg=-landroid_support"] diff --git a/docker/android/libudev.patch b/docker/android/libudev.patch deleted file mode 100644 index ba7e849b2e6..00000000000 --- a/docker/android/libudev.patch +++ /dev/null @@ -1,216 +0,0 @@ -diff --git a/src/collect/collect.c b/src/collect/collect.c -index 2cf1f00..b24f26b 100644 ---- a/src/collect/collect.c -+++ b/src/collect/collect.c -@@ -84,7 +84,7 @@ static void usage(void) - " invoked for each ID in ) collect returns 0, the\n" - " number of missing IDs otherwise.\n" - " On error a negative number is returned.\n\n" -- , program_invocation_short_name); -+ , "parity"); - } - - /* -diff --git a/src/scsi_id/scsi_id.c b/src/scsi_id/scsi_id.c -index 8b76d87..7bf3948 100644 ---- a/src/scsi_id/scsi_id.c -+++ b/src/scsi_id/scsi_id.c -@@ -321,7 +321,7 @@ static void help(void) { - " -u --replace-whitespace Replace all whitespace by underscores\n" - " -v --verbose Verbose logging\n" - " -x --export Print values as environment keys\n" -- , program_invocation_short_name); -+ , "parity"); - - } - -diff --git a/src/shared/hashmap.h b/src/shared/hashmap.h -index a03ee58..a7c2005 100644 ---- a/src/shared/hashmap.h -+++ b/src/shared/hashmap.h -@@ -98,10 +98,7 @@ extern const struct hash_ops uint64_hash_ops; - #if SIZEOF_DEV_T != 8 - unsigned long devt_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) _pure_; - int devt_compare_func(const void *a, const void *b) _pure_; --extern const struct hash_ops devt_hash_ops = { -- .hash = devt_hash_func, -- .compare = devt_compare_func --}; -+extern const struct hash_ops devt_hash_ops; - #else - #define devt_hash_func uint64_hash_func - #define devt_compare_func uint64_compare_func -diff --git a/src/shared/log.c b/src/shared/log.c -index 4a40996..1496984 100644 ---- a/src/shared/log.c -+++ b/src/shared/log.c -@@ -335,7 +335,7 @@ static int write_to_syslog( - - IOVEC_SET_STRING(iovec[0], header_priority); - IOVEC_SET_STRING(iovec[1], header_time); -- IOVEC_SET_STRING(iovec[2], program_invocation_short_name); -+ IOVEC_SET_STRING(iovec[2], "parity"); - IOVEC_SET_STRING(iovec[3], header_pid); - IOVEC_SET_STRING(iovec[4], buffer); - -@@ -383,7 +383,7 @@ static int write_to_kmsg( - char_array_0(header_pid); - - IOVEC_SET_STRING(iovec[0], header_priority); -- IOVEC_SET_STRING(iovec[1], program_invocation_short_name); -+ IOVEC_SET_STRING(iovec[1], "parity"); - IOVEC_SET_STRING(iovec[2], header_pid); - IOVEC_SET_STRING(iovec[3], buffer); - IOVEC_SET_STRING(iovec[4], "\n"); -diff --git a/src/udev/udevadm-control.c b/src/udev/udevadm-control.c -index 6af7163..3271e56 100644 ---- a/src/udev/udevadm-control.c -+++ b/src/udev/udevadm-control.c -@@ -41,7 +41,7 @@ static void print_help(void) { - " -p --property=KEY=VALUE Set a global property for all events\n" - " -m --children-max=N Maximum number of children\n" - " --timeout=SECONDS Maximum time to block for a reply\n" -- , program_invocation_short_name); -+ , "parity"); - } - - static int adm_control(struct udev *udev, int argc, char *argv[]) { -diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c -index 0aec976..a31ac02 100644 ---- a/src/udev/udevadm-info.c -+++ b/src/udev/udevadm-info.c -@@ -279,7 +279,7 @@ static void help(void) { - " -P --export-prefix Export the key name with a prefix\n" - " -e --export-db Export the content of the udev database\n" - " -c --cleanup-db Clean up the udev database\n" -- , program_invocation_short_name); -+ , "parity"); - } - - static int uinfo(struct udev *udev, int argc, char *argv[]) { -diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c -index 15ded09..b58dd08 100644 ---- a/src/udev/udevadm-monitor.c -+++ b/src/udev/udevadm-monitor.c -@@ -73,7 +73,7 @@ static void help(void) { - " -u --udev Print udev events\n" - " -s --subsystem-match=SUBSYSTEM[/DEVTYPE] Filter events by subsystem\n" - " -t --tag-match=TAG Filter events by tag\n" -- , program_invocation_short_name); -+ , "parity"); - } - - static int adm_monitor(struct udev *udev, int argc, char *argv[]) { -diff --git a/src/udev/udevadm-settle.c b/src/udev/udevadm-settle.c -index 33597bc..b36a504 100644 ---- a/src/udev/udevadm-settle.c -+++ b/src/udev/udevadm-settle.c -@@ -43,7 +43,7 @@ static void help(void) { - " --version Show package version\n" - " -t --timeout=SECONDS Maximum time to wait for events\n" - " -E --exit-if-exists=FILE Stop waiting if file exists\n" -- , program_invocation_short_name); -+ , "parity"); - } - - static int adm_settle(struct udev *udev, int argc, char *argv[]) { -diff --git a/src/udev/udevadm-test-builtin.c b/src/udev/udevadm-test-builtin.c -index baaeca9..50ed812 100644 ---- a/src/udev/udevadm-test-builtin.c -+++ b/src/udev/udevadm-test-builtin.c -@@ -39,7 +39,7 @@ static void help(struct udev *udev) { - " -h --help Print this message\n" - " --version Print version of the program\n\n" - "Commands:\n" -- , program_invocation_short_name); -+ , "parity"); - - udev_builtin_list(udev); - } -diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c -index 47fd924..a855412 100644 ---- a/src/udev/udevadm-test.c -+++ b/src/udev/udevadm-test.c -@@ -39,7 +39,7 @@ static void help(void) { - " --version Show package version\n" - " -a --action=ACTION Set action string\n" - " -N --resolve-names=early|late|never When to resolve names\n" -- , program_invocation_short_name); -+ , "parity"); - } - - static int adm_test(struct udev *udev, int argc, char *argv[]) { -diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c -index 4dc756a..67787d3 100644 ---- a/src/udev/udevadm-trigger.c -+++ b/src/udev/udevadm-trigger.c -@@ -92,7 +92,7 @@ static void help(void) { - " -y --sysname-match=NAME Trigger devices with this /sys path\n" - " --name-match=NAME Trigger devices with this /dev name\n" - " -b --parent-match=NAME Trigger devices with that parent device\n" -- , program_invocation_short_name); -+ , "parity"); - } - - static int adm_trigger(struct udev *udev, int argc, char *argv[]) { -diff --git a/src/udev/udevadm.c b/src/udev/udevadm.c -index 3e57cf6..b03dfaa 100644 ---- a/src/udev/udevadm.c -+++ b/src/udev/udevadm.c -@@ -62,7 +62,7 @@ static int adm_help(struct udev *udev, int argc, char *argv[]) { - printf("%s [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]\n\n" - "Send control commands or test the device manager.\n\n" - "Commands:\n" -- , program_invocation_short_name); -+ , "parity"); - - for (i = 0; i < ELEMENTSOF(udevadm_cmds); i++) - if (udevadm_cmds[i]->help != NULL) -@@ -128,7 +128,7 @@ int main(int argc, char *argv[]) { - goto out; - } - -- fprintf(stderr, "%s: missing or unknown command\n", program_invocation_short_name); -+ fprintf(stderr, "%s: missing or unknown command\n", "parity"); - rc = 2; - out: - mac_selinux_finish(); -diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index cf826c6..4eec0af 100644 ---- a/src/udev/udevd.c -+++ b/src/udev/udevd.c -@@ -1041,7 +1041,7 @@ static void help(void) { - " -t --event-timeout=SECONDS Seconds to wait before terminating an event\n" - " -N --resolve-names=early|late|never\n" - " When to resolve users and groups\n" -- , program_invocation_short_name); -+ , "parity"); - } - - static int parse_argv(int argc, char *argv[]) { -diff --git a/src/v4l_id/v4l_id.c b/src/v4l_id/v4l_id.c -index 1dce0d5..f65badf 100644 ---- a/src/v4l_id/v4l_id.c -+++ b/src/v4l_id/v4l_id.c -@@ -49,7 +49,7 @@ int main(int argc, char *argv[]) { - printf("%s [-h,--help] \n\n" - "Video4Linux device identification.\n\n" - " -h Print this message\n" -- , program_invocation_short_name); -+ , "parity"); - return 0; - case '?': - return -EINVAL; -diff --git a/src/shared/path-util.c b/src/shared/path-util.c -index 0744563..7151356 100644 ---- a/src/shared/path-util.c -+++ b/src/shared/path-util.c -@@ -109,7 +109,7 @@ char *path_make_absolute_cwd(const char *p) { - if (path_is_absolute(p)) - return strdup(p); - -- cwd = get_current_dir_name(); -+ cwd = getcwd(malloc(128), 128); - if (!cwd) - return NULL; - diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index c5c21dffe55..098eb5f1763 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -18,7 +18,7 @@ ethcore-bloom-journal = { path = "../util/bloom" } parity-bytes = "0.1" hashdb = "0.2.1" memorydb = "0.2.1" -patricia-trie = "0.2.1" +patricia-trie = "0.2" patricia-trie-ethereum = { path = "../util/patricia-trie-ethereum" } parity-crypto = "0.1" error-chain = { version = "0.12", default-features = false } diff --git a/ethcore/evm/src/interpreter/gasometer.rs b/ethcore/evm/src/interpreter/gasometer.rs index 406df19fd35..60ea30da042 100644 --- a/ethcore/evm/src/interpreter/gasometer.rs +++ b/ethcore/evm/src/interpreter/gasometer.rs @@ -176,9 +176,8 @@ impl Gasometer { Request::GasMem(default_gas, mem_needed(stack.peek(0), stack.peek(1))?) }, instructions::SHA3 => { - let w = overflowing!(add_gas_usize(Gas::from_u256(*stack.peek(1))?, 31)); - let words = w >> 5; - let gas = Gas::from(schedule.sha3_gas) + (Gas::from(schedule.sha3_word_gas) * words); + let words = overflowing!(to_word_size(Gas::from_u256(*stack.peek(1))?)); + let gas = overflowing!(Gas::from(schedule.sha3_gas).overflow_add(overflowing!(Gas::from(schedule.sha3_word_gas).overflow_mul(words)))); Request::GasMem(gas, mem_needed(stack.peek(0), stack.peek(1))?) }, instructions::CALLDATACOPY | instructions::CODECOPY | instructions::RETURNDATACOPY => { @@ -231,13 +230,24 @@ impl Gasometer { Request::GasMemProvide(gas, mem, Some(requested)) }, - instructions::CREATE | instructions::CREATE2 => { + instructions::CREATE => { + let start = stack.peek(1); + let len = stack.peek(2); + let gas = Gas::from(schedule.create_gas); - let mem = match instruction { - instructions::CREATE => mem_needed(stack.peek(1), stack.peek(2))?, - instructions::CREATE2 => mem_needed(stack.peek(2), stack.peek(3))?, - _ => unreachable!("instruction can only be CREATE/CREATE2 checked above; qed"), - }; + let mem = mem_needed(start, len)?; + + Request::GasMemProvide(gas, mem, None) + }, + instructions::CREATE2 => { + let start = stack.peek(1); + let len = stack.peek(2); + + let base = Gas::from(schedule.create_gas); + let word = overflowing!(to_word_size(Gas::from_u256(*len)?)); + let word_gas = overflowing!(Gas::from(schedule.sha3_word_gas).overflow_mul(word)); + let gas = overflowing!(base.overflow_add(word_gas)); + let mem = mem_needed(start, len)?; Request::GasMemProvide(gas, mem, None) }, @@ -287,8 +297,8 @@ impl Gasometer { }, Request::GasMemCopy(gas, mem_size, copy) => { let (mem_gas_cost, new_mem_gas, new_mem_size) = self.mem_gas_cost(schedule, current_mem_size, &mem_size)?; - let copy = overflowing!(add_gas_usize(copy, 31)) >> 5; - let copy_gas = Gas::from(schedule.copy_gas) * copy; + let copy = overflowing!(to_word_size(copy)); + let copy_gas = overflowing!(Gas::from(schedule.copy_gas).overflow_mul(copy)); let gas = overflowing!(gas.overflow_add(copy_gas)); let gas = overflowing!(gas.overflow_add(mem_gas_cost)); @@ -315,7 +325,7 @@ impl Gasometer { }; let current_mem_size = Gas::from(current_mem_size); - let req_mem_size_rounded = (overflowing!(mem_size.overflow_add(Gas::from(31 as usize))) >> 5) << 5; + let req_mem_size_rounded = overflowing!(to_word_size(*mem_size)) << 5; let (mem_gas_cost, new_mem_gas) = if req_mem_size_rounded > current_mem_size { let new_mem_gas = gas_for_mem(req_mem_size_rounded)?; @@ -347,6 +357,16 @@ fn add_gas_usize(value: Gas, num: usize) -> (Gas, bool) { value.overflow_add(Gas::from(num)) } +#[inline] +fn to_word_size(value: Gas) -> (Gas, bool) { + let (gas, overflow) = add_gas_usize(value, 31); + if overflow { + return (gas, overflow); + } + + (gas >> 5, false) +} + #[inline] fn calculate_eip1283_sstore_gas(schedule: &Schedule, original: &U256, current: &U256, new: &U256) -> Gas { Gas::from( @@ -383,7 +403,7 @@ fn calculate_eip1283_sstore_gas(schedule: &Schedule, origina } pub fn handle_eip1283_sstore_clears_refund(ext: &mut vm::Ext, original: &U256, current: &U256, new: &U256) { - let sstore_clears_schedule = U256::from(ext.schedule().sstore_refund_gas); + let sstore_clears_schedule = ext.schedule().sstore_refund_gas; if current == new { // 1. If current value equals new value (this is a no-op), 200 gas is deducted. @@ -418,11 +438,11 @@ pub fn handle_eip1283_sstore_clears_refund(ext: &mut vm::Ext, original: &U256, c // 2.2.2. If original value equals new value (this storage slot is reset) if original.is_zero() { // 2.2.2.1. If original value is 0, add 19800 gas to refund counter. - let refund = U256::from(ext.schedule().sstore_set_gas - ext.schedule().sload_gas); + let refund = ext.schedule().sstore_set_gas - ext.schedule().sload_gas; ext.add_sstore_refund(refund); } else { // 2.2.2.2. Otherwise, add 4800 gas to refund counter. - let refund = U256::from(ext.schedule().sstore_reset_gas - ext.schedule().sload_gas); + let refund = ext.schedule().sstore_reset_gas - ext.schedule().sload_gas; ext.add_sstore_refund(refund); } } diff --git a/ethcore/evm/src/interpreter/mod.rs b/ethcore/evm/src/interpreter/mod.rs index 07d0f0c6294..8fd0dc32830 100644 --- a/ethcore/evm/src/interpreter/mod.rs +++ b/ethcore/evm/src/interpreter/mod.rs @@ -306,8 +306,7 @@ impl Interpreter { match result { InstructionResult::JumpToPosition(position) => { if self.valid_jump_destinations.is_none() { - let code_hash = self.params.code_hash.clone().unwrap_or_else(|| keccak(self.reader.code.as_ref())); - self.valid_jump_destinations = Some(self.cache.jump_destinations(&code_hash, &self.reader.code)); + self.valid_jump_destinations = Some(self.cache.jump_destinations(&self.params.code_hash, &self.reader.code)); } let jump_destinations = self.valid_jump_destinations.as_ref().expect("jump_destinations are initialized on first jump; qed"); let pos = self.verify_jump(position, jump_destinations)?; @@ -634,7 +633,7 @@ impl Interpreter { gasometer::handle_eip1283_sstore_clears_refund(ext, &original_val, ¤t_val, &val); } else { if !current_val.is_zero() && val.is_zero() { - let sstore_clears_schedule = U256::from(ext.schedule().sstore_refund_gas); + let sstore_clears_schedule = ext.schedule().sstore_refund_gas; ext.add_sstore_refund(sstore_clears_schedule); } } diff --git a/ethcore/evm/src/interpreter/shared_cache.rs b/ethcore/evm/src/interpreter/shared_cache.rs index f4a7f47f90f..63c4f507d82 100644 --- a/ethcore/evm/src/interpreter/shared_cache.rs +++ b/ethcore/evm/src/interpreter/shared_cache.rs @@ -50,17 +50,22 @@ impl SharedCache { } /// Get jump destinations bitmap for a contract. - pub fn jump_destinations(&self, code_hash: &H256, code: &[u8]) -> Arc { - if code_hash == &KECCAK_EMPTY { - return Self::find_jump_destinations(code); - } + pub fn jump_destinations(&self, code_hash: &Option, code: &[u8]) -> Arc { + if let Some(ref code_hash) = code_hash { + if code_hash == &KECCAK_EMPTY { + return Self::find_jump_destinations(code); + } - if let Some(d) = self.jump_destinations.lock().get_mut(code_hash) { - return d.0.clone(); + if let Some(d) = self.jump_destinations.lock().get_mut(code_hash) { + return d.0.clone(); + } } let d = Self::find_jump_destinations(code); - self.jump_destinations.lock().insert(code_hash.clone(), Bits(d.clone())); + + if let Some(ref code_hash) = code_hash { + self.jump_destinations.lock().insert(*code_hash, Bits(d.clone())); + } d } diff --git a/ethcore/evm/src/tests.rs b/ethcore/evm/src/tests.rs index 9fd7bcd9023..2c8caa54171 100644 --- a/ethcore/evm/src/tests.rs +++ b/ethcore/evm/src/tests.rs @@ -716,7 +716,7 @@ fn test_jumps(factory: super::Factory) { test_finalize(vm.exec(&mut ext)).unwrap() }; - assert_eq!(ext.sstore_clears, U256::from(ext.schedule().sstore_refund_gas)); + assert_eq!(ext.sstore_clears, ext.schedule().sstore_refund_gas as i128); assert_store(&ext, 0, "0000000000000000000000000000000000000000000000000000000000000000"); // 5! assert_store(&ext, 1, "0000000000000000000000000000000000000000000000000000000000000078"); // 5! assert_eq!(gas_left, U256::from(54_117)); diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index e8968723120..6f28ebef2e8 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -13,7 +13,7 @@ parity-bytes = "0.1" ethcore-transaction = { path = "../transaction" } ethereum-types = "0.4" memorydb = "0.2.1" -patricia-trie = "0.2.1" +patricia-trie = "0.2" patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" } ethcore-network = { path = "../../util/network" } ethcore-io = { path = "../../util/io" } diff --git a/ethcore/private-tx/Cargo.toml b/ethcore/private-tx/Cargo.toml index 9b65c12180a..ed098c182a1 100644 --- a/ethcore/private-tx/Cargo.toml +++ b/ethcore/private-tx/Cargo.toml @@ -26,7 +26,7 @@ heapsize = "0.4" keccak-hash = "0.1.2" log = "0.4" parking_lot = "0.6" -patricia-trie = "0.2.1" +patricia-trie = "0.2" patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" } rand = "0.3" rlp = { version = "0.2.4", features = ["ethereum"] } diff --git a/ethcore/res/ethereum/classic.json b/ethcore/res/ethereum/classic.json index b4d15c6186d..a5b6dba8cd2 100644 --- a/ethcore/res/ethereum/classic.json +++ b/ethcore/res/ethereum/classic.json @@ -3068,17 +3068,18 @@ ] }, "nodes": [ - "enode://e809c4a2fec7daed400e5e28564e23693b23b2cc5a019b612505631bbe7b9ccf709c1796d2a3d29ef2b045f210caf51e3c4f5b6d3587d43ad5d6397526fa6179@174.112.32.157:30303", - "enode://6e538e7c1280f0a31ff08b382db5302480f775480b8e68f8febca0ceff81e4b19153c6f8bf60313b93bef2cc34d34e1df41317de0ce613a201d1660a788a03e2@52.206.67.235:30303", + "enode://efd48ad0879eeb7f9cb5e50f33f7bc21e805a72e90361f145baaa22dd75d111e7cd9c93f1b7060dcb30aa1b3e620269336dbf32339fea4c18925a4c15fe642df@18.205.66.229:30303", "enode://5fbfb426fbb46f8b8c1bd3dd140f5b511da558cd37d60844b525909ab82e13a25ee722293c829e52cb65c2305b1637fa9a2ea4d6634a224d5f400bfe244ac0de@162.243.55.45:30303", - "enode://42d8f29d1db5f4b2947cd5c3d76c6d0d3697e6b9b3430c3d41e46b4bb77655433aeedc25d4b4ea9d8214b6a43008ba67199374a9b53633301bca0cd20c6928ab@104.155.176.151:30303", - "enode://814920f1ec9510aa9ea1c8f79d8b6e6a462045f09caa2ae4055b0f34f7416fca6facd3dd45f1cf1673c0209e0503f02776b8ff94020e98b6679a0dc561b4eba0@104.154.136.117:30303", - "enode://72e445f4e89c0f476d404bc40478b0df83a5b500d2d2e850e08eb1af0cd464ab86db6160d0fde64bd77d5f0d33507ae19035671b3c74fec126d6e28787669740@104.198.71.200:30303", - "enode://39abab9d2a41f53298c0c9dc6bbca57b0840c3ba9dccf42aa27316addc1b7e56ade32a0a9f7f52d6c5db4fe74d8824bcedfeaecf1a4e533cacb71cf8100a9442@144.76.238.49:30303", - "enode://f50e675a34f471af2438b921914b5f06499c7438f3146f6b8936f1faeb50b8a91d0d0c24fb05a66f05865cd58c24da3e664d0def806172ddd0d4c5bdbf37747e@144.76.238.49:30306", - "enode://83b33409349ffa25e150555f7b4f8deebc68f3d34d782129dc3c8ba07b880c209310a4191e1725f2f6bef59bce9452d821111eaa786deab08a7e6551fca41f4f@159.89.223.6:30303", - "enode://5cd218959f8263bc3721d7789070806b0adff1a0ed3f95ec886fb469f9362c7507e3b32b256550b9a7964a23a938e8d42d45a0c34b332bfebc54b29081e83b93@35.187.57.94:30303", - "enode://6dd3ac8147fa82e46837ec8c3223d69ac24bcdbab04b036a3705c14f3a02e968f7f1adfcdb002aacec2db46e625c04bf8b5a1f85bb2d40a479b3cc9d45a444af@104.237.131.102:30303" + "enode://6dd3ac8147fa82e46837ec8c3223d69ac24bcdbab04b036a3705c14f3a02e968f7f1adfcdb002aacec2db46e625c04bf8b5a1f85bb2d40a479b3cc9d45a444af@104.237.131.102:30303", + "enode://b9e893ea9cb4537f4fed154233005ae61b441cd0ecd980136138c304fefac194c25a16b73dac05fc66a4198d0c15dd0f33af99b411882c68a019dfa6bb703b9d@18.130.93.66:30303", + "enode://3fe9705a02487baea45c1ffebfa4d84819f5f1e68a0dbc18031553242a6a08e39499b61e361a52c2a92f9553efd63763f6fdd34692be0d4ba6823bb2fc346009@178.62.238.75:30303", + "enode://d50facc65e46bda6ff594b6e95491efa16e067de41ae96571d9f3cb853d538c44864496fa5e4df10115f02bbbaf47853f932e110a44c89227da7c30e96840596@188.166.163.187:30303", + "enode://a0d5c589dc02d008fe4237da9877a5f1daedee0227ab612677eabe323520f003eb5e311af335de9f7964c2092bbc2b3b7ab1cce5a074d8346959f0868b4e366e@46.101.78.44:30303", + "enode://c071d96b0c0f13006feae3977fb1b3c2f62caedf643df9a3655bc1b60f777f05e69a4e58bf3547bb299210092764c56df1e08380e91265baa845dca8bc0a71da@68.183.99.5:30303", + "enode://83b33409349ffa25e150555f7b4f8deebc68f3d34d782129dc3c8ba07b880c209310a4191e1725f2f6bef59bce9452d821111eaa786deab08a7e6551fca41f4f@206.189.68.191:30303", + "enode://0daae2a30f2c73b0b257746587136efb8e3479496f7ea1e943eeb9a663b72dd04582f699f7010ee02c57fc45d1f09568c20a9050ff937f9139e2973ddd98b87b@159.89.169.103:30303", + "enode://50808461dd73b3d70537e4c1e5fafd1132b3a90f998399af9205f8889987d62096d4e853813562dd43e7270a71c9d9d4e4dd73a534fdb22fbac98c389c1a7362@178.128.55.119:30303", + "enode://5cd218959f8263bc3721d7789070806b0adff1a0ed3f95ec886fb469f9362c7507e3b32b256550b9a7964a23a938e8d42d45a0c34b332bfebc54b29081e83b93@35.187.57.94:30303" ], "accounts": { "0000000000000000000000000000000000000001": { "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, diff --git a/ethcore/res/ethereum/constantinople_test.json b/ethcore/res/ethereum/constantinople_test.json index 7b153d3f4bb..6169b743eff 100644 --- a/ethcore/res/ethereum/constantinople_test.json +++ b/ethcore/res/ethereum/constantinople_test.json @@ -1,16 +1,16 @@ { - "name": "Byzantium (Test)", + "name": "Constantinople (test)", "engine": { "Ethash": { "params": { "minimumDifficulty": "0x020000", "difficultyBoundDivisor": "0x0800", "durationLimit": "0x0d", - "blockReward": "0x29A2241AF62C0000", + "blockReward": "0x1BC16D674EC80000", "homesteadTransition": "0x0", "eip100bTransition": "0x0", "difficultyBombDelays": { - "0": 3000000 + "0": 5000000 } } } @@ -30,11 +30,13 @@ "eip161abcTransition": "0x0", "eip161dTransition": "0x0", "eip140Transition": "0x0", - "eip210Transition": "0x0", "eip211Transition": "0x0", "eip214Transition": "0x0", "eip155Transition": "0x0", "eip658Transition": "0x0", + "eip145Transition": "0x0", + "eip1014Transition": "0x0", + "eip1052Transition": "0x0", "eip1283Transition": "0x0" }, "genesis": { diff --git a/ethcore/res/ethereum/eip210_test.json b/ethcore/res/ethereum/eip210_test.json new file mode 100644 index 00000000000..9733e5d87ef --- /dev/null +++ b/ethcore/res/ethereum/eip210_test.json @@ -0,0 +1,54 @@ +{ + "name": "EIP210 (test)", + "engine": { + "Ethash": { + "params": { + "minimumDifficulty": "0x020000", + "difficultyBoundDivisor": "0x0800", + "durationLimit": "0x0d", + "blockReward": "0x4563918244F40000", + "homesteadTransition": "0x0" + } + } + }, + "params": { + "gasLimitBoundDivisor": "0x0400", + "registrar" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b", + "accountStartNonce": "0x00", + "maximumExtraDataSize": "0x20", + "minGasLimit": "0x1388", + "networkID" : "0x1", + "maxCodeSize": 24576, + "maxCodeSizeTransition": "0x0", + "eip98Transition": "0xffffffffffffffff", + "eip150Transition": "0x0", + "eip160Transition": "0x0", + "eip161abcTransition": "0x0", + "eip161dTransition": "0x0", + "eip210Transition": "0x0" + }, + "genesis": { + "seal": { + "ethereum": { + "nonce": "0x0000000000000042", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "difficulty": "0x400000000", + "author": "0x0000000000000000000000000000000000000000", + "timestamp": "0x00", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa", + "gasLimit": "0x1388" + }, + "accounts": { + "0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, + "0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } }, + "0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, + "0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, + "0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": "0x00", "pricing": { "modexp": { "divisor": 100 } } } }, + "0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": "0x00", "pricing": { "linear": { "base": 500, "word": 0 } } } }, + "0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": "0x00", "pricing": { "linear": { "base": 2000, "word": 0 } } } }, + "0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": "0x00", "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } } + } +} diff --git a/ethcore/res/ethereum/foundation.json b/ethcore/res/ethereum/foundation.json index 4b11041a84a..f80fe893465 100644 --- a/ethcore/res/ethereum/foundation.json +++ b/ethcore/res/ethereum/foundation.json @@ -177,8 +177,8 @@ "stateRoot": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544" }, "hardcodedSync": { - "header": "f9020ba0c7139a7f4b14c2e12dbe34aeb92711b37747bf8698ecdd6f2c3b1f5f3840e288a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479452e44f279f4203dcf680395379e5f9990a69f13ca06e817f8a9b206f93a393da76a3ece2a74b98eaecc4dae0cfa8f409455e88ccb4a0d739197170d2bc6bbb24fac0ce695982090702082fe1541bb7634f018dfe87b3a038503b7299fb1c113a78b4a3a5dfd997ef32e7fbf722fc178dfcb21e1af1f7f5b9010000020000000000000008000000000010000000000000000000000000000200000002000000000008000000000000000000000000000000000000000000000000000000000000000001004008000000000000000000000000000080000000000008000000080000000000008000000000000000000000000000040210004000000010000000400000000001040000000200000000000000440008000000040000000000000000000000000010000000000000000000000000000000800000000000100002000000000000000000002000000000000000000000000000000000000080000000100000000000000000040400000000000000004000000000000000870c90e059b181c6835ee8018379fb9583065150845b833d198a7777772e62772e636f6da0171fc2d066507ea10c8c2d7bedd5ccc3f0dfb4d590a3998a614013326c0b213a88b4fd884826187393", - "totalDifficulty": "6255555800944520547241", + "header": "f90206a0391c42ff4f047145a6b9a14179c3cc404b31d92f30693e28cf2bba41f47f6329a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794b2930b35844a230f00e51431acae96fe543a0347a0fb280d4457e60a0b96577e1dde9e00905102cfd36def5c5b31dcc2284636136ea077f739c324e35c7448b14aa02186973d3c74cc1ab081498cd0c487a604873723a0e462d76b5204d14b13d1f1b39ea048a3b637f91d42c729c367d5bbdbd0a72d70b90100008003410402005000200009400030c40490500208480008414000a40048806408000080802008204400010001800c0020080c0a00400105a9080820400900240000084012030a1504030508000200005c4404a0c3490820000010400811040004708a1006910211444040c28001a800e920d00000940c200119111a10401001008044214002002080c21081801e008a320848a204400042400898004004010028840181106210080254a081112480031000410202440092c880be3894000120050500860880000108000c0080009e0000204007212840808cb80200601024020000210280100c018540b28a1041a62400000108204084000008808040000004870bc009a1914d7f8362f801837a121d8379ee5a845bbd53ca8573696e6731a0abce0f90ce69f740080eeb94d1cb13981fafe3bc6d020a44815acd86cbd3fc0a889501b04c0614e053", + "totalDifficulty": "7128515864594819065361", "CHTs": [ "0x0eb474b7721727204978e92e27d31cddff56471911e424a4c8271c35f9c982cc", "0xe10e94515fb5ffb7ffa9bf50db4a959b3f50c2ff75e0b8bd5f5e038749e52a11", @@ -3216,7 +3216,137 @@ "0xf344c0cf6516f0fa6617e48076726aefbdaaf5a31f67ad8199bc3f6e426bf904", "0x3f3d2d33f36ba9009e9a72f3f5bbcb5df5392a19fc7afc8d37823aaf52b03477", "0x346a89411f090d559ff90e670bf0a385b1b09f117fc9ffa18b09d3b6d5d8e45c", - "0x5bc5689e2b4572b8ceea472cc7827e22cbfd018920beebf5c5b25f65f5cd5357" + "0x5bc5689e2b4572b8ceea472cc7827e22cbfd018920beebf5c5b25f65f5cd5357", + "0xda418efcaa0076f77e4d2f0c57fc32fa67179a5631d9df52d56497113d0e87af", + "0x5a8050832e835202695129f6f384652827e61ea5f1be7ff300183201d8bd6b4d", + "0xd9f444c382da42c310bd2f05955187163ae7b224e5efd44ab95af332e197d374", + "0x9ef2c5bad361117eedbc2adcb72a2ef5eba4caf3a99a0cbb2a65a94d185e48ae", + "0x7e3e089bc46b00a4174d90003379c382ab5bd84d092b9c4db3189d2bdc24f00b", + "0x94f50fb12eed909d251fe69adb1a1f214776cb029d487360b55c3a2abb663d7e", + "0xd3e1f4244dea40d0741255db2dae72103e263390e0ccfdefcbb2da59ecc5ec9f", + "0x6808bf0cb7d4b677527de762b6db8ddf74a1b272349f34f44505912bd95d62f3", + "0xbf7672ac474b5b849bc086ff8455216f015c8fc7660436dee153522ef6991c04", + "0xe79d27a369cdd5455ddbc6bd9158cd1870aa895b3c3971d07f1555b95ed02ac3", + "0xfa9e20a36c11b0dfbf7e9c62872a6423f5460dfd18e447481461a41176678262", + "0xaafb6c407910341bedc82c0f260cdef75ce5653f644b93a465cb990247a32986", + "0x5058e655e0c179e6c20f48fbd08c2f34f9341f6c07972ff40f55bfabbc783b12", + "0x28d2e7c852de8602a764ff693b6881af18ddadd67fc7eff481f48ac20ebf32f6", + "0xf82e09e7916f61b5cfdc3dcf193bf9d535f2b33f93a06c90fbdc78b3aac6b7ef", + "0x626f3cca9e1a9e5e123e34485c8697c758ffc32213a727665065dd6abd2babe5", + "0xb7f1c07f673d903daa61dec649eb12286a7a0568ee36ecfb1023ec41427c8dd0", + "0x8d1d42bfe88dbe4c621cf68d380dc57e7768121a815546bb4aab29b7486da9ee", + "0x79835acd7266bce85978f481aa3c58f3bab9106d72892df8579e472dc95c6899", + "0x0911c9c804bbe9be0aebab6c92f5b71a893f72a9d0cd35a51b0e8cd19ab0c02a", + "0x7fd2eff10936d8d12fd9a1c6d27e77cbec4e48253465eb7e65876134ff60c8ec", + "0xc739ad4255415e2831c6996673f3d02dc79f6e6d6822f7dee23bff5b94833c3a", + "0x2559faafbae0852fe5a1c924f0e4f6ccdf4fd22f483148b3672a3e7b3692b669", + "0xca37f0aa3d375dbddc0b426c9564fe68f10b0a4cbbf1ab87f97b27b44878f2fb", + "0x00ba40205d1bd46ad5b5e73cd5b1f3418bd892586d5a4647ac9a6d158f15bd93", + "0xfa6d25c829299535e6b80af81a2416d10ed6903117e73c656b979a5f5abe3ee0", + "0xfd82d8944315cfb228a8fa416c18ff82cbd8869c3babbd3389dca6dd66797785", + "0xd8834cc29788cb40ec901725419df8c031a13e190756a6352696de870eaf4671", + "0xdf6843a52bf55e0f4404e7bdf144bb17d5c47a72ef9482e712090ac9730a7f52", + "0x4c2c562f835966c72985f7cca89a3b1a7b0d4cb04623dc96e337daa35a2f5925", + "0x49d2afd87e83a04059dbf3ef4e2598b8d0c495ab1cf91ed3004e16a608e910c2", + "0x5be64774739c001c239efae1ce9f2a5706cc6e3054ddf24b03c09358f2f4852f", + "0x678f789dc8c409653b36f4d2015338165d3bc6a73f2a77ebfe438676b8412d7a", + "0xf87c8fbf02d8e84cf72680e6b9a8b8be39fbae9f1eb1047c536d77535494a301", + "0xe2428b952d2c6d60d4925f56b3d8227cd6bc608da2c1b20264befd8b1ad89454", + "0x561a95eb50c663462bb8af3aab336bd745b0571746b10fefa791bc11be777763", + "0x6945f40e3499d2769ceecf499c701015d93fddb607720b18dbbd5a6a2aa46639", + "0x9c35b0367a2b82270d64f11c5299336b21b9f454077dcf7af3b2e434677a31b6", + "0x454dc6bb2443509381e478f1836cb36808e2ecd1a9944072056c292b710072f4", + "0x0c80566f34a46477592560a883a9c01fa393f7a2c9dbb28a54e46a5c017e8596", + "0xeff6a1255090509eccfdea2e591516886c91191f1f02eaae4808ac95009086fc", + "0x37cf60888e5ec75841e7f0533feef7200185a1c9f3253073216d83923c864829", + "0xb169ebb9e418809a96529835bc293782e4fc6310dba450afe3e95a7abdf7cc01", + "0xa3c8d5c71ce0477a247f56bfe95272ea07f0b7f10a8526b6e3ff9a8de8faa9ab", + "0x2bf18db4ee84bafbbabaf05d1d4d383c0d5fc91be6ae902334496996eb3a8e48", + "0x6c116f0d5809a2c28351a737ef3dbd1808685e1fd656e37df6b6e524aa82c918", + "0x21e2c8e019c687fdb360c9bdd4e3a5133488cd2e0365aee3b823120734aa6f27", + "0x20c9a1db9de894ab4f576265da25f391b32c0805c3da76fbfdd0aaf300f88a39", + "0x23ef1f43af87be7396449fc1f89d9766c59e8adf2660812293c65a27482ddb8e", + "0x04a82d3a4a5e7f2507688ecdcdc300d7fb97aa8be92a671d7d42c0b60fa4532b", + "0x99e204c42afd6d4040faad384517d99bd0e077b03310d32223234d2251d6a07c", + "0xe342c0c4295665b9e25773fc9998e18c460e723d0a14efdb59c19b27b9c7011b", + "0xb654b1b8ede0d54a605cda54b4635d2b3c2bb8efd01ebd416e52cc87b590d4f3", + "0x5daabc41eeb6de98336411a03ec0323995e81549941cf32b7e15c765d1b7b39e", + "0x5103fc7f0fc6df43fb081b580bb01476f2b1cbde73e4d0f9d1fa6d8427fae789", + "0xe2ecf5daba51d2f7b22106033fc43f956bd1db0c5ad02bd941bd3d2b96ca21c5", + "0xf152bce5c6d1efb7e22cde72d6b8ca37f556ffb686a13770c5fab46e04837c92", + "0x306007d8091caa5baaa78643307f5abf9a5f03996fc072a9016ba6b487b2017c", + "0xf57308d0c02c6b8e2416c070554c7e29911fa84ef4cf2d934e2322ca262e987c", + "0xb234fe7433d7fd71fe0c6dfc834e4bcbf84a261b95760a6c4eb67d222b9ff392", + "0x753059f3405f60da3aa7cd1aa0cbcfa4d5ef4f2a6ed34b853b2c5ab2181fd383", + "0x096c6630e821816d9f4bd83fbe0ccfd223282f34aae5a49f969ba30b98c324c3", + "0xd3eec9dedb057fbc839c474fc99cb54d89f3f47d896e06e758c98f1cd194b61f", + "0x0d44cb2a83b9a3fa18daac280cf08b46cc637d705488fd9400cd7300475d0a1c", + "0x2e37a3036db99c4cb1c135f5ca6b527fa13b2e80ee421805b7be5d8b16983602", + "0x381e0ca505308b7d3a083e60b0f9cb44c89f84942430ec9e4c5571796ab6a8eb", + "0x90b04d35906c6f5a59c266c3bce7c2b63cea1486f714e272592ef9ecab25b0ee", + "0x9cbea70e760f2ee97537d058d57f395886a2c3a6e769ccd3433b797b8716517b", + "0x4e2167846e8d6f0f6495b5f1443f59bea143b63f242e40186fc6429434d1136e", + "0xcaa0512739d000bb9783fceb46d0427098886e2b7f2e1140855f1a91f843d5b3", + "0xc14df4e379e84591f618e60b5953aa6764146c7822aa1f0e3c2287e20753985a", + "0xf4443154c04fd378b2c3812fee84b774b37d6e12778674403fb5c995379df866", + "0x1a501c2733cc138fb6ff3716899e08dbcd4d75edc18af8972e8a749e45eaf67a", + "0xfc8cb80bb0d0fb490f29aae3067641eef72e9225c558e7e299e0796a2086969d", + "0x2b7895550febf03070485c02d521e7ddd80b94b7fe33a60b7d7ea3545b13e7dd", + "0xfc4137c3cccd45050b5770a40b2f38c43c62b70b07d17bb6d762b405f3d753dc", + "0x86ed22bbbb9fc6600112b91601af4fff56d0ecbe9b3099f91d4477cab8e300f5", + "0x2273a60405ffb04bd024d880c79010f18d58e3c8ca0dc82795a0125364679fa6", + "0x00dfbfe7be3bb2116d9a603a01ac428c0088a2c1477810cd5d3be0d1bd86beab", + "0x7acfb03315585c79e2a47dbe847d24cab0785791f6af7f179fea4f9d6ecb0e0f", + "0xbf6a2e20ee1da5eec12b792bbaec2531e20766ba54bac423011c1057215851db", + "0xb5e94d1e3ba7363d1d79fb62dedd0b6c26b0485052dd64a7093d41ad2d41b890", + "0x9b0cc26f08708814960de8f280ac26d8ed5089a19bcbd2d765059306da22c196", + "0x22d8af121d3e395d3cb4f6ee43c06e6292f1b5ffda672d2e40dba69a2885f5ac", + "0x04bc174272a57189d76aa17de0f76806e8481f4903575ed8c4df12b042637e0e", + "0x06ebd2b6ec4b80280969a92726df5f9cb12d4288b60af617b7040876116656d3", + "0x0e9430513e63b5173271c89b1c91af0b4818d5d14a3034e1228c56c94186a109", + "0x8dc5422ba98d9e58112b052a00d4b82b1db32e22dd7ff2d845619899bd47f277", + "0xde513d40bdbb1e4956b468cece598d77134626a900066b92fb2ecd6fcb5f81c2", + "0x90746299ec75af1eb444ad14ac666ee444aa020fac3fb57796516d8772ec8f45", + "0xaa91c30c62b24f943ee1eec7586b682289541c0355c2726e44424da8686ca24d", + "0x76eb68baae9fb7ed126097f93842dcadfe6e7188d61549d9c0922a9b3ef8e80a", + "0x5aa5b4045e7fe71559a6e93f4a89b135eaef38b9a7f3a84e383ab1ff902ceca9", + "0x504b78f8fc3646e9722e96a5e97d99f2560d4fa3337fa5faf1cc8c8a05f3520d", + "0xffd7a5d7c3b21e8144f7678a9ddc039cf85eb32b09000a600c9f12aa7d6083ed", + "0xcbb4010000e96ff0b50b9627dae032bd50782ccbd51af8af7cfcd6cd184675f7", + "0xb96fabbdd02371bf4a6a0dc00e3874cf43d47246e27163c910c141b6759a4249", + "0x7358419f4e994ff296a37f2e88b238b3de6ba73062073c9467dec52a2df64422", + "0xca90be9f190a1fd0548becfa719a6e4763e92de0e4da4283a33b5f7d2886b425", + "0xa629364f7d6329b008d9c6a0262327bcc12953aa515cdb7b8817e7fe1d746d46", + "0xc5167bd8cac1ea6d14f305c9d4fe075e1875d96353e5236473b6daca5ae9b4fe", + "0xaf4ce2490e9504172a4393cf14e691e947c86a0ec7b53416384a5832b213d6c5", + "0xbfa4853ef2eecc5d99a90e1abfef37ca10c1f823c1d0ad59a1bb19339861241f", + "0xbb5a6584cdc7e4d06ec5fc1514233cc42970f6c332c3a9590978dc9908e58c0a", + "0xe69d7a0766db411e504f09a8f39f0583b2869016bbe95f21dba432bbe8b88442", + "0x89cf4caaaf200881779f5fa6da8ae91ff1c962045dd0622b5ca65c830d3a9d4f", + "0x82d66c631f4c4167e5301d896dbdfe24d8245b1de041fc85eaeb6e35117ed9a0", + "0x957907bc93879681d8682a188622f9bf2c7d2595dbe3e2e34bb01711cc4124d1", + "0xccb3a3380550586696abd3ac267e85c7516b2b682b3c48f66aca94d57500f3b3", + "0xaf56d4650406e70748dc860a7879d8d522599081f8e7011056c976b860703e43", + "0x5d96ac1d2dff8a054d880a44f5d45a1bd18aba29085fcd633b0608351ff1876c", + "0xe051736dad8b9f93a8f1c13031c2b63249925e152685a2e7ec188ee089861b20", + "0x0db8987339e1fae41af5f08e6fa15da5fd80de3431b54e82cf8edbdc792f870e", + "0xcc99097678110af2be8dc07da8d642dce928b7d9e2728fe6fef1fe2eaa81a72a", + "0x2428c1f94ca57c7913b011a68281eee9ee4855e4ed2c97e34a370e649b21acb1", + "0x501ee9580c89b1f67c5b3b69ae5fd1f83852a2f9330f53565bcd04d8a7c0b776", + "0x16ae47cfa19e8046f93a579fa2557b17aeca7892fc7a82b6d539930c8b7c95c9", + "0xda62590043ca70c1cdfc7969cdfa853bddbcef0ef62aabb9f372805322511014", + "0x481b4aeaaa60504c94dcfea966840b381db85183c34cd25b4857300b5c189003", + "0x035dcc47f8670a9f648bcb0232e42fd4876243a7a3bf737b88d723ba187929a7", + "0xebe9bf09e3577865aeb341a06f67bb6e607f10b04ed9f9d733492a9d0e9ceb1a", + "0xad5d85b58af6aef7f81bd6b2407c6e4884ec82b2ae2aeaa24e379a3d35902375", + "0x0f0dd63d7c6c284659283825624140b31a3adaf7cdbb2255faca443e52ebfe84", + "0x40079be1c9394e95b4823895ed380d79333ca2085aed2abd0d766f84d21b7b42", + "0x7cc40ed01b436ce225a3f9c5c2bc7f6f81aee40bb83a54bca2fe899b15f3e2b6", + "0x1b6356e1a83ca5b0eefda1fd62fa959b118d2a19a6a90f182a53414b3fc7f9f0", + "0xae4a71712cc96a5b30b45e3b92c339c2e975e4ed683f4d1fcadcdc121ff7c6bf", + "0x226f6d8c71ec32c5eaab6b01c0fc1d00ae95e60b383d09560e90549b79eb1447", + "0xf3dec779841c9384df93bcefbba8700a292b570b29d286a7c9c5a442b4788a20", + "0x63ef48e80efa45383857adcb0f31076393260cbad058d1938345ad13faae50b4" ] }, "nodes": [ diff --git a/ethcore/res/ethereum/kovan.json b/ethcore/res/ethereum/kovan.json index 28126713582..336d32baec0 100644 --- a/ethcore/res/ethereum/kovan.json +++ b/ethcore/res/ethereum/kovan.json @@ -43,7 +43,13 @@ "eip211Transition": 5067000, "eip214Transition": 5067000, "eip658Transition": 5067000, - "wasmActivationTransition": 6600000 + "wasmActivationTransition": 6600000, + "eip145Transition": 9200000, + "eip1014Transition": 9200000, + "eip1052Transition": 9200000, + "eip1283Transition": 9200000, + "kip4Transition": 9200000, + "kip6Transition": 9200000 }, "genesis": { "seal": { @@ -56,8 +62,8 @@ "gasLimit": "0x5B8D80" }, "hardcodedSync": { - "header": "f9023ea00861b3771ffb84fce48b8ba3c54a09f81e91ccb38c401261f06d370098889a43a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479400e6d2b931f55a3f1701c7389d592a7778897879a071cc81d58cdd21d1e17f7389e55c530cd9f94cc15bb32af6477320682327dcffa06090021a7c09ae5e75e443410ebdb76de04f1eafb0ab910daae96ee6eec560eaa032510bf257dd03b11f3b4761b94b495a5b5a18cd6eb17c77785e0f46e2ffc882b901000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000400000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000090fffffffffffffffffffffffffffffffd8381e001837a12008306697a845b83bd6096d583010b068650617269747986312e32372e30826c698416e0ef58b841117e2088e2835bf2afcd5d48f42b3bf2a1f33435f21f089ead2a6bae7d01c1486e645b460bb3c726a827ff1eb50e0579f3410563bae090fc256cf1d8d594b82100", - "totalDifficulty": "2845866505151538604560067685603735513869853136", + "header": "f90247a01865856fb6e4118598117560df31734c74cf725c8edae4db941055ac0afeb207a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479400e6d2b931f55a3f1701c7389d592a7778897879a054563efd593e9682943065880710af9187131127148575efc8bb51d80dfed41aa0a568a1653a6c7d559711be0b91a8e75db76c678dbdd286c75b88e4f0c0d31171a0dab32c5cbe9b9244a7af00afa7f6042a4ac923573e8f2f025b107abe1e3da999b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000004000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000090fffffffffffffffffffffffffffffffd8389b001837a120083046540845bbd803c9fde830200048f5061726974792d457468657265756d86312e32382e30826c698416ef600fb841387b51dae8bc8daa6cde190d3f44797690b4da1ce5fcfcd54bdbb2a6ee6d8c1f7649081ca28b5cd70067ee9f61e27d8184db83705102d5e1a269f2b631b4d5db01", + "totalDifficulty": "3020091077015059097853315484608800838133866777", "CHTs": [ "0xdb9557458495268ddd69409fc1f66631ed5ff9bf6c479be6eabe5d83a460acac", "0xd413800c22172be6e0b7a36348c90098955991f119ddad32c5b928e8db4deb02", @@ -4214,7 +4220,257 @@ "0x3ef50c81169af169c100f58f3afcb8e2f926d957b2adbaca8787be5d4e8d7233", "0x8783eaeb56ca2d7fec84e0e272b77271fdfd6c14452a2e1dd83de770c5d99a1a", "0x861024460895378ba100c5d0c05e62bb6cac8b21ae529ab5cab39eb6c6cabd90", - "0x1c741ed9eda60e5ac585e2f48f06fb988367c2c40a0d8111bb04b260fe44ec6b" + "0x1c741ed9eda60e5ac585e2f48f06fb988367c2c40a0d8111bb04b260fe44ec6b", + "0x6051d77e0596a911bce132c4bc12be2ae5cf29d113dd52a41b3bc166861149ce", + "0x92c049df5ddb238644015d4e039e169614ed1d926de070952f2407912906cb4b", + "0xa897567fc1ee9437f2876deb3de2b11b8fc00aa07340564031573f0351ec556d", + "0x3e54a8e15218db168960d28369003cdb1a76f8db19384e9e2696ae66a6693d6e", + "0xc5db7ade97cf28f8b61f2c63a0773201ba64f37dadc19c03943b6772aa7a1a50", + "0xda784d1bf64b7efd06558b90cd2436f3e61dc0f7a8370ff92516ed062f461091", + "0xa1d10b0a36ec5169d2df740878d051bf4d38ebc5dc04ae5558daaabc2bfa1471", + "0xcc89a8be2ff74a7bb9e967cfea3cac067aa84cc455a2fdd5449577b52a2b4ff3", + "0xbd23a3e6d3198d81d798c2851c36b954fa6f359bc8fc6e04a0b757e3d0ba053a", + "0x74640f825b9d9f95be69763845aaa0269d3a6ed5aaec88bfd9b5c4139ba7ef41", + "0xc01a29e41af3cc0d0a13ea83f131f3e4828ec3e83dd2fdf9739c139938dfc2b3", + "0x832509e705972acc7efe91475e8d76ac00a12750e194847093825e6c4db9e83b", + "0x63139d1224766ada1318613b9ec5894308efa2473e809d9e37c8305c6965f2cc", + "0x76547e54dc59473093c3fcca1166307cc7d0f4f0e8a35d850507bec216b76476", + "0x3a6a14785272391982cfa690762f5b2aeccc1dc0bb13eab6b9fcfd056f40703a", + "0x603e32b52795c04416d800b6a936343aaaa09898fa97cadc2b157eeaaf3bd6f7", + "0xf241102a3d3f3a9fdc5a1a586b16fdce4280c6c6da04290541eb3cb9c28c7325", + "0x6db6de041bcc7c00104a21bbd487a1e1ddd5e4953f7a503aa992d68a8a7bbc43", + "0x8377d795c55eac07c0acca674e775ed7d8eea35867990c8a776f40965c9ddc68", + "0x48d62d562279641043e405f4d7fbd76050d773103871c5de2c8acc25992db502", + "0xa9ef42d314e15c419537e022753ab46d41318f1fa8784e4363494f395eb6d236", + "0x99572f567eb602a1d9839bd23b41562bb3782eccf9a8893e54b002e685ab378c", + "0xd8cf2fa2291efed46c1a36e1b8837be62e86caacc380aa6397792ae8baf8f3a1", + "0xed2e800df1acb7bba5ee6251592c397a604debd7b0bfc28c8b0002dc40faa8bf", + "0x9ccece195d9e67e318f6d2952bca9486d09f4207c6d8be266cc0eebe41290920", + "0xb20580a5c96c25bb59e1bae6ced3ea5cb69d903f64e648bcb38b799141b3cd5b", + "0x1488647e697452306d2744ca6c709007cf75e2e37da3c7c05006211ba0720824", + "0x009c3dfc5494962c77900fb8da67d7bf2a2f4b855c521b9d50c4aafb1e0735bb", + "0x482428835dfff3ee1da335b36ba3aa1969fa35e89150e5b3c1991f28272d14f5", + "0x6a972044f2076e98833b243c9ed18162d96b46823170ef7c20b1a02d8bbd48c5", + "0x676242effe0fae84110c4933beecfe5ff549b439e54ff5a588add229329e5365", + "0x2441bce77589ebf8019fa8ae870a8529479c6eaa0fed7e0fbd3cc7439dbd4a09", + "0x0b20c25d2c6897c1a8dc9ea1364d3c72d33c97b4d70b9176c3f0a1e3b6ce08a7", + "0x685aa4e279118f8326a90c78e9896e40d9baa62144e2425887dcc704106979c3", + "0xabcab60973f6bc9ec3b596452e7434c4dc89c55c8eea925fc0092d1103c6f86b", + "0xcbf44f106f3f2c0050906b5e344ad22f0e0034067d35402d447311d254516dd0", + "0xcaa67796a8ac69283d7b6304181a988992130ad8441d47b4fdaf236686dc1caa", + "0xad06e6db230bd0bfaa0df59d1ae517ced29d5f11b34f76ef9bb6a73407128b59", + "0x93ef56a4951e4e5c19230918b1219c1f07e9356363503c1410e71486ed338f87", + "0xc6fef02b5bdd4909906c40cf5b999fe9e08e4c0d8bfe59d3c9aa99011136f780", + "0xfed633749700ffdeb0921a537a215ae31c25b85e4f80727376e50c247b4c5a38", + "0xc39d8cc15f4331fb7db2c24ee1163bd164e81ad2ebc43271f841fb25d03835c6", + "0xb13962dcb364ee49e2d0a34dd1a555fa8df363041504ef1e987ce78646d64146", + "0x97e0d3047e2151d53cbd1358da627453558362c6a830910b33f241848b20cffc", + "0x587ea98cbd1da50c0af1986f6ee5e676658c06442e893304708db831fec8e804", + "0x0a1d21212d9bd85a1a39e046c897d1dafb496bfd80762beda2fd3eb1cdc72eb9", + "0x46aad83612f04e7a51fd642de742f713601992e58de4daf24148a3e6f3318aa2", + "0xa65a8a9ed4fb28fcab6ee3af5df4647083c2e735fc652568759fe0426e9a294e", + "0xacd7ed5525cad187f053ba98487cc4abf24f76c8c0e97e71a696d553a3a41b7f", + "0xdcbdcfbaee764bb404bfa5261b5037b9c7ce567a3c1aa9f7280071990320da18", + "0xf195aae79a232b2170a98602efaa2efbdebb3c40d2438e63bf0954e4dc779cb0", + "0xfbb2675a62e2e67baf85e56fcd4cdf2bf89ff7905952155d3cfd4e625fb674d9", + "0x5b955473a35f6b0d24fa8be8009734ecee62f6c4bcf0cafc2335f07c51752fb1", + "0x66f37b268338f4ba1e21eef6884aef245bc36935be1f5eb14ee1d23618f00f5b", + "0xaab809ee86773263043201b83bd445d98a634d8a6da4c389b2336f68381dd481", + "0x509fc38118491458e45c7e8ab1d60c687f50d85fc1c0bf104b531a3b352198ea", + "0x20d1e4f38e83b27b77d55281af40e9f96be098fdbb90730170638c88ab7e435a", + "0xb33711864d62709a98f81d9c5f0a301bd5808d0e8ecef1063c97347af754c8c2", + "0xd69fd6c0fea478bb380b948f5b054f91831cf26d304991d40ebdf0b00a97503c", + "0x87157d452bf57e617ac1dd2372438b0777b83f6087d8223008d823652c634882", + "0x9c54b0172ae0223e6b23f7e000cb6887144e615efb02c74596002dc26d43eb5c", + "0x5b0f87baa8e40f0a2bbc1a76afbe0b21b5e8aae1443f0d38c3ac55c5f942db42", + "0xeb68d93e19860fb9fb76847080edc345972e29ab1ffd417ae5727d3cec79c0eb", + "0xd27026033bba2557c79c4babaf669a399fbc72a2a5cc06c707e24eaacee83bce", + "0x420d887bd82cccac29711c52f4d362b6a7d854e694f8d597d208d0a094fbad8e", + "0x02ff085c6c3c47879a91f511ea4c54a214af8160e07dce8e82a6be9e8299e237", + "0x1f0384e0afaf47ba59aff9f224905950768674c48de0fb0312749b16edb0a347", + "0x55cefaac814e132ff335882a366ea6173bc21fa713e93d8ad92260c84cfd2d85", + "0x58a8dd6e036a05a937a7053be916c0e7f719f2a1905186e7586a9d2dafd5a1a4", + "0x8714d03549461e32a467cefdad60a96788c97172db05c18eb9debf6e6a4d39e8", + "0xd141656c1f57c12feed31dbff3817e1d2af4e1b5cf6aa75d1bb29ea2c0a3ae69", + "0x5ec365177e19fca3c1063e65a9342008aff04ba9d03d53837b598b143504b97a", + "0xc620e23ae73d423bf2628a3de70b1a1f915d80173e0c8d1443a44b91400c5a8a", + "0xc72c2356ed53eae5a4a56bc248d9d2f4e9154f1404780b84781f357cbc7ad2d2", + "0xe60bfe30e5a1a9457ccca65810675e129948b474f391ce64d270200be7ea6beb", + "0xf679887baad8f8e497d60b015156f194b94fc30c6cb1f83fbc4575e99b95a8d5", + "0x654463146799fcfa18a74ffe4f2423fa04c8747c16b789dd24da26d0338d381c", + "0xe8b5406278d9e4622d088976af8b5e6b14cc146a9530c862a42fa5566a247355", + "0x8ecb4735132f769663781f96fb531115190e68390c54e33b250db874e90aebaa", + "0xef13bf38c2ba993c9dea5777e5db348339273d0e6dd1f41867d3b258f24ac4d4", + "0xbbbbeedf7276a857c513f4ebce88e3b531c99cf206eacd1c6c29d3cabab45df4", + "0x89cd50cde2de3ef40de7502241b78e664de53dd4a5e2ed85db62c55be0a4d8a4", + "0x0da2cae061e7dff539c7e39b0b9f63af3217f1a51bc597db957b6a3972cf7186", + "0x57aa87a6daab3c65519de7c1c1360ab33b830d46f169d4e0d3c38e7dadef289b", + "0x85fb1241c4110b4f3a6c197450af8ac47bb24d531219f6cefcc079717b208c84", + "0x52194cfba6bd7d5eb8b438054fbaf5fef387cdb8b1a7ebafe44cdcf4da47b1dd", + "0x7d24eb47a1310f7f4244e825847f634fd4a4224f695a3609c5250dc6052de6d4", + "0x38edeacb93b10653624f77dc05063499daa770b74d6b63ebe656be5a3630b7b8", + "0x4e050f7b9d73c1aea3ce60c8eae8e46b55b6d4c1cd1eae22faf982895871dcd1", + "0xf22b284ed4d97b7d3553600388748721a328052daaf92a58ed5403fd4020a496", + "0xc5fcf858d9a9748045fa0ca1271ba5af780a788c51d693815e0490671be3885b", + "0x2342efdb88226e68173ef84060a0d4dc6c8aa9c9431883beef4a5588f3157fae", + "0xe1599bf452eaacb8dcd51ff835a9ef5761dbce83cfc719813d6a10772ca5fdb3", + "0xb754797393b3216778ea6389361ca5951f365ae4e7ed99ed4cd4c9c76ff442d3", + "0x3fb5f9f3754764155296c6ff4c469109512264c603ece7c78c1231942bb8ac35", + "0xbb347d23c7d703cd2801e2763f1a6c375b5cb2a666ba137c4d6442c3f94688dc", + "0xed3806645b55fd7027dfb7f5f796933049ae558d26ca695a01e1b11333f5e453", + "0xeadb7740432ede4f90c0bc490c15fb377b68de0fc1ee3a56e87e21e7771211fe", + "0xa8c0e907e0b544e7fc3116d47e4cdfc8e8688f5cc4a67cdf600f74be6b79775a", + "0xc6f6b94f2fb4c56066e3c722123b8e85f80ce8baa0427b62c5a2ff937702c481", + "0xfff0b94553a7daaee58a7e15daf9845d1a3ad4917d81d4f23dad27d0262b48ec", + "0xb9084676613e1a063c2b491bef1b984acfbd2dce60a8ed970688239524e31962", + "0x196af717eab2cf09b47db13605ca4864cb0c4189d40c9b618d8a7d3f92831d78", + "0x4fac369653dcfe74d86b7422354d68f7580b1ae0ab359a8b8f8be8582590ea7a", + "0x035ff04f84478354706945480266321d31790f5445028f3e964801fd9a16c78c", + "0x63df70a24370a408bffabbe1c7a4c9b9e40be1cb326ab10d63fe54bb9de50d34", + "0x37b5c558d31128595425ca68deddf5ae7539abc6da838837eb1e0457e092d9ea", + "0x41a9ce82ab27afbc84669368c2e75a15e6386b77034ec316795a896ef9de577d", + "0x08bc6cc18842df4130280823f7676f418f4797d3ddfc544e54267e6456cfac68", + "0xeabc09ffceeb35cc4ec18518d4920bea2f43bf746f23b5524fa405bd874e9d34", + "0x40336744dcfe6f312e17eea83f53538f9999864c41bec43576cfcbef68d12e7d", + "0x3e780dc9c8f2b708527f1eebca75d18507e00e226a00e1b1ddd0b715aa8dd561", + "0xfd6a3c50c4a4d6e1a6fe27fa96f6aa2654573cbb9b839ce8e09a75993e2bf8e5", + "0x166c03d381d6ab94666099024adc95de0ecc9818e5ceb49965767682ca0c73fe", + "0x9805810b802a51a3ae18ce44f6b2c68abfccef2119df2430e4693e291059e222", + "0x353ecd1a0922e819ffdcd634385ebbdb674d247c4fe75e2d5437b659c98424a4", + "0xe75fb8682b706ed6596699d6151db4dcb19f6e71a3b6e34aabc3508c919f5c17", + "0x6e9bab64b10a2341f49e81d862ef3322d3117842e3f1aabc8b774c68484a2a31", + "0x82b5e79ee8d72c3613458c975530bcbba359734a4e9f07015686dfc521230329", + "0x86d48d57ccbe1f1986a4043748b1a0d8d76fd56bc74e7c48c6fd742affa0ee11", + "0x46ee65b9c2fa3e69aa1cd6ba5aaafa7f7aef59224098b60e22994996c927c9c4", + "0xb6983761b177e21899799410dc018f1acd3d417fe35943fbe57207f9f799a100", + "0x594057a8386db6e159d43d136c464c5e3980eae75a73900f7a84ba94803fc6c4", + "0x53c78073c4a4c44d17db85be06f38ab47ecbb7f36ffa87b9db707fd2bc87f391", + "0x4a976673044732e3e8a0987fc8f3c36375e3c4fb3722fcde5259af492ec458c7", + "0x1e2fc8db341a4d9e123ae4ff4f4d8096d8afef47c5d2915c665922bd1de3b00c", + "0x565cd8eb410c6e0b4d67b54d37ff42f6189095965896b0f81566ca502bea34e3", + "0x32d030e4ff6b2f5a560cb7525b5e66ab1f34a1e06531f9b81c48b8a257bd5637", + "0x25a91d756023bb9ae538034bd39b6e698d05fb1393d1328c4fc7e5c14209cce1", + "0x8036f74c4cbaff3bd98820ddd84bc093c95e88d357b341154a3189715225d068", + "0x8bc6bc61f7a57a145b8d728f583e027c8630f0c07e003b189f390ffd11d6f150", + "0xfbeb53fa167d067c9b0a2c0710f7f5931484f7dd90b9456c52c578a15f402d9b", + "0x8d355b208a16b8aa3f7bc5d8864dc7d6a1c4917a97c523274b86e82998d60b63", + "0xc94e45da800d7b56456d55a9aa36ddf9df45e9cfeeacb1116b8c51a0cea34ebd", + "0x81761ec04a8d219aedb2f58aee529e876043b0a476e771957bc03fef9f0780de", + "0x29264094c720151f7448cae053a403aa86fc20649bcf383517e214d1677e893e", + "0x9ac97c7eef9b69dcd73ec7144a0cddfbf0973791beed405202fb4c2d932ec59e", + "0x89611f8e2f9e2e1629f83ec14aaec1656876718c05088e5087887c87b8414c39", + "0x67244fcdba97905472631378fa3a228b649880c2efdd57e5a6c95e9b70ad8456", + "0x0d554cfc4df02560c3e76159d1964c69c39f5df9489bba5516f28a32a4be202e", + "0xce9274a36a0f25a13edef679a5b286bf91a9dc5274354bb6f1ce0ac52557e650", + "0x6017e68689d9f6dca78f42b93a224b445c18b70288a6e4c0d6cc295627dbb1b9", + "0x76791c90f887355878d0a4d8c84ec3990a3159933ecc8d868d196b363153bd5f", + "0xacb6a6c9ec937b3d5cedba26ab6d581fc41cf9a58b0867232e2c8c73d9978cc3", + "0x89f17989ef556a0562c2aa5a2a1d71e5132b89d656bead1ef88ad31073b80cd1", + "0x06efcf8dbadaf28ee719a5b9c017a093fde84a7f4b9966fe3052c0b2fe410ea6", + "0xce16909616f1d97e5853818938b4798030259ddd41e3468f35b940ca901d6817", + "0xd3ff9e9ad14a605a94bdf05dd2639b6fbda28ccf7b2b228f064b0de52410df5b", + "0xb3e8ca9ee88d4c3ce347d82e8f22793ba22b7adc350fd694b1b00b0764c584f9", + "0xe690268a4ec089aced00f9654aa95acb7a8d7270d9428205b103c30a08d142eb", + "0xd685e1460799c51f14273361e31b9739e5212fa538fb8dfbb8e81e8b1d329bbe", + "0x664c293680fb7c5a89ff3c31e81ec8d0c30a6274ef44e4e76bdb9bba83f3c0b3", + "0x44027fd23526685d920d37b032f912159e308286eaac018244006690b4191d4e", + "0x7ea934c3d75a9ecb6a2055dcd5feaf2d4c851eaf360a648d5d87ef40fba2fbd0", + "0xfd97fc801315e5be630ccb3dc983c409a58fc1fc307adc1e4a48fc60c89ea40f", + "0x15aa0c3c732a2c6684d521729dfeb93f62e22e155d85d20e5488e2c86b043142", + "0xba235420ac54100da28cd6f30ff64b8594e73c42f45ca8494fb3d3c4d66651a9", + "0x9948e8489cd94bed4b8e90a8bd35e01ffe38e7c077f587c6c1949caa99cc98e0", + "0xcf66ccdfa85655d7d4c94cffd41f499afdfa2bbddcdaac547223e6ac4d1f9cf1", + "0x7e5382881f710530720b420a3f3ac08211565ecc8fead8ec649cea11f9385c3d", + "0x104576fbb1760c16ce85c3e5757832d53bda83d618500ef677a6a192ff14a5fb", + "0x9e4689bb1ee34635e1106e38ca41833d2dbc1cfacb7635ede5761048a8637c7c", + "0xc8c7f7ac271015da443320f4af650fc71ea0914f4c41252a5b7ec76f329d5268", + "0x46a93ae992001a54119c8d27788e3ef8927dee0a9949b22ece0196a90932c1da", + "0xa69467f9944f1a5e3a46718a99d3cb14930cab6d971baa37bb774cc757e55c2b", + "0x33f7272fdbfb91428a1344df5867300e256fc3cc2e439c777c3feae1cb27b781", + "0x0aaa367f4c7f399edc64ac1754f47aa5c28b0fa208238276de6bd9e424021ce3", + "0xf5f363c3bfa4a23bf221951f4b53a77b27613938babe40f0832d05fdfd252233", + "0xec315af99bdfdcb3cab1f1dcaa5b42ef53f4e3fcf4d921578892a5896fa20e9c", + "0xb580a8e51e875446d7096a20801dded1f7e5b5fac9f47e9361dfc9dd80214013", + "0xb877df38d8f4cebdfb89f26868bdb97ef945da187b44e1cbeafc1d4b7059d713", + "0x78613b9d2d6b639a54ecf1d50a56af80560b436fa632ae636cf354d4a6dd4af8", + "0x80a9d0a5e43558f1d24256baa6940c0074fa84d4b8e7e236054943f9ad5fbe2b", + "0x60f79f699ba1a740c9784f2a8f1b652d4e695ad2d230b110472b95914fd35c8d", + "0xae20de288eb7362a36a1ff236faaed6ddaacf58783d098118bc9fe66b8780651", + "0xcd08003531d6094cabdbe4d971a01b41552784c246bd2a2f749ee9947d1394d6", + "0x676720accf739c380f64748390c1acd2f88d454539866f7326a517c9b629b545", + "0x086b71ac681c0ea369c16b22ca49753b2083ec25b46ba659206433eb060d98c3", + "0x78910ab7d67e67da722ad53b669d8c3a312de3cf362c6254c09581088e920acb", + "0x5bc6e98a830c114cb432091679ac5b3efd25c362d6f99585ce3a027dff95e524", + "0x8d0daff5a97327b615d1535fea44fa33610fd645d93035e1e5e2bb49d4dcef24", + "0xbb46662b884bc6676d98ebf3f2a35ff9190339b72d68520fe40100b4eafaa2a2", + "0x9aa8faaf935c95a60ffae0487844860084a963792ae0bb90a831f825339810ac", + "0xfd77b5d6b6b87bfb0ddcad7b0ed3992e5fe897b16db06b118230b2d292e317e9", + "0xc465a3384c694bc50cbe97ce9f3bc364884651a97a491f7f64e65dc319d1c9f0", + "0xc4634431867d7a302be79e83fb50d01df7f3b950aeede21fcb59b883399b06e4", + "0xfd524c29525cb97a89026ff68048ca6e2a9f522791eadd74447a6c278151d7df", + "0xc7df516c295a58cf4cd5614eee3d2f773a412dcd4926eadad7e935ecae6d8907", + "0xfb915abde0108d6e84354e21a513fa564f5201277e060bb916a9153537fba1f7", + "0x1d3c6a780f1b259e096f4a141ab83cb6bd035407421e2468e743daec211e536f", + "0xb2f47534f060c70f61a7c16f920d0e11b957bb3ef912ed9292f35b8ceda2acea", + "0x03e0ebe6e9992f6921362d463b68f91518d91079c001c6bea7b3452879fdc29c", + "0xd9a7de173a1617ad813a554a56d7c7d2f010ac78d7782e524b35b5c676cb72dc", + "0x90d05d99167e53d34a02c5b66ed6920190370656905465f20efe56499aa0ba6b", + "0x17702606dc895aae35aef034fddf8f7235efcc66e5c9d252347063209c2177b0", + "0x3c416492193d81fc03b5c1964989a314e5ee6d689c638c996f6761b4d7acd6be", + "0x3c6c1162ea9b277f831989ea26e14bb23ce4d72bb9c865e354992559266ceb16", + "0x96de93f849613bb2ffc117bf111d4798b9252649f94f21187da324a3fe363833", + "0x91e50fc6e564cb9d6b7aab3a6e93f6b32944d5a781196a9a8b12ac7f6f527565", + "0xdbefa2bb2ee620d75295d0f3103e06b428f955dba1a792421e435051c46f7933", + "0x78f29df98ef7dce9fe7b4414da90fb4df5d99231ab0a3b7a3e70659986580fe4", + "0x56cf56899c2388d55eb1496ccbe62041d14cf655c9dbc53984d86c22ed281acd", + "0x099f52c675171088550a9e93e1ab17f003190fa3388d956724d422e5925c4813", + "0x9913e4ad8405b8a60fa512fb616c544c6cdc415cb1023aad0669d58cc3810161", + "0xbf5d51369b2510bb57f8fc8e9342890e8bb37049079dc79ab97afc0bcbf3cbf2", + "0x3a012d45d250c818b641fb18b71b622f5bdf0b7a541e0d8de54f61e516ee3ce7", + "0x0233833414d2cff3da0326f7baccf1bd522db5fee290ab4fc0a976934a20358e", + "0x38a0978c955f20cdc32e2013a5373efbfc50924e45e9c4c756291a903f4162b4", + "0x4107f33a14052662a0469ddd646ab6659006df131c4b0f6b0e6cfd331b46fea2", + "0x8074fb5054c755c912bc68b1dc22ae40ba13c06912c8af1c12652eb4d84c6503", + "0xf6d151b8f9c26c3a31366d967dd7338e80e8107b9b81da0a98faf16df9cbc91a", + "0xcebb0256d0a8a4b22d2341ec7c48292c3226caf4aeaa2003ee36dde25cff833b", + "0x5fa9ac499a2642b0cb7ca365062c02588f9c555bcdf584f533ee8e8544b9928d", + "0x800c7f04db30247318b8d4c11d575dca66bf615674fbeb9e8c20f387d907c8e2", + "0xb0a43de06c9d48afefd5411d759e3c6293cbea4a7c6d862b119182ea02af81b7", + "0xb6e7ca0075d28959cf87d716fea885e9e3a0062fc7da1b6e06089c808a632b8a", + "0x734c1b19f0b5972b5215f675cf60c68c12cf6d6bda7b5a95ee9a781482e68365", + "0x1995b08fffb20dedbef592ac23a81d87129ceb396e065265dd4a6cb876beaf09", + "0x051082047a6b579684b5444ce5b75bc630277ec06b0087779387b9d7fcd18fec", + "0x4aabfe145c368e6878e2ccbdfbecf2f1db5c9078650696bb3a584c14fe17177f", + "0x42811ab68b304ce30fe896c52b53d861abc3c8b5e4e740fa97b1695db9a6691f", + "0xd90cdb12ad64f86b2aa7afb781c00301f50206b05f1543b111c2b971ed209c94", + "0x385435507c2ef42b5f1760b97497e8a02a4b5ec4926c3cce8569fc0f4be59ce8", + "0x2d7a4908350c9cf022920cc51e0cad9c3c05d1d14a92d72310b52f984c857101", + "0xceea9c58106f4f806a256f64dc04e1c4b53e6cc5eb048f3df7a14f8de3506e96", + "0x7032f864eb3eae8d198c3f8edd9cc2dfe88b9971cd01b33318dcba004f9b044b", + "0x71bfeb4c183b20fba60e225524c809b0864fa14f5c0137accc36649ed0712e5c", + "0xef0ec5a2761c46827110c20e14fc4aecadc2407541ea046de09a58cda3b2e839", + "0x5e6debf328055c9413fc3eeca28583f917b361a5b5bda9af4306929931a4116a", + "0x1aab81df07eab969189333e5b2930fcc1b88a525ec5bc6af6626fdcb202b8f34", + "0xbdbf97e1558711d4872821b9400e03a811c61096bb838d3126b1c2154f8fb776", + "0x7d8aaee482933ffaa97777af3e4bf69ce7d99afb24e546d2e365d445d3d0190d", + "0x9da421621b14164582b2b877090c9a956f3a7c917031bf743a9ce457b6292369", + "0x050d717f0433a72b17a0e9a1340f26aed5bf17f90c08a5b73e675860ac9c24de", + "0x80551d3ff835aaf987b9ec056a73a3890985ef551431daa9d4aca10c81cac7fd", + "0x625a5b5aed2660d32d2fd8c4d1bfc248365a5cddaf9b5695e3f131629739ec60", + "0x7d86bc2dc5914d16b3d0d882a5db0230b4b688cbd8c81098d2efc5080e589646", + "0xfe42cd832cdffe56426031ba7d837c56d86be72b89ca9f5474bd08db80cfe903", + "0x0ca30e1fd3bf3e16a0e295ecbb442757248b2ad47baf88fc37d6c55901e709f6", + "0x2a83ed111b99844e17fb7aa69854525958255ffea04e0bfdc365264e72b349db", + "0x709779de19590b69864f5b9228b3a1c334724e20be006ef5ae38f8c05eb6f37e", + "0xf09c664d0e2e88ad5418d14481fefdc9e9c46158bc5439ffe0bf6d6d5ecb2eda", + "0xf350785dd3617ef73b0a5bf439ce5c49adca0c041b6b5047a664e5e33967ddf7", + "0x8fcf87571154dc4eb0a73c6ee31cc0db5f4e064cf23a255a408b2f2c7cc9c0e9", + "0x75801fc8867ce7c75b3148c6c022d7702143b93d93c1fc2349e3e969d0179cae", + "0xf14c18bf68ae881d3fb07f631340b00557a83860d0ba0efbfe55fe199176aff6", + "0xbe48c727fb6a32242229eaa09146c76522dcf6bed6d1c6fc1bebf86b5e4ccdb4", + "0x8487b971e383272df82cd812a0bf3a2026b85bc3897b4ce9ce48afa00849fe00", + "0x60d18b465172f59c0d71594b5273a90cb41db24a5d4c9fc37020f9d8c467a4a2", + "0xab4e36d9f17c748c87d89c23b667e3f4e3265e77b62dbd9c92659026f8a53d12" ] }, "accounts": { diff --git a/ethcore/res/ethereum/poacore.json b/ethcore/res/ethereum/poacore.json index b80b3a113fd..115108f27bb 100644 --- a/ethcore/res/ethereum/poacore.json +++ b/ethcore/res/ethereum/poacore.json @@ -15,9 +15,14 @@ }, "772000": { "safeContract": "0x83451c8bc04d4ee9745ccc58edfab88037bc48cc" + }, + "5329160": { + "safeContract": "0xa105Db0e6671C7B5f4f350ff1Af6460E6C696e71" } } - } + }, + "blockRewardContractAddress": "0x4d0153D434384128D17243409e02fca1B3EE21D6", + "blockRewardContractTransition": 5761140 } } }, diff --git a/ethcore/res/ethereum/poasokol.json b/ethcore/res/ethereum/poasokol.json index 443ebbed0e4..c6d51a9c8a6 100644 --- a/ethcore/res/ethereum/poasokol.json +++ b/ethcore/res/ethereum/poasokol.json @@ -18,9 +18,14 @@ }, "509355": { "safeContract": "0x03048F666359CFD3C74a1A5b9a97848BF71d5038" + }, + "4622420": { + "safeContract": "0x4c6a159659CCcb033F4b2e2Be0C16ACC62b89DDB" } } - } + }, + "blockRewardContractAddress": "0x3145197AD50D7083D0222DE4fCCf67d9BD05C30D", + "blockRewardContractTransition": 4639000 } } }, diff --git a/ethcore/res/ethereum/ropsten.json b/ethcore/res/ethereum/ropsten.json index 3f938042f24..264e6ee977f 100644 --- a/ethcore/res/ethereum/ropsten.json +++ b/ethcore/res/ethereum/ropsten.json @@ -9,12 +9,14 @@ "durationLimit": "0x0d", "blockReward": { "0": "0x4563918244F40000", - "1700000": "0x29A2241AF62C0000" + "1700000": "0x29A2241AF62C0000", + "4230000": "0x1BC16D674EC80000" }, "homesteadTransition": 0, "eip100bTransition": 1700000, "difficultyBombDelays": { - "1700000": 3000000 + "1700000": 3000000, + "4230000": 2000000 } } } @@ -26,8 +28,8 @@ "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", "networkID" : "0x3", - "forkBlock": 3383558, - "forkCanonHash": "0x6b4b80d65951375a70bc1ecf9a270d152dd355454d57869abbae2e42c213e0f3", + "forkBlock": "0x40E80F", + "forkCanonHash": "0x3e12d5c0f8d63fbc5831cc7f7273bd824fa4d0a9a4102d65d99a7ea5604abc00", "maxCodeSize": 24576, "maxCodeSizeTransition": 10, "eip150Transition": 0, @@ -39,7 +41,11 @@ "eip140Transition": 1700000, "eip211Transition": 1700000, "eip214Transition": 1700000, - "eip658Transition": 1700000 + "eip658Transition": 1700000, + "eip145Transition": 4230000, + "eip1014Transition": 4230000, + "eip1052Transition": 4230000, + "eip1283Transition": 4230000 }, "genesis": { "seal": { @@ -56,8 +62,8 @@ "gasLimit": "0x1000000" }, "hardcodedSync":{ - "header": "f9020fa0a415a8dcd55fe9c93372da415ff6897036e48cd3c1a5ff8ffe119eea1096ecd6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479443d58f2096e015db88e44346e73d8c59cb1753bda0100f05d66d36782b7c061c724d8d07619cc61053eda41badc8d2cb9292898ebaa00a60317b490365f40f0528e1f559b0f49facb6638c82a9490d368e963647c704a0118b536c3bdabf90273d527dfc26914c7878176fff16cee8fbb150e00ffcdd29b9010000000000000000040000002040000000000000000000000000000000000000000040020000000000010800000000000010000000000200000800000000600400000000080100c000004002080000000045000000008000080000000020000200404010010200010004000000000008020000008000000000000000108010440000800080000400010000080010820008000410800000100000000000000000000240244000000010000000000010010000000000002000000000000000000004000000020000001000002000000000000000013000000100000800008000200000104000000000000080000080200402010000000000000000001020000008008501602a8414833bc8018347b7a983476d40845b838083904d696e656420627920416e74506f6f6ca0f540bc9cfa258b97576bfb9a79518b2c07ed73a98bc6baa61cf7af4b40ad5b6988965658a406315a8a", - "totalDifficulty": "9811143388018700", + "header": "f90217a00f0e017311206b97b47403eba05a16ada760a691a36f844ab8bc9082a4efedc9a067baeee20ae4f4216ab4b0c41198efd376aca23e44b1d6575c5949955547b72a946a9ecfa04e99726ec105517ac7ae1aba550bea6ca0e64d4fe9bee34d98e127f7f94f17535582d5bc6eeb6219f323b046b9a98c72b5a02d33ce5daab0436707c6d958dcf0bcd311ec7a72d7b33c20784178d5d95bc6e9a0a5b9cd4802fafaa9381ec0aa745cdb7ac953675e9df89474e5fe14fee134cf87b90100000008018000100000000000800000010000000050004000800000800014200010000001000000000001009001000000000000000000000000000000006004020600000000200001000108088002260441000020204000000000000000000280000000000200010001000000041008002000000004004c000000001000000000008000000000000800000400000201000000044001145000000000000001000a0200c04000a00010080100000020000000400002040000000000040000000040200001020000401000000800080080000400010000000200000008020020200000101000000000100400000000004400010020000200000000000001000000008453461c8683402001837a1200832c5216845bbd359199d88301080f846765746888676f312e31302e31856c696e7578a0c1da176f6642888b4369e14349ca7dc125ef7d4f5f7abad61bd7f6b95bfd46bf887d1a171a9f55dd67", + "totalDifficulty": "12027449412394243", "CHTs": [ "0x614648fc0a459451850bdfe353a932b5ff824e1b568478394f78b3ed5427e37a", "0x1eae561c582dbb7f4e041998e084e165d0332c915d3a6da367638a8d24f3fafc", @@ -1971,14 +1977,154 @@ "0xb652952de1bf9e1174e5f6a37b069b437792672a37a9e0159c4f36b6e64306b4", "0xb72dd6cb5df1b00dbbd84e097e2da79af2ce60559697ab4c93b0a8b85b2ee406", "0xb96fd4a94ac30c10f757691f7f06f25a4900fe424f4eb7ccf322e2f95249b914", - "0x99fd442599036f161ccef1ae8088c5ef694c1819f5b76d9d2fa8f979935f69f8" + "0x99fd442599036f161ccef1ae8088c5ef694c1819f5b76d9d2fa8f979935f69f8", + "0x3e53574f6ae31a45ef928f9c37bea6c61e6d728a5ade9851567d3167f5ca3314", + "0xd7e3d08c5b71a7ad8338e8b51ec54cb11ad4d643d129a371af07376f8c47c1d4", + "0x1033c8aed4ec46377f75cc9a6b3297e1da0a7d1e74df20bae9fdf6d037afdc28", + "0x924d621544f3301f9e212fbb95872fce9eb4a4172a11693674de733bfc2b0018", + "0x7f61884149ea4def1444a70c022da1c23f31ecc51bb175905b492236a57c7fde", + "0x40c50785bc0665ab4eb3cec95405e17510c571570a5859ead804530dbcbd1387", + "0xf806491cf778f4796c0f73428e6eaf237da8488af99e9b61d72c56fa03e7051c", + "0x7a9670842dcb12c66f11e357a84849cee227ea5a7351e7c6c9370e9ef2560129", + "0x1c974da4e1073157c10deac8b256c8ced77a030e0500b2b8a90b6ca1d32ab4fa", + "0x97ebcc81ba9c1e04865ee4617daa967dec39f65501be21fbbe929db869d57dd8", + "0xa36e4506065d8b9c662697b18ffe50ed2f6ccfe6d07a065bdad048778cc53668", + "0xb9d5566eb0d40bbb03114d333d1d1dc85b0e780ec63229f3b93b2c84af5f9509", + "0xcd16693573724880c3c83834d516be65c35a861b76b43878e28aa7fcbc961361", + "0x4f60ecd7811acc087fc4557fdfaa1a0b522fe30da1cbae5e7740eec3cff04c00", + "0x9e58573b152bf5008e0ea3fc0d64573211916521a62fb08ba0f1b44c5da12e7d", + "0x2c6693cfd7e5bf9a3d8cef9e186b3da25d07af983564ced6238f9191b020f105", + "0x8cc6149caeafef85ec7b2456f33530459c52b30a5365a2a0022b1c308357f7b4", + "0x6f66863bd9909f687523128569cd0894c4cf41e2eddd5cd9c20d30c446b1711b", + "0x402317752053e7b6d7e2d5512d6397112d80ace0873f5f9d32c023a402ec03b3", + "0x2fcd50a79495057908bd34875e3531e6298488f0d06d043fb6fb0b140895d379", + "0x533ba9669dcee2c6e35713c7eca3bca168a326a36b0e39fcde76cbd35ab3d99d", + "0xdc2e86503e8066bc5fac91fe63544e33568a3c744967b9360458101c3d9df096", + "0xf994b38ba312d8bfb00d428b13a088738d93965b525eae81b45b9be344f99fd2", + "0x0721f3f772958d6a58dba638453b8d004e0c76dc8b4cf6d595b712edddcf002f", + "0x3c650c2c7ebbe7879a15882c3157552e8ae1adebea8f0c65a2dda272cc4ed838", + "0x649fe38e87546703245a7adf5925e8c7a07942750e14d39553a56ca3fcbd8c65", + "0xad204bf42d2a444faa864df8e9d023483a6b6daaa8001e00bb5373a45ed064a3", + "0x2c5cdc73d8ddef2e5c0d47358ac180043e7e246e590a7e8ad2b0a3f9b4e9375d", + "0xf38f6c364bbbbe626e849ca9bb9324c54cf0ba8dfc0b2741a3ff87ce7734adbc", + "0x317efc1cea774849d6219d31c8464a15956da4f3810bf15d4353443f79d98e75", + "0xb6796dccdf4d3cab16b5ec9567237cb988ee94131f3262c2a581180b775e76de", + "0x1fde3fdf2303d080d400c43345a424f50f6551a6a06ad50c6e277d49e8034df3", + "0x4d7bc44a3b56f5e69fd3e5e8c0cd8f5f839a775c4ee381b4b1d0a36656cf91cc", + "0x6051b60fdced0c51aa6a1cab2418c8f21c5d174109d514a4c6de758b2056611b", + "0x3c2f7be830078af3c2c6d1557b3da74d1d5bbfd8094f98886a959aa71ce70b15", + "0x8f296b90a0ece0a3dbec19a801072497c5840f9c0491062cd402db00c2b69f2a", + "0x6c14c4697f8291dbdfdbfea5522798e3f8b17204f80d8370e6d379e6ee659e77", + "0x4e98f63afaa50f8a30b0d352eb5fcb5403c635cf54b41545aa8b48465d23fb1d", + "0xad3059433e981ff12cd0d7dbc11a8d92a65cb39c6e936e9c7db5934d45806492", + "0x1cbb21f28ad2d191d6850c97487e5a733306f2f6ba370723fd5ed37cf6c880a0", + "0x82a0010a1b20d383bff0e5d7ba3751bc0d9161a4817554432558c5c2825babb3", + "0x33e54e93443e87c003d582dc51d0b9981ddcaeac4df0993877739651cbf52a58", + "0x1de8bc150f4142cd45b5d0784e5952abd8de7cba9654af959498c0fd0bcac404", + "0x3ee852f48a1a930d671e53c9c8d8c3c38353ee1737c093960c3f841e6c682e94", + "0xa9c6e05ec91e2a2f2f003419063fe033e37e5353c6e233706e29c08693e35eb8", + "0x649f7328064c55c03249d527dadaedcdbb4cb0e939d94c866844192d99469e05", + "0x3a407d00efcd5fe7bb765347b1a3f231b744349269b3aeb44099f4bdd068eb9e", + "0xa1a20af2f7e61082810ce7e7afe6118bc0ad95e9641e6129027f46af28048107", + "0x0d68fc5e58cacb2d16d99a0e9e612d674754ea51cbee2c68a21f4b0aa926688c", + "0x9b3e58144c014343271c9dc90daa8d2f642954b3eda223d64bbb0ac41380e512", + "0xd3de08b676d4f06bbf4322ed4340caab76e6ab7144c97af91c2bc9c749e65b38", + "0x21d626c9c38087aac6262b64f09398be6e4cbf246100d8c2416cab57e9ac1b68", + "0x563a450e35f40279f5946641a823f596ef3ad22a45b8ec280128546aeb0faf14", + "0xadd9c7128e14e670c7d21d6dfa5c09a11dfd237e90709b087e3329d3cd89b5fd", + "0x258cc0f845d8e7438a707f590f55203c6c51302cef4cfbf788b1c7054688da14", + "0x4309676aa14fa8244e0a089c7013b89c9adf57fa952295b8ddb23fc6545c9870", + "0x5db769765dfb41aefc0f40f06f3d005b30ce1f14f04f653e0c5500f651cd61cb", + "0xbef131c9f19572b05d295d7122fd1a09fe4a8afd4e20c5a0f3cd2785b7eb9882", + "0x3f235228ea537332a041ec75cc6cb5663edaa1c2ed1c1700273af73a5d49bf1c", + "0xc081811bb077c6ebe224b560eb6b81f3f813b26789cb06d96110071ffc25fcb4", + "0x912444c19a5e458b79c89969ed5336f2873267baf2fe729b6f218b74d269b797", + "0x5846fc726eb9627e9d070041b92d76191c4b32e315d33ad18121b8acd01634fd", + "0xc899f45494660034d343670856c13a32b230d047434a4d54a772132ddfe3e182", + "0x11a699c18b04e8cdcd96a43b7465f7bd81f8f64d7ebe79dcaf9201cc897f2746", + "0x8e09b134dc8a1735c060175e9688fd001974bf2e3baa5a8e88dc4c87365e0e07", + "0xa086797ebca0a1d446a9289b7eda920b926e1b595c288a9dea31ad225e6de86f", + "0x0cc04369b6036dff78a9856a5173bb2dde380359a8dbe0126e06d6e763a01c36", + "0x4b5efcac86e03d1f67774769b8bcc5d131c181cd4fa297eaa6cea5ec0cdfaa6f", + "0x47272a21a07ad5e14e3f97b237dab7e33344da4db5b2d31bc7cd0cc2d2c9f1db", + "0x9540755fd321d125b73cb6f1884c2f0b2a821d29362194f5029a5e7ba2d3ed44", + "0x229b88922fe52a78090673775f264cd665fe222002d6add2ed29b7ffd98de717", + "0x8fa2d755d5cc0efb01d9fd6f5ae1f7864404ae111d8ba17e23686ea9b6566336", + "0x33a8f2e0775fd19b1302b985bd6c29d4ab5fc63060bcf3df2c3685ab1b19ce67", + "0xf6d6bebb541ef9b84d779c62adb76774bb38a8eba3823e74e0790dc7401bebbc", + "0xa1f421108d49ed23996e55012613fc05e0f86e00f17251b1ff1e0824d35befc7", + "0x2cc572ed83dc6c604bb455ab050c550184a923f4b13815f06d10ef19dffb3c7a", + "0x28220e7d1a9583d68656f03ef4d6fa3e249c71d1b42698f87ba1fc582493e194", + "0xe8aa37b3214abb1bc167fdb6f10119a4019541f31c76b3b3f8c363bb138bd09e", + "0x825189c2c836dda454b457a03ff83d422bf78df1f368434768690fa7f51c57e0", + "0x5dad65d275e69478c81ecaec5b872660205735d9649ac020f65f5ea6ae972dda", + "0x84a1184d8f94fab280e0593479179348f9184d6fe5a2b2ea9697894c42574473", + "0xbef5a05bc7e1fb94465570144499672d95f31fa241b4c510011f6677e2bf72fb", + "0xd08235ebe6d79a8549bcd3d2414cd8afd2a3e2ca22ced226c60aacad1361ff89", + "0xbab5204ad45ec52860023e7474579e7c95397f3c4ac01db7e446e92c19dceef0", + "0x6c81acf2ff161d423a904c457166ff454ef41571d01e73d56bf9ab892790248d", + "0xaf4a603b808e3ddece42e3e123ea02defb9f8ef2546a95c5a617b6ecdb89c306", + "0xeecdbda25b04eb764e322d9a1e5eefad399c9ced8c77b1e4ecfbefcc90bb403d", + "0x9463f4677a2039ca372b61b16d5bcb7c043b26af04aea4d3f0dcdec7bd222070", + "0x27bfd92799b4cf9699d2bfcb158f6727bb986fc0dee780fc1052366ebc4e6364", + "0x63c3faa1a8fc0d531261cd241b1299d4fc13629abb4cd357eeb130505fbddf94", + "0x9a4535b07ff68862f3396b14b88fa07cff7abdd5744775aeeec6868606eb4712", + "0xae59e7c3e0a1df32f6e027da2983d3c55b4ba4d99e85329361561bd7f13ac629", + "0xcc5dc26b9be8fd8432537d967afe12fc668949e4fcf72d97a40f9214975fa57a", + "0x8f11634c83c7a43be8b98335ba617a64c6379f5f92664055c5e1620791134ddb", + "0x14ce2a69d844e6a46aa244c5aca9fb74c127f2151c7c16f4611ca030df365d8b", + "0xb06f220566a5e62570b9e9e49a8b9d5663501ba145b12260fbf9d4a18a4b19e3", + "0x6274f3cf553c45e6ba7ef644d75bf208e08a8c6325e336aefd35dda9cca3c4d2", + "0xd0d685497c2f2b923d0b9f1590a748da8c684a915a470db58c3105c83d8304e7", + "0xf37fab515f96e655f182f0b6e6aa3602f2cd74773329094772151e8c33d1f9a4", + "0xf6efd731481e8553f1d18b5735166499e787009b484b0dfbe4d35e7930f0d837", + "0xc96132b510863e553e08c54e98b5e9c0067f26e421980a6a3bfd4f07480c4396", + "0xdca9d8182c573871b6d6a184cb9819256398080bcb7fd765e6c69cd972a28d8d", + "0xd632ca6f5d45646726ecd2977ffea5c71a867890633f571b359657c0d096f840", + "0xfe3884dbca6bd3b0087466b04e6a5857ad59d7a25021e1d994d059d20005185b", + "0x7f40eb6fb94b05bb43873a98e9d4eb5f7ac90fb8913240bc0909c6be42922b30", + "0x5113a0808666815cfc52b8ed63c649d96f35c365def36ae623f536241b163c3f", + "0x8e6dbacfb5c593d7d7c2650d3d0115c3702cbb55f73011823a202e69ca33cc70", + "0x8f069ac7caa48bce09fe93f4aaef6784d8a6f7a3a09edb82c7512ec18acc3ab9", + "0xa5525e51fd789c59d3b208efffe09abca47cfd6981d36ab44084b86706c69888", + "0xcb4a7e60d5e8b9d22887ef1e8ce339cfcea0ae1fcbfa9adb766ad05d84182de7", + "0x0a14f23f9066ebdb67df31e66f6b8ab1c089025c0ba56ea56d15f73749f47cb7", + "0x0963e3eba12e41d21af7625b8dc487b637b1789a6ac05fb23062e0166942df68", + "0xcb7ec271b2f42cae0027d22b688b19b9288f2b5d9c43bc5b1ea23b35f5542828", + "0x9b97e6f4b2eeee29ecccf9584dc020c8caa3cae51c82f5b58d279eaf0c6ab4e3", + "0xad7f1963ce9993e6172c2ae90c6e1d4d3d3c52e14284fcc1b1e9a56776afb97e", + "0x52ef2ad7bc2921742dcbac9772f13d5c31be938eb1ad6aceb2fa8a163389cefa", + "0x369ead6d900e64ae0b5028df8574e59b67c61dca418c87ce6461eb4c8535fd30", + "0x7e1a18f6199f05f21f9eb5463e9ffd87637d2fd24a23047fe095895c533cb6a5", + "0xe1b8813a95e511aaec9b358d515e624fbc20e551c56328f843ae90b3c895d3a2", + "0xc2ea59f3d1e7bbe115390a4c210142fe9f9dcb1959764450f5b5292ad90e0fcf", + "0x97d235c3f18e6819c08dab4efe66d0f11f0d06f8ffc9686e3f28400e057e6f4a", + "0xea64f817770252b77b08ca2f579b440ec02e833fc88af7c9c96a8e1e07b2cb2c", + "0x185f5fd1f7001b533dc01783c83b7ab0828a4e2f188cc4e26768c515b4c421f6", + "0x0c9de9844e856a1e4340bf54dcaf9dc66b489304765b5c3c6ca20284f5a0dca6", + "0x4dd1d52da1d260d1f0f63bafc4c816b30cea8ec3434e7d4b63a0eff86997254c", + "0x0b3eb94aa246f7c8c871535ae2d3abe5c1b951e76b77510140ef52d5ea2457ee", + "0x27102708eea5d715799642f213049d8ac9abc3b12c76d147ce443dab28af96d8", + "0x81fb3c4e8dc6c658af2901b7aebf7467b9ae045dd0f58fe8d77f8770ac517fb6", + "0xf68dba4eee635d7494bae6fb9f0c44e739b3121d4bc6f6f21b495a716af3cf52", + "0xcf87b723dc473d313bf9ddfa233056036c5658777e831796f1f56647cd040c8d", + "0x49927c2100039ac496d9c16dd12f0a05c9441b8616c69c726fd2e79ae65e130c", + "0x088195c7251f6b9fa2105e77df5620211b8ca783a77f1a98de6752fc442c26c7", + "0x604de480bcb88e908b90451c4142b99b9cbb479167473befca7bea9b4ca427a3", + "0x642fdaf6bc1abbf261a9480fcf9bb48cf03fb80bdd434c6ab63401856c74fa39", + "0xe6b596393fce7a3023a316ac34a1fac18e18779ca5983791866f857f257592e1", + "0x40384a52564fae5df8c3e41827cdf584e38f3f555a54ca749b7b516619071d85", + "0xe52f7c17a4106594563ae7b724e5613e87d8442177f39a36b946b0e335be0e5b", + "0x7726202a7c255a9d7be47af6f3b44c1e379cda61237866554396fb6ec043482c", + "0x665da353f296cde80e3cbcb9c7f93b107d5676e5cd694b0bd33334d74789beb9" ] }, "nodes": [ "enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303", "enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303", "enode://30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606@52.176.7.10:30303", - "enode://865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c@52.176.100.77:30303" + "enode://865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c@52.176.100.77:30303", + "enode://691907d5a7dee24884b791e799183e5db01f4fe0b6e9b795ffaf5cf85a3023a637f2abadc82fc0da168405092df869126377c5f190794cd2d1c067245ae2b1ce@13.125.237.43:30303" ], "accounts": { "0000000000000000000000000000000000000000": { "balance": "1" }, diff --git a/ethcore/res/ethereum/tests-issues/currents.json b/ethcore/res/ethereum/tests-issues/currents.json new file mode 100644 index 00000000000..b6be610eb92 --- /dev/null +++ b/ethcore/res/ethereum/tests-issues/currents.json @@ -0,0 +1,468 @@ +{ "block": + [ + { + "reference": "9590", + "failing": "stCreateTest", + "subtests": [ + "CreateOOGafterInitCodeReturndata2_d0g1v0_Constantinople" + ] + }, + { + "reference": "9590", + "failing": "stCreate2", + "subtests": [ + "RevertDepthCreateAddressCollision_d0g1v0_Constantinople", + "RevertDepthCreateAddressCollision_d1g1v1_Constantinople", + "CREATE2_Suicide_d5g0v0_Constantinople", + "CREATE2_Suicide_d7g0v0_Constantinople", + "create2collisionSelfdestructedOOG_d2g0v0_Byzantium", + "create2collisionSelfdestructedOOG_d2g0v0_Constantinople", + "create2collisionNonce_d1g0v0_Byzantium", + "create2collisionNonce_d1g0v0_Constantinople", + "CreateMessageRevertedOOGInInit_d0g1v0_Constantinople", + "create2callPrecompiles_d3g0v0_Constantinople", + "create2collisionCode_d1g0v0_Byzantium", + "create2collisionCode_d1g0v0_Constantinople", + "create2collisionStorage_d0g0v0_Byzantium", + "create2collisionStorage_d0g0v0_Constantinople", + "create2callPrecompiles_d4g0v0_Constantinople", + "create2collisionSelfdestructedRevert_d0g0v0_Byzantium", + "create2collisionSelfdestructedRevert_d0g0v0_Constantinople", + "CreateMessageReverted_d0g1v0_Constantinople", + "RevertOpcodeCreate_d0g1v0_Constantinople", + "CREATE2_Suicide_d11g0v0_Constantinople", + "create2checkFieldsInInitcode_d5g0v0_Constantinople", + "create2collisionSelfdestructedOOG_d1g0v0_Byzantium", + "create2collisionSelfdestructedOOG_d1g0v0_Constantinople", + "returndatacopy_following_create_d1g0v0_Constantinople", + "RevertDepthCreate2OOG_d1g1v1_Constantinople", + "create2collisionSelfdestructed_d2g0v0_Byzantium", + "create2collisionSelfdestructed_d2g0v0_Constantinople", + "create2callPrecompiles_d2g0v0_Constantinople", + "create2InitCodes_d2g0v0_Constantinople", + "create2collisionNonce_d2g0v0_Byzantium", + "create2collisionNonce_d2g0v0_Constantinople", + "create2collisionCode_d0g0v0_Byzantium", + "create2collisionCode_d0g0v0_Constantinople", + "CREATE2_Bounds_d0g0v0_Constantinople", + "RevertDepthCreate2OOG_d0g0v0_Constantinople", + "CREATE2_Suicide_d1g0v0_Constantinople", + "CREATE2_Bounds3_d0g1v0_Constantinople", + "create2collisionStorage_d2g0v0_Byzantium", + "create2collisionStorage_d2g0v0_Constantinople", + "RevertDepthCreateAddressCollision_d0g0v1_Constantinople", + "create2callPrecompiles_d5g0v0_Constantinople", + "create2collisionCode2_d0g0v0_Byzantium", + "create2collisionCode2_d0g0v0_Constantinople", + "create2noCash_d0g0v0_Byzantium", + "create2noCash_d0g0v0_Constantinople", + "create2checkFieldsInInitcode_d7g0v0_Constantinople", + "create2SmartInitCode_d1g0v0_Constantinople", + "create2InitCodes_d6g0v0_Constantinople", + "create2noCash_d1g0v0_Byzantium", + "create2noCash_d1g0v0_Constantinople", + "CREATE2_ContractSuicideDuringInit_ThenStoreThenReturn_d0g0v0_Constantinople", + "RevertOpcodeInCreateReturns_d0g0v0_Constantinople", + "create2collisionStorage_d1g0v0_Byzantium", + "create2collisionStorage_d1g0v0_Constantinople", + "create2checkFieldsInInitcode_d3g0v0_Constantinople", + "create2collisionBalance_d0g0v0_Byzantium", + "create2collisionBalance_d0g0v0_Constantinople", + "create2collisionSelfdestructed2_d0g0v0_Constantinople", + "create2InitCodes_d3g0v0_Constantinople", + "create2collisionCode2_d1g0v0_Byzantium", + "create2collisionCode2_d1g0v0_Constantinople", + "create2checkFieldsInInitcode_d1g0v0_Constantinople", + "create2collisionBalance_d1g0v0_Byzantium", + "create2collisionBalance_d1g0v0_Constantinople", + "CREATE2_Bounds3_d0g2v0_Constantinople", + "create2callPrecompiles_d6g0v0_Constantinople", + "Create2Recursive_d0g0v0_Constantinople", + "create2collisionSelfdestructedOOG_d0g0v0_Byzantium", + "create2collisionSelfdestructedOOG_d0g0v0_Constantinople", + "CREATE2_Suicide_d3g0v0_Constantinople", + "returndatacopy_following_create_d0g0v0_Constantinople", + "create2InitCodes_d8g0v0_Constantinople", + "RevertDepthCreate2OOG_d0g0v1_Constantinople", + "create2checkFieldsInInitcode_d2g0v0_Constantinople", + "RevertDepthCreate2OOG_d1g0v1_Constantinople", + "Create2OnDepth1024_d0g0v0_Constantinople", + "create2collisionSelfdestructed2_d1g0v0_Constantinople", + "create2collisionSelfdestructedRevert_d2g0v0_Byzantium", + "create2collisionSelfdestructedRevert_d2g0v0_Constantinople", + "create2callPrecompiles_d0g0v0_Constantinople", + "RevertDepthCreateAddressCollision_d0g1v1_Constantinople", + "create2collisionSelfdestructed_d1g0v0_Byzantium", + "create2collisionSelfdestructed_d1g0v0_Constantinople", + "call_outsize_then_create2_successful_then_returndatasize_d0g0v0_Byzantium", + "call_outsize_then_create2_successful_then_returndatasize_d0g0v0_Constantinople", + "Create2OOGafterInitCodeRevert_d0g0v0_Constantinople", + "Create2OOGafterInitCodeReturndata3_d0g0v0_Constantinople", + "Create2OOGafterInitCodeReturndataSize_d0g0v0_Constantinople", + "create2InitCodes_d7g0v0_Constantinople", + "CREATE2_Suicide_d10g0v0_Constantinople", + "RevertDepthCreate2OOG_d0g1v0_Constantinople", + "create2InitCodes_d5g0v0_Constantinople", + "create2collisionSelfdestructedRevert_d1g0v0_Byzantium", + "create2collisionSelfdestructedRevert_d1g0v0_Constantinople", + "RevertDepthCreate2OOG_d1g1v0_Constantinople", + "create2collisionSelfdestructed_d0g0v0_Byzantium", + "create2collisionSelfdestructed_d0g0v0_Constantinople", + "create2noCash_d2g0v0_Byzantium", + "create2noCash_d2g0v0_Constantinople", + "CREATE2_Bounds3_d0g0v0_Constantinople", + "create2collisionNonce_d0g0v0_Byzantium", + "create2collisionNonce_d0g0v0_Constantinople", + "CREATE2_Suicide_d2g0v0_Constantinople", + "Create2OOGafterInitCode_d0g0v0_Constantinople", + "call_then_create2_successful_then_returndatasize_d0g0v0_Byzantium", + "call_then_create2_successful_then_returndatasize_d0g0v0_Constantinople", + "create2collisionBalance_d2g0v0_Byzantium", + "create2collisionBalance_d2g0v0_Constantinople", + "create2checkFieldsInInitcode_d6g0v0_Constantinople", + "RevertDepthCreate2OOG_d0g1v1_Constantinople", + "returndatacopy_afterFailing_create_d0g0v0_Constantinople", + "returndatacopy_following_revert_in_create_d0g0v0_Constantinople", + "CREATE2_Suicide_d9g0v0_Constantinople", + "create2callPrecompiles_d7g0v0_Constantinople", + "RevertDepthCreateAddressCollision_d1g0v1_Constantinople", + "create2InitCodes_d1g0v0_Constantinople", + "CREATE2_Bounds_d0g1v0_Constantinople", + "Create2OOGafterInitCodeReturndata_d0g0v0_Constantinople", + "create2checkFieldsInInitcode_d4g0v0_Constantinople", + "CreateMessageRevertedOOGInInit_d0g0v0_Constantinople", + "RevertDepthCreateAddressCollision_d1g1v0_Constantinople", + "returndatacopy_following_successful_create_d0g0v0_Constantinople", + "create2checkFieldsInInitcode_d0g0v0_Constantinople", + "CreateMessageReverted_d0g0v0_Constantinople", + "create2SmartInitCode_d0g0v0_Constantinople", + "CREATE2_Bounds2_d0g0v0_Constantinople", + "returndatasize_following_successful_create_d0g0v0_Constantinople", + "CREATE2_Bounds2_d0g1v0_Constantinople", + "returndatacopy_0_0_following_successful_create_d0g0v0_Constantinople", + "RevertDepthCreateAddressCollision_d0g0v0_Constantinople", + "CREATE2_Suicide_d0g0v0_Constantinople", + "create2InitCodes_d0g0v0_Constantinople", + "Create2OnDepth1023_d0g0v0_Constantinople", + "create2InitCodes_d4g0v0_Constantinople", + "Create2OOGafterInitCodeReturndata2_d0g0v0_Constantinople", + "create2collisionBalance_d3g0v0_Byzantium", + "create2collisionBalance_d3g0v0_Constantinople", + "CREATE2_Suicide_d4g0v0_Constantinople", + "Create2OOGafterInitCode_d0g1v0_Constantinople", + "RevertDepthCreateAddressCollision_d1g0v0_Constantinople", + "Create2OOGafterInitCodeRevert2_d0g0v0_Constantinople", + "Create2OOGafterInitCodeReturndata_d0g1v0_Constantinople", + "Create2Recursive_d0g1v0_Constantinople", + "create2collisionCode_d2g0v0_Byzantium", + "create2collisionCode_d2g0v0_Constantinople", + "CREATE2_Suicide_d6g0v0_Constantinople", + "CREATE2_Suicide_d8g0v0_Constantinople", + "RevertOpcodeCreate_d0g0v0_Constantinople", + "Create2OOGafterInitCodeReturndata2_d0g1v0_Constantinople", + "create2callPrecompiles_d1g0v0_Constantinople", + "RevertInCreateInInit_d0g0v0_Constantinople", + "RevertDepthCreate2OOG_d1g0v0_Constantinople" + ] + }, + { + "reference": "9590", + "failing": "bcStateTest", + "subtests": [ + "suicideStorageCheck_Byzantium", + "suicideStorageCheck_Constantinople", + "suicideStorageCheckVCreate2_Byzantium", + "suicideStorageCheckVCreate2_Constantinople", + "create2collisionwithSelfdestructSameBlock_Constantinople", + "blockhashNonConstArg_Constantinople", + "suicideThenCheckBalance_Constantinople", + "suicideThenCheckBalance_Homestead", + "suicideStorageCheckVCreate_Byzantium", + "suicideStorageCheckVCreate_Constantinople" + ] + }, + { + "reference": "9590", + "failing": "stEIP158Specific", + "subtests": [ + "callToEmptyThenCallError_d0g0v0_Byzantium", + "callToEmptyThenCallError_d0g0v0_Constantinople", + "callToEmptyThenCallError_d0g0v0_EIP158" + ] + }, + { + "reference": "9590", + "failing": "stPreCompiledContracts", + "subtests": [ + "identity_to_smaller_d0g0v0_Constantinople", + "identity_to_bigger_d0g0v0_Constantinople" + ] + }, + { + "reference": "9590", + "failing": "stReturnDataTest", + "subtests": [ + "modexp_modsize0_returndatasize_d0g1v0_Constantinople", + "modexp_modsize0_returndatasize_d0g2v0_Constantinople", + "modexp_modsize0_returndatasize_d0g3v0_Constantinople" + ] + }, + { + "reference": "9590", + "failing": "stSpecialTest", + "subtests": [ + "push32withoutByte_d0g0v0_Constantinople" + ] + } + + ], + "state": + [ + { + "reference": "9590", + "failing": "stCreateTest", + "subtests": { + "CreateOOGafterInitCodeReturndata2": { + "subnumbers": ["2"], + "chain": "Constantinople (test)" + } + } + }, + { + "reference": "9590", + "failing": "stCreate2Test", + "subtests": { + "RevertInCreateInInit": { + "subnumbers": ["1"], + "chain": "Constantinople (test)" + } + } + }, + { + "reference": "9590", + "failing": "stEIP150Specific", + "subtests": { + "NewGasPriceForCodes": { + "subnumbers": ["1"], + "chain": "Constantinople (test)" + } + } + }, + { + "reference": "9590", + "failing": "stInitCodeTest", + "subtests": { + "OutOfGasContractCreation": { + "subnumbers": ["4"], + "chain": "Constantinople (test)" + } + } + }, + { + "reference": "9590", + "failing": "stPreCompiledContracts", + "subtests": { + "modexp": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + } + } + }, + { + "reference": "9590", + "failing": "stRevertTest", + "subtests": { + "LoopCallsDepthThenRevert3": { + "subnumbers": ["1"], + "chain": "Constantinople (test)" + }, + "RevertOpcodeCreate": { + "subnumbers": ["1"], + "chain": "Constantinople (test)" + }, + "RevertSubCallStorageOOG2": { + "subnumbers": ["1","3"], + "chain": "Constantinople (test)" + }, + "RevertDepthCreateOOG": { + "subnumbers": ["3","4"], + "chain": "Constantinople (test)" + }, + "RevertOpcodeMultipleSubCalls": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "RevertOpcodeDirectCall": { + "subnumbers": ["1","2"], + "chain": "Constantinople (test)" + }, + "LoopCallsDepthThenRevert2": { + "subnumbers": ["1"], + "chain": "Constantinople (test)" + }, + "RevertDepth2": { + "subnumbers": ["1"], + "chain": "Constantinople (test)" + }, + "RevertRemoteSubCallStorageOOG2": { + "subnumbers": ["1","2"], + "chain": "Constantinople (test)" + }, + "RevertDepthCreateAddressCollision": { + "subnumbers": ["3","4"], + "chain": "Constantinople (test)" + } + } + }, + { + "reference": "9590", + "failing": "stStaticCall", + "subtests": { + "static_RevertDepth2": { + "subnumbers": ["1","3"], + "chain": "Constantinople (test)" + }, + "static_CheckOpcodes4": { + "subnumbers": ["3"], + "chain": "Constantinople (test)" + }, + "static_CheckOpcodes3": { + "subnumbers": ["5","6","7","8"], + "chain": "Constantinople (test)" + }, + "static_callBasic": { + "subnumbers": ["1","2"], + "chain": "Constantinople (test)" + }, + "static_CheckOpcodes2": { + "subnumbers": ["5","6","7","8"], + "chain": "Constantinople (test)" + }, + "static_callCreate": { + "subnumbers": ["2"], + "chain": "Constantinople (test)" + } + } + }, + { + "reference": "https://github.com/ethereum/tests/issues/512", + "failing": "stZeroKnowledge", + "subtests": { + "pointAddTrunc": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "pointAdd": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "pointMulAdd": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "pointMulAdd2": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + } + } + }, + { + "reference": "9590", + "failing": "stCreate2Test", + "subtests": { + "call_then_create2_successful_then_returndatasize": { + "subnumbers": ["1"], + "chain": "Constantinople (test)" + }, + "returndatacopy_afterFailing_create": { + "subnumbers": ["1"], + "chain": "Constantinople (test)" + }, + "create2checkFieldsInInitcode": { + "subnumbers": ["1","2","3","5","6","7"], + "chain": "Constantinople (test)" + }, + "Create2Recursive": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "create2collisionBalance": { + "subnumbers": ["2","3"], + "chain": "Constantinople (test)" + }, + "create2InitCodes": { + "subnumbers": ["1","5","6","7","8","9"], + "chain": "Constantinople (test)" + }, + "Create2OOGafterInitCode": { + "subnumbers": ["2"], + "chain": "Constantinople (test)" + }, + "CreateMessageRevertedOOGInInit": { + "subnumbers": ["2"], + "chain": "Constantinople (test)" + }, + "returndatacopy_following_revert_in_create": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "create2collisionSelfdestructed": { + "subnumbers": ["2"], + "chain": "Constantinople (test)" + }, + "returndatacopy_0_0_following_successful_create": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "Create2OnDepth1023": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "Create2OOGafterInitCodeReturndata2": { + "subnumbers": ["2"], + "chain": "Constantinople (test)" + }, + "RevertOpcodeInCreateReturns": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "CREATE2_ContractSuicideDuringInit_ThenStoreThenReturn": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "returndatasize_following_successful_create": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "call_outsize_then_create2_successful_then_returndatasize": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "CreateMessageReverted": { + "subnumbers": ["2"], + "chain": "Constantinople (test)" + }, + "CREATE2_Suicide": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "Create2OOGafterInitCodeRevert": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "Create2OnDepth1024": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + }, + "create2collisionStorage": { + "subnumbers": ["2","3"], + "chain": "Constantinople (test)" + }, + "create2callPrecompiles": { + "subnumbers": ["*"], + "chain": "Constantinople (test)" + } + } + } + ] +} diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 470c5361e02..e9b6f5b1662 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -52,7 +52,7 @@ use encoded; use engines::{EthEngine, EpochTransition, ForkChoice}; use error::{ ImportErrorKind, BlockImportErrorKind, ExecutionError, CallError, BlockError, ImportResult, - QueueError, QueueErrorKind, Error as EthcoreError + QueueError, QueueErrorKind, Error as EthcoreError, EthcoreResult, }; use vm::{EnvInfo, LastHashes}; use evm::Schedule; @@ -296,7 +296,6 @@ impl Importer { continue; } - let raw = block.bytes.clone(); match self.check_and_lock_block(block, client) { Ok(closed_block) => { if self.engine.is_proposal(&header) { @@ -314,8 +313,8 @@ impl Importer { } }, Err(err) => { - self.bad_blocks.report(raw, format!("{:?}", err)); - invalid_blocks.insert(header.hash()); + self.bad_blocks.report(bytes, format!("{:?}", err)); + invalid_blocks.insert(hash); }, } } @@ -356,7 +355,7 @@ impl Importer { imported } - fn check_and_lock_block(&self, block: PreverifiedBlock, client: &Client) -> Result { + fn check_and_lock_block(&self, block: PreverifiedBlock, client: &Client) -> EthcoreResult { let engine = &*self.engine; let header = block.header.clone(); @@ -364,7 +363,7 @@ impl Importer { let best_block_number = client.chain.read().best_block_number(); if client.pruning_info().earliest_state > header.number() { warn!(target: "client", "Block import failed for #{} ({})\nBlock is ancient (current best block: #{}).", header.number(), header.hash(), best_block_number); - return Err(()); + bail!("Block is ancient"); } // Check if parent is in chain @@ -372,7 +371,7 @@ impl Importer { Some(h) => h, None => { warn!(target: "client", "Block import failed for #{} ({}): Parent not found ({}) ", header.number(), header.hash(), header.parent_hash()); - return Err(()); + bail!("Parent not found"); } }; @@ -391,13 +390,13 @@ impl Importer { if let Err(e) = verify_family_result { warn!(target: "client", "Stage 3 block verification failed for #{} ({})\nError: {:?}", header.number(), header.hash(), e); - return Err(()); + bail!(e); }; let verify_external_result = self.verifier.verify_block_external(&header, engine); if let Err(e) = verify_external_result { warn!(target: "client", "Stage 4 block verification failed for #{} ({})\nError: {:?}", header.number(), header.hash(), e); - return Err(()); + bail!(e); }; // Enact Verified Block @@ -417,9 +416,13 @@ impl Importer { &mut chain.ancestry_with_metadata_iter(*header.parent_hash()), ); - let mut locked_block = enact_result.map_err(|e| { - warn!(target: "client", "Block import failed for #{} ({})\nError: {:?}", header.number(), header.hash(), e); - })?; + let mut locked_block = match enact_result { + Ok(b) => b, + Err(e) => { + warn!(target: "client", "Block import failed for #{} ({})\nError: {:?}", header.number(), header.hash(), e); + bail!(e); + } + }; // Strip receipts for blocks before validate_receipts_transition, // if the expected receipts root header does not match. @@ -433,7 +436,7 @@ impl Importer { // Final Verification if let Err(e) = self.verifier.verify_block_final(&header, locked_block.block().header()) { warn!(target: "client", "Stage 5 block verification failed for #{} ({})\nError: {:?}", header.number(), header.hash(), e); - return Err(()); + bail!(e); } Ok(locked_block) @@ -443,7 +446,7 @@ impl Importer { /// /// The block is guaranteed to be the next best blocks in the /// first block sequence. Does no sealing or transaction validation. - fn import_old_block(&self, unverified: Unverified, receipts_bytes: &[u8], db: &KeyValueDB, chain: &BlockChain) -> Result<(), ::error::Error> { + fn import_old_block(&self, unverified: Unverified, receipts_bytes: &[u8], db: &KeyValueDB, chain: &BlockChain) -> EthcoreResult<()> { let receipts = ::rlp::decode_list(receipts_bytes); let _import_lock = self.import_lock.lock(); @@ -1153,7 +1156,8 @@ impl Client { }, }; - snapshot::take_snapshot(&*self.engine, &self.chain.read(), start_hash, db.as_hashdb(), writer, p)?; + let processing_threads = self.config.snapshot.processing_threads; + snapshot::take_snapshot(&*self.engine, &self.chain.read(), start_hash, db.as_hashdb(), writer, p, processing_threads)?; Ok(()) } @@ -1491,7 +1495,7 @@ impl Call for Client { let sender = t.sender(); let options = || TransactOptions::with_tracing().dont_check_nonce(); - let cond = |gas| { + let exec = |gas| { let mut tx = t.as_unsigned().clone(); tx.gas = gas; let tx = tx.fake_sign(sender); @@ -1499,22 +1503,28 @@ impl Call for Client { let mut clone = state.clone(); let machine = self.engine.machine(); let schedule = machine.schedule(env_info.number); - Ok(Executive::new(&mut clone, &env_info, &machine, &schedule) + Executive::new(&mut clone, &env_info, &machine, &schedule) .transact_virtual(&tx, options()) + .ok() .map(|r| r.exception.is_none()) - .unwrap_or(false)) }; - if !cond(upper)? { + let cond = |gas| exec(gas).unwrap_or(false); + + if !cond(upper) { upper = max_upper; - if !cond(upper)? { - trace!(target: "estimate_gas", "estimate_gas failed with {}", upper); - let err = ExecutionError::Internal(format!("Requires higher than upper limit of {}", upper)); - return Err(err.into()) + match exec(upper) { + Some(false) => return Err(CallError::Exceptional), + None => { + trace!(target: "estimate_gas", "estimate_gas failed with {}", upper); + let err = ExecutionError::Internal(format!("Requires higher than upper limit of {}", upper)); + return Err(err.into()) + }, + _ => {}, } } let lower = t.gas_required(&self.engine.schedule(env_info.number)).into(); - if cond(lower)? { + if cond(lower) { trace!(target: "estimate_gas", "estimate_gas succeeded with {}", lower); return Ok(lower) } @@ -1523,12 +1533,12 @@ impl Call for Client { /// Returns the lowest value between `lower` and `upper` for which `cond` returns true. /// We assert: `cond(lower) = false`, `cond(upper) = true` fn binary_chop(mut lower: U256, mut upper: U256, mut cond: F) -> Result - where F: FnMut(U256) -> Result + where F: FnMut(U256) -> bool { while upper - lower > 1.into() { let mid = (lower + upper) / 2; trace!(target: "estimate_gas", "{} .. {} .. {}", lower, mid, upper); - let c = cond(mid)?; + let c = cond(mid); match c { true => upper = mid, false => lower = mid, @@ -2352,14 +2362,13 @@ impl ProvingBlockChainClient for Client { env_info.gas_limit = transaction.gas.clone(); let mut jdb = self.state_db.read().journal_db().boxed_clone(); - state::prove_transaction( + state::prove_transaction_virtual( jdb.as_hashdb_mut(), header.state_root().clone(), &transaction, self.engine.machine(), &env_info, self.factories.clone(), - false, ) } diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index 40d2c4990f1..9567a499f74 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -19,6 +19,7 @@ use std::fmt::{Display, Formatter, Error as FmtError}; use verification::{VerifierType, QueueConfig}; use journaldb; +use snapshot::SnapshotConfiguration; pub use std::time::Duration; pub use blockchain::Config as BlockChainConfig; @@ -120,6 +121,8 @@ pub struct ClientConfig { pub check_seal: bool, /// Maximal number of transactions queued for verification in a separate thread. pub transaction_verification_queue_size: usize, + /// Snapshot configuration + pub snapshot: SnapshotConfiguration, } impl Default for ClientConfig { @@ -144,6 +147,7 @@ impl Default for ClientConfig { history_mem: 32 * mb, check_seal: true, transaction_verification_queue_size: 8192, + snapshot: Default::default(), } } } diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 81fbc4e6f71..09f00515e84 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -118,7 +118,7 @@ pub struct TestBlockChainClient { } /// Used for generating test client blocks. -#[derive(Clone)] +#[derive(Clone, Copy)] pub enum EachBlockWith { /// Plain block. Nothing, @@ -242,69 +242,68 @@ impl TestBlockChainClient { *self.error_on_logs.write() = val; } - /// Add blocks to test client. - pub fn add_blocks(&self, count: usize, with: EachBlockWith) { - let len = self.numbers.read().len(); - for n in len..(len + count) { - let mut header = BlockHeader::new(); - header.set_difficulty(From::from(n)); - header.set_parent_hash(self.last_hash.read().clone()); - header.set_number(n as BlockNumber); - header.set_gas_limit(U256::from(1_000_000)); - header.set_extra_data(self.extra_data.clone()); - let uncles = match with { - EachBlockWith::Uncle | EachBlockWith::UncleAndTransaction => { - let mut uncles = RlpStream::new_list(1); - let mut uncle_header = BlockHeader::new(); - uncle_header.set_difficulty(From::from(n)); - uncle_header.set_parent_hash(self.last_hash.read().clone()); - uncle_header.set_number(n as BlockNumber); - uncles.append(&uncle_header); - header.set_uncles_hash(keccak(uncles.as_raw())); - uncles - }, - _ => RlpStream::new_list(0) - }; - let txs = match with { - EachBlockWith::Transaction | EachBlockWith::UncleAndTransaction => { - let mut txs = RlpStream::new_list(1); - let keypair = Random.generate().unwrap(); - // Update nonces value - self.nonces.write().insert(keypair.address(), U256::one()); - let tx = Transaction { - action: Action::Create, - value: U256::from(100), - data: "3331600055".from_hex().unwrap(), - gas: U256::from(100_000), - gas_price: U256::from(200_000_000_000u64), - nonce: U256::zero() - }; - let signed_tx = tx.sign(keypair.secret(), None); - txs.append(&signed_tx); - txs.out() - }, - _ => ::rlp::EMPTY_LIST_RLP.to_vec() - }; - - let mut rlp = RlpStream::new_list(3); - rlp.append(&header); - rlp.append_raw(&txs, 1); - rlp.append_raw(uncles.as_raw(), 1); - let unverified = Unverified::from_rlp(rlp.out()).unwrap(); - self.import_block(unverified).unwrap(); - } - } + /// Add a block to test client. + pub fn add_block(&self, with: EachBlockWith, hook: F) + where F: Fn(BlockHeader) -> BlockHeader + { + let n = self.numbers.read().len(); + + let mut header = BlockHeader::new(); + header.set_difficulty(From::from(n)); + header.set_parent_hash(self.last_hash.read().clone()); + header.set_number(n as BlockNumber); + header.set_gas_limit(U256::from(1_000_000)); + header.set_extra_data(self.extra_data.clone()); + + header = hook(header); + + let uncles = match with { + EachBlockWith::Uncle | EachBlockWith::UncleAndTransaction => { + let mut uncles = RlpStream::new_list(1); + let mut uncle_header = BlockHeader::new(); + uncle_header.set_difficulty(From::from(n)); + uncle_header.set_parent_hash(self.last_hash.read().clone()); + uncle_header.set_number(n as BlockNumber); + uncles.append(&uncle_header); + header.set_uncles_hash(keccak(uncles.as_raw())); + uncles + }, + _ => RlpStream::new_list(0) + }; + let txs = match with { + EachBlockWith::Transaction | EachBlockWith::UncleAndTransaction => { + let mut txs = RlpStream::new_list(1); + let keypair = Random.generate().unwrap(); + // Update nonces value + self.nonces.write().insert(keypair.address(), U256::one()); + let tx = Transaction { + action: Action::Create, + value: U256::from(100), + data: "3331600055".from_hex().unwrap(), + gas: U256::from(100_000), + gas_price: U256::from(200_000_000_000u64), + nonce: U256::zero() + }; + let signed_tx = tx.sign(keypair.secret(), None); + txs.append(&signed_tx); + txs.out() + }, + _ => ::rlp::EMPTY_LIST_RLP.to_vec() + }; - /// Make a bad block by setting invalid extra data. - pub fn corrupt_block(&self, n: BlockNumber) { - let hash = self.block_hash(BlockId::Number(n)).unwrap(); - let mut header: BlockHeader = self.block_header(BlockId::Number(n)).unwrap().decode().expect("decoding failed"); - header.set_extra_data(b"This extra data is way too long to be considered valid".to_vec()); let mut rlp = RlpStream::new_list(3); rlp.append(&header); - rlp.append_raw(&::rlp::NULL_RLP, 1); - rlp.append_raw(&::rlp::NULL_RLP, 1); - self.blocks.write().insert(hash, rlp.out()); + rlp.append_raw(&txs, 1); + rlp.append_raw(uncles.as_raw(), 1); + let unverified = Unverified::from_rlp(rlp.out()).unwrap(); + self.import_block(unverified).unwrap(); + } + + /// Add a sequence of blocks to test client. + pub fn add_blocks(&self, count: usize, with: EachBlockWith) { + for _ in 0..count { + self.add_block(with, |header| header); + } } /// Make a bad block by setting invalid parent hash. diff --git a/ethcore/src/engines/authority_round/mod.rs b/ethcore/src/engines/authority_round/mod.rs index 577c7b97f63..9e779677b0e 100644 --- a/ethcore/src/engines/authority_round/mod.rs +++ b/ethcore/src/engines/authority_round/mod.rs @@ -321,7 +321,7 @@ impl EmptyStep { impl fmt::Display for EmptyStep { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - write!(f, "({}, {}, {})", self.signature, self.step, self.parent_hash) + write!(f, "({:x}, {}, {:x})", self.signature, self.step, self.parent_hash) } } @@ -829,6 +829,10 @@ impl Engine for AuthorityRound { /// Additional engine-specific information for the user/developer concerning `header`. fn extra_info(&self, header: &Header) -> BTreeMap { + if header.seal().len() < header_expected_seal_fields(header, self.empty_steps_transition) { + return BTreeMap::default(); + } + let step = header_step(header, self.empty_steps_transition).as_ref().map(ToString::to_string).unwrap_or("".into()); let signature = header_signature(header, self.empty_steps_transition).as_ref().map(ToString::to_string).unwrap_or("".into()); @@ -1403,10 +1407,12 @@ impl Engine for AuthorityRound { #[cfg(test)] mod tests { + use std::collections::BTreeMap; use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering}; use hash::keccak; use ethereum_types::{Address, H520, H256, U256}; + use ethkey::Signature; use header::Header; use rlp::encode; use block::*; @@ -2072,4 +2078,40 @@ mod tests { addr1_balance + (1000 + 0) + (1000 + 2), ) } + + #[test] + fn extra_info_from_seal() { + let (spec, tap, accounts) = setup_empty_steps(); + let engine = &*spec.engine; + + let addr1 = accounts[0]; + engine.set_signer(tap.clone(), addr1, "1".into()); + + let mut header: Header = Header::default(); + let empty_step = empty_step(engine, 1, &header.parent_hash()); + let sealed_empty_step = empty_step.sealed(); + + header.set_number(2); + header.set_seal(vec![ + encode(&2usize).to_vec(), + encode(&H520::default()).to_vec(), + ::rlp::encode_list(&vec![sealed_empty_step]).to_vec(), + ]); + + let info = engine.extra_info(&header); + + let mut expected = BTreeMap::default(); + expected.insert("step".into(), "2".into()); + expected.insert("signature".into(), Signature::from(H520::default()).to_string()); + expected.insert("emptySteps".into(), format!("[{}]", empty_step)); + + assert_eq!(info, expected); + + header.set_seal(vec![]); + + assert_eq!( + engine.extra_info(&header), + BTreeMap::default(), + ); + } } diff --git a/ethcore/src/engines/instant_seal.rs b/ethcore/src/engines/instant_seal.rs index 80e9ea45169..c1b5de4ab5d 100644 --- a/ethcore/src/engines/instant_seal.rs +++ b/ethcore/src/engines/instant_seal.rs @@ -18,7 +18,7 @@ use engines::{Engine, Seal}; use parity_machine::{Machine, Transactions, TotalScoredHeader}; /// `InstantSeal` params. -#[derive(Debug, PartialEq)] +#[derive(Default, Debug, PartialEq)] pub struct InstantSealParams { /// Whether to use millisecond timestamp pub millisecond_timestamp: bool, diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index 424a9e94c91..0f5a9f4ccc0 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -32,7 +32,7 @@ pub mod epoch; pub use self::authority_round::AuthorityRound; pub use self::basic_authority::BasicAuthority; pub use self::epoch::{EpochVerifier, Transition as EpochTransition}; -pub use self::instant_seal::InstantSeal; +pub use self::instant_seal::{InstantSeal, InstantSealParams}; pub use self::null_engine::NullEngine; pub use self::tendermint::Tendermint; @@ -44,7 +44,7 @@ use self::epoch::PendingTransition; use account_provider::AccountProvider; use builtin::Builtin; -use vm::{EnvInfo, Schedule, CreateContractAddress}; +use vm::{EnvInfo, Schedule, CreateContractAddress, CallType, ActionValue}; use error::Error; use header::{Header, BlockNumber}; use snapshot::SnapshotComponents; @@ -163,8 +163,10 @@ pub fn default_system_or_code_call<'a>(machine: &'a ::machine::EthereumMachine, None, Some(code), Some(code_hash), + Some(ActionValue::Apparent(U256::zero())), U256::max_value(), Some(data), + Some(CallType::StaticCall), ) }, }; diff --git a/ethcore/src/engines/tendermint/mod.rs b/ethcore/src/engines/tendermint/mod.rs index 2d0015d06b2..70d78147e42 100644 --- a/ethcore/src/engines/tendermint/mod.rs +++ b/ethcore/src/engines/tendermint/mod.rs @@ -693,7 +693,6 @@ impl Engine for Tendermint { } fn stop(&self) { - self.step_service.stop() } fn is_proposal(&self, header: &Header) -> bool { diff --git a/ethcore/src/ethereum/mod.rs b/ethcore/src/ethereum/mod.rs index 6d33e6d2d03..3336b8ba852 100644 --- a/ethcore/src/ethereum/mod.rs +++ b/ethcore/src/ethereum/mod.rs @@ -152,6 +152,9 @@ pub fn new_frontier_test_machine() -> EthereumMachine { load_machine(include_byt /// Create a new Foundation Homestead-era chain spec as though it never changed from Frontier. pub fn new_homestead_test_machine() -> EthereumMachine { load_machine(include_bytes!("../../res/ethereum/homestead_test.json")) } +/// Create a new Foundation Homestead-EIP210-era chain spec as though it never changed from Homestead/Frontier. +pub fn new_eip210_test_machine() -> EthereumMachine { load_machine(include_bytes!("../../res/ethereum/eip210_test.json")) } + /// Create a new Foundation Byzantium era spec. pub fn new_byzantium_test_machine() -> EthereumMachine { load_machine(include_bytes!("../../res/ethereum/byzantium_test.json")) } diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index d2cf2f027fd..8bf58ecaeea 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -627,7 +627,8 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { let schedule = self.schedule; // refunds from SSTORE nonzero -> zero - let sstore_refunds = substate.sstore_clears_refund; + assert!(substate.sstore_clears_refund >= 0, "On transaction level, sstore clears refund cannot go below zero."); + let sstore_refunds = U256::from(substate.sstore_clears_refund as u64); // refunds from contract suicides let suicide_refunds = U256::from(schedule.suicide_refund_gas) * U256::from(substate.suicides.len()); let refunds_bound = sstore_refunds + suicide_refunds; @@ -1653,7 +1654,7 @@ mod tests { let gas_used = gas - gas_left; // sstore: 0 -> (1) -> () -> (1 -> 0 -> 1) assert_eq!(gas_used, U256::from(41860)); - assert_eq!(refund, U256::from(19800)); + assert_eq!(refund, 19800); assert_eq!(state.storage_at(&operating_address, &k).unwrap(), H256::from(U256::from(1))); // Test a call via top-level -> y2 -> x2 @@ -1671,7 +1672,7 @@ mod tests { let gas_used = gas - gas_left; // sstore: 1 -> (1) -> () -> (0 -> 1 -> 0) assert_eq!(gas_used, U256::from(11860)); - assert_eq!(refund, U256::from(19800)); + assert_eq!(refund, 19800); } fn wasm_sample_code() -> Arc> { diff --git a/ethcore/src/externalities.rs b/ethcore/src/externalities.rs index 5c7c95c6671..1152ee1d6ce 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -394,12 +394,12 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B> self.depth } - fn add_sstore_refund(&mut self, value: U256) { - self.substate.sstore_clears_refund = self.substate.sstore_clears_refund.saturating_add(value); + fn add_sstore_refund(&mut self, value: usize) { + self.substate.sstore_clears_refund += value as i128; } - fn sub_sstore_refund(&mut self, value: U256) { - self.substate.sstore_clears_refund = self.substate.sstore_clears_refund.saturating_sub(value); + fn sub_sstore_refund(&mut self, value: usize) { + self.substate.sstore_clears_refund -= value as i128; } fn trace_next_instruction(&mut self, pc: usize, instruction: u8, current_gas: U256) -> bool { diff --git a/ethcore/src/json_tests/difficulty.rs b/ethcore/src/json_tests/difficulty.rs index 0de1f1777b7..23a85594552 100644 --- a/ethcore/src/json_tests/difficulty.rs +++ b/ethcore/src/json_tests/difficulty.rs @@ -95,10 +95,11 @@ mod difficulty_test_foundation { declare_test!{DifficultyTests_difficultyMainNetwork, "BasicTests/difficultyMainNetwork.json"} } -mod difficulty_test_ropsten { - difficulty_json_test_nopath!(new_ropsten_test); - declare_test!{DifficultyTests_difficultyRopsten, "BasicTests/difficultyRopsten.json"} -} +// Disabling Ropsten diff tests; waiting for upstream ethereum/tests Constantinople update +//mod difficulty_test_ropsten { +// difficulty_json_test_nopath!(new_ropsten_test); +// declare_test!{DifficultyTests_difficultyRopsten, "BasicTests/difficultyRopsten.json"} +//} mod difficulty_test_frontier { difficulty_json_test_nopath!(new_frontier_test); diff --git a/ethcore/src/json_tests/executive.rs b/ethcore/src/json_tests/executive.rs index 78ef3e22dcf..b9774c2b100 100644 --- a/ethcore/src/json_tests/executive.rs +++ b/ethcore/src/json_tests/executive.rs @@ -209,11 +209,11 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for TestExt<'a, T, V, B> false } - fn add_sstore_refund(&mut self, value: U256) { + fn add_sstore_refund(&mut self, value: usize) { self.ext.add_sstore_refund(value) } - fn sub_sstore_refund(&mut self, value: U256) { + fn sub_sstore_refund(&mut self, value: usize) { self.ext.sub_sstore_refund(value) } } diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index 8162408e92f..c74cc6bf4d1 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -135,8 +135,10 @@ impl EthereumMachine { Some(contract_address), code, code_hash, + None, gas, - data + data, + None, ) } @@ -149,8 +151,10 @@ impl EthereumMachine { contract_address: Option
, code: Option>>, code_hash: Option, + value: Option, gas: U256, - data: Option> + data: Option>, + call_type: Option, ) -> Result, Error> { let env_info = { let mut env_info = block.env_info(); @@ -167,11 +171,11 @@ impl EthereumMachine { origin: SYSTEM_ADDRESS, gas, gas_price: 0.into(), - value: ActionValue::Transfer(0.into()), + value: value.unwrap_or(ActionValue::Transfer(0.into())), code, code_hash, data, - call_type: CallType::Call, + call_type: call_type.unwrap_or(CallType::Call), params_type: ParamsType::Separate, }; let schedule = self.schedule(env_info.number); diff --git a/ethcore/src/snapshot/consensus/authority.rs b/ethcore/src/snapshot/consensus/authority.rs index 72d828643dd..1e21d6fccee 100644 --- a/ethcore/src/snapshot/consensus/authority.rs +++ b/ethcore/src/snapshot/consensus/authority.rs @@ -30,7 +30,7 @@ use machine::EthereumMachine; use ids::BlockId; use header::Header; use receipt::Receipt; -use snapshot::{Error, ManifestData}; +use snapshot::{Error, ManifestData, Progress}; use itertools::{Position, Itertools}; use rlp::{RlpStream, Rlp}; @@ -59,6 +59,7 @@ impl SnapshotComponents for PoaSnapshot { chain: &BlockChain, block_at: H256, sink: &mut ChunkSink, + _progress: &Progress, preferred_size: usize, ) -> Result<(), Error> { let number = chain.block_number(&block_at) diff --git a/ethcore/src/snapshot/consensus/mod.rs b/ethcore/src/snapshot/consensus/mod.rs index 7b6b03a3ee2..ec14b2188d3 100644 --- a/ethcore/src/snapshot/consensus/mod.rs +++ b/ethcore/src/snapshot/consensus/mod.rs @@ -22,7 +22,7 @@ use std::sync::Arc; use blockchain::{BlockChain, BlockChainDB}; use engines::EthEngine; -use snapshot::{Error, ManifestData}; +use snapshot::{Error, ManifestData, Progress}; use ethereum_types::H256; @@ -49,6 +49,7 @@ pub trait SnapshotComponents: Send { chain: &BlockChain, block_at: H256, chunk_sink: &mut ChunkSink, + progress: &Progress, preferred_size: usize, ) -> Result<(), Error>; diff --git a/ethcore/src/snapshot/consensus/work.rs b/ethcore/src/snapshot/consensus/work.rs index ded004fe89f..b287ae9bb5f 100644 --- a/ethcore/src/snapshot/consensus/work.rs +++ b/ethcore/src/snapshot/consensus/work.rs @@ -28,7 +28,7 @@ use std::sync::Arc; use blockchain::{BlockChain, BlockChainDB, BlockProvider}; use engines::EthEngine; -use snapshot::{Error, ManifestData}; +use snapshot::{Error, ManifestData, Progress}; use snapshot::block::AbridgedBlock; use ethereum_types::H256; use kvdb::KeyValueDB; @@ -65,6 +65,7 @@ impl SnapshotComponents for PowSnapshot { chain: &BlockChain, block_at: H256, chunk_sink: &mut ChunkSink, + progress: &Progress, preferred_size: usize, ) -> Result<(), Error> { PowWorker { @@ -72,6 +73,7 @@ impl SnapshotComponents for PowSnapshot { rlps: VecDeque::new(), current_hash: block_at, writer: chunk_sink, + progress: progress, preferred_size: preferred_size, }.chunk_all(self.blocks) } @@ -96,6 +98,7 @@ struct PowWorker<'a> { rlps: VecDeque, current_hash: H256, writer: &'a mut ChunkSink<'a>, + progress: &'a Progress, preferred_size: usize, } @@ -138,6 +141,7 @@ impl<'a> PowWorker<'a> { last = self.current_hash; self.current_hash = block.header_view().parent_hash(); + self.progress.blocks.fetch_add(1, Ordering::SeqCst); } if loaded_size != 0 { diff --git a/ethcore/src/snapshot/mod.rs b/ethcore/src/snapshot/mod.rs index 03f2eebfbf7..f05719e06b1 100644 --- a/ethcore/src/snapshot/mod.rs +++ b/ethcore/src/snapshot/mod.rs @@ -20,6 +20,7 @@ //! https://wiki.parity.io/Warp-Sync-Snapshot-Format use std::collections::{HashMap, HashSet}; +use std::cmp; use std::sync::Arc; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use hash::{keccak, KECCAK_NULL_RLP, KECCAK_EMPTY}; @@ -43,6 +44,7 @@ use trie::{Trie, TrieMut}; use ethtrie::{TrieDB, TrieDBMut}; use rlp::{RlpStream, Rlp}; use bloom_journal::Bloom; +use num_cpus; use self::io::SnapshotWriter; @@ -88,6 +90,28 @@ const MAX_CHUNK_SIZE: usize = PREFERRED_CHUNK_SIZE / 4 * 5; const MIN_SUPPORTED_STATE_CHUNK_VERSION: u64 = 1; // current state chunk version. const STATE_CHUNK_VERSION: u64 = 2; +/// number of snapshot subparts, must be a power of 2 in [1; 256] +const SNAPSHOT_SUBPARTS: usize = 16; +/// Maximum number of snapshot subparts (must be a multiple of `SNAPSHOT_SUBPARTS`) +const MAX_SNAPSHOT_SUBPARTS: usize = 256; + +/// Configuration for the Snapshot service +#[derive(Debug, Clone, PartialEq)] +pub struct SnapshotConfiguration { + /// If `true`, no periodic snapshots will be created + pub no_periodic: bool, + /// Number of threads for creating snapshots + pub processing_threads: usize, +} + +impl Default for SnapshotConfiguration { + fn default() -> Self { + SnapshotConfiguration { + no_periodic: false, + processing_threads: ::std::cmp::max(1, num_cpus::get() / 2), + } + } +} /// A progress indicator for snapshots. #[derive(Debug, Default)] @@ -130,7 +154,8 @@ pub fn take_snapshot( block_at: H256, state_db: &HashDB, writer: W, - p: &Progress + p: &Progress, + processing_threads: usize, ) -> Result<(), Error> { let start_header = chain.block_header_data(&block_at) .ok_or(Error::InvalidStartingBlock(BlockId::Hash(block_at)))?; @@ -142,17 +167,45 @@ pub fn take_snapshot( let writer = Mutex::new(writer); let chunker = engine.snapshot_components().ok_or(Error::SnapshotsUnsupported)?; let snapshot_version = chunker.current_version(); - let (state_hashes, block_hashes) = scope(|scope| { + let (state_hashes, block_hashes) = scope(|scope| -> Result<(Vec, Vec), Error> { let writer = &writer; let block_guard = scope.spawn(move || chunk_secondary(chunker, chain, block_at, writer, p)); - let state_res = chunk_state(state_db, &state_root, writer, p); - state_res.and_then(|state_hashes| { - block_guard.join().map(|block_hashes| (state_hashes, block_hashes)) - }) + // The number of threads must be between 1 and SNAPSHOT_SUBPARTS + assert!(processing_threads >= 1, "Cannot use less than 1 threads for creating snapshots"); + let num_threads: usize = cmp::min(processing_threads, SNAPSHOT_SUBPARTS); + info!(target: "snapshot", "Using {} threads for Snapshot creation.", num_threads); + + let mut state_guards = Vec::with_capacity(num_threads as usize); + + for thread_idx in 0..num_threads { + let state_guard = scope.spawn(move || -> Result, Error> { + let mut chunk_hashes = Vec::new(); + + for part in (thread_idx..SNAPSHOT_SUBPARTS).step_by(num_threads) { + debug!(target: "snapshot", "Chunking part {} in thread {}", part, thread_idx); + let mut hashes = chunk_state(state_db, &state_root, writer, p, Some(part))?; + chunk_hashes.append(&mut hashes); + } + + Ok(chunk_hashes) + }); + state_guards.push(state_guard); + } + + let block_hashes = block_guard.join()?; + let mut state_hashes = Vec::new(); + + for guard in state_guards { + let part_state_hashes = guard.join()?; + state_hashes.extend(part_state_hashes); + } + + debug!(target: "snapshot", "Took a snapshot of {} accounts", p.accounts.load(Ordering::SeqCst)); + Ok((state_hashes, block_hashes)) })?; - info!("produced {} state chunks and {} block chunks.", state_hashes.len(), block_hashes.len()); + info!(target: "snapshot", "produced {} state chunks and {} block chunks.", state_hashes.len(), block_hashes.len()); let manifest_data = ManifestData { version: snapshot_version, @@ -200,6 +253,7 @@ pub fn chunk_secondary<'a>(mut chunker: Box, chain: &'a Bloc chain, start_hash, &mut chunk_sink, + progress, PREFERRED_CHUNK_SIZE, )?; } @@ -263,10 +317,12 @@ impl<'a> StateChunker<'a> { /// Walk the given state database starting from the given root, /// creating chunks and writing them out. +/// `part` is a number between 0 and 15, which describe which part of +/// the tree should be chunked. /// /// Returns a list of hashes of chunks created, or any error it may /// have encountered. -pub fn chunk_state<'a>(db: &HashDB, root: &H256, writer: &Mutex, progress: &'a Progress) -> Result, Error> { +pub fn chunk_state<'a>(db: &HashDB, root: &H256, writer: &Mutex, progress: &'a Progress, part: Option) -> Result, Error> { let account_trie = TrieDB::new(db, &root)?; let mut chunker = StateChunker { @@ -281,11 +337,33 @@ pub fn chunk_state<'a>(db: &HashDB, root: &H256, writer: &Mutex= seek_to) { + break; + } + + let account = ::rlp::decode(&*account_data)?; let account_db = AccountDB::from_hash(db, account_key_hash); let fat_rlps = account::to_fat_rlps(&account_key_hash, &account, &account_db, &mut used_code, PREFERRED_CHUNK_SIZE - chunker.chunk_size(), PREFERRED_CHUNK_SIZE)?; diff --git a/ethcore/src/snapshot/tests/state.rs b/ethcore/src/snapshot/tests/state.rs index 12f19e8c27c..82cee2af088 100644 --- a/ethcore/src/snapshot/tests/state.rs +++ b/ethcore/src/snapshot/tests/state.rs @@ -22,7 +22,7 @@ use hash::{KECCAK_NULL_RLP, keccak}; use basic_account::BasicAccount; use snapshot::account; -use snapshot::{chunk_state, Error as SnapshotError, Progress, StateRebuilder}; +use snapshot::{chunk_state, Error as SnapshotError, Progress, StateRebuilder, SNAPSHOT_SUBPARTS}; use snapshot::io::{PackedReader, PackedWriter, SnapshotReader, SnapshotWriter}; use super::helpers::{compare_dbs, StateProducer}; @@ -53,7 +53,11 @@ fn snap_and_restore() { let state_root = producer.state_root(); let writer = Mutex::new(PackedWriter::new(&snap_file).unwrap()); - let state_hashes = chunk_state(&old_db, &state_root, &writer, &Progress::default()).unwrap(); + let mut state_hashes = Vec::new(); + for part in 0..SNAPSHOT_SUBPARTS { + let mut hashes = chunk_state(&old_db, &state_root, &writer, &Progress::default(), Some(part)).unwrap(); + state_hashes.append(&mut hashes); + } writer.into_inner().finish(::snapshot::ManifestData { version: 2, @@ -164,7 +168,7 @@ fn checks_flag() { let state_root = producer.state_root(); let writer = Mutex::new(PackedWriter::new(&snap_file).unwrap()); - let state_hashes = chunk_state(&old_db, &state_root, &writer, &Progress::default()).unwrap(); + let state_hashes = chunk_state(&old_db, &state_root, &writer, &Progress::default(), None).unwrap(); writer.into_inner().finish(::snapshot::ManifestData { version: 2, diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index aa5d9cd9b7d..00ef71459aa 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -33,7 +33,10 @@ use vm::{EnvInfo, CallType, ActionValue, ActionParams, ParamsType}; use builtin::Builtin; use encoded; -use engines::{EthEngine, NullEngine, InstantSeal, BasicAuthority, AuthorityRound, Tendermint, DEFAULT_BLOCKHASH_CONTRACT}; +use engines::{ + EthEngine, NullEngine, InstantSeal, InstantSealParams, BasicAuthority, + AuthorityRound, Tendermint, DEFAULT_BLOCKHASH_CONTRACT +}; use error::Error; use executive::Executive; use factory::Factories; @@ -596,7 +599,8 @@ impl Spec { match engine_spec { ethjson::spec::Engine::Null(null) => Arc::new(NullEngine::new(null.params.into(), machine)), ethjson::spec::Engine::Ethash(ethash) => Arc::new(::ethereum::Ethash::new(spec_params.cache_dir, ethash.params.into(), machine, spec_params.optimization_setting)), - ethjson::spec::Engine::InstantSeal(instant_seal) => Arc::new(InstantSeal::new(instant_seal.params.into(), machine)), + ethjson::spec::Engine::InstantSeal(Some(instant_seal)) => Arc::new(InstantSeal::new(instant_seal.params.into(), machine)), + ethjson::spec::Engine::InstantSeal(None) => Arc::new(InstantSeal::new(InstantSealParams::default(), machine)), ethjson::spec::Engine::BasicAuthority(basic_authority) => Arc::new(BasicAuthority::new(basic_authority.params.into(), machine)), ethjson::spec::Engine::AuthorityRound(authority_round) => AuthorityRound::new(authority_round.params.into(), machine) .expect("Failed to start AuthorityRound consensus engine."), @@ -873,14 +877,13 @@ impl Spec { data: d, }.fake_sign(from); - let res = ::state::prove_transaction( + let res = ::state::prove_transaction_virtual( db.as_hashdb_mut(), *genesis.state_root(), &tx, self.engine.machine(), &env_info, factories.clone(), - true, ); res.map(|(out, proof)| { diff --git a/ethcore/src/state/mod.rs b/ethcore/src/state/mod.rs index 98f877617d0..197496d4c76 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -224,17 +224,16 @@ pub fn check_proof( } } -/// Prove a transaction on the given state. +/// Prove a `virtual` transaction on the given state. /// Returns `None` when the transacion could not be proved, /// and a proof otherwise. -pub fn prove_transaction + Send + Sync>( +pub fn prove_transaction_virtual + Send + Sync>( db: H, root: H256, transaction: &SignedTransaction, machine: &Machine, env_info: &EnvInfo, factories: Factories, - virt: bool, ) -> Option<(Bytes, Vec)> { use self::backend::Proving; @@ -252,7 +251,7 @@ pub fn prove_transaction + Send + Sync>( }; let options = TransactOptions::with_no_tracing().dont_check_nonce().save_output_from_contract(); - match state.execute(env_info, machine, transaction, options, virt) { + match state.execute(env_info, machine, transaction, options, true) { Err(ExecutionError::Internal(_)) => None, Err(e) => { trace!(target: "state", "Proved call failed: {}", e); diff --git a/ethcore/src/state/substate.rs b/ethcore/src/state/substate.rs index 054b8b384bb..5565c8f91ee 100644 --- a/ethcore/src/state/substate.rs +++ b/ethcore/src/state/substate.rs @@ -16,7 +16,7 @@ //! Execution environment substate. use std::collections::HashSet; -use ethereum_types::{U256, Address}; +use ethereum_types::Address; use log_entry::LogEntry; use evm::{Schedule, CleanDustMode}; use super::CleanupMode; @@ -35,7 +35,7 @@ pub struct Substate { pub logs: Vec, /// Refund counter of SSTORE. - pub sstore_clears_refund: U256, + pub sstore_clears_refund: i128, /// Created contracts. pub contracts_created: Vec
, @@ -52,7 +52,7 @@ impl Substate { self.suicides.extend(s.suicides); self.touched.extend(s.touched); self.logs.extend(s.logs); - self.sstore_clears_refund = self.sstore_clears_refund + s.sstore_clears_refund; + self.sstore_clears_refund += s.sstore_clears_refund; self.contracts_created.extend(s.contracts_created); } diff --git a/ethcore/src/tests/evm.rs b/ethcore/src/tests/evm.rs index 7befa47f67b..25ca8afd09e 100644 --- a/ethcore/src/tests/evm.rs +++ b/ethcore/src/tests/evm.rs @@ -38,7 +38,7 @@ fn test_blockhash_eip210(factory: Factory) { let test_blockhash_contract = "73fffffffffffffffffffffffffffffffffffffffe33141561007a57600143036020526000356101006020510755600061010060205107141561005057600035610100610100602051050761010001555b6000620100006020510714156100755760003561010062010000602051050761020001555b61014a565b4360003512151561009057600060405260206040f35b610100600035430312156100b357610100600035075460605260206060f3610149565b62010000600035430312156100d157600061010060003507146100d4565b60005b156100f6576101006101006000350507610100015460805260206080f3610148565b630100000060003543031215610116576000620100006000350714610119565b60005b1561013c57610100620100006000350507610200015460a052602060a0f3610147565b600060c052602060c0f35b5b5b5b5b"; let blockhash_contract_code = Arc::new(test_blockhash_contract.from_hex().unwrap()); let blockhash_contract_code_hash = keccak(blockhash_contract_code.as_ref()); - let machine = ::ethereum::new_constantinople_test_machine(); + let machine = ::ethereum::new_eip210_test_machine(); let mut env_info = EnvInfo::default(); // populate state with 256 last hashes diff --git a/ethcore/src/verification/queue/mod.rs b/ethcore/src/verification/queue/mod.rs index 41b82d0f657..d1c29d7abcb 100644 --- a/ethcore/src/verification/queue/mod.rs +++ b/ethcore/src/verification/queue/mod.rs @@ -465,19 +465,19 @@ impl VerificationQueue { /// Add a block to the queue. pub fn import(&self, input: K::Input) -> ImportResult { - let h = input.hash(); + let hash = input.hash(); { - if self.processing.read().contains_key(&h) { + if self.processing.read().contains_key(&hash) { bail!(ErrorKind::Import(ImportErrorKind::AlreadyQueued)); } let mut bad = self.verification.bad.lock(); - if bad.contains(&h) { + if bad.contains(&hash) { bail!(ErrorKind::Import(ImportErrorKind::KnownBad)); } if bad.contains(&input.parent_hash()) { - bad.insert(h.clone()); + bad.insert(hash); bail!(ErrorKind::Import(ImportErrorKind::KnownBad)); } } @@ -486,21 +486,21 @@ impl VerificationQueue { Ok(item) => { self.verification.sizes.unverified.fetch_add(item.heap_size_of_children(), AtomicOrdering::SeqCst); - self.processing.write().insert(h.clone(), item.difficulty()); + self.processing.write().insert(hash, item.difficulty()); { let mut td = self.total_difficulty.write(); *td = *td + item.difficulty(); } self.verification.unverified.lock().push_back(item); self.more_to_verify.notify_all(); - Ok(h) + Ok(hash) }, Err(err) => { match err { // Don't mark future blocks as bad. Error(ErrorKind::Block(BlockError::TemporarilyInvalid(_)), _) => {}, _ => { - self.verification.bad.lock().insert(h.clone()); + self.verification.bad.lock().insert(hash); } } Err(err) diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index cc1ee1ad6d1..cae9815f67d 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -245,15 +245,15 @@ fn verify_uncles(block: &PreverifiedBlock, bc: &BlockProvider, engine: &EthEngin /// Phase 4 verification. Check block information against transaction enactment results, pub fn verify_block_final(expected: &Header, got: &Header) -> Result<(), Error> { + if expected.state_root() != got.state_root() { + return Err(From::from(BlockError::InvalidStateRoot(Mismatch { expected: expected.state_root().clone(), found: got.state_root().clone() }))) + } if expected.gas_used() != got.gas_used() { return Err(From::from(BlockError::InvalidGasUsed(Mismatch { expected: expected.gas_used().clone(), found: got.gas_used().clone() }))) } if expected.log_bloom() != got.log_bloom() { return Err(From::from(BlockError::InvalidLogBloom(Mismatch { expected: expected.log_bloom().clone(), found: got.log_bloom().clone() }))) } - if expected.state_root() != got.state_root() { - return Err(From::from(BlockError::InvalidStateRoot(Mismatch { expected: expected.state_root().clone(), found: got.state_root().clone() }))) - } if expected.receipts_root() != got.receipts_root() { return Err(From::from(BlockError::InvalidReceiptsRoot(Mismatch { expected: expected.receipts_root().clone(), found: got.receipts_root().clone() }))) } diff --git a/ethcore/sync/src/block_sync.rs b/ethcore/sync/src/block_sync.rs index 55b23cba4d1..7cca71b026e 100644 --- a/ethcore/sync/src/block_sync.rs +++ b/ethcore/sync/src/block_sync.rs @@ -28,6 +28,7 @@ use ethcore::client::{BlockStatus, BlockId, BlockImportError, BlockImportErrorKi use ethcore::error::{ImportErrorKind, QueueErrorKind, BlockError}; use sync_io::SyncIo; use blocks::{BlockCollection, SyncBody, SyncHeader}; +use chain::BlockSet; const MAX_HEADERS_TO_REQUEST: usize = 128; const MAX_BODIES_TO_REQUEST: usize = 32; @@ -35,6 +36,26 @@ const MAX_RECEPITS_TO_REQUEST: usize = 128; const SUBCHAIN_SIZE: u64 = 256; const MAX_ROUND_PARENTS: usize = 16; const MAX_PARALLEL_SUBCHAIN_DOWNLOAD: usize = 5; +const MAX_USELESS_HEADERS_PER_ROUND: usize = 3; + +// logging macros prepend BlockSet context for log filtering +macro_rules! trace_sync { + ($self:ident, $fmt:expr, $($arg:tt)+) => { + trace!(target: "sync", concat!("{:?}: ", $fmt), $self.block_set, $($arg)+); + }; + ($self:ident, $fmt:expr) => { + trace!(target: "sync", concat!("{:?}: ", $fmt), $self.block_set); + }; +} + +macro_rules! debug_sync { + ($self:ident, $fmt:expr, $($arg:tt)+) => { + debug!(target: "sync", concat!("{:?}: ", $fmt), $self.block_set, $($arg)+); + }; + ($self:ident, $fmt:expr) => { + debug!(target: "sync", concat!("{:?}: ", $fmt), $self.block_set); + }; +} #[derive(Copy, Clone, Eq, PartialEq, Debug)] /// Downloader state @@ -65,6 +86,7 @@ pub enum BlockRequest { } /// Indicates sync action +#[derive(Eq, PartialEq, Debug)] pub enum DownloadAction { /// Do nothing None, @@ -89,15 +111,17 @@ impl From for BlockDownloaderImportError { /// Block downloader strategy. /// Manages state and block data for a block download process. pub struct BlockDownloader { + /// Which set of blocks to download + block_set: BlockSet, /// Downloader state state: State, /// Highest block number seen highest_block: Option, /// Downloaded blocks, holds `H`, `B` and `S` blocks: BlockCollection, - /// Last impoted block number + /// Last imported block number last_imported_block: BlockNumber, - /// Last impoted block hash + /// Last imported block hash last_imported_hash: H256, /// Number of blocks imported this round imported_this_round: Option, @@ -112,15 +136,20 @@ pub struct BlockDownloader { target_hash: Option, /// Probing range for seeking common best block. retract_step: u64, - /// Whether reorg should be limited. - limit_reorg: bool, + /// consecutive useless headers this round + useless_headers_count: usize, } impl BlockDownloader { - /// Create a new instance of syncing strategy. This won't reorganize to before the - /// last kept state. - pub fn new(sync_receipts: bool, start_hash: &H256, start_number: BlockNumber) -> Self { + /// Create a new instance of syncing strategy. + /// For BlockSet::NewBlocks this won't reorganize to before the last kept state. + pub fn new(block_set: BlockSet, start_hash: &H256, start_number: BlockNumber) -> Self { + let sync_receipts = match block_set { + BlockSet::NewBlocks => false, + BlockSet::OldBlocks => true + }; BlockDownloader { + block_set, state: State::Idle, highest_block: None, last_imported_block: start_number, @@ -133,32 +162,14 @@ impl BlockDownloader { download_receipts: sync_receipts, target_hash: None, retract_step: 1, - limit_reorg: true, - } - } - - /// Create a new instance of sync with unlimited reorg allowed. - pub fn with_unlimited_reorg(sync_receipts: bool, start_hash: &H256, start_number: BlockNumber) -> Self { - BlockDownloader { - state: State::Idle, - highest_block: None, - last_imported_block: start_number, - last_imported_hash: start_hash.clone(), - last_round_start: start_number, - last_round_start_hash: start_hash.clone(), - blocks: BlockCollection::new(sync_receipts), - imported_this_round: None, - round_parents: VecDeque::new(), - download_receipts: sync_receipts, - target_hash: None, - retract_step: 1, - limit_reorg: false, + useless_headers_count: 0, } } /// Reset sync. Clear all local downloaded data. pub fn reset(&mut self) { self.blocks.clear(); + self.useless_headers_count = 0; self.state = State::Idle; } @@ -220,45 +231,65 @@ impl BlockDownloader { } /// Add new block headers. - pub fn import_headers(&mut self, io: &mut SyncIo, r: &Rlp, expected_hash: Option) -> Result { + pub fn import_headers(&mut self, io: &mut SyncIo, r: &Rlp, expected_hash: H256) -> Result { let item_count = r.item_count().unwrap_or(0); if self.state == State::Idle { - trace!(target: "sync", "Ignored unexpected block headers"); + trace_sync!(self, "Ignored unexpected block headers"); return Ok(DownloadAction::None) } if item_count == 0 && (self.state == State::Blocks) { return Err(BlockDownloaderImportError::Invalid); } + // The request is generated in ::request_blocks. + let (max_count, skip) = if self.state == State::ChainHead { + (SUBCHAIN_SIZE as usize, (MAX_HEADERS_TO_REQUEST - 2) as u64) + } else { + (MAX_HEADERS_TO_REQUEST, 0) + }; + + if item_count > max_count { + debug!(target: "sync", "Headers response is larger than expected"); + return Err(BlockDownloaderImportError::Invalid); + } + let mut headers = Vec::new(); let mut hashes = Vec::new(); - let mut valid_response = item_count == 0; //empty response is valid - let mut any_known = false; + let mut last_header = None; for i in 0..item_count { let info = SyncHeader::from_rlp(r.at(i)?.as_raw().to_vec())?; let number = BlockNumber::from(info.header.number()); let hash = info.header.hash(); - // Check if any of the headers matches the hash we requested - if !valid_response { - if let Some(expected) = expected_hash { - valid_response = expected == hash; + + let valid_response = match last_header { + // First header must match expected hash. + None => expected_hash == hash, + Some((last_number, last_hash)) => { + // Subsequent headers must be spaced by skip interval. + let skip_valid = number == last_number + skip + 1; + // Consecutive headers must be linked by parent hash. + let parent_valid = (number != last_number + 1) || *info.header.parent_hash() == last_hash; + skip_valid && parent_valid } + }; + + // Disable the peer for this syncing round if it gives invalid chain + if !valid_response { + debug!(target: "sync", "Invalid headers response"); + return Err(BlockDownloaderImportError::Invalid); } - any_known = any_known || self.blocks.contains_head(&hash); + + last_header = Some((number, hash)); if self.blocks.contains(&hash) { - trace!(target: "sync", "Skipping existing block header {} ({:?})", number, hash); + trace_sync!(self, "Skipping existing block header {} ({:?})", number, hash); continue; } - if self.highest_block.as_ref().map_or(true, |n| number > *n) { - self.highest_block = Some(number); - } - match io.chain().block_status(BlockId::Hash(hash.clone())) { BlockStatus::InChain | BlockStatus::Queued => { match self.state { - State::Blocks => trace!(target: "sync", "Header already in chain {} ({})", number, hash), - _ => trace!(target: "sync", "Header already in chain {} ({}), state = {:?}", number, hash, self.state), + State::Blocks => trace_sync!(self, "Header already in chain {} ({})", number, hash), + _ => trace_sync!(self, "Header already in chain {} ({}), state = {:?}", number, hash, self.state), } headers.push(info); hashes.push(hash); @@ -273,53 +304,67 @@ impl BlockDownloader { } } - // Disable the peer for this syncing round if it gives invalid chain - if !valid_response { - trace!(target: "sync", "Invalid headers response"); - return Err(BlockDownloaderImportError::Invalid); + if let Some((number, _)) = last_header { + if self.highest_block.as_ref().map_or(true, |n| number > *n) { + self.highest_block = Some(number); + } } match self.state { State::ChainHead => { if !headers.is_empty() { - // TODO: validate heads better. E.g. check that there is enough distance between blocks. - trace!(target: "sync", "Received {} subchain heads, proceeding to download", headers.len()); + trace_sync!(self, "Received {} subchain heads, proceeding to download", headers.len()); self.blocks.reset_to(hashes); self.state = State::Blocks; return Ok(DownloadAction::Reset); } else { + trace_sync!(self, "No useful subchain heads received, expected hash {:?}", expected_hash); let best = io.chain().chain_info().best_block_number; let oldest_reorg = io.chain().pruning_info().earliest_state; let last = self.last_imported_block; - if self.limit_reorg && best > last && (last == 0 || last < oldest_reorg) { - trace!(target: "sync", "No common block, disabling peer"); - return Err(BlockDownloaderImportError::Invalid); + match self.block_set { + BlockSet::NewBlocks if best > last && (last == 0 || last < oldest_reorg) => { + trace_sync!(self, "No common block, disabling peer"); + return Err(BlockDownloaderImportError::Invalid) + }, + BlockSet::OldBlocks => { + trace_sync!(self, "Expected some useful headers for downloading OldBlocks. Try a different peer"); + return Err(BlockDownloaderImportError::Useless) + }, + _ => (), } } }, State::Blocks => { let count = headers.len(); - // At least one of the heades must advance the subchain. Otherwise they are all useless. - if count == 0 || !any_known { - trace!(target: "sync", "No useful headers"); + // At least one of the headers must advance the subchain. Otherwise they are all useless. + if count == 0 { + self.useless_headers_count += 1; + trace_sync!(self, "No useful headers ({:?} this round), expected hash {:?}", self.useless_headers_count, expected_hash); + // only reset download if we have multiple subchain heads, to avoid unnecessary resets + // when we are at the head of the chain when we may legitimately receive no useful headers + if self.blocks.heads_len() > 1 && self.useless_headers_count >= MAX_USELESS_HEADERS_PER_ROUND { + trace_sync!(self, "Received {:?} useless responses this round. Resetting sync", MAX_USELESS_HEADERS_PER_ROUND); + self.reset(); + } return Err(BlockDownloaderImportError::Useless); } self.blocks.insert_headers(headers); - trace!(target: "sync", "Inserted {} headers", count); + trace_sync!(self, "Inserted {} headers", count); }, - _ => trace!(target: "sync", "Unexpected headers({})", headers.len()), + _ => trace_sync!(self, "Unexpected headers({})", headers.len()), } Ok(DownloadAction::None) } /// Called by peer once it has new block bodies - pub fn import_bodies(&mut self, r: &Rlp) -> Result<(), BlockDownloaderImportError> { + pub fn import_bodies(&mut self, r: &Rlp, expected_hashes: &[H256]) -> Result<(), BlockDownloaderImportError> { let item_count = r.item_count().unwrap_or(0); if item_count == 0 { return Err(BlockDownloaderImportError::Useless); } else if self.state != State::Blocks { - trace!(target: "sync", "Ignored unexpected block bodies"); + trace_sync!(self, "Ignored unexpected block bodies"); } else { let mut bodies = Vec::with_capacity(item_count); for i in 0..item_count { @@ -327,8 +372,13 @@ impl BlockDownloader { bodies.push(body); } - if self.blocks.insert_bodies(bodies) != item_count { - trace!(target: "sync", "Deactivating peer for giving invalid block bodies"); + let hashes = self.blocks.insert_bodies(bodies); + if hashes.len() != item_count { + trace_sync!(self, "Deactivating peer for giving invalid block bodies"); + return Err(BlockDownloaderImportError::Invalid); + } + if !all_expected(hashes.as_slice(), expected_hashes, |&a, &b| a == b) { + trace_sync!(self, "Deactivating peer for giving unexpected block bodies"); return Err(BlockDownloaderImportError::Invalid); } } @@ -336,25 +386,30 @@ impl BlockDownloader { } /// Called by peer once it has new block bodies - pub fn import_receipts(&mut self, _io: &mut SyncIo, r: &Rlp) -> Result<(), BlockDownloaderImportError> { + pub fn import_receipts(&mut self, r: &Rlp, expected_hashes: &[H256]) -> Result<(), BlockDownloaderImportError> { let item_count = r.item_count().unwrap_or(0); if item_count == 0 { return Err(BlockDownloaderImportError::Useless); } else if self.state != State::Blocks { - trace!(target: "sync", "Ignored unexpected block receipts"); + trace_sync!(self, "Ignored unexpected block receipts"); } else { let mut receipts = Vec::with_capacity(item_count); for i in 0..item_count { let receipt = r.at(i).map_err(|e| { - trace!(target: "sync", "Error decoding block receipts RLP: {:?}", e); + trace_sync!(self, "Error decoding block receipts RLP: {:?}", e); BlockDownloaderImportError::Invalid })?; receipts.push(receipt.as_raw().to_vec()); } - if self.blocks.insert_receipts(receipts) != item_count { - trace!(target: "sync", "Deactivating peer for giving invalid block receipts"); + let hashes = self.blocks.insert_receipts(receipts); + if hashes.len() != item_count { + trace_sync!(self, "Deactivating peer for giving invalid block receipts"); + return Err(BlockDownloaderImportError::Invalid); + } + if !all_expected(hashes.as_slice(), expected_hashes, |a, b| a.contains(b)) { + trace_sync!(self, "Deactivating peer for giving unexpected block receipts"); return Err(BlockDownloaderImportError::Invalid); } } @@ -363,7 +418,7 @@ impl BlockDownloader { fn start_sync_round(&mut self, io: &mut SyncIo) { self.state = State::ChainHead; - trace!(target: "sync", "Starting round (last imported count = {:?}, last started = {}, block = {:?}", self.imported_this_round, self.last_round_start, self.last_imported_block); + trace_sync!(self, "Starting round (last imported count = {:?}, last started = {}, block = {:?}", self.imported_this_round, self.last_round_start, self.last_imported_block); // Check if need to retract to find the common block. The problem is that the peers still return headers by hash even // from the non-canonical part of the tree. So we also retract if nothing has been imported last round. let start = self.last_round_start; @@ -375,12 +430,12 @@ impl BlockDownloader { if let Some(&(_, p)) = self.round_parents.iter().find(|&&(h, _)| h == start_hash) { self.last_imported_block = start - 1; self.last_imported_hash = p.clone(); - trace!(target: "sync", "Searching common header from the last round {} ({})", self.last_imported_block, self.last_imported_hash); + trace_sync!(self, "Searching common header from the last round {} ({})", self.last_imported_block, self.last_imported_hash); } else { let best = io.chain().chain_info().best_block_number; let oldest_reorg = io.chain().pruning_info().earliest_state; - if self.limit_reorg && best > start && start < oldest_reorg { - debug!(target: "sync", "Could not revert to previous ancient block, last: {} ({})", start, start_hash); + if self.block_set == BlockSet::NewBlocks && best > start && start < oldest_reorg { + debug_sync!(self, "Could not revert to previous ancient block, last: {} ({})", start, start_hash); self.reset(); } else { let n = start - cmp::min(self.retract_step, start); @@ -389,10 +444,10 @@ impl BlockDownloader { Some(h) => { self.last_imported_block = n; self.last_imported_hash = h; - trace!(target: "sync", "Searching common header in the blockchain {} ({})", start, self.last_imported_hash); + trace_sync!(self, "Searching common header in the blockchain {} ({})", start, self.last_imported_hash); } None => { - debug!(target: "sync", "Could not revert to previous block, last: {} ({})", start, self.last_imported_hash); + debug_sync!(self, "Could not revert to previous block, last: {} ({})", start, self.last_imported_hash); self.reset(); } } @@ -420,7 +475,7 @@ impl BlockDownloader { State::ChainHead => { if num_active_peers < MAX_PARALLEL_SUBCHAIN_DOWNLOAD { // Request subchain headers - trace!(target: "sync", "Starting sync with better chain"); + trace_sync!(self, "Starting sync with better chain"); // Request MAX_HEADERS_TO_REQUEST - 2 headers apart so that // MAX_HEADERS_TO_REQUEST would include headers for neighbouring subchains return Some(BlockRequest::Headers { @@ -463,8 +518,9 @@ impl BlockDownloader { } /// Checks if there are blocks fully downloaded that can be imported into the blockchain and does the import. - pub fn collect_blocks(&mut self, io: &mut SyncIo, allow_out_of_order: bool) -> Result<(), BlockDownloaderImportError> { - let mut bad = false; + /// Returns DownloadAction::Reset if it is imported all the the blocks it can and all downloading peers should be reset + pub fn collect_blocks(&mut self, io: &mut SyncIo, allow_out_of_order: bool) -> DownloadAction { + let mut download_action = DownloadAction::None; let mut imported = HashSet::new(); let blocks = self.blocks.drain(); let count = blocks.len(); @@ -478,8 +534,8 @@ impl BlockDownloader { if self.target_hash.as_ref().map_or(false, |t| t == &h) { self.state = State::Complete; - trace!(target: "sync", "Sync target reached"); - return Ok(()); + trace_sync!(self, "Sync target reached"); + return download_action; } let result = if let Some(receipts) = receipts { @@ -490,15 +546,15 @@ impl BlockDownloader { match result { Err(BlockImportError(BlockImportErrorKind::Import(ImportErrorKind::AlreadyInChain), _)) => { - trace!(target: "sync", "Block already in chain {:?}", h); + trace_sync!(self, "Block already in chain {:?}", h); self.block_imported(&h, number, &parent); }, Err(BlockImportError(BlockImportErrorKind::Import(ImportErrorKind::AlreadyQueued), _)) => { - trace!(target: "sync", "Block already queued {:?}", h); + trace_sync!(self, "Block already queued {:?}", h); self.block_imported(&h, number, &parent); }, Ok(_) => { - trace!(target: "sync", "Block queued {:?}", h); + trace_sync!(self, "Block queued {:?}", h); imported.insert(h.clone()); self.block_imported(&h, number, &parent); }, @@ -506,37 +562,34 @@ impl BlockDownloader { break; }, Err(BlockImportError(BlockImportErrorKind::Block(BlockError::UnknownParent(_)), _)) => { - trace!(target: "sync", "Unknown new block parent, restarting sync"); + trace_sync!(self, "Unknown new block parent, restarting sync"); break; }, Err(BlockImportError(BlockImportErrorKind::Block(BlockError::TemporarilyInvalid(_)), _)) => { - debug!(target: "sync", "Block temporarily invalid, restarting sync"); + debug_sync!(self, "Block temporarily invalid: {:?}, restarting sync", h); break; }, Err(BlockImportError(BlockImportErrorKind::Queue(QueueErrorKind::Full(limit)), _)) => { - debug!(target: "sync", "Block import queue full ({}), restarting sync", limit); + debug_sync!(self, "Block import queue full ({}), restarting sync", limit); + download_action = DownloadAction::Reset; break; }, Err(e) => { - debug!(target: "sync", "Bad block {:?} : {:?}", h, e); - bad = true; + debug_sync!(self, "Bad block {:?} : {:?}", h, e); + download_action = DownloadAction::Reset; break; } } } - trace!(target: "sync", "Imported {} of {}", imported.len(), count); + trace_sync!(self, "Imported {} of {}", imported.len(), count); self.imported_this_round = Some(self.imported_this_round.unwrap_or(0) + imported.len()); - if bad { - return Err(BlockDownloaderImportError::Invalid); - } - if self.blocks.is_empty() { // complete sync round - trace!(target: "sync", "Sync round complete"); - self.reset(); + trace_sync!(self, "Sync round complete"); + download_action = DownloadAction::Reset; } - Ok(()) + download_action } fn block_imported(&mut self, hash: &H256, number: BlockNumber, parent: &H256) { @@ -549,4 +602,392 @@ impl BlockDownloader { } } -//TODO: module tests +// Determines if the first argument matches an ordered subset of the second, according to some predicate. +fn all_expected(values: &[A], expected_values: &[B], is_expected: F) -> bool + where F: Fn(&A, &B) -> bool +{ + let mut expected_iter = expected_values.iter(); + values.iter().all(|val1| { + while let Some(val2) = expected_iter.next() { + if is_expected(val1, val2) { + return true; + } + } + false + }) +} + +#[cfg(test)] +mod tests { + use super::*; + use ethcore::client::TestBlockChainClient; + use ethcore::header::Header as BlockHeader; + use ethcore::spec::Spec; + use ethkey::{Generator,Random}; + use hash::keccak; + use parking_lot::RwLock; + use rlp::{encode_list,RlpStream}; + use tests::helpers::TestIo; + use tests::snapshot::TestSnapshotService; + use transaction::{Transaction,SignedTransaction}; + use triehash_ethereum::ordered_trie_root; + + fn dummy_header(number: u64, parent_hash: H256) -> BlockHeader { + let mut header = BlockHeader::new(); + header.set_gas_limit(0.into()); + header.set_difficulty((number * 100).into()); + header.set_timestamp(number * 10); + header.set_number(number); + header.set_parent_hash(parent_hash); + header.set_state_root(H256::zero()); + header + } + + fn dummy_signed_tx() -> SignedTransaction { + let keypair = Random.generate().unwrap(); + Transaction::default().sign(keypair.secret(), None) + } + + fn import_headers(headers: &[BlockHeader], downloader: &mut BlockDownloader, io: &mut SyncIo) -> Result { + let mut stream = RlpStream::new(); + stream.append_list(headers); + let bytes = stream.out(); + let rlp = Rlp::new(&bytes); + let expected_hash = headers.first().unwrap().hash(); + downloader.import_headers(io, &rlp, expected_hash) + } + + fn import_headers_ok(headers: &[BlockHeader], downloader: &mut BlockDownloader, io: &mut SyncIo) { + let res = import_headers(headers, downloader, io); + assert!(res.is_ok()); + } + + #[test] + fn import_headers_in_chain_head_state() { + ::env_logger::try_init().ok(); + + let spec = Spec::new_test(); + let genesis_hash = spec.genesis_header().hash(); + + let mut downloader = BlockDownloader::new(BlockSet::NewBlocks, &genesis_hash, 0); + downloader.state = State::ChainHead; + + let mut chain = TestBlockChainClient::new(); + let snapshot_service = TestSnapshotService::new(); + let queue = RwLock::new(VecDeque::new()); + let mut io = TestIo::new(&mut chain, &snapshot_service, &queue, None); + + // Valid headers sequence. + let valid_headers = [ + spec.genesis_header(), + dummy_header(127, H256::random()), + dummy_header(254, H256::random()), + ]; + let rlp_data = encode_list(&valid_headers); + let valid_rlp = Rlp::new(&rlp_data); + + match downloader.import_headers(&mut io, &valid_rlp, genesis_hash) { + Ok(DownloadAction::Reset) => assert_eq!(downloader.state, State::Blocks), + _ => panic!("expected transition to Blocks state"), + }; + + // Headers are rejected because the expected hash does not match. + let invalid_start_block_headers = [ + dummy_header(0, H256::random()), + dummy_header(127, H256::random()), + dummy_header(254, H256::random()), + ]; + let rlp_data = encode_list(&invalid_start_block_headers); + let invalid_start_block_rlp = Rlp::new(&rlp_data); + + match downloader.import_headers(&mut io, &invalid_start_block_rlp, genesis_hash) { + Err(BlockDownloaderImportError::Invalid) => (), + _ => panic!("expected BlockDownloaderImportError"), + }; + + // Headers are rejected because they are not spaced as expected. + let invalid_skip_headers = [ + spec.genesis_header(), + dummy_header(128, H256::random()), + dummy_header(256, H256::random()), + ]; + let rlp_data = encode_list(&invalid_skip_headers); + let invalid_skip_rlp = Rlp::new(&rlp_data); + + match downloader.import_headers(&mut io, &invalid_skip_rlp, genesis_hash) { + Err(BlockDownloaderImportError::Invalid) => (), + _ => panic!("expected BlockDownloaderImportError"), + }; + + // Invalid because the packet size is too large. + let mut too_many_headers = Vec::with_capacity((SUBCHAIN_SIZE + 1) as usize); + too_many_headers.push(spec.genesis_header()); + for i in 1..(SUBCHAIN_SIZE + 1) { + too_many_headers.push(dummy_header((MAX_HEADERS_TO_REQUEST as u64 - 1) * i, H256::random())); + } + let rlp_data = encode_list(&too_many_headers); + + let too_many_rlp = Rlp::new(&rlp_data); + match downloader.import_headers(&mut io, &too_many_rlp, genesis_hash) { + Err(BlockDownloaderImportError::Invalid) => (), + _ => panic!("expected BlockDownloaderImportError"), + }; + } + + #[test] + fn import_headers_in_blocks_state() { + ::env_logger::try_init().ok(); + + let mut chain = TestBlockChainClient::new(); + let snapshot_service = TestSnapshotService::new(); + let queue = RwLock::new(VecDeque::new()); + let mut io = TestIo::new(&mut chain, &snapshot_service, &queue, None); + + let mut headers = Vec::with_capacity(3); + let parent_hash = H256::random(); + headers.push(dummy_header(127, parent_hash)); + let parent_hash = headers[0].hash(); + headers.push(dummy_header(128, parent_hash)); + let parent_hash = headers[1].hash(); + headers.push(dummy_header(129, parent_hash)); + + let mut downloader = BlockDownloader::new(BlockSet::NewBlocks, &H256::random(), 0); + downloader.state = State::Blocks; + downloader.blocks.reset_to(vec![headers[0].hash()]); + + let rlp_data = encode_list(&headers); + let headers_rlp = Rlp::new(&rlp_data); + + match downloader.import_headers(&mut io, &headers_rlp, headers[0].hash()) { + Ok(DownloadAction::None) => (), + _ => panic!("expected successful import"), + }; + + // Invalidate parent_hash link. + headers[2] = dummy_header(129, H256::random()); + let rlp_data = encode_list(&headers); + let headers_rlp = Rlp::new(&rlp_data); + + match downloader.import_headers(&mut io, &headers_rlp, headers[0].hash()) { + Err(BlockDownloaderImportError::Invalid) => (), + _ => panic!("expected BlockDownloaderImportError"), + }; + + // Invalidate header sequence by skipping a header. + headers[2] = dummy_header(130, headers[1].hash()); + let rlp_data = encode_list(&headers); + let headers_rlp = Rlp::new(&rlp_data); + + match downloader.import_headers(&mut io, &headers_rlp, headers[0].hash()) { + Err(BlockDownloaderImportError::Invalid) => (), + _ => panic!("expected BlockDownloaderImportError"), + }; + } + + #[test] + fn import_bodies() { + ::env_logger::try_init().ok(); + + let mut chain = TestBlockChainClient::new(); + let snapshot_service = TestSnapshotService::new(); + let queue = RwLock::new(VecDeque::new()); + let mut io = TestIo::new(&mut chain, &snapshot_service, &queue, None); + + // Import block headers. + let mut headers = Vec::with_capacity(4); + let mut bodies = Vec::with_capacity(4); + let mut parent_hash = H256::zero(); + for i in 0..4 { + // Construct the block body + let mut uncles = if i > 0 { + encode_list(&[dummy_header(i - 1, H256::random())]).into_vec() + } else { + ::rlp::EMPTY_LIST_RLP.to_vec() + }; + + let mut txs = encode_list(&[dummy_signed_tx()]); + let tx_root = ordered_trie_root(Rlp::new(&txs).iter().map(|r| r.as_raw())); + + let mut rlp = RlpStream::new_list(2); + rlp.append_raw(&txs, 1); + rlp.append_raw(&uncles, 1); + bodies.push(rlp.out()); + + // Construct the block header + let mut header = dummy_header(i, parent_hash); + header.set_transactions_root(tx_root); + header.set_uncles_hash(keccak(&uncles)); + parent_hash = header.hash(); + headers.push(header); + } + + let mut downloader = BlockDownloader::new(BlockSet::NewBlocks, &headers[0].hash(), 0); + downloader.state = State::Blocks; + downloader.blocks.reset_to(vec![headers[0].hash()]); + + // Only import the first three block headers. + let rlp_data = encode_list(&headers[0..3]); + let headers_rlp = Rlp::new(&rlp_data); + assert!(downloader.import_headers(&mut io, &headers_rlp, headers[0].hash()).is_ok()); + + // Import first body successfully. + let mut rlp_data = RlpStream::new_list(1); + rlp_data.append_raw(&bodies[0], 1); + let bodies_rlp = Rlp::new(rlp_data.as_raw()); + assert!(downloader.import_bodies(&bodies_rlp, &[headers[0].hash(), headers[1].hash()]).is_ok()); + + // Import second body successfully. + let mut rlp_data = RlpStream::new_list(1); + rlp_data.append_raw(&bodies[1], 1); + let bodies_rlp = Rlp::new(rlp_data.as_raw()); + assert!(downloader.import_bodies(&bodies_rlp, &[headers[0].hash(), headers[1].hash()]).is_ok()); + + // Import unexpected third body. + let mut rlp_data = RlpStream::new_list(1); + rlp_data.append_raw(&bodies[2], 1); + let bodies_rlp = Rlp::new(rlp_data.as_raw()); + match downloader.import_bodies(&bodies_rlp, &[headers[0].hash(), headers[1].hash()]) { + Err(BlockDownloaderImportError::Invalid) => (), + _ => panic!("expected BlockDownloaderImportError"), + }; + } + + #[test] + fn import_receipts() { + ::env_logger::try_init().ok(); + + let mut chain = TestBlockChainClient::new(); + let snapshot_service = TestSnapshotService::new(); + let queue = RwLock::new(VecDeque::new()); + let mut io = TestIo::new(&mut chain, &snapshot_service, &queue, None); + + // Import block headers. + let mut headers = Vec::with_capacity(4); + let mut receipts = Vec::with_capacity(4); + let mut parent_hash = H256::zero(); + for i in 0..4 { + // Construct the receipts. Receipt root for the first two blocks is the same. + // + // The RLP-encoded integers are clearly not receipts, but the BlockDownloader treats + // all receipts as byte blobs, so it does not matter. + let mut receipts_rlp = if i < 2 { + encode_list(&[0u32]) + } else { + encode_list(&[i as u32]) + }; + let receipts_root = ordered_trie_root(Rlp::new(&receipts_rlp).iter().map(|r| r.as_raw())); + receipts.push(receipts_rlp); + + // Construct the block header. + let mut header = dummy_header(i, parent_hash); + header.set_receipts_root(receipts_root); + parent_hash = header.hash(); + headers.push(header); + } + + let mut downloader = BlockDownloader::new(BlockSet::OldBlocks, &headers[0].hash(), 0); + downloader.state = State::Blocks; + downloader.blocks.reset_to(vec![headers[0].hash()]); + + // Only import the first three block headers. + let rlp_data = encode_list(&headers[0..3]); + let headers_rlp = Rlp::new(&rlp_data); + assert!(downloader.import_headers(&mut io, &headers_rlp, headers[0].hash()).is_ok()); + + // Import second and third receipts successfully. + let mut rlp_data = RlpStream::new_list(2); + rlp_data.append_raw(&receipts[1], 1); + rlp_data.append_raw(&receipts[2], 1); + let receipts_rlp = Rlp::new(rlp_data.as_raw()); + assert!(downloader.import_receipts(&receipts_rlp, &[headers[1].hash(), headers[2].hash()]).is_ok()); + + // Import unexpected fourth receipt. + let mut rlp_data = RlpStream::new_list(1); + rlp_data.append_raw(&receipts[3], 1); + let bodies_rlp = Rlp::new(rlp_data.as_raw()); + match downloader.import_bodies(&bodies_rlp, &[headers[1].hash(), headers[2].hash()]) { + Err(BlockDownloaderImportError::Invalid) => (), + _ => panic!("expected BlockDownloaderImportError"), + }; + } + + #[test] + fn reset_after_multiple_sets_of_useless_headers() { + ::env_logger::try_init().ok(); + + let spec = Spec::new_test(); + let genesis_hash = spec.genesis_header().hash(); + + let mut downloader = BlockDownloader::new(BlockSet::NewBlocks, &genesis_hash, 0); + downloader.state = State::ChainHead; + + let mut chain = TestBlockChainClient::new(); + let snapshot_service = TestSnapshotService::new(); + let queue = RwLock::new(VecDeque::new()); + let mut io = TestIo::new(&mut chain, &snapshot_service, &queue, None); + + let heads = [ + spec.genesis_header(), + dummy_header(127, H256::random()), + dummy_header(254, H256::random()), + ]; + + let short_subchain = [dummy_header(1, genesis_hash)]; + + import_headers_ok(&heads, &mut downloader, &mut io); + import_headers_ok(&short_subchain, &mut downloader, &mut io); + + assert_eq!(downloader.state, State::Blocks); + assert!(!downloader.blocks.is_empty()); + + // simulate receiving useless headers + let head = vec![short_subchain.last().unwrap().clone()]; + for _ in 0..MAX_USELESS_HEADERS_PER_ROUND { + let res = import_headers(&head, &mut downloader, &mut io); + assert!(res.is_err()); + } + + assert_eq!(downloader.state, State::Idle); + assert!(downloader.blocks.is_empty()); + } + + #[test] + fn dont_reset_after_multiple_sets_of_useless_headers_for_chain_head() { + ::env_logger::try_init().ok(); + + let spec = Spec::new_test(); + let genesis_hash = spec.genesis_header().hash(); + + let mut downloader = BlockDownloader::new(BlockSet::NewBlocks, &genesis_hash, 0); + downloader.state = State::ChainHead; + + let mut chain = TestBlockChainClient::new(); + let snapshot_service = TestSnapshotService::new(); + let queue = RwLock::new(VecDeque::new()); + let mut io = TestIo::new(&mut chain, &snapshot_service, &queue, None); + + let heads = [ + spec.genesis_header() + ]; + + let short_subchain = [dummy_header(1, genesis_hash)]; + + import_headers_ok(&heads, &mut downloader, &mut io); + import_headers_ok(&short_subchain, &mut downloader, &mut io); + + assert_eq!(downloader.state, State::Blocks); + assert!(!downloader.blocks.is_empty()); + + // simulate receiving useless headers + let head = vec![short_subchain.last().unwrap().clone()]; + for _ in 0..MAX_USELESS_HEADERS_PER_ROUND { + let res = import_headers(&head, &mut downloader, &mut io); + assert!(res.is_err()); + } + + // download shouldn't be reset since this is the chain head for a single subchain. + // this state usually occurs for NewBlocks when it has reached the chain head. + assert_eq!(downloader.state, State::Blocks); + assert!(!downloader.blocks.is_empty()); + } +} diff --git a/ethcore/sync/src/blocks.rs b/ethcore/sync/src/blocks.rs index 3815084f8f1..c64843e3b2a 100644 --- a/ethcore/sync/src/blocks.rs +++ b/ethcore/sync/src/blocks.rs @@ -215,32 +215,28 @@ impl BlockCollection { } /// Insert a collection of block bodies for previously downloaded headers. - pub fn insert_bodies(&mut self, bodies: Vec) -> usize { - let mut inserted = 0; - for b in bodies { - if let Err(e) = self.insert_body(b) { - trace!(target: "sync", "Ignored invalid body: {:?}", e); - } else { - inserted += 1; - } - } - inserted + pub fn insert_bodies(&mut self, bodies: Vec) -> Vec { + bodies.into_iter() + .filter_map(|b| { + self.insert_body(b) + .map_err(|e| trace!(target: "sync", "Ignored invalid body: {:?}", e)) + .ok() + }) + .collect() } /// Insert a collection of block receipts for previously downloaded headers. - pub fn insert_receipts(&mut self, receipts: Vec) -> usize { + pub fn insert_receipts(&mut self, receipts: Vec) -> Vec> { if !self.need_receipts { - return 0; - } - let mut inserted = 0; - for r in receipts { - if let Err(e) = self.insert_receipt(r) { - trace!(target: "sync", "Ignored invalid receipt: {:?}", e); - } else { - inserted += 1; - } + return Vec::new(); } - inserted + receipts.into_iter() + .filter_map(|r| { + self.insert_receipt(r) + .map_err(|e| trace!(target: "sync", "Ignored invalid receipt: {:?}", e)) + .ok() + }) + .collect() } /// Returns a set of block hashes that require a body download. The returned set is marked as being downloaded. @@ -401,9 +397,9 @@ impl BlockCollection { self.blocks.contains_key(hash) } - /// Check if collection contains a block header. - pub fn contains_head(&self, hash: &H256) -> bool { - self.heads.contains(hash) + /// Check the number of heads + pub fn heads_len(&self) -> usize { + self.heads.len() } /// Return used heap size. @@ -421,7 +417,7 @@ impl BlockCollection { self.downloading_headers.contains(hash) || self.downloading_bodies.contains(hash) } - fn insert_body(&mut self, body: SyncBody) -> Result<(), network::Error> { + fn insert_body(&mut self, body: SyncBody) -> Result { let header_id = { let tx_root = ordered_trie_root(Rlp::new(&body.transactions_bytes).iter().map(|r| r.as_raw())); let uncles = keccak(&body.uncles_bytes); @@ -438,7 +434,7 @@ impl BlockCollection { Some(ref mut block) => { trace!(target: "sync", "Got body {}", h); block.body = Some(body); - Ok(()) + Ok(h) }, None => { warn!("Got body with no header {}", h); @@ -453,7 +449,7 @@ impl BlockCollection { } } - fn insert_receipt(&mut self, r: Bytes) -> Result<(), network::Error> { + fn insert_receipt(&mut self, r: Bytes) -> Result, network::Error> { let receipt_root = { let receipts = Rlp::new(&r); ordered_trie_root(receipts.iter().map(|r| r.as_raw())) @@ -461,7 +457,8 @@ impl BlockCollection { self.downloading_receipts.remove(&receipt_root); match self.receipt_ids.entry(receipt_root) { hash_map::Entry::Occupied(entry) => { - for h in entry.remove() { + let block_hashes = entry.remove(); + for h in block_hashes.iter() { match self.blocks.get_mut(&h) { Some(ref mut block) => { trace!(target: "sync", "Got receipt {}", h); @@ -473,7 +470,7 @@ impl BlockCollection { } } } - Ok(()) + Ok(block_hashes.to_vec()) }, hash_map::Entry::Vacant(_) => { trace!(target: "sync", "Ignored unknown/stale block receipt {:?}", receipt_root); diff --git a/ethcore/sync/src/chain/handler.rs b/ethcore/sync/src/chain/handler.rs index 15f234fbbfe..bbb3db3288e 100644 --- a/ethcore/sync/src/chain/handler.rs +++ b/ethcore/sync/src/chain/handler.rs @@ -28,6 +28,7 @@ use network::PeerId; use rlp::Rlp; use snapshot::ChunkType; use std::cmp; +use std::mem; use std::collections::HashSet; use std::time::Instant; use sync_io::SyncIo; @@ -292,10 +293,19 @@ impl SyncHandler { let block_set = sync.peers.get(&peer_id) .and_then(|p| p.block_set) .unwrap_or(BlockSet::NewBlocks); - if !sync.reset_peer_asking(peer_id, PeerAsking::BlockBodies) { + let allowed = sync.peers.get(&peer_id).map(|p| p.is_allowed()).unwrap_or(false); + + if !sync.reset_peer_asking(peer_id, PeerAsking::BlockBodies) || !allowed { trace!(target: "sync", "{}: Ignored unexpected bodies", peer_id); return Ok(()); } + let expected_blocks = match sync.peers.get_mut(&peer_id) { + Some(peer) => mem::replace(&mut peer.asking_blocks, Vec::new()), + None => { + trace!(target: "sync", "{}: Ignored unexpected bodies (peer not found)", peer_id); + return Ok(()); + } + }; let item_count = r.item_count()?; trace!(target: "sync", "{} -> BlockBodies ({} entries), set = {:?}", peer_id, item_count, block_set); if item_count == 0 { @@ -315,7 +325,7 @@ impl SyncHandler { Some(ref mut blocks) => blocks, } }; - downloader.import_bodies(r)?; + downloader.import_bodies(r, expected_blocks.as_slice())?; } sync.collect_blocks(io, block_set); Ok(()) @@ -368,10 +378,23 @@ impl SyncHandler { let expected_hash = sync.peers.get(&peer_id).and_then(|p| p.asking_hash); let allowed = sync.peers.get(&peer_id).map(|p| p.is_allowed()).unwrap_or(false); let block_set = sync.peers.get(&peer_id).and_then(|p| p.block_set).unwrap_or(BlockSet::NewBlocks); - if !sync.reset_peer_asking(peer_id, PeerAsking::BlockHeaders) || expected_hash.is_none() || !allowed { - trace!(target: "sync", "{}: Ignored unexpected headers, expected_hash = {:?}", peer_id, expected_hash); + + if !sync.reset_peer_asking(peer_id, PeerAsking::BlockHeaders) { + debug!(target: "sync", "{}: Ignored unexpected headers", peer_id); return Ok(()); } + let expected_hash = match expected_hash { + Some(hash) => hash, + None => { + debug!(target: "sync", "{}: Ignored unexpected headers (expected_hash is None)", peer_id); + return Ok(()); + } + }; + if !allowed { + debug!(target: "sync", "{}: Ignored unexpected headers (peer not allowed)", peer_id); + return Ok(()); + } + let item_count = r.item_count()?; trace!(target: "sync", "{} -> BlockHeaders ({} entries), state = {:?}, set = {:?}", peer_id, item_count, sync.state, block_set); if (sync.state == SyncState::Idle || sync.state == SyncState::WaitingPeers) && sync.old_blocks.is_none() { @@ -399,12 +422,8 @@ impl SyncHandler { downloader.import_headers(io, r, expected_hash)? }; - if let DownloadAction::Reset = result { - // mark all outstanding requests as expired - trace!("Resetting downloads for {:?}", block_set); - for (_, ref mut p) in sync.peers.iter_mut().filter(|&(_, ref p)| p.block_set == Some(block_set)) { - p.reset_asking(); - } + if result == DownloadAction::Reset { + sync.reset_downloads(block_set); } sync.collect_blocks(io, block_set); @@ -415,10 +434,18 @@ impl SyncHandler { fn on_peer_block_receipts(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { sync.clear_peer_download(peer_id); let block_set = sync.peers.get(&peer_id).and_then(|p| p.block_set).unwrap_or(BlockSet::NewBlocks); - if !sync.reset_peer_asking(peer_id, PeerAsking::BlockReceipts) { + let allowed = sync.peers.get(&peer_id).map(|p| p.is_allowed()).unwrap_or(false); + if !sync.reset_peer_asking(peer_id, PeerAsking::BlockReceipts) || !allowed { trace!(target: "sync", "{}: Ignored unexpected receipts", peer_id); return Ok(()); } + let expected_blocks = match sync.peers.get_mut(&peer_id) { + Some(peer) => mem::replace(&mut peer.asking_blocks, Vec::new()), + None => { + trace!(target: "sync", "{}: Ignored unexpected bodies (peer not found)", peer_id); + return Ok(()); + } + }; let item_count = r.item_count()?; trace!(target: "sync", "{} -> BlockReceipts ({} entries)", peer_id, item_count); if item_count == 0 { @@ -438,7 +465,7 @@ impl SyncHandler { Some(ref mut blocks) => blocks, } }; - downloader.import_receipts(io, r)?; + downloader.import_receipts(r, expected_blocks.as_slice())?; } sync.collect_blocks(io, block_set); Ok(()) diff --git a/ethcore/sync/src/chain/mod.rs b/ethcore/sync/src/chain/mod.rs index 06bd3febab6..f5a0e30b8da 100644 --- a/ethcore/sync/src/chain/mod.rs +++ b/ethcore/sync/src/chain/mod.rs @@ -109,7 +109,7 @@ use ethcore::client::{BlockChainClient, BlockStatus, BlockId, BlockChainInfo, Bl use ethcore::snapshot::{RestorationStatus}; use sync_io::SyncIo; use super::{WarpSync, SyncConfig}; -use block_sync::{BlockDownloader, BlockDownloaderImportError as DownloaderImportError}; +use block_sync::{BlockDownloader, DownloadAction}; use rand::Rng; use snapshot::{Snapshot}; use api::{EthProtocolInfo as PeerInfoDigest, WARP_SYNC_PROTOCOL_ID}; @@ -429,7 +429,7 @@ impl ChainSync { peers: HashMap::new(), handshaking_peers: HashMap::new(), active_peers: HashSet::new(), - new_blocks: BlockDownloader::new(false, &chain_info.best_block_hash, chain_info.best_block_number), + new_blocks: BlockDownloader::new(BlockSet::NewBlocks, &chain_info.best_block_hash, chain_info.best_block_number), old_blocks: None, last_sent_block_number: 0, network_id: config.network_id, @@ -507,8 +507,9 @@ impl ChainSync { self.peers.clear(); } - /// Reset sync. Clear all downloaded data but keep the queue - fn reset(&mut self, io: &mut SyncIo) { + /// Reset sync. Clear all downloaded data but keep the queue. + /// Set sync state to the given state or to the initial state if `None` is provided. + fn reset(&mut self, io: &mut SyncIo, state: Option) { self.new_blocks.reset(); let chain_info = io.chain().chain_info(); for (_, ref mut p) in &mut self.peers { @@ -520,7 +521,7 @@ impl ChainSync { } } } - self.state = ChainSync::get_init_state(self.warp_sync, io.chain()); + self.state = state.unwrap_or_else(|| ChainSync::get_init_state(self.warp_sync, io.chain())); // Reactivate peers only if some progress has been made // since the last sync round of if starting fresh. self.active_peers = self.peers.keys().cloned().collect(); @@ -534,7 +535,7 @@ impl ChainSync { io.snapshot_service().abort_restore(); } self.snapshot.clear(); - self.reset(io); + self.reset(io, None); self.continue_sync(io); } @@ -637,13 +638,13 @@ impl ChainSync { pub fn update_targets(&mut self, chain: &BlockChainClient) { // Do not assume that the block queue/chain still has our last_imported_block let chain = chain.chain_info(); - self.new_blocks = BlockDownloader::new(false, &chain.best_block_hash, chain.best_block_number); + self.new_blocks = BlockDownloader::new(BlockSet::NewBlocks, &chain.best_block_hash, chain.best_block_number); self.old_blocks = None; if self.download_old_blocks { if let (Some(ancient_block_hash), Some(ancient_block_number)) = (chain.ancient_block_hash, chain.ancient_block_number) { trace!(target: "sync", "Downloading old blocks from {:?} (#{}) till {:?} (#{:?})", ancient_block_hash, ancient_block_number, chain.first_block_hash, chain.first_block_number); - let mut downloader = BlockDownloader::with_unlimited_reorg(true, &ancient_block_hash, ancient_block_number); + let mut downloader = BlockDownloader::new(BlockSet::OldBlocks, &ancient_block_hash, ancient_block_number); if let Some(hash) = chain.first_block_hash { trace!(target: "sync", "Downloader target set to {:?}", hash); downloader.set_target(&hash); @@ -699,7 +700,7 @@ impl ChainSync { /// Called after all blocks have been downloaded fn complete_sync(&mut self, io: &mut SyncIo) { trace!(target: "sync", "Sync complete"); - self.reset(io); + self.reset(io, Some(SyncState::Idle)); } /// Enter waiting state @@ -762,12 +763,10 @@ impl ChainSync { } } - // Only ask for old blocks if the peer has a higher difficulty than the last imported old block - let last_imported_old_block_difficulty = self.old_blocks.as_mut().and_then(|d| { - io.chain().block_total_difficulty(BlockId::Number(d.last_imported_block_number())) - }); + // Only ask for old blocks if the peer has an equal or higher difficulty + let equal_or_higher_difficulty = peer_difficulty.map_or(false, |pd| pd >= syncing_difficulty); - if force || last_imported_old_block_difficulty.map_or(true, |ld| peer_difficulty.map_or(true, |pd| pd > ld)) { + if force || equal_or_higher_difficulty { if let Some(request) = self.old_blocks.as_mut().and_then(|d| d.request_blocks(io, num_active_peers)) { SyncRequester::request_blocks(self, io, peer_id, request, BlockSet::OldBlocks); return; @@ -775,9 +774,9 @@ impl ChainSync { } else { trace!( target: "sync", - "peer {:?} is not suitable for requesting old blocks, last_imported_old_block_difficulty={:?}, peer_difficulty={:?}", + "peer {:?} is not suitable for requesting old blocks, syncing_difficulty={:?}, peer_difficulty={:?}", peer_id, - last_imported_old_block_difficulty, + syncing_difficulty, peer_difficulty ); self.deactivate_peer(io, peer_id); @@ -855,18 +854,39 @@ impl ChainSync { fn collect_blocks(&mut self, io: &mut SyncIo, block_set: BlockSet) { match block_set { BlockSet::NewBlocks => { - if self.new_blocks.collect_blocks(io, self.state == SyncState::NewBlocks) == Err(DownloaderImportError::Invalid) { - self.restart(io); + if self.new_blocks.collect_blocks(io, self.state == SyncState::NewBlocks) == DownloadAction::Reset { + self.reset_downloads(block_set); + self.new_blocks.reset(); } }, BlockSet::OldBlocks => { - if self.old_blocks.as_mut().map_or(false, |downloader| { downloader.collect_blocks(io, false) == Err(DownloaderImportError::Invalid) }) { - self.restart(io); - } else if self.old_blocks.as_ref().map_or(false, |downloader| { downloader.is_complete() }) { + let mut is_complete = false; + let mut download_action = DownloadAction::None; + if let Some(downloader) = self.old_blocks.as_mut() { + download_action = downloader.collect_blocks(io, false); + is_complete = downloader.is_complete(); + } + + if download_action == DownloadAction::Reset { + self.reset_downloads(block_set); + if let Some(downloader) = self.old_blocks.as_mut() { + downloader.reset(); + } + } + + if is_complete { trace!(target: "sync", "Background block download is complete"); self.old_blocks = None; } } + }; + } + + /// Mark all outstanding requests as expired + fn reset_downloads(&mut self, block_set: BlockSet) { + trace!(target: "sync", "Resetting downloads for {:?}", block_set); + for (_, ref mut p) in self.peers.iter_mut().filter(|&(_, ref p)| p.block_set == Some(block_set)) { + p.reset_asking(); } } diff --git a/ethcore/sync/src/chain/propagator.rs b/ethcore/sync/src/chain/propagator.rs index 102a3171246..82b592c4ba0 100644 --- a/ethcore/sync/src/chain/propagator.rs +++ b/ethcore/sync/src/chain/propagator.rs @@ -200,7 +200,7 @@ impl SyncPropagator { let appended = packet.append_raw_checked(&transaction.drain(), 1, MAX_TRANSACTION_PACKET_SIZE); if !appended { // Maximal packet size reached just proceed with sending - debug!("Transaction packet size limit reached. Sending incomplete set of {}/{} transactions.", pushed, to_send.len()); + debug!(target: "sync", "Transaction packet size limit reached. Sending incomplete set of {}/{} transactions.", pushed, to_send.len()); to_send = to_send.into_iter().take(pushed).collect(); break; } diff --git a/ethcore/sync/src/tests/chain.rs b/ethcore/sync/src/tests/chain.rs index 0b6c8f7c284..06118df66b5 100644 --- a/ethcore/sync/src/tests/chain.rs +++ b/ethcore/sync/src/tests/chain.rs @@ -225,32 +225,28 @@ fn propagate_blocks() { #[test] fn restart_on_malformed_block() { + ::env_logger::try_init().ok(); let mut net = TestNet::new(2); - net.peer(1).chain.add_blocks(10, EachBlockWith::Uncle); - net.peer(1).chain.corrupt_block(6); - net.sync_steps(20); - - assert_eq!(net.peer(0).chain.chain_info().best_block_number, 5); -} - -#[test] -fn restart_on_broken_chain() { - let mut net = TestNet::new(2); - net.peer(1).chain.add_blocks(10, EachBlockWith::Uncle); - net.peer(1).chain.corrupt_block_parent(6); + net.peer(1).chain.add_blocks(5, EachBlockWith::Nothing); + net.peer(1).chain.add_block(EachBlockWith::Nothing, |mut header| { + header.set_extra_data(b"This extra data is way too long to be considered valid".to_vec()); + header + }); net.sync_steps(20); - assert_eq!(net.peer(0).chain.chain_info().best_block_number, 5); + // This gets accepted just fine since the TestBlockChainClient performs no validation. + // Probably remove this test? + assert_eq!(net.peer(0).chain.chain_info().best_block_number, 6); } #[test] -fn high_td_attach() { +fn reject_on_broken_chain() { let mut net = TestNet::new(2); - net.peer(1).chain.add_blocks(10, EachBlockWith::Uncle); + net.peer(1).chain.add_blocks(10, EachBlockWith::Nothing); net.peer(1).chain.corrupt_block_parent(6); net.sync_steps(20); - assert_eq!(net.peer(0).chain.chain_info().best_block_number, 5); + assert_eq!(net.peer(0).chain.chain_info().best_block_number, 0); } #[test] diff --git a/ethcore/transaction/src/transaction.rs b/ethcore/transaction/src/transaction.rs index f5034c4b2ae..ee37f68524d 100644 --- a/ethcore/transaction/src/transaction.rs +++ b/ethcore/transaction/src/transaction.rs @@ -90,8 +90,8 @@ pub mod signature { match v { v if v == 27 => 0, v if v == 28 => 1, - v if v > 36 => ((v - 1) % 2) as u8, - _ => 4 + v if v >= 35 => ((v - 1) % 2) as u8, + _ => 4 } } } @@ -364,7 +364,7 @@ impl UnverifiedTransaction { pub fn chain_id(&self) -> Option { match self.v { v if self.is_unsigned() => Some(v), - v if v > 36 => Some((v - 35) / 2), + v if v >= 35 => Some((v - 35) / 2), _ => None, } } @@ -583,6 +583,27 @@ mod tests { assert_eq!(t.chain_id(), None); } + #[test] + fn signing_eip155_zero_chainid() { + use ethkey::{Random, Generator}; + + let key = Random.generate().unwrap(); + let t = Transaction { + action: Action::Create, + nonce: U256::from(42), + gas_price: U256::from(3000), + gas: U256::from(50_000), + value: U256::from(1), + data: b"Hello!".to_vec() + }; + + let hash = t.hash(Some(0)); + let sig = ::ethkey::sign(&key.secret(), &hash).unwrap(); + let u = t.with_signature(sig, Some(0)); + + assert!(SignedTransaction::new(u).is_ok()); + } + #[test] fn signing() { use ethkey::{Random, Generator}; diff --git a/ethcore/vm/Cargo.toml b/ethcore/vm/Cargo.toml index d199ed552b9..4ea807089e4 100644 --- a/ethcore/vm/Cargo.toml +++ b/ethcore/vm/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Parity Technologies "] byteorder = "1.0" parity-bytes = "0.1" ethereum-types = "0.4" -patricia-trie = "0.2.1" +patricia-trie = "0.2" patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" } log = "0.4" common-types = { path = "../types" } diff --git a/ethcore/vm/src/ext.rs b/ethcore/vm/src/ext.rs index 168640593b8..2994fba5c2a 100644 --- a/ethcore/vm/src/ext.rs +++ b/ethcore/vm/src/ext.rs @@ -140,10 +140,10 @@ pub trait Ext { fn depth(&self) -> usize; /// Increments sstore refunds counter. - fn add_sstore_refund(&mut self, value: U256); + fn add_sstore_refund(&mut self, value: usize); /// Decrements sstore refunds counter. - fn sub_sstore_refund(&mut self, value: U256); + fn sub_sstore_refund(&mut self, value: usize); /// Decide if any more operations should be traced. Passthrough for the VM trace. fn trace_next_instruction(&mut self, _pc: usize, _instruction: u8, _current_gas: U256) -> bool { false } diff --git a/ethcore/vm/src/tests.rs b/ethcore/vm/src/tests.rs index b6e44f000e4..fef1da29574 100644 --- a/ethcore/vm/src/tests.rs +++ b/ethcore/vm/src/tests.rs @@ -56,7 +56,7 @@ pub struct FakeExt { pub store: HashMap, pub suicides: HashSet
, pub calls: HashSet, - pub sstore_clears: U256, + pub sstore_clears: i128, pub depth: usize, pub blockhashes: HashMap, pub codes: HashMap>, @@ -220,12 +220,12 @@ impl Ext for FakeExt { self.is_static } - fn add_sstore_refund(&mut self, value: U256) { - self.sstore_clears = self.sstore_clears + value; + fn add_sstore_refund(&mut self, value: usize) { + self.sstore_clears += value as i128; } - fn sub_sstore_refund(&mut self, value: U256) { - self.sstore_clears = self.sstore_clears - value; + fn sub_sstore_refund(&mut self, value: usize) { + self.sstore_clears -= value as i128; } fn trace_next_instruction(&mut self, _pc: usize, _instruction: u8, _gas: U256) -> bool { diff --git a/ethcore/wasm/src/runtime.rs b/ethcore/wasm/src/runtime.rs index 41c0d950da4..9d10eb5404d 100644 --- a/ethcore/wasm/src/runtime.rs +++ b/ethcore/wasm/src/runtime.rs @@ -285,7 +285,7 @@ impl<'a> Runtime<'a> { self.ext.set_storage(key, val).map_err(|_| Error::StorageUpdateError)?; if former_val != H256::zero() && val == H256::zero() { - let sstore_clears_schedule = U256::from(self.schedule().sstore_refund_gas); + let sstore_clears_schedule = self.schedule().sstore_refund_gas; self.ext.add_sstore_refund(sstore_clears_schedule); } diff --git a/json/src/spec/engine.rs b/json/src/spec/engine.rs index f8476757c3f..020cc1fd0ba 100644 --- a/json/src/spec/engine.rs +++ b/json/src/spec/engine.rs @@ -26,7 +26,7 @@ pub enum Engine { Null(NullEngine), /// Instantly sealing engine. #[serde(rename="instantSeal")] - InstantSeal(InstantSeal), + InstantSeal(Option), /// Ethash engine. Ethash(Ethash), /// BasicAuthority engine. @@ -71,6 +71,17 @@ mod tests { _ => panic!(), }; + let s = r#"{ + "instantSeal": null + }"#; + + let deserialized: Engine = serde_json::from_str(s).unwrap(); + match deserialized { + Engine::InstantSeal(_) => {}, // instant seal is unit tested in its own file. + _ => panic!(), + }; + + let s = r#"{ "Ethash": { "params": { diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 899b3932d82..a65a4b79945 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -704,11 +704,11 @@ usage! { "--price-update-period=[T]", "T will be allowed to pass between each gas price update. T may be daily, hourly, a number of seconds, or a time string of the form \"2 days\", \"30 minutes\" etc..", - ARG arg_gas_floor_target: (String) = "4700000", or |c: &Config| c.mining.as_ref()?.gas_floor_target.clone(), + ARG arg_gas_floor_target: (String) = "8000000", or |c: &Config| c.mining.as_ref()?.gas_floor_target.clone(), "--gas-floor-target=[GAS]", "Amount of gas per block to target when sealing a new block.", - ARG arg_gas_cap: (String) = "6283184", or |c: &Config| c.mining.as_ref()?.gas_cap.clone(), + ARG arg_gas_cap: (String) = "10000000", or |c: &Config| c.mining.as_ref()?.gas_cap.clone(), "--gas-cap=[GAS]", "A cap on how large we will raise the gas limit per block due to transaction volume.", @@ -865,6 +865,10 @@ usage! { "--no-periodic-snapshot", "Disable automated snapshots which usually occur once every 10000 blocks.", + ARG arg_snapshot_threads: (Option) = None, or |c: &Config| c.snapshots.as_ref()?.processing_threads, + "--snapshot-threads=[NUM]", + "Enables multiple threads for snapshots creation.", + ["Whisper Options"] FLAG flag_whisper: (bool) = false, or |c: &Config| c.whisper.as_ref()?.enabled, "--whisper", @@ -1345,6 +1349,7 @@ struct Footprint { #[serde(deny_unknown_fields)] struct Snapshots { disable_periodic: Option, + processing_threads: Option, } #[derive(Default, Debug, PartialEq, Deserialize)] @@ -1712,7 +1717,7 @@ mod tests { arg_reseal_max_period: 60000u64, flag_reseal_on_uncle: false, arg_work_queue_size: 20usize, - arg_tx_gas_limit: Some("6283184".into()), + arg_tx_gas_limit: Some("10000000".into()), arg_tx_time_limit: Some(100u64), arg_relay_set: "cheap".into(), arg_min_gas_price: Some(0u64), @@ -1721,8 +1726,8 @@ mod tests { arg_poll_lifetime: 60u32, arg_usd_per_eth: "auto".into(), arg_price_update_period: "hourly".into(), - arg_gas_floor_target: "4700000".into(), - arg_gas_cap: "6283184".into(), + arg_gas_floor_target: "8000000".into(), + arg_gas_cap: "10000000".into(), arg_extra_data: Some("Parity".into()), flag_tx_queue_no_unfamiliar_locals: false, flag_tx_queue_no_early_reject: false, @@ -1771,6 +1776,7 @@ mod tests { arg_export_state_at: "latest".into(), arg_snapshot_at: "latest".into(), flag_no_periodic_snapshot: false, + arg_snapshot_threads: None, // -- Whisper options. flag_whisper: false, @@ -2021,6 +2027,7 @@ mod tests { }), snapshots: Some(Snapshots { disable_periodic: Some(true), + processing_threads: None, }), misc: Some(Misc { logging: Some("own_tx=trace".into()), diff --git a/parity/cli/tests/config.full.toml b/parity/cli/tests/config.full.toml index d615996cfce..2c9fe271db4 100644 --- a/parity/cli/tests/config.full.toml +++ b/parity/cli/tests/config.full.toml @@ -125,13 +125,13 @@ min_gas_price = 0 usd_per_tx = "0.0001" usd_per_eth = "auto" price_update_period = "hourly" -gas_floor_target = "4700000" -gas_cap = "6283184" +gas_floor_target = "8000000" +gas_cap = "10000000" tx_queue_size = 8192 tx_queue_strategy = "gas_factor" tx_queue_ban_count = 1 tx_queue_ban_time = 180 #s -tx_gas_limit = "6283184" +tx_gas_limit = "10000000" tx_time_limit = 100 #ms tx_queue_no_unfamiliar_locals = false tx_queue_no_early_reject = false diff --git a/parity/configuration.rs b/parity/configuration.rs index 6a40aff3d60..6f99aa80bc2 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -30,8 +30,10 @@ use sync::{NetworkConfiguration, validate_node_url, self}; use ethcore::ethstore::ethkey::{Secret, Public}; use ethcore::client::{VMType}; use ethcore::miner::{stratum, MinerOptions}; +use ethcore::snapshot::SnapshotConfiguration; use ethcore::verification::queue::VerifierSettings; use miner::pool; +use num_cpus; use rpc::{IpcConfiguration, HttpConfiguration, WsConfiguration}; use parity_rpc::NetworkSettings; @@ -125,6 +127,7 @@ impl Configuration { let update_policy = self.update_policy()?; let logger_config = self.logger_config(); let ws_conf = self.ws_config()?; + let snapshot_conf = self.snapshot_config()?; let http_conf = self.http_config()?; let ipc_conf = self.ipc_config()?; let net_conf = self.net_config()?; @@ -298,6 +301,7 @@ impl Configuration { file_path: self.args.arg_snapshot_file.clone(), kind: snapshot::Kind::Take, block_at: to_block_id(&self.args.arg_snapshot_at)?, + snapshot_conf: snapshot_conf, }; Cmd::Snapshot(snapshot_cmd) } else if self.args.cmd_restore { @@ -314,6 +318,7 @@ impl Configuration { file_path: self.args.arg_restore_file.clone(), kind: snapshot::Kind::Restore, block_at: to_block_id("latest")?, // unimportant. + snapshot_conf: snapshot_conf, }; Cmd::Snapshot(restore_cmd) } else if self.args.cmd_export_hardcoded_sync { @@ -349,6 +354,7 @@ impl Configuration { gas_price_percentile: self.args.arg_gas_price_percentile, poll_lifetime: self.args.arg_poll_lifetime, ws_conf: ws_conf, + snapshot_conf: snapshot_conf, http_conf: http_conf, ipc_conf: ipc_conf, net_conf: net_conf, @@ -374,7 +380,6 @@ impl Configuration { private_tx_enabled, name: self.args.arg_identity, custom_bootnodes: self.args.arg_bootnodes.is_some(), - no_periodic_snapshot: self.args.flag_no_periodic_snapshot, check_seal: !self.args.flag_no_seal_check, download_old_blocks: !self.args.flag_no_ancient_blocks, verifier_settings: verifier_settings, @@ -890,6 +895,18 @@ impl Configuration { Ok((provider_conf, encryptor_conf, self.args.flag_private_enabled)) } + fn snapshot_config(&self) -> Result { + let conf = SnapshotConfiguration { + no_periodic: self.args.flag_no_periodic_snapshot, + processing_threads: match self.args.arg_snapshot_threads { + Some(threads) if threads > 0 => threads, + _ => ::std::cmp::max(1, num_cpus::get() / 2), + }, + }; + + Ok(conf) + } + fn network_settings(&self) -> Result { let http_conf = self.http_config()?; let net_addresses = self.net_addresses()?; @@ -1398,7 +1415,7 @@ mod tests { name: "".into(), custom_bootnodes: false, fat_db: Default::default(), - no_periodic_snapshot: false, + snapshot_conf: Default::default(), stratum: None, check_seal: true, download_old_blocks: true, diff --git a/parity/params.rs b/parity/params.rs index df924aee39e..52a2c3a049e 100644 --- a/parity/params.rs +++ b/parity/params.rs @@ -286,7 +286,7 @@ impl Default for MinerExtras { author: Default::default(), engine_signer: Default::default(), extra_data: version_data(), - gas_range_target: (4_700_000.into(), 6_283_184.into()), + gas_range_target: (8_000_000.into(), 10_000_000.into()), work_notify: Default::default(), } } diff --git a/parity/run.rs b/parity/run.rs index 73324aa0896..5d7075ed2d8 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -25,7 +25,7 @@ use ethcore::account_provider::{AccountProvider, AccountProviderSettings}; use ethcore::client::{BlockId, CallContract, Client, Mode, DatabaseCompactionProfile, VMType, BlockChainClient, BlockInfo}; use ethcore::ethstore::ethkey; use ethcore::miner::{stratum, Miner, MinerService, MinerOptions}; -use ethcore::snapshot; +use ethcore::snapshot::{self, SnapshotConfiguration}; use ethcore::spec::{SpecParams, OptimizeFor}; use ethcore::verification::queue::VerifierSettings; use ethcore_logger::{Config as LogConfig, RotatingLogger}; @@ -119,7 +119,7 @@ pub struct RunCmd { pub name: String, pub custom_bootnodes: bool, pub stratum: Option, - pub no_periodic_snapshot: bool, + pub snapshot_conf: SnapshotConfiguration, pub check_seal: bool, pub download_old_blocks: bool, pub verifier_settings: VerifierSettings, @@ -531,6 +531,7 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: client_config.queue.verifier_settings = cmd.verifier_settings; client_config.transaction_verification_queue_size = ::std::cmp::max(2048, txpool_size / 4); + client_config.snapshot = cmd.snapshot_conf.clone(); // set up bootnodes let mut net_conf = cmd.net_conf; @@ -778,7 +779,7 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: }); // the watcher must be kept alive. - let watcher = match cmd.no_periodic_snapshot { + let watcher = match cmd.snapshot_conf.no_periodic { true => None, false => { let sync = sync_provider.clone(); @@ -960,6 +961,11 @@ fn prepare_account_provider(spec: &SpecType, dirs: &Directories, data_dir: &str, account_settings, ); + // Add development account if running dev chain: + if let SpecType::Dev = *spec { + insert_dev_account(&account_provider); + } + for a in cfg.unlocked_accounts { // Check if the account exists if !account_provider.has_account(a) { @@ -976,11 +982,6 @@ fn prepare_account_provider(spec: &SpecType, dirs: &Directories, data_dir: &str, } } - // Add development account if running dev chain: - if let SpecType::Dev = *spec { - insert_dev_account(&account_provider); - } - Ok(account_provider) } diff --git a/parity/snapshot.rs b/parity/snapshot.rs index 0611734fd33..bc087e704a8 100644 --- a/parity/snapshot.rs +++ b/parity/snapshot.rs @@ -22,7 +22,7 @@ use std::sync::Arc; use hash::keccak; use ethcore::account_provider::AccountProvider; -use ethcore::snapshot::{Progress, RestorationStatus, SnapshotService as SS}; +use ethcore::snapshot::{Progress, RestorationStatus, SnapshotConfiguration, SnapshotService as SS}; use ethcore::snapshot::io::{SnapshotReader, PackedReader, PackedWriter}; use ethcore::snapshot::service::Service as SnapshotService; use ethcore::client::{Mode, DatabaseCompactionProfile, VMType}; @@ -62,6 +62,7 @@ pub struct SnapshotCommand { pub file_path: Option, pub kind: Kind, pub block_at: BlockId, + pub snapshot_conf: SnapshotConfiguration, } // helper for reading chunks from arbitrary reader and feeding them into the @@ -165,7 +166,7 @@ impl SnapshotCommand { execute_upgrades(&self.dirs.base, &db_dirs, algorithm, &self.compaction)?; // prepare client config - let client_config = to_client_config( + let mut client_config = to_client_config( &self.cache_config, spec.name.to_lowercase(), Mode::Active, @@ -180,6 +181,8 @@ impl SnapshotCommand { true, ); + client_config.snapshot = self.snapshot_conf; + let restoration_db_handler = db::restoration_db_handler(&client_path, &client_config); let client_db = restoration_db_handler.open(&client_path) .map_err(|e| format!("Failed to open database {:?}", e))?; diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 09b7c860398..84568391f38 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -58,7 +58,7 @@ keccak-hash = "0.1.2" parity-reactor = { path = "../util/reactor" } parity-updater = { path = "../updater" } parity-version = { path = "../util/version" } -patricia-trie = "0.2.1" +patricia-trie = "0.2" rlp = { version = "0.2.4", features = ["ethereum"] } stats = { path = "../util/stats" } vm = { path = "../ethcore/vm" } diff --git a/rpc/src/authcodes.rs b/rpc/src/authcodes.rs index 5b7309a3176..8fd47d553fc 100644 --- a/rpc/src/authcodes.rs +++ b/rpc/src/authcodes.rs @@ -50,8 +50,6 @@ impl TimeProvider for DefaultTimeProvider { const TIME_THRESHOLD: u64 = 7; /// minimal length of hash const TOKEN_LENGTH: usize = 16; -/// special "initial" token used for authorization when there are no tokens yet. -const INITIAL_TOKEN: &'static str = "initial"; /// Separator between fields in serialized tokens file. const SEPARATOR: &'static str = ";"; /// Number of seconds to keep unused tokens. @@ -163,16 +161,6 @@ impl AuthCodes { let as_token = |code| keccak(format!("{}:{}", code, time)); - // Check if it's the initial token. - if self.is_empty() { - let initial = &as_token(INITIAL_TOKEN) == hash; - // Initial token can be used only once. - if initial { - let _ = self.generate_new(); - } - return initial; - } - // look for code for code in &mut self.codes { if &as_token(&code.code) == hash { @@ -239,7 +227,7 @@ mod tests { } #[test] - fn should_return_true_if_code_is_initial_and_store_is_empty() { + fn should_return_false_even_if_code_is_initial_and_store_is_empty() { // given let code = "initial"; let time = 99; @@ -250,7 +238,7 @@ mod tests { let res2 = codes.is_valid(&generate_hash(code, time), time); // then - assert_eq!(res1, true); + assert_eq!(res1, false); assert_eq!(res2, false); } diff --git a/rpc/src/tests/ws.rs b/rpc/src/tests/ws.rs index 91f10e64758..ed5e8299e8d 100644 --- a/rpc/src/tests/ws.rs +++ b/rpc/src/tests/ws.rs @@ -136,7 +136,7 @@ mod testing { } #[test] - fn should_allow_initial_connection_but_only_once() { + fn should_not_allow_initial_connection_even_once() { // given let (server, port, authcodes) = serve(); let code = "initial"; @@ -160,26 +160,9 @@ mod testing { timestamp, ) ); - let response2 = http_client::request(server.addr(), - &format!("\ - GET / HTTP/1.1\r\n\ - Host: 127.0.0.1:{}\r\n\ - Connection: Close\r\n\ - Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n\ - Sec-WebSocket-Protocol:{:?}_{}\r\n\ - Sec-WebSocket-Version: 13\r\n\ - \r\n\ - {{}} - ", - port, - keccak(format!("{}:{}", code, timestamp)), - timestamp, - ) - ); // then - assert_eq!(response1.status, "HTTP/1.1 101 Switching Protocols".to_owned()); - assert_eq!(response2.status, "HTTP/1.1 403 Forbidden".to_owned()); - http_client::assert_security_headers_present(&response2.headers, None); + assert_eq!(response1.status, "HTTP/1.1 403 Forbidden".to_owned()); + http_client::assert_security_headers_present(&response1.headers, None); } } diff --git a/rpc/src/v1/helpers/light_fetch.rs b/rpc/src/v1/helpers/light_fetch.rs index 6b1ecf493ba..acb8e7c0420 100644 --- a/rpc/src/v1/helpers/light_fetch.rs +++ b/rpc/src/v1/helpers/light_fetch.rs @@ -188,7 +188,7 @@ impl LightFetch { } /// Helper for getting proved execution. - pub fn proved_execution(&self, req: CallRequest, num: Trailing) -> impl Future + Send { + pub fn proved_read_only_execution(&self, req: CallRequest, num: Trailing) -> impl Future + Send { const DEFAULT_GAS_PRICE: u64 = 21_000; // starting gas when gas not provided. const START_GAS: u64 = 50_000; @@ -247,19 +247,20 @@ impl LightFetch { }).join(header_fut).and_then(move |((gas_known, tx), hdr)| { // then request proved execution. // TODO: get last-hashes from network. - let env_info = match client.env_info(id) { + let hash = hdr.hash(); + let env_info = match client.env_info(BlockId::Hash(hash)) { Some(env_info) => env_info, _ => return Either::A(future::err(errors::unknown_block())), }; - Either::B(execute_tx(gas_known, ExecuteParams { - from: from, - tx: tx, - hdr: hdr, - env_info: env_info, + Either::B(execute_read_only_tx(gas_known, ExecuteParams { + from, + tx, + hdr, + env_info, engine: client.engine().clone(), - on_demand: on_demand, - sync: sync, + on_demand, + sync, })) })) } @@ -598,10 +599,10 @@ struct ExecuteParams { // has a peer execute the transaction with given params. If `gas_known` is false, // this will double the gas on each `OutOfGas` error. -fn execute_tx(gas_known: bool, params: ExecuteParams) -> impl Future + Send { +fn execute_read_only_tx(gas_known: bool, params: ExecuteParams) -> impl Future + Send { if !gas_known { Box::new(future::loop_fn(params, |mut params| { - execute_tx(true, params.clone()).and_then(move |res| { + execute_read_only_tx(true, params.clone()).and_then(move |res| { match res { Ok(executed) => { // TODO: how to distinguish between actual OOG and diff --git a/rpc/src/v1/impls/light/eth.rs b/rpc/src/v1/impls/light/eth.rs index e36716fc306..67e2c72ab61 100644 --- a/rpc/src/v1/impls/light/eth.rs +++ b/rpc/src/v1/impls/light/eth.rs @@ -398,7 +398,7 @@ impl Eth for EthClient { } fn call(&self, req: CallRequest, num: Trailing) -> BoxFuture { - Box::new(self.fetcher().proved_execution(req, num).and_then(|res| { + Box::new(self.fetcher().proved_read_only_execution(req, num).and_then(|res| { match res { Ok(exec) => Ok(exec.output.into()), Err(e) => Err(errors::execution(e)), @@ -408,7 +408,7 @@ impl Eth for EthClient { fn estimate_gas(&self, req: CallRequest, num: Trailing) -> BoxFuture { // TODO: binary chop for more accurate estimates. - Box::new(self.fetcher().proved_execution(req, num).and_then(|res| { + Box::new(self.fetcher().proved_read_only_execution(req, num).and_then(|res| { match res { Ok(exec) => Ok((exec.refunded + exec.gas_used).into()), Err(e) => Err(errors::execution(e)), diff --git a/rpc/src/v1/impls/net.rs b/rpc/src/v1/impls/net.rs index 74521d81356..e86bd253f7a 100644 --- a/rpc/src/v1/impls/net.rs +++ b/rpc/src/v1/impls/net.rs @@ -22,7 +22,12 @@ use v1::traits::Net; /// Net rpc implementation. pub struct NetClient { - sync: Arc + sync: Arc, + /// Cached `network_id`. + /// + /// We cache it to avoid redundant aquire of sync read lock. + /// https://github.com/paritytech/parity-ethereum/issues/8746 + network_id: u64, } impl NetClient where S: SyncProvider { @@ -30,17 +35,18 @@ impl NetClient where S: SyncProvider { pub fn new(sync: &Arc) -> Self { NetClient { sync: sync.clone(), + network_id: sync.status().network_id, } } } impl Net for NetClient where S: SyncProvider + 'static { fn version(&self) -> Result { - Ok(format!("{}", self.sync.status().network_id).to_owned()) + Ok(format!("{}", self.network_id)) } fn peer_count(&self) -> Result { - Ok(format!("0x{:x}", self.sync.status().num_peers as u64).to_owned()) + Ok(format!("{:#x}", self.sync.status().num_peers as u64)) } fn is_listening(&self) -> Result { diff --git a/scripts/aura-test.sh b/scripts/aura-test.sh deleted file mode 100755 index 0c39e12f4d1..00000000000 --- a/scripts/aura-test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -e # fail on any error -set -u # treat unset variables as error - -cargo build -j $(nproc) --release --features final $CARGOFLAGS -git clone https://github.com/paritytech/parity-import-tests -cp target/release/parity parity-import-tests/aura/parity -cd parity-import-tests/aura -echo "Start Aura test" -./parity import blocks.rlp --chain chain.json -./parity restore snap --chain chain.json -echo "Aura test complete" diff --git a/docker/README.md b/scripts/docker/README.md similarity index 100% rename from docker/README.md rename to scripts/docker/README.md diff --git a/docker/alpine/Dockerfile b/scripts/docker/alpine/Dockerfile similarity index 100% rename from docker/alpine/Dockerfile rename to scripts/docker/alpine/Dockerfile diff --git a/docker/centos/Dockerfile b/scripts/docker/centos/Dockerfile similarity index 100% rename from docker/centos/Dockerfile rename to scripts/docker/centos/Dockerfile diff --git a/docker/centos/Dockerfile.build b/scripts/docker/centos/Dockerfile.build similarity index 100% rename from docker/centos/Dockerfile.build rename to scripts/docker/centos/Dockerfile.build diff --git a/docker/centos/build.sh b/scripts/docker/centos/build.sh similarity index 100% rename from docker/centos/build.sh rename to scripts/docker/centos/build.sh diff --git a/docker/hub/Dockerfile b/scripts/docker/hub/Dockerfile similarity index 77% rename from docker/hub/Dockerfile rename to scripts/docker/hub/Dockerfile index 4eec8cfc61c..53fa092ef9e 100644 --- a/docker/hub/Dockerfile +++ b/scripts/docker/hub/Dockerfile @@ -15,8 +15,17 @@ RUN apt autoremove -y RUN apt clean -y RUN rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* +RUN groupadd -g 1000 parity \ + && useradd -m -u 1000 -g parity -s /bin/sh parity + +USER parity + +WORKDIR /home/parity + +ENV PATH "~/bin:${PATH}" + #add TARGET to docker image -COPY artifacts/x86_64-unknown-linux-gnu/$TARGET /usr/bin/$TARGET +COPY artifacts/x86_64-unknown-linux-gnu/$TARGET ./bin/$TARGET # Build a shell script because the ENTRYPOINT command doesn't like using ENV RUN echo "#!/bin/bash \n ${TARGET} \$@" > ./entrypoint.sh diff --git a/docker/ubuntu-aarch64/Dockerfile b/scripts/docker/ubuntu-aarch64/Dockerfile similarity index 100% rename from docker/ubuntu-aarch64/Dockerfile rename to scripts/docker/ubuntu-aarch64/Dockerfile diff --git a/docker/ubuntu-arm/Dockerfile b/scripts/docker/ubuntu-arm/Dockerfile similarity index 100% rename from docker/ubuntu-arm/Dockerfile rename to scripts/docker/ubuntu-arm/Dockerfile diff --git a/scripts/gitlab-rpc-docs.sh b/scripts/gitlab-rpc-docs.sh deleted file mode 100755 index de03fc69f26..00000000000 --- a/scripts/gitlab-rpc-docs.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash - -clone_repos() { - git clone https://github.com/parity-js/jsonrpc.git jsonrpc - git clone https://github.com/paritytech/wiki.git wiki -} - -build_docs() { - npm install - npm run build:markdown -} - -update_wiki_docs() { - for file in $(ls jsonrpc/docs); do - module_name=${file:0:-3} - mv jsonrpc/docs/$file wiki/JSONRPC-$module_name-module.md - done -} - -set_remote_wiki() { - git config remote.origin.url "https://${GITHUB_TOKEN}@github.com/paritytech/wiki.git" -} - -setup_git() { - git config --global user.email "devops@parity.com" - git config --global user.name "Devops Parity" -} - -commit_files() { - git checkout -b rpcdoc-update-${CI_COMMIT_REF_NAME} - git add . - git commit -m "Update docs to ${CI_COMMIT_REF_NAME}" - git tag -a "${CI_COMMIT_REF_NAME}" -m "Updated to ${CI_COMMIT_REF_NAME}" -} - -upload_files() { - git push --tags -} - -PROJECT_DIR=$(pwd) - -setup_git -cd .. -clone_repos -cp -r $PROJECT_DIR jsonrpc/.parity -cd jsonrpc -build_docs -cd .. -update_wiki_docs -cd wiki -set_remote_wiki -commit_files -upload_files diff --git a/scripts/gitlab/build-unix.sh b/scripts/gitlab/build-unix.sh index 50ae7314c3d..00933f1eeb7 100755 --- a/scripts/gitlab/build-unix.sh +++ b/scripts/gitlab/build-unix.sh @@ -2,13 +2,19 @@ set -e # fail on any error set -u # treat unset variables as error + echo "__________Show ENVIROMENT__________" -echo "CC: " $CC -echo "CXX: " $CXX +echo "CI_SERVER_NAME: " $CI_SERVER_NAME +echo "CARGO_HOME: " $CARGO_HOME +echo "BUILD_TARGET: " $BUILD_TARGET +echo "BUILD_ARCH: " $BUILD_ARCH +echo "CARGO_TARGET: " $CARGO_TARGET +echo "CC: " $CC +echo "CXX: " $CXX echo "__________CARGO CONFIG__________" -rm -rf .cargo mkdir -p .cargo +rm -f .cargo/config echo "[target.$CARGO_TARGET]" >> .cargo/config echo "linker= \"$CC\"" >> .cargo/config cat .cargo/config @@ -26,10 +32,15 @@ mkdir -p artifacts cd artifacts mkdir -p $CARGO_TARGET cd $CARGO_TARGET -cp ../../target/$CARGO_TARGET/release/{parity,parity-evm,ethstore,ethkey,whisper} . +cp ../../target/$CARGO_TARGET/release/parity ./parity +cp ../../target/$CARGO_TARGET/release/parity-evm ./parity-evm +cp ../../target/$CARGO_TARGET/release/ethstore ./ethstore +cp ../../target/$CARGO_TARGET/release/ethkey ./ethkey +cp ../../target/$CARGO_TARGET/release/whisper ./whisper strip -v ./* echo "_____ Calculating checksums _____" for binary in $(ls) do rhash --sha256 $binary -o $binary.sha256 + ./parity tools hash $binary > $binary.sha3 done diff --git a/scripts/gitlab/build-windows.sh b/scripts/gitlab/build-windows.sh index a5510875c87..afd4c64a601 100755 --- a/scripts/gitlab/build-windows.sh +++ b/scripts/gitlab/build-windows.sh @@ -5,19 +5,26 @@ set -u # treat unset variables as error set INCLUDE="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;C:\vs2015\VC\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt" set LIB="C:\vs2015\VC\lib;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64" -rustup default stable-x86_64-pc-windows-msvc -echo "_____ Building _____" +echo "__________Show ENVIROMENT__________" +echo "CI_SERVER_NAME: " $CI_SERVER_NAME +echo "CARGO_HOME: " $CARGO_HOME +echo "BUILD_TARGET: " $BUILD_TARGET +echo "BUILD_ARCH: " $BUILD_ARCH +echo "CARGO_TARGET: " $CARGO_TARGET + +echo "_____ Building target: "$CARGO_TARGET" _____" time cargo build --target $CARGO_TARGET --release --features final time cargo build --target $CARGO_TARGET --release -p evmbin time cargo build --target $CARGO_TARGET --release -p ethstore-cli time cargo build --target $CARGO_TARGET --release -p ethkey-cli time cargo build --target $CARGO_TARGET --release -p whisper-cli + echo "__________Sign binaries__________" -scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity.exe -scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity-evm.exe -scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethstore.exe -scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethkey.exe -scripts/gitlab/sign.cmd $keyfile $certpass target/$CARGO_TARGET/release/whisper.exe +scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity.exe +scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/parity-evm.exe +scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethstore.exe +scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/ethkey.exe +scripts/gitlab/sign-win.cmd $keyfile $certpass target/$CARGO_TARGET/release/whisper.exe echo "_____ Post-processing binaries _____" rm -rf artifacts @@ -25,11 +32,17 @@ mkdir -p artifacts cd artifacts mkdir -p $CARGO_TARGET cd $CARGO_TARGET -cp --verbose ../../target/$CARGO_TARGET/release/{parity.exe,parity-evm.exe,ethstore.exe,ethkey.exe,whisper.exe} . +cp --verbose ../../target/$CARGO_TARGET/release/parity.exe ./parity.exe +cp --verbose ../../target/$CARGO_TARGET/release/parity-evm.exe ./parity-evm.exe +cp --verbose ../../target/$CARGO_TARGET/release/ethstore.exe ./ethstore.exe +cp --verbose ../../target/$CARGO_TARGET/release/ethkey.exe ./ethkey.exe +cp --verbose ../../target/$CARGO_TARGET/release/whisper.exe ./whisper.exe echo "_____ Calculating checksums _____" for binary in $(ls) do rhash --sha256 $binary -o $binary.sha256 + ./parity.exe tools hash $binary > $binary.sha3 done cp parity.exe.sha256 parity.sha256 +cp parity.exe.sha3 parity.sha3 diff --git a/scripts/gitlab/cargo-audit.sh b/scripts/gitlab/cargo-audit.sh new file mode 100755 index 00000000000..1e53f77cd4c --- /dev/null +++ b/scripts/gitlab/cargo-audit.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e # fail on any error +set -u # treat unset variables as error + +CARGO_TARGET_DIR=./target cargo +stable install cargo-audit --force +cargo +stable audit diff --git a/scripts/gitlab/clippy.sh b/scripts/gitlab/clippy.sh deleted file mode 100755 index aef39c29fbc..00000000000 --- a/scripts/gitlab/clippy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e # fail on any error -set -u # treat unset variables as error - -cargo install clippy -cargo clippy -- -D warnings diff --git a/scripts/gitlab/coverage.sh b/scripts/gitlab/coverage.sh deleted file mode 100755 index 38d01cb1faf..00000000000 --- a/scripts/gitlab/coverage.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -x -git submodule update --init --recursive -rm -rf target/* -cargo test --all --exclude evmjit --no-run -- --test-threads 8|| exit $? -KCOV_TARGET="target/cov" -KCOV_FLAGS="--verify" -mkdir -p $KCOV_TARGET -echo "__________Cover RUST___________" -for FILE in `find target/debug/deps ! -name "*.*" -type f` -do - timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET $FILE -done -timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET target/debug/parity-* - -bash <(curl -s https://codecov.io/bash) && - echo "Uploaded code coverage" - -exit 0 diff --git a/scripts/gitlab/rpc-docs.sh b/scripts/gitlab/docs-jsonrpc.sh similarity index 77% rename from scripts/gitlab/rpc-docs.sh rename to scripts/gitlab/docs-jsonrpc.sh index 86e751412d2..3c00fe4ea06 100755 --- a/scripts/gitlab/rpc-docs.sh +++ b/scripts/gitlab/docs-jsonrpc.sh @@ -29,29 +29,35 @@ setup_git() { git config user.name "Devops Parity" } +set_remote_wiki() { + git config remote.origin.url "https://${GITHUB_TOKEN}@github.com/paritytech/wiki.git" +} + commit_files() { echo "__________Commit files__________" git checkout -b rpcdoc-update-${CI_COMMIT_REF_NAME} git add . git commit -m "Update docs to ${CI_COMMIT_REF_NAME}" - git tag -a "${CI_COMMIT_REF_NAME}" + git tag -a "${CI_COMMIT_REF_NAME}" -m "Update RPC docs to ${CI_COMMIT_REF_NAME}" } upload_files() { echo "__________Upload files__________" + git push origin HEAD git push --tags } -RPC_TRAITS_DIR="rpc/src/v1/traits/" +RPC_TRAITS_DIR="rpc/src/v1/traits" setup_git clone_repos mkdir -p "jsonrpc/.parity/$RPC_TRAITS_DIR" -cp -r "$RPC_TRAITS_DIR" "jsonrpc/.parity/$RPC_TRAITS_DIR" +cp $RPC_TRAITS_DIR/*.rs "jsonrpc/.parity/$RPC_TRAITS_DIR" cd jsonrpc build_docs cd .. update_wiki_docs cd wiki +set_remote_wiki commit_files upload_files diff --git a/scripts/gitlab/install-readme.sh b/scripts/gitlab/install-readme.sh deleted file mode 100755 index 531bae9b77a..00000000000 --- a/scripts/gitlab/install-readme.sh +++ /dev/null @@ -1,8 +0,0 @@ -echo "Parity Wallet -============= - -Welcome to Parity Wallet, your all-in-one Ethereum node and wallet. - -If you continue, Parity will be installed as a user service. You will be able to use the Parity Wallet through your browser by using the menu bar icon, following the shortcut in the Launchpad or navigating to http://localhost:8180/ in your browser. - -Parity is distributed under the terms of the GPL." diff --git a/scripts/gitlab/package-snap.sh b/scripts/gitlab/package-snap.sh deleted file mode 100755 index 168ab475155..00000000000 --- a/scripts/gitlab/package-snap.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e # fail on any error -set -u # treat unset variables as error -case ${CI_COMMIT_REF_NAME} in - nightly|*v2.1*) export GRADE="devel";; - beta|*v2.0*) export GRADE="stable";; - stable|*v1.11*) export GRADE="stable";; - *) echo "No release" exit 0;; -esac -SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap" -echo "__________Create snap package__________" -echo "Release channel :" $GRADE " Branch/tag: " $CI_COMMIT_REF_NAME -snapcraft clean -echo $VERSION:$GRADE:$BUILD_ARCH -cat scripts/gitlab/templates/snapcraft.template.yaml | envsubst '$VERSION:$GRADE:$BUILD_ARCH:$CARGO_TARGET' > snapcraft.yaml -cat snapcraft.yaml -snapcraft --target-arch=$BUILD_ARCH -ls *.snap -echo "__________Post-processing snap package__________" -mkdir -p artifacts -mv -v $SNAP_PACKAGE "artifacts/"$SNAP_PACKAGE -echo "_____ Calculating checksums _____" -cd artifacts -rhash --sha256 $SNAP_PACKAGE -o $SNAP_PACKAGE".sha256" diff --git a/scripts/gitlab/publish-awss3.sh b/scripts/gitlab/publish-awss3.sh new file mode 100755 index 00000000000..9ef0435f5ba --- /dev/null +++ b/scripts/gitlab/publish-awss3.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +set -e # fail on any error +set -u # treat unset variables as error + +echo "__________Register Release__________" +DATA="secret=$RELEASES_SECRET" + +echo "Pushing release to Mainnet" +./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA" + +echo "Pushing release to Kovan" +./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-release/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA" + +cd artifacts +ls -l | sort -k9 +filetest=( * ) +echo ${filetest[*]} +for DIR in "${filetest[@]}"; +do + cd $DIR + if [[ $DIR =~ "windows" ]]; + then + WIN=".exe"; + else + WIN=""; + fi + sha3=$(cat parity.sha3 | awk '{print $1}') + case $DIR in + x86_64* ) + DATA="commit=$CI_COMMIT_SHA&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET" + ../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_COMMIT_REF_NAME/$DIR" + # Kovan + ../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_COMMIT_REF_NAME/$DIR" + ;; + esac + cd .. +done + +echo "__________Push binaries to AWS S3____________" +aws configure set aws_access_key_id $s3_key +aws configure set aws_secret_access_key $s3_secret +if [[ "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" || "$CI_COMMIT_REF_NAME" = "nightly" ]]; + then + export S3_BUCKET=builds-parity-published; + else + export S3_BUCKET=builds-parity; +fi +aws s3 sync ./ s3://$S3_BUCKET/$CI_COMMIT_REF_NAME/ diff --git a/scripts/gitlab/publish-docker.sh b/scripts/gitlab/publish-docker.sh index 41c2e3db48a..e4d2007b95c 100755 --- a/scripts/gitlab/publish-docker.sh +++ b/scripts/gitlab/publish-docker.sh @@ -3,9 +3,9 @@ set -e # fail on any error set -u # treat unset variables as error -if [ "$CI_COMMIT_REF_NAME" == "beta" ]; -then export DOCKER_BUILD_TAG="latest"; -else export DOCKER_BUILD_TAG=$CI_COMMIT_REF_NAME; +if [ "$CI_COMMIT_REF_NAME" == "master" ]; + then export DOCKER_BUILD_TAG="latest"; + else export DOCKER_BUILD_TAG=$CI_COMMIT_REF_NAME; fi docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity @@ -17,6 +17,6 @@ export DOCKER_TARGET=$1 echo $DOCKER_TARGET echo "__________Docker build and push__________" -docker build --build-arg TARGET=$DOCKER_TARGET --no-cache=true --tag parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG -f docker/hub/Dockerfile . +docker build --build-arg TARGET=$DOCKER_TARGET --no-cache=true --tag parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG -f scripts/docker/hub/Dockerfile . docker push parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG docker logout diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh deleted file mode 100755 index 35644c8d754..00000000000 --- a/scripts/gitlab/publish-snap.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e # fail on any error -set -u # treat unset variables as error - -case ${CI_COMMIT_REF_NAME} in - nightly|*v2.1*) export CHANNEL="edge";; - beta|*v2.0*) export CHANNEL="beta";; - stable|*v1.11*) export CHANNEL="stable";; - *) echo "No release" exit 0;; -esac -echo "Release channel :" $CHANNEL " Branch/tag: " $CI_COMMIT_REF_NAME - -echo $SNAPCRAFT_LOGIN_PARITY_BASE64 | base64 --decode > snapcraft.login -snapcraft login --with snapcraft.login -snapcraft push --release $CHANNEL "artifacts/parity_"$VERSION"_"$BUILD_ARCH".snap" -snapcraft status parity -snapcraft logout diff --git a/scripts/gitlab/push.sh b/scripts/gitlab/push.sh deleted file mode 100755 index 15e7667e540..00000000000 --- a/scripts/gitlab/push.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -set -e # fail on any error -set -u # treat unset variables as error -updater_push_release () { - echo "push release" - # Mainnet - -} -echo "__________Set ENVIROMENT__________" -DESCRIPTION="$(cat CHANGELOG.md)" -RELEASE_TABLE="$(cat scripts/gitlab/templates/release-table.md)" -RELEASE_TABLE="$(echo "${RELEASE_TABLE//\$VERSION/${VERSION}}")" -#The text in the file CANGELOG.md before which the table with links is inserted. Must be present in this file necessarily -REPLACE_TEXT="The full list of included changes:" -case ${CI_COMMIT_REF_NAME} in - nightly|*v2.1*) NAME="Parity "$VERSION" nightly";; - beta|*v2.0*) NAME="Parity "$VERSION" beta";; - stable|*v1.11*) NAME="Parity "$VERSION" stable";; - *) echo "No release" exit 0;; -esac -cd artifacts -ls -l | sort -k9 -filetest=( * ) -echo ${filetest[*]} -for DIR in "${filetest[@]}"; -do - cd $DIR - if [[ $DIR == "*windows*" ]]; - then - WIN=".exe"; - else - WIN=""; - fi - for binary in $(ls parity.sha256) - do - sha256=$(cat $binary | awk '{ print $1}' ) - case $DIR in - x86_64* ) - DATA="commit=$CI_BUILD_REF&sha3=$sha256&filename=parity$WIN&secret=$RELEASES_SECRET" - ../../scripts/gitlab/safe_curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$DIR" - # Kovan - ../../scripts/gitlab/safe_curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$DIR" - ;; - esac - RELEASE_TABLE="$(echo "${RELEASE_TABLE/sha$DIR/${sha256}}")" - done - cd .. -done -#do not touch the following 3 lines. Features of output in Markdown -DESCRIPTION="$(echo "${DESCRIPTION/${REPLACE_TEXT}/${RELEASE_TABLE} - -${REPLACE_TEXT}}")" -echo "$DESCRIPTION" -if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]]; then DESCRIPTION=""; fi #TODO in the future, we need to prepare a script that will do changelog -echo "__________Create release to Github____________" -github-release release --user devops-parity --repo parity-ethereum --tag "$CI_COMMIT_REF_NAME" --draft --name "$NAME" --description "$DESCRIPTION" -echo "__________Push binaries to AWS S3____________" -aws configure set aws_access_key_id $s3_key -aws configure set aws_secret_access_key $s3_secret -if [[ "$CI_BUILD_REF_NAME" = "beta" || "$CI_BUILD_REF_NAME" = "stable" || "$CI_BUILD_REF_NAME" = "nightly" ]]; - then - export S3_BUCKET=builds-parity-published; - else - export S3_BUCKET=builds-parity; -fi -aws s3 sync ./ s3://$S3_BUCKET/$CI_BUILD_REF_NAME/ diff --git a/scripts/gitlab/rustfmt.sh b/scripts/gitlab/rustfmt.sh deleted file mode 100755 index 447d66f24ec..00000000000 --- a/scripts/gitlab/rustfmt.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e # fail on any error -set -u # treat unset variables as error - -cargo install rustfmt-nightly -cargo fmt -- --write-mode=diff diff --git a/scripts/gitlab/safe_curl.sh b/scripts/gitlab/safe-curl.sh similarity index 100% rename from scripts/gitlab/safe_curl.sh rename to scripts/gitlab/safe-curl.sh diff --git a/scripts/gitlab/sign.cmd b/scripts/gitlab/sign-win.cmd similarity index 100% rename from scripts/gitlab/sign.cmd rename to scripts/gitlab/sign-win.cmd diff --git a/scripts/gitlab/templates/release-table.md b/scripts/gitlab/templates/release-table.md deleted file mode 100644 index 6145521524e..00000000000 --- a/scripts/gitlab/templates/release-table.md +++ /dev/null @@ -1,16 +0,0 @@ -| OS | Arch | Download | SHA256 Checksum | -|:---:|:---:|:---|:---| -| linux | arm64 | [parity](https://releases.parity.io/$VERSION/aarch64-unknown-linux-gnu/parity) | `shaaarch64-unknown-linux-gnu` | -| android | armv7 | [parity](https://releases.parity.io/$VERSION/armv7-linux-androideabi/parity) | `shaarmv7-linux-androideabi` | -| linux | armv7 | [parity](https://releases.parity.io/$VERSION/armv7-unknown-linux-gnueabihf/parity) | `shaarmv7-unknown-linux-gnueabihf` | -| linux | i686 | [parity](https://releases.parity.io/$VERSION/i686-unknown-linux-gnu/parity) | `shai686-unknown-linux-gnu` | -| osx | x64 | [parity](https://releases.parity.io/$VERSION/x86_64-apple-darwin/parity) | `shax86_64-apple-darwin` | -| windows | x64 | [parity.exe](https://releases.parity.io/$VERSION/x86_64-pc-windows-msvc/parity.exe) | `shax86_64-pc-windows-msvc` | -| linux | x64 | [parity](https://releases.parity.io/$VERSION/x86_64-unknown-linux-gnu/parity) | `shax86_64-unknown-linux-gnu` | - -| OS | Alternative | Link | -|:---:|:---:|:---| -| Apple Icon by Pixel Perfect from https://www.flaticon.com/authors/pixel-perfect | Homebrew |[github.com/paritytech/homebrew-paritytech/blob/master/README.md](https://github.com/paritytech/homebrew-paritytech/blob/master/README.md) | -| Linux Icon by Pixel Perfect from https://www.flaticon.com/authors/pixel-perfect | Snapcraft | [snapcraft.io/parity](https://snapcraft.io/parity/) | -| Settings Icon by Pixel Perfect from https://www.flaticon.com/authors/pixel-perfect | Docker | [hub.docker.com/r/parity/parity](https://hub.docker.com/r/parity/parity) | -| Settings Icon by Pixel Perfect from https://www.flaticon.com/authors/pixel-perfect | Other binaries | [vanity-service.parity.io/parity-binaries?format=markdown&version=$VERSION](https://vanity-service.parity.io/parity-binaries?format=markdown&version=$VERSION) | diff --git a/scripts/gitlab/templates/snapcraft.template.yaml b/scripts/gitlab/templates/snapcraft.template.yaml deleted file mode 100644 index 97bb39aa14a..00000000000 --- a/scripts/gitlab/templates/snapcraft.template.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: parity -version: $VERSION -architectures: [$BUILD_ARCH] -grade: $GRADE -confinement: strict - -summary: Fast, light, robust Ethereum implementation -description: | - Parity's goal is to be the fastest, lightest, and most secure Ethereum - client. We are developing Parity using the sophisticated and cutting-edge - Rust programming language. Parity is licensed under the GPLv3, and can be - used for all your Ethereum needs. - - -apps: - parity: - command: parity - plugs: [home, network, network-bind, mount-observe, x11, unity7, desktop, desktop-legacy, wayland] - desktop: usr/share/applications/parity.desktop - parity-evm: - command: parity-evm - plugs: [home, network, network-bind] - ethkey: - command: ethkey - plugs: [home] - ethstore: - command: ethstore - plugs: [home] - whisper: - command: whisper - plugs: [home] - -icon: snap/gui/icon.png - -parts: - desktop-icon: - source: ./snap - plugin: nil - override-build: | - mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications - mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps - cp -v gui/parity.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications/ - cp -v gui/icon.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/ - parity: - source: ./artifacts/$CARGO_TARGET - plugin: nil - override-build: | - mkdir -p $SNAPCRAFT_PART_INSTALL/usr/bin - cp -v parity $SNAPCRAFT_PART_INSTALL/usr/bin/parity - cp -v parity-evm $SNAPCRAFT_PART_INSTALL/usr/bin/parity-evm - cp -v ethkey $SNAPCRAFT_PART_INSTALL/usr/bin/ethkey - cp -v ethstore $SNAPCRAFT_PART_INSTALL/usr/bin/ethstore - cp -v whisper $SNAPCRAFT_PART_INSTALL/usr/bin/whisper - stage-packages: [libc6, libssl1.0.0, libudev1, libstdc++6, cmake] - df: - plugin: nil - stage-packages: [coreutils] - stage: [bin/df] diff --git a/scripts/gitlab/test-all.sh b/scripts/gitlab/test-all.sh new file mode 100755 index 00000000000..15c22870626 --- /dev/null +++ b/scripts/gitlab/test-all.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# ARGUMENT $1 Rust flavor to test with (stable/beta/nightly) + +set -e # fail on any error +set -u # treat unset variables as error + +git log --graph --oneline --decorate=short -n 10 + +case ${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} in + (beta|stable) + export GIT_COMPARE=origin/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}~ + ;; + (master|nightly) + export GIT_COMPARE=master~ + ;; + (*) + export GIT_COMPARE=master + ;; +esac + +export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^CHANGELOG.md -e ^test.sh -e ^scripts/ -e ^docs/ -e ^docker/ -e ^snap/ | wc -l | tr -d ' ')" +echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED" + +if [ "${RUST_FILES_MODIFIED}" = "0" ] +then + echo "__________Skipping Rust tests since no Rust files modified__________"; + exit 0 +fi + +rustup default $1 + +git submodule update --init --recursive +rustup show + +exec ./test.sh diff --git a/scripts/gitlab/test.sh b/scripts/gitlab/test.sh deleted file mode 100755 index be48c52cca8..00000000000 --- a/scripts/gitlab/test.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# ARGUMENT $1 Rust flavor to test with (stable/beta/nightly) - -set -e # fail on any error -set -u # treat unset variables as error - -rustup default $1 - -if [[ "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" ]]; then - export GIT_COMPARE=$CI_COMMIT_REF_NAME~; -else - export GIT_COMPARE=master; -fi - -export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ | wc -l)" -echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED" - -git submodule update --init --recursive -rustup show -if [[ "${RUST_FILES_MODIFIED}" == "0" ]]; -then echo "__________Skipping Rust tests since no Rust files modified__________"; -else ./test.sh || exit $?; -fi - -# if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]]; -# ### @TODO re-enable fail after https://github.com/paritytech/parity-import-tests/issues/3 -# then sh scripts/aura-test.sh; # || exit $?; -# fi diff --git a/snap/gui/icon.png b/snap/gui/icon.png deleted file mode 100644 index f0f22390f56..00000000000 Binary files a/snap/gui/icon.png and /dev/null differ diff --git a/snap/gui/parity.desktop b/snap/gui/parity.desktop deleted file mode 100644 index 1833865deab..00000000000 --- a/snap/gui/parity.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Type=Application -Encoding=UTF-8 -Name=Parity Ethereum -Comment=The fastest and most advanced Ethereum client. -Exec=parity -Icon=/usr/share/pixmaps/icon.png -Terminal=true diff --git a/test.sh b/test.sh index 83d07b78bc9..63ea22d77f2 100755 --- a/test.sh +++ b/test.sh @@ -4,6 +4,7 @@ FEATURES="json-tests" OPTIONS="--release" VALIDATE=1 +THREADS=8 case $1 in --no-json) @@ -29,31 +30,72 @@ esac set -e -if [ "$VALIDATE" -eq "1" ]; then -# Validate --no-default-features build -echo "________Validate build________" -time cargo check --no-default-features -time cargo check --manifest-path util/io/Cargo.toml --no-default-features -time cargo check --manifest-path util/io/Cargo.toml --features "mio" -# Validate chainspecs -echo "________Validate chainspecs________" -time ./scripts/validate_chainspecs.sh +validate () { + if [ "$VALIDATE" -eq "1" ] + then + echo "________Validate build________" + time cargo check $@ --no-default-features + time cargo check $@ --manifest-path util/io/Cargo.toml --no-default-features + time cargo check $@ --manifest-path util/io/Cargo.toml --features "mio" + + # Validate chainspecs + echo "________Validate chainspecs________" + time ./scripts/validate_chainspecs.sh + else + echo "# not validating due to \$VALIDATE!=1" + fi +} + +cpp_test () { + case $CARGO_TARGET in + (x86_64-unknown-linux-gnu) + # Running the C++ example + echo "________Running the C++ example________" + cd parity-clib-examples/cpp && \ + mkdir -p build && \ + cd build && \ + cmake .. && \ + make -j $THREADS && \ + ./parity-example && \ + cd .. && \ + rm -rf build && \ + cd ../.. + ;; + (*) + echo "________Skipping the C++ example________" + ;; + esac +} + +cargo_test () { + echo "________Running Parity Full Test Suite________" + git submodule update --init --recursive + time cargo test $OPTIONS --features "$FEATURES" --all $@ -- --test-threads $THREADS +} + + +if [ "$CARGO_TARGET" ] +then + validate --target $CARGO_TARGET +else + validate +fi + +test "${RUN_TESTS}" = "all" && cpp_test + +if [ "$CARGO_TARGET" ] +then + + case "${RUN_TESTS}" in + (cargo|all) + cargo_test --target $CARGO_TARGET $@ + ;; + ('') + cargo_test --no-run --target $CARGO_TARGET $@ + ;; + esac +else + cargo_test $@ fi -# Running the C++ example -echo "________Running the C++ example________" -cd parity-clib-examples/cpp && \ - mkdir -p build && \ - cd build && \ - cmake .. && \ - make -j 8 && \ - ./parity-example && \ - cd .. && \ - rm -rf build && \ - cd ../.. - -# Running tests -echo "________Running Parity Full Test Suite________" -git submodule update --init --recursive -time cargo test $OPTIONS --features "$FEATURES" --all $1 -- --test-threads 8 diff --git a/util/io/Cargo.toml b/util/io/Cargo.toml index ad50881ddfa..e53b302b7fe 100644 --- a/util/io/Cargo.toml +++ b/util/io/Cargo.toml @@ -9,7 +9,7 @@ authors = ["Parity Technologies "] [dependencies] fnv = "1.0" mio = { version = "0.6.8", optional = true } -crossbeam = "0.3" +crossbeam-deque = "0.6" parking_lot = "0.6" log = "0.4" slab = "0.4" diff --git a/util/io/src/lib.rs b/util/io/src/lib.rs index 02dbf223be4..3aa51fbdf9d 100644 --- a/util/io/src/lib.rs +++ b/util/io/src/lib.rs @@ -74,7 +74,7 @@ extern crate mio; #[macro_use] extern crate log as rlog; extern crate slab; -extern crate crossbeam; +extern crate crossbeam_deque as deque; extern crate parking_lot; extern crate num_cpus; extern crate timer; diff --git a/util/io/src/service_mio.rs b/util/io/src/service_mio.rs index 729fcec176e..07d0f8106bb 100644 --- a/util/io/src/service_mio.rs +++ b/util/io/src/service_mio.rs @@ -20,7 +20,7 @@ use std::collections::HashMap; use mio::*; use mio::timer::{Timeout}; use mio::deprecated::{EventLoop, Handler, Sender, EventLoopBuilder}; -use crossbeam::sync::chase_lev; +use deque; use slab::Slab; use {IoError, IoHandler}; use worker::{Worker, Work, WorkType}; @@ -184,7 +184,7 @@ pub struct IoManager where Message: Send + Sync { timers: Arc>>, handlers: Arc>>>>, workers: Vec, - worker_channel: chase_lev::Worker>, + worker_channel: deque::Worker>, work_ready: Arc, } @@ -194,7 +194,7 @@ impl IoManager where Message: Send + Sync + 'static { event_loop: &mut EventLoop>, handlers: Arc>>>> ) -> Result<(), IoError> { - let (worker, stealer) = chase_lev::deque(); + let (worker, stealer) = deque::fifo(); let num_workers = 4; let work_ready_mutex = Arc::new(Mutex::new(())); let work_ready = Arc::new(Condvar::new()); @@ -430,7 +430,7 @@ impl IoChannel where Message: Send + Sync + 'static { /// General IO Service. Starts an event loop and dispatches IO requests. /// 'Message' is a notification message type pub struct IoService where Message: Send + Sync + 'static { - thread: Mutex>>, + thread: Option>, host_channel: Mutex>>, handlers: Arc>>>>, } @@ -448,19 +448,19 @@ impl IoService where Message: Send + Sync + 'static { IoManager::::start(&mut event_loop, h).expect("Error starting IO service"); }); Ok(IoService { - thread: Mutex::new(Some(thread)), + thread: Some(thread), host_channel: Mutex::new(channel), handlers: handlers, }) } - pub fn stop(&self) { + pub fn stop(&mut self) { trace!(target: "shutdown", "[IoService] Closing..."); // Clear handlers so that shared pointers are not stuck on stack // in Channel::send_sync self.handlers.write().clear(); self.host_channel.lock().send(IoMessage::Shutdown).unwrap_or_else(|e| warn!("Error on IO service shutdown: {:?}", e)); - if let Some(thread) = self.thread.lock().take() { + if let Some(thread) = self.thread.take() { thread.join().unwrap_or_else(|e| { debug!(target: "shutdown", "Error joining IO service event loop thread: {:?}", e); }); diff --git a/util/io/src/service_non_mio.rs b/util/io/src/service_non_mio.rs index 315f84c4d1d..30839f9e954 100644 --- a/util/io/src/service_non_mio.rs +++ b/util/io/src/service_non_mio.rs @@ -16,7 +16,7 @@ use std::sync::{Arc, Weak}; use std::thread; -use crossbeam::sync::chase_lev; +use deque; use slab::Slab; use fnv::FnvHashMap; use {IoError, IoHandler}; @@ -198,7 +198,7 @@ struct Shared where Message: Send + Sync + 'static { // necessary. timers: Mutex>, // Channel used to send work to the worker threads. - channel: Mutex>>>, + channel: Mutex>>>, } // Messages used to communicate with the event loop from other threads. @@ -224,7 +224,7 @@ impl Clone for WorkTask where Message: Send + Sized { impl IoService where Message: Send + Sync + 'static { /// Starts IO event loop pub fn start() -> Result, IoError> { - let (tx, rx) = chase_lev::deque(); + let (tx, rx) = deque::fifo(); let shared = Arc::new(Shared { handlers: RwLock::new(Slab::with_capacity(MAX_HANDLERS)), @@ -251,7 +251,7 @@ impl IoService where Message: Send + Sync + 'static { } /// Stops the IO service. - pub fn stop(&self) { + pub fn stop(&mut self) { trace!(target: "shutdown", "[IoService] Closing..."); // Clear handlers so that shared pointers are not stuck on stack // in Channel::send_sync @@ -307,15 +307,15 @@ impl Drop for IoService where Message: Send + Sync { } } -fn do_work(shared: &Arc>, rx: chase_lev::Stealer>) - where Message: Send + Sync + 'static +fn do_work(shared: &Arc>, rx: deque::Stealer>) + where Message: Send + Sync + 'static { loop { match rx.steal() { - chase_lev::Steal::Abort => continue, - chase_lev::Steal::Empty => thread::park(), - chase_lev::Steal::Data(WorkTask::Shutdown) => break, - chase_lev::Steal::Data(WorkTask::UserMessage(message)) => { + deque::Steal::Retry => continue, + deque::Steal::Empty => thread::park(), + deque::Steal::Data(WorkTask::Shutdown) => break, + deque::Steal::Data(WorkTask::UserMessage(message)) => { for id in 0 .. MAX_HANDLERS { if let Some(handler) = shared.handlers.read().get(id) { let ctxt = IoContext { handler: id, shared: shared.clone() }; @@ -323,7 +323,7 @@ fn do_work(shared: &Arc>, rx: chase_lev::Stealer { + deque::Steal::Data(WorkTask::TimerTrigger { handler_id, token }) => { if let Some(handler) = shared.handlers.read().get(handler_id) { let ctxt = IoContext { handler: handler_id, shared: shared.clone() }; handler.timeout(&ctxt, token); diff --git a/util/io/src/worker.rs b/util/io/src/worker.rs index 2520608483d..1d335941677 100644 --- a/util/io/src/worker.rs +++ b/util/io/src/worker.rs @@ -17,7 +17,7 @@ use std::sync::Arc; use std::thread::{JoinHandle, self}; use std::sync::atomic::{AtomicBool, Ordering as AtomicOrdering}; -use crossbeam::sync::chase_lev; +use deque; use service_mio::{HandlerId, IoChannel, IoContext}; use IoHandler; use LOCAL_STACK_SIZE; @@ -53,7 +53,7 @@ pub struct Worker { impl Worker { /// Creates a new worker instance. pub fn new(index: usize, - stealer: chase_lev::Stealer>, + stealer: deque::Stealer>, channel: IoChannel, wait: Arc, wait_mutex: Arc>, @@ -75,8 +75,9 @@ impl Worker { worker } - fn work_loop(stealer: chase_lev::Stealer>, - channel: IoChannel, wait: Arc, + fn work_loop(stealer: deque::Stealer>, + channel: IoChannel, + wait: Arc, wait_mutex: Arc>, deleting: Arc) where Message: Send + Sync + 'static { @@ -91,8 +92,9 @@ impl Worker { while !deleting.load(AtomicOrdering::Acquire) { match stealer.steal() { - chase_lev::Steal::Data(work) => Worker::do_work(work, channel.clone()), - _ => break, + deque::Steal::Data(work) => Worker::do_work(work, channel.clone()), + deque::Steal::Retry => {}, + deque::Steal::Empty => break, } } } diff --git a/util/network-devp2p/src/discovery.rs b/util/network-devp2p/src/discovery.rs index c7782b247ca..8ef244cbd11 100644 --- a/util/network-devp2p/src/discovery.rs +++ b/util/network-devp2p/src/discovery.rs @@ -42,9 +42,9 @@ const PACKET_PONG: u8 = 2; const PACKET_FIND_NODE: u8 = 3; const PACKET_NEIGHBOURS: u8 = 4; -const PING_TIMEOUT: Duration = Duration::from_millis(300); +const PING_TIMEOUT: Duration = Duration::from_millis(500); const FIND_NODE_TIMEOUT: Duration = Duration::from_secs(2); -const EXPIRY_TIME: Duration = Duration::from_secs(60); +const EXPIRY_TIME: Duration = Duration::from_secs(20); const MAX_NODES_PING: usize = 32; // Max nodes to add/ping at once const REQUEST_BACKOFF: [Duration; 4] = [ Duration::from_secs(1), @@ -80,15 +80,29 @@ impl BucketEntry { } } -pub struct NodeBucket { - nodes: VecDeque, //sorted by last active +struct FindNodeRequest { + // Time when the request was sent + sent_at: Instant, + // Number of items sent by the node + response_count: usize, + // Whether the request have been answered yet + answered: bool, } -struct PendingRequest { - packet_id: u8, +struct PingRequest { + // Time when the request was sent sent_at: Instant, - packet_hash: H256, - response_count: usize, // Some requests (eg. FIND_NODE) have multi-packet responses + // The node to which the request was sent + node: NodeEntry, + // The hash sent in the Ping request + echo_hash: H256, + // The hash Parity used to respond with (until rev 01f825b0e1f1c4c420197b51fc801cbe89284b29) + #[deprecated()] + deprecated_echo_hash: H256, +} + +pub struct NodeBucket { + nodes: VecDeque, //sorted by last active } impl Default for NodeBucket { @@ -115,13 +129,13 @@ pub struct Discovery<'a> { id_hash: H256, secret: Secret, public_endpoint: NodeEndpoint, - discovery_round: u16, + discovery_initiated: bool, + discovery_round: Option, discovery_id: NodeId, discovery_nodes: HashSet, node_buckets: Vec, - in_flight_requests: HashMap, - expiring_pings: VecDeque<(NodeId, Instant)>, - expiring_finds: VecDeque<(NodeId, Instant)>, + in_flight_pings: HashMap, + in_flight_find_nodes: HashMap, send_queue: VecDeque, check_timestamps: bool, adding_nodes: Vec, @@ -141,13 +155,13 @@ impl<'a> Discovery<'a> { id_hash: keccak(key.public()), secret: key.secret().clone(), public_endpoint: public, - discovery_round: 0, + discovery_initiated: false, + discovery_round: None, discovery_id: NodeId::new(), discovery_nodes: HashSet::new(), node_buckets: (0..ADDRESS_BITS).map(|_| NodeBucket::new()).collect(), - in_flight_requests: HashMap::new(), - expiring_pings: VecDeque::new(), - expiring_finds: VecDeque::new(), + in_flight_pings: HashMap::new(), + in_flight_find_nodes: HashMap::new(), send_queue: VecDeque::new(), check_timestamps: true, adding_nodes: Vec::new(), @@ -175,15 +189,6 @@ impl<'a> Discovery<'a> { } } - /// Add a list of known nodes to the table. - pub fn init_node_list(&mut self, nodes: Vec) { - for n in nodes { - if self.is_allowed(&n) { - self.update_node(n); - } - } - } - fn update_node(&mut self, e: NodeEntry) -> Option { trace!(target: "discovery", "Inserting {:?}", &e); let id_hash = keccak(e.id); @@ -224,13 +229,20 @@ impl<'a> Discovery<'a> { /// Starts the discovery process at round 0 fn start(&mut self) { trace!(target: "discovery", "Starting discovery"); - self.discovery_round = 0; + self.discovery_round = Some(0); self.discovery_id.randomize(); //TODO: use cryptographic nonce self.discovery_nodes.clear(); } + /// Complete the discovery process + fn stop(&mut self) { + trace!(target: "discovery", "Completing discovery"); + self.discovery_round = None; + self.discovery_nodes.clear(); + } + fn update_new_nodes(&mut self) { - while self.in_flight_requests.len() < MAX_NODES_PING { + while self.in_flight_pings.len() < MAX_NODES_PING { match self.adding_nodes.pop() { Some(next) => self.try_ping(next), None => break, @@ -239,8 +251,12 @@ impl<'a> Discovery<'a> { } fn discover(&mut self) { - self.update_new_nodes(); - if self.discovery_round == DISCOVERY_MAX_STEPS { + let discovery_round = match self.discovery_round { + Some(r) => r, + None => return, + }; + if discovery_round == DISCOVERY_MAX_STEPS { + self.stop(); return; } trace!(target: "discovery", "Starting round {:?}", self.discovery_round); @@ -263,12 +279,10 @@ impl<'a> Discovery<'a> { } if tried_count == 0 { - trace!(target: "discovery", "Completing discovery"); - self.discovery_round = DISCOVERY_MAX_STEPS; - self.discovery_nodes.clear(); + self.stop(); return; } - self.discovery_round += 1; + self.discovery_round = Some(discovery_round + 1); } /// The base 2 log of the distance between a and b using the XOR metric. @@ -285,14 +299,20 @@ impl<'a> Discovery<'a> { } fn try_ping(&mut self, node: NodeEntry) { - if !self.is_allowed(&node) || - self.in_flight_requests.contains_key(&node.id) || - self.adding_nodes.iter().any(|n| n.id == node.id) - { + if !self.is_allowed(&node) { + trace!(target: "discovery", "Node {:?} not allowed", node); + return; + } + if self.in_flight_pings.contains_key(&node.id) || self.in_flight_find_nodes.contains_key(&node.id) { + trace!(target: "discovery", "Node {:?} in flight requests", node); + return; + } + if self.adding_nodes.iter().any(|n| n.id == node.id) { + trace!(target: "discovery", "Node {:?} in adding nodes", node); return; } - if self.in_flight_requests.len() < MAX_NODES_PING { + if self.in_flight_pings.len() < MAX_NODES_PING { self.ping(&node) .unwrap_or_else(|e| { warn!(target: "discovery", "Error sending Ping packet: {:?}", e); @@ -308,18 +328,17 @@ impl<'a> Discovery<'a> { self.public_endpoint.to_rlp_list(&mut rlp); node.endpoint.to_rlp_list(&mut rlp); append_expiration(&mut rlp); + let old_parity_hash = keccak(rlp.as_raw()); let hash = self.send_packet(PACKET_PING, &node.endpoint.udp_address(), &rlp.drain())?; - let request_info = PendingRequest { - packet_id: PACKET_PING, + self.in_flight_pings.insert(node.id, PingRequest { sent_at: Instant::now(), - packet_hash: hash, - response_count: 0, - }; - self.expiring_pings.push_back((node.id, request_info.sent_at)); - self.in_flight_requests.insert(node.id, request_info); + node: node.clone(), + echo_hash: hash, + deprecated_echo_hash: old_parity_hash, + }); - trace!(target: "discovery", "Sent Ping to {:?}", &node.endpoint); + trace!(target: "discovery", "Sent Ping to {:?} ; node_id={:#x}", &node.endpoint, node.id); Ok(()) } @@ -327,16 +346,13 @@ impl<'a> Discovery<'a> { let mut rlp = RlpStream::new_list(2); rlp.append(target); append_expiration(&mut rlp); - let hash = self.send_packet(PACKET_FIND_NODE, &node.endpoint.udp_address(), &rlp.drain())?; + self.send_packet(PACKET_FIND_NODE, &node.endpoint.udp_address(), &rlp.drain())?; - let request_info = PendingRequest { - packet_id: PACKET_FIND_NODE, + self.in_flight_find_nodes.insert(node.id, FindNodeRequest { sent_at: Instant::now(), - packet_hash: hash, response_count: 0, - }; - self.expiring_finds.push_back((node.id, request_info.sent_at)); - self.in_flight_requests.insert(node.id, request_info); + answered: false, + }); trace!(target: "discovery", "Sent FindNode to {:?}", &node.endpoint); Ok(()) @@ -448,20 +464,31 @@ impl<'a> Discovery<'a> { entry.endpoint.is_allowed(&self.ip_filter) && entry.id != self.id } - fn on_ping(&mut self, rlp: &Rlp, node: &NodeId, from: &SocketAddr, echo_hash: &[u8]) -> Result, Error> { + fn on_ping(&mut self, rlp: &Rlp, node_id: &NodeId, from: &SocketAddr, echo_hash: &[u8]) -> Result, Error> { trace!(target: "discovery", "Got Ping from {:?}", &from); - let source = NodeEndpoint::from_rlp(&rlp.at(1)?)?; - let dest = NodeEndpoint::from_rlp(&rlp.at(2)?)?; + let ping_from = NodeEndpoint::from_rlp(&rlp.at(1)?)?; + let ping_to = NodeEndpoint::from_rlp(&rlp.at(2)?)?; let timestamp: u64 = rlp.val_at(3)?; self.check_timestamp(timestamp)?; let mut response = RlpStream::new_list(3); - dest.to_rlp_list(&mut response); + let pong_to = NodeEndpoint { + address: from.clone(), + udp_port: ping_from.udp_port + }; + // Here the PONG's `To` field should be the node we are + // sending the request to + // WARNING: this field _should not be used_, but old Parity versions + // use it in order to get the node's address. + // So this is a temporary fix so that older Parity versions don't brake completely. + ping_to.to_rlp_list(&mut response); + // pong_to.to_rlp_list(&mut response); + response.append(&echo_hash); append_expiration(&mut response); self.send_packet(PACKET_PONG, from, &response.drain())?; - let entry = NodeEntry { id: *node, endpoint: source.clone() }; + let entry = NodeEntry { id: *node_id, endpoint: pong_to.clone() }; if !entry.endpoint.is_valid() { debug!(target: "discovery", "Got bad address: {:?}", entry); } else if !self.is_allowed(&entry) { @@ -469,40 +496,45 @@ impl<'a> Discovery<'a> { } else { self.add_node(entry.clone()); } - Ok(None) } fn on_pong(&mut self, rlp: &Rlp, node_id: &NodeId, from: &SocketAddr) -> Result, Error> { - trace!(target: "discovery", "Got Pong from {:?}", &from); - let dest = NodeEndpoint::from_rlp(&rlp.at(0)?)?; + trace!(target: "discovery", "Got Pong from {:?} ; node_id={:#x}", &from, node_id); + let _pong_to = NodeEndpoint::from_rlp(&rlp.at(0)?)?; let echo_hash: H256 = rlp.val_at(1)?; let timestamp: u64 = rlp.val_at(2)?; self.check_timestamp(timestamp)?; - let mut node = NodeEntry { id: *node_id, endpoint: dest }; - if !node.endpoint.is_valid() { - debug!(target: "discovery", "Bad address: {:?}", node); - node.endpoint.address = *from; - } - let is_expected = match self.in_flight_requests.entry(*node_id) { + let expected_node = match self.in_flight_pings.entry(*node_id) { Entry::Occupied(entry) => { - let is_expected = { + let expected_node = { let request = entry.get(); - request.packet_id == PACKET_PING && request.packet_hash == echo_hash + if request.echo_hash != echo_hash && request.deprecated_echo_hash != echo_hash { + debug!(target: "discovery", "Got unexpected Pong from {:?} ; packet_hash={:#x} ; expected_hash={:#x}", &from, request.echo_hash, echo_hash); + None + } else { + if request.deprecated_echo_hash == echo_hash { + trace!(target: "discovery", "Got Pong from an old parity-ethereum version."); + } + Some(request.node.clone()) + } }; - if is_expected { + + if expected_node.is_some() { entry.remove(); } - is_expected + expected_node + }, + Entry::Vacant(_) => { + None }, - Entry::Vacant(_) => false }; - if is_expected { + if let Some(node) = expected_node { Ok(self.update_node(node)) } else { - debug!(target: "discovery", "Got unexpected Pong from {:?}", &from); + debug!(target: "discovery", "Got unexpected Pong from {:?} ; request not found", &from); Ok(None) } } @@ -544,29 +576,32 @@ impl<'a> Discovery<'a> { fn on_neighbours(&mut self, rlp: &Rlp, node_id: &NodeId, from: &SocketAddr) -> Result, Error> { let results_count = rlp.at(0)?.item_count()?; - let is_expected = match self.in_flight_requests.entry(*node_id) { + let is_expected = match self.in_flight_find_nodes.entry(*node_id) { Entry::Occupied(mut entry) => { - let result = { + let expected = { let request = entry.get_mut(); - if request.packet_id == PACKET_FIND_NODE && - request.response_count + results_count <= BUCKET_SIZE - { + // Mark the request as answered + request.answered = true; + if request.response_count + results_count <= BUCKET_SIZE { request.response_count += results_count; true } else { + debug!(target: "discovery", "Got unexpected Neighbors from {:?} ; oversized packet ({} + {}) node_id={:#x}", &from, request.response_count, results_count, node_id); false } }; if entry.get().response_count == BUCKET_SIZE { entry.remove(); } - result + expected } - Entry::Vacant(_) => false, + Entry::Vacant(_) => { + debug!(target: "discovery", "Got unexpected Neighbors from {:?} ; couldn't find node_id={:#x}", &from, node_id); + false + }, }; if !is_expected { - debug!(target: "discovery", "Got unexpected Neighbors from {:?}", &from); return Ok(None); } @@ -591,65 +626,74 @@ impl<'a> Discovery<'a> { Ok(None) } - fn check_expired(&mut self, time: Instant) -> HashSet { - let mut removed: HashSet = HashSet::new(); - while let Some((node_id, sent_at)) = self.expiring_pings.pop_front() { - if time.duration_since(sent_at) <= PING_TIMEOUT { - self.expiring_pings.push_front((node_id, sent_at)); - break; + fn check_expired(&mut self, time: Instant) { + let mut nodes_to_expire = Vec::new(); + self.in_flight_pings.retain(|node_id, ping_request| { + if time.duration_since(ping_request.sent_at) > PING_TIMEOUT { + debug!(target: "discovery", "Removing expired PING request for node_id={:#x}", node_id); + nodes_to_expire.push(*node_id); + false + } else { + true } - self.expire_in_flight_request(node_id, sent_at, &mut removed); - } - while let Some((node_id, sent_at)) = self.expiring_finds.pop_front() { - if time.duration_since(sent_at) <= FIND_NODE_TIMEOUT { - self.expiring_finds.push_front((node_id, sent_at)); - break; + }); + self.in_flight_find_nodes.retain(|node_id, find_node_request| { + if time.duration_since(find_node_request.sent_at) > FIND_NODE_TIMEOUT { + if !find_node_request.answered { + debug!(target: "discovery", "Removing expired FIND NODE request for node_id={:#x}", node_id); + nodes_to_expire.push(*node_id); + } + false + } else { + true } - self.expire_in_flight_request(node_id, sent_at, &mut removed); + }); + for node_id in nodes_to_expire { + self.expire_node_request(node_id); } - removed } - fn expire_in_flight_request(&mut self, node_id: NodeId, sent_at: Instant, removed: &mut HashSet) { - if let Entry::Occupied(entry) = self.in_flight_requests.entry(node_id) { - if entry.get().sent_at == sent_at { - entry.remove(); - - // Attempt to remove from bucket if in one. - let id_hash = keccak(&node_id); - let dist = Discovery::distance(&self.id_hash, &id_hash) - .expect("distance is None only if id hashes are equal; will never send request to self; qed"); - let bucket = &mut self.node_buckets[dist]; - if let Some(index) = bucket.nodes.iter().position(|n| n.id_hash == id_hash) { - if bucket.nodes[index].fail_count < self.request_backoff.len() { - let node = &mut bucket.nodes[index]; - node.backoff_until = Instant::now() + self.request_backoff[node.fail_count]; - node.fail_count += 1; - trace!( - target: "discovery", - "Requests to node {:?} timed out {} consecutive time(s)", - &node.address, node.fail_count - ); - } else { - removed.insert(node_id); - let node = bucket.nodes.remove(index).expect("index was located in if condition"); - debug!(target: "discovery", "Removed expired node {:?}", &node.address); - } - } + fn expire_node_request(&mut self, node_id: NodeId) { + // Attempt to remove from bucket if in one. + let id_hash = keccak(&node_id); + let dist = Discovery::distance(&self.id_hash, &id_hash) + .expect("distance is None only if id hashes are equal; will never send request to self; qed"); + let bucket = &mut self.node_buckets[dist]; + if let Some(index) = bucket.nodes.iter().position(|n| n.id_hash == id_hash) { + if bucket.nodes[index].fail_count < self.request_backoff.len() { + let node = &mut bucket.nodes[index]; + node.backoff_until = Instant::now() + self.request_backoff[node.fail_count]; + node.fail_count += 1; + trace!( + target: "discovery", + "Requests to node {:?} timed out {} consecutive time(s)", + &node.address, node.fail_count + ); + } else { + let node = bucket.nodes.remove(index).expect("index was located in if condition"); + debug!(target: "discovery", "Removed expired node {:?}", &node.address); } } } - pub fn round(&mut self) -> Option { - let removed = self.check_expired(Instant::now()); - self.discover(); - if !removed.is_empty() { - Some(TableUpdates { added: HashMap::new(), removed }) - } else { None } + + pub fn round(&mut self) { + self.check_expired(Instant::now()); + self.update_new_nodes(); + + if self.discovery_round.is_some() { + self.discover(); + // Start discovering if the first pings have been sent (or timed out) + } else if self.in_flight_pings.len() == 0 && !self.discovery_initiated { + self.discovery_initiated = true; + self.refresh(); + } } pub fn refresh(&mut self) { - self.start(); + if self.discovery_round.is_none() { + self.start(); + } } pub fn any_sends_queued(&self) -> bool { @@ -663,6 +707,16 @@ impl<'a> Discovery<'a> { pub fn requeue_send(&mut self, datagram: Datagram) { self.send_queue.push_front(datagram) } + + /// Add a list of known nodes to the table. + #[cfg(test)] + pub fn init_node_list(&mut self, nodes: Vec) { + for n in nodes { + if self.is_allowed(&n) { + self.update_node(n); + } + } + } } fn append_expiration(rlp: &mut RlpStream) { @@ -738,13 +792,13 @@ mod tests { for i in 1..(MAX_NODES_PING+1) { discovery.add_node(NodeEntry { id: NodeId::random(), endpoint: ep.clone() }); - assert_eq!(discovery.in_flight_requests.len(), i); + assert_eq!(discovery.in_flight_pings.len(), i); assert_eq!(discovery.send_queue.len(), i); assert_eq!(discovery.adding_nodes.len(), 0); } for i in 1..20 { discovery.add_node(NodeEntry { id: NodeId::random(), endpoint: ep.clone() }); - assert_eq!(discovery.in_flight_requests.len(), MAX_NODES_PING); + assert_eq!(discovery.in_flight_pings.len(), MAX_NODES_PING); assert_eq!(discovery.send_queue.len(), MAX_NODES_PING); assert_eq!(discovery.adding_nodes.len(), i); } @@ -821,23 +875,29 @@ mod tests { assert_eq!(total_bucket_nodes(&discovery.node_buckets), 1200); // Requests have not expired yet. - let removed = discovery.check_expired(Instant::now()).len(); + let num_nodes = total_bucket_nodes(&discovery.node_buckets); + discovery.check_expired(Instant::now()); + let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets); assert_eq!(removed, 0); // Expiring pings to bucket nodes removes them from bucket. - let removed = discovery.check_expired(Instant::now() + PING_TIMEOUT).len(); + let num_nodes = total_bucket_nodes(&discovery.node_buckets); + discovery.check_expired(Instant::now() + PING_TIMEOUT); + let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets); assert!(removed > 0); assert_eq!(total_bucket_nodes(&discovery.node_buckets), 1200 - removed); for _ in 0..100 { discovery.add_node(NodeEntry { id: NodeId::random(), endpoint: ep.clone() }); } - assert!(discovery.in_flight_requests.len() > 0); + assert!(discovery.in_flight_pings.len() > 0); // Expire pings to nodes that are not in buckets. - let removed = discovery.check_expired(Instant::now() + PING_TIMEOUT).len(); + let num_nodes = total_bucket_nodes(&discovery.node_buckets); + discovery.check_expired(Instant::now() + PING_TIMEOUT); + let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets); assert_eq!(removed, 0); - assert_eq!(discovery.in_flight_requests.len(), 0); + assert_eq!(discovery.in_flight_pings.len(), 0); let from = SocketAddr::from_str("99.99.99.99:40445").unwrap(); @@ -849,7 +909,9 @@ mod tests { discovery.on_packet(&packet, from.clone()).unwrap(); } - let removed = discovery.check_expired(Instant::now() + FIND_NODE_TIMEOUT).len(); + let num_nodes = total_bucket_nodes(&discovery.node_buckets); + discovery.check_expired(Instant::now() + FIND_NODE_TIMEOUT); + let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets); assert!(removed > 0); // FIND_NODE does not time out because it receives k results. @@ -859,7 +921,9 @@ mod tests { discovery.on_packet(&packet, from.clone()).unwrap(); } - let removed = discovery.check_expired(Instant::now() + FIND_NODE_TIMEOUT).len(); + let num_nodes = total_bucket_nodes(&discovery.node_buckets); + discovery.check_expired(Instant::now() + FIND_NODE_TIMEOUT); + let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets); assert_eq!(removed, 0); // Test bucket evictions with retries. @@ -868,12 +932,16 @@ mod tests { for _ in 0..2 { discovery.ping(&node_entries[101]).unwrap(); - let removed = discovery.check_expired(Instant::now() + PING_TIMEOUT).len(); + let num_nodes = total_bucket_nodes(&discovery.node_buckets); + discovery.check_expired(Instant::now() + PING_TIMEOUT); + let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets); assert_eq!(removed, 0); } discovery.ping(&node_entries[101]).unwrap(); - let removed = discovery.check_expired(Instant::now() + PING_TIMEOUT).len(); + let num_nodes = total_bucket_nodes(&discovery.node_buckets); + discovery.check_expired(Instant::now() + PING_TIMEOUT); + let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets); assert_eq!(removed, 1); } @@ -1066,9 +1134,11 @@ mod tests { assert_eq!(ep1, NodeEndpoint::from_rlp(&rlp.at(1).unwrap()).unwrap()); assert_eq!(ep2, NodeEndpoint::from_rlp(&rlp.at(2).unwrap()).unwrap()); + // `discovery1` should be added to node table on ping received if let Some(_) = discovery2.on_packet(&ping_data.payload, ep1.address.clone()).unwrap() { panic!("Expected no changes to discovery2's table"); } + let pong_data = discovery2.dequeue_send().unwrap(); let data = &pong_data.payload[(32 + 65)..]; assert_eq!(data[0], PACKET_PONG); diff --git a/util/network-devp2p/src/host.rs b/util/network-devp2p/src/host.rs index f16701b6a8b..8df7a89a36f 100644 --- a/util/network-devp2p/src/host.rs +++ b/util/network-devp2p/src/host.rs @@ -59,8 +59,9 @@ const TCP_ACCEPT: StreamToken = SYS_TIMER + 1; const IDLE: TimerToken = SYS_TIMER + 2; const DISCOVERY: StreamToken = SYS_TIMER + 3; const DISCOVERY_REFRESH: TimerToken = SYS_TIMER + 4; -const DISCOVERY_ROUND: TimerToken = SYS_TIMER + 5; -const NODE_TABLE: TimerToken = SYS_TIMER + 6; +const FAST_DISCOVERY_REFRESH: TimerToken = SYS_TIMER + 5; +const DISCOVERY_ROUND: TimerToken = SYS_TIMER + 6; +const NODE_TABLE: TimerToken = SYS_TIMER + 7; const FIRST_SESSION: StreamToken = 0; const LAST_SESSION: StreamToken = FIRST_SESSION + MAX_SESSIONS - 1; const USER_TIMER: TimerToken = LAST_SESSION + 256; @@ -71,6 +72,8 @@ const SYS_TIMER: TimerToken = LAST_SESSION + 1; const MAINTENANCE_TIMEOUT: Duration = Duration::from_secs(1); // for DISCOVERY_REFRESH TimerToken const DISCOVERY_REFRESH_TIMEOUT: Duration = Duration::from_secs(60); +// for FAST_DISCOVERY_REFRESH TimerToken +const FAST_DISCOVERY_REFRESH_TIMEOUT: Duration = Duration::from_secs(10); // for DISCOVERY_ROUND TimerToken const DISCOVERY_ROUND_TIMEOUT: Duration = Duration::from_millis(300); // for NODE_TABLE TimerToken @@ -478,10 +481,10 @@ impl Host { let socket = UdpSocket::bind(&udp_addr).expect("Error binding UDP socket"); *self.udp_socket.lock() = Some(socket); - discovery.init_node_list(self.nodes.read().entries()); discovery.add_node_list(self.nodes.read().entries()); *self.discovery.lock() = Some(discovery); io.register_stream(DISCOVERY)?; + io.register_timer(FAST_DISCOVERY_REFRESH, FAST_DISCOVERY_REFRESH_TIMEOUT)?; io.register_timer(DISCOVERY_REFRESH, DISCOVERY_REFRESH_TIMEOUT)?; io.register_timer(DISCOVERY_ROUND, DISCOVERY_ROUND_TIMEOUT)?; } @@ -533,6 +536,18 @@ impl Host { } } + fn has_enough_peers(&self) -> bool { + let min_peers = { + let info = self.info.read(); + let config = &info.config; + + config.min_peers + }; + let (_, egress_count, ingress_count) = self.session_count(); + + return egress_count + ingress_count >= min_peers as usize; + } + fn connect_peers(&self, io: &IoContext) { let (min_peers, mut pin, max_handshakes, allow_ips, self_id) = { let info = self.info.read(); @@ -736,11 +751,14 @@ impl Host { let max_ingress = max(max_peers - min_peers, min_peers / 2); if reserved_only || (s.info.originated && egress_count > min_peers) || - (!s.info.originated && ingress_count > max_ingress) && !self.reserved_nodes.read().contains(&id) { - // only proceed if the connecting peer is reserved. - s.disconnect(io, DisconnectReason::TooManyPeers); - kill = true; - break; + (!s.info.originated && ingress_count > max_ingress) { + if !self.reserved_nodes.read().contains(&id) { + // only proceed if the connecting peer is reserved. + trace!(target: "network", "Disconnecting non-reserved peer {:?}", id); + s.disconnect(io, DisconnectReason::TooManyPeers); + kill = true; + break; + } } if !self.filter.as_ref().map_or(true, |f| f.connection_allowed(&self_id, &id, ConnectionDirection::Inbound)) { @@ -1014,16 +1032,23 @@ impl IoHandler for Host { IDLE => self.maintain_network(io), FIRST_SESSION ... LAST_SESSION => self.connection_timeout(token, io), DISCOVERY_REFRESH => { - if let Some(d) = self.discovery.lock().as_mut() { - d.refresh(); - } + // Run the _slow_ discovery if enough peers are connected + if !self.has_enough_peers() { + return; + } + self.discovery.lock().as_mut().map(|d| d.refresh()); io.update_registration(DISCOVERY).unwrap_or_else(|e| debug!("Error updating discovery registration: {:?}", e)); }, - DISCOVERY_ROUND => { - let node_changes = { self.discovery.lock().as_mut().and_then(|d| d.round()) }; - if let Some(node_changes) = node_changes { - self.update_nodes(io, node_changes); + FAST_DISCOVERY_REFRESH => { + // Run the fast discovery if not enough peers are connected + if self.has_enough_peers() { + return; } + self.discovery.lock().as_mut().map(|d| d.refresh()); + io.update_registration(DISCOVERY).unwrap_or_else(|e| debug!("Error updating discovery registration: {:?}", e)); + }, + DISCOVERY_ROUND => { + self.discovery.lock().as_mut().map(|d| d.round()); io.update_registration(DISCOVERY).unwrap_or_else(|e| debug!("Error updating discovery registration: {:?}", e)); }, NODE_TABLE => { diff --git a/util/network-devp2p/src/node_table.rs b/util/network-devp2p/src/node_table.rs index 7d1380907ba..d689676daf9 100644 --- a/util/network-devp2p/src/node_table.rs +++ b/util/network-devp2p/src/node_table.rs @@ -385,7 +385,7 @@ impl NodeTable { None => return, }; if let Err(e) = fs::create_dir_all(&path) { - warn!("Error creating node table directory: {:?}", e); + warn!(target: "network", "Error creating node table directory: {:?}", e); return; } path.push(NODES_FILE); @@ -400,11 +400,11 @@ impl NodeTable { match fs::File::create(&path) { Ok(file) => { if let Err(e) = serde_json::to_writer_pretty(file, &table) { - warn!("Error writing node table file: {:?}", e); + warn!(target: "network", "Error writing node table file: {:?}", e); } }, Err(e) => { - warn!("Error creating node table file: {:?}", e); + warn!(target: "network", "Error creating node table file: {:?}", e); } } } @@ -418,7 +418,7 @@ impl NodeTable { let file = match fs::File::open(&path) { Ok(file) => file, Err(e) => { - debug!("Error opening node table file: {:?}", e); + debug!(target: "network", "Error opening node table file: {:?}", e); return Default::default(); }, }; @@ -431,7 +431,7 @@ impl NodeTable { .collect() }, Err(e) => { - warn!("Error reading node table file: {:?}", e); + warn!(target: "network", "Error reading node table file: {:?}", e); Default::default() }, } @@ -624,19 +624,29 @@ mod tests { // unknown - node 6 + // nodes are also ordered according to their addition time + // + // nanosecond precision lost since mac os x high sierra update so let's not compare their order + // https://github.com/paritytech/parity-ethereum/issues/9632 let r = table.nodes(&IpFilter::default()); - assert_eq!(r[0][..], id4[..]); // most recent success - assert_eq!(r[1][..], id3[..]); + // most recent success + assert!( + (r[0] == id4 && r[1] == id3) || + (r[0] == id3 && r[1] == id4) + ); // unknown (old contacts and new nodes), randomly shuffled assert!( - r[2][..] == id5[..] && r[3][..] == id6[..] || - r[2][..] == id6[..] && r[3][..] == id5[..] + (r[2] == id5 && r[3] == id6) || + (r[2] == id6 && r[3] == id5) ); - assert_eq!(r[4][..], id1[..]); // oldest failure - assert_eq!(r[5][..], id2[..]); + // oldest failure + assert!( + (r[4] == id1 && r[5] == id2) || + (r[4] == id2 && r[5] == id1) + ); } #[test] diff --git a/util/patricia-trie-ethereum/Cargo.toml b/util/patricia-trie-ethereum/Cargo.toml index 174eb81afbe..a4121a0ba80 100644 --- a/util/patricia-trie-ethereum/Cargo.toml +++ b/util/patricia-trie-ethereum/Cargo.toml @@ -6,7 +6,7 @@ description = "Merkle-Patricia Trie (Ethereum Style)" license = "GPL-3.0" [dependencies] -patricia-trie = "0.2.1" +patricia-trie = "0.2" keccak-hasher = { version = "0.1.1", path = "../keccak-hasher" } hashdb = "0.2" rlp = { version = "0.2.4", features = ["ethereum"] } diff --git a/util/version/Cargo.toml b/util/version/Cargo.toml index 8a06a5eb5df..2f6cd6496d1 100644 --- a/util/version/Cargo.toml +++ b/util/version/Cargo.toml @@ -3,21 +3,21 @@ [package] name = "parity-version" # NOTE: this value is used for Parity Ethereum version string (via env CARGO_PKG_VERSION) -version = "2.1.0" +version = "2.1.6" authors = ["Parity Technologies "] build = "build.rs" [package.metadata] # This versions track. Should be changed to `stable` or `beta` when on respective branches. # Used by auto-updater and for Parity version string. -track = "nightly" +track = "stable" # Network specific settings, used ONLY by auto-updater. # Latest supported fork blocks. # Indicates a critical release in this track (i.e. consensus issue). [package.metadata.networks] foundation = { forkBlock = 4370000, critical = false } -ropsten = { forkBlock = 10, critical = false } +ropsten = { forkBlock = 4230000, critical = false } kovan = { forkBlock = 6600000, critical = false } [dependencies]