Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6c55469c9 | ||
|
|
94164e1ca5 | ||
|
|
9bb75d8dda | ||
|
|
e78a9872c0 | ||
|
|
76d4064a4c | ||
|
|
a03cf2ed43 | ||
|
|
b6a764deb2 |
143
.gitlab-ci.yml
143
.gitlab-ci.yml
@@ -4,11 +4,13 @@ stages:
|
|||||||
- publish
|
- publish
|
||||||
- optional
|
- optional
|
||||||
|
|
||||||
image: parity/rust-parity-ethereum-build:xenial
|
image: parity/parity-ci-linux:latest
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: fetch
|
GIT_STRATEGY: fetch
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
CI_SERVER_NAME: "GitLab CI"
|
CI_SERVER_NAME: "GitLab CI"
|
||||||
|
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
|
||||||
|
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
|
||||||
CARGO_TARGET: x86_64-unknown-linux-gnu
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
.no_git: &no_git # disable git strategy
|
.no_git: &no_git # disable git strategy
|
||||||
@@ -30,41 +32,72 @@ variables:
|
|||||||
expire_in: 1 mos
|
expire_in: 1 mos
|
||||||
paths:
|
paths:
|
||||||
- artifacts/
|
- artifacts/
|
||||||
|
- tools/
|
||||||
|
|
||||||
.docker-cache-status: &docker-cache-status
|
.docker-cache-status: &docker-cache-status
|
||||||
variables:
|
variables:
|
||||||
CARGO_HOME: "/ci-cache/parity-ethereum/cargo/${CI_JOB_NAME}"
|
CARGO_HOME: "/ci-cache/parity-ethereum/cargo/${CI_JOB_NAME}"
|
||||||
|
dependencies: []
|
||||||
before_script:
|
before_script:
|
||||||
- SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_error.log RUST_LOG=sccache::server=debug sccache --start-server
|
- rustup show
|
||||||
|
- cargo --version
|
||||||
|
- SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_debug.log
|
||||||
|
RUST_LOG=sccache=debug
|
||||||
|
sccache --start-server
|
||||||
- sccache -s
|
- sccache -s
|
||||||
after_script:
|
after_script:
|
||||||
- echo "All crate-types:"
|
# sccache debug info
|
||||||
- grep 'parse_arguments.*--crate-type' sccache_error.log | sed -re 's/.*"--crate-type", "([^"]+)".*/\1/' | sort | uniq -c
|
- if test -e sccache_debug.log;
|
||||||
- echo "Non-cacheable reasons:"
|
then
|
||||||
- grep CannotCache sccache_error.log | sed -re 's/.*CannotCache\((.+)\).*/\1/' | sort | uniq -c
|
echo "_____All crate-types:_____";
|
||||||
|
grep 'parse_arguments.*--crate-type' sccache_debug.log | sed -re 's/.*"--crate-type", "([^"]+)".*/\1/' | sort | uniq -c;
|
||||||
|
echo "_____Non-cacheable reasons:_____";
|
||||||
|
grep CannotCache sccache_debug.log | sed -re 's/.*CannotCache\((.+)\).*/\1/' | sort | uniq -c;
|
||||||
|
else
|
||||||
|
echo "_____No logs from sccache_____";
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
tags:
|
tags:
|
||||||
- linux-docker
|
- linux-docker
|
||||||
|
|
||||||
|
.build-on-linux: &build-on-linux
|
||||||
|
stage: build
|
||||||
|
<<: *docker-cache-status
|
||||||
|
<<: *collect_artifacts
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/build-linux.sh
|
||||||
|
- sccache -s
|
||||||
|
after_script:
|
||||||
|
- mkdir -p tools
|
||||||
|
- cp -r scripts/docker/hub/* ./tools
|
||||||
|
- cp scripts/gitlab/publish-snap.sh ./tools
|
||||||
|
- cp scripts/gitlab/publish-onchain.sh ./tools
|
||||||
|
- cp scripts/gitlab/safe-curl.sh ./tools
|
||||||
|
- echo v"$(sed -r -n '1,/^version/s/^version\s*=\s*"([^"]+)".*$/\1/p' Cargo.toml)" |
|
||||||
|
tee ./tools/VERSION
|
||||||
|
- echo "$(sed -r -n '1,/^track/s/^track\s*=\s*"([^"]+)".*$/\1/p' ./util/version/Cargo.toml)" |
|
||||||
|
tee ./tools/TRACK
|
||||||
|
|
||||||
|
|
||||||
cargo-check 0 3:
|
cargo-check 0 3:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- time cargo check --target $CARGO_TARGET --locked --no-default-features
|
- time cargo check --target $CARGO_TARGET --locked --no-default-features --verbose --color=always
|
||||||
- sccache -s
|
- sccache -s
|
||||||
|
|
||||||
cargo-check 1 3:
|
cargo-check 1 3:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features --verbose --color=always
|
||||||
- sccache -s
|
- sccache -s
|
||||||
|
|
||||||
cargo-check 2 3:
|
cargo-check 2 3:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio"
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio" --verbose --color=always
|
||||||
- sccache -s
|
- sccache -s
|
||||||
|
|
||||||
cargo-audit:
|
cargo-audit:
|
||||||
@@ -72,7 +105,7 @@ cargo-audit:
|
|||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- cargo audit
|
- cargo audit
|
||||||
- sccache -s
|
allow_failure: true # failed cargo audit shouldn't prevent a PR from being merged
|
||||||
|
|
||||||
validate-chainspecs:
|
validate-chainspecs:
|
||||||
stage: test
|
stage: test
|
||||||
@@ -92,55 +125,64 @@ test-linux:
|
|||||||
stage: build
|
stage: build
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- ./scripts/gitlab/test-linux.sh
|
- ./scripts/gitlab/test-linux.sh stable
|
||||||
- sccache -s
|
- sccache -s
|
||||||
|
|
||||||
build-android:
|
test-linux-beta:
|
||||||
stage: build
|
|
||||||
image: parity/rust-parity-ethereum-android-build:stretch
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: armv7-linux-androideabi
|
|
||||||
<<: *docker-cache-status
|
|
||||||
<<: *collect_artifacts
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/build-linux.sh
|
|
||||||
tags:
|
|
||||||
- linux-docker
|
|
||||||
|
|
||||||
build-linux: &build-linux
|
|
||||||
stage: build
|
stage: build
|
||||||
only: *releaseable_branches
|
only: *releaseable_branches
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
<<: *collect_artifacts
|
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/build-linux.sh
|
- ./scripts/gitlab/test-linux.sh beta
|
||||||
- sccache -s
|
- sccache -s
|
||||||
|
|
||||||
|
test-linux-nightly:
|
||||||
|
stage: build
|
||||||
|
only: *releaseable_branches
|
||||||
|
<<: *docker-cache-status
|
||||||
|
script:
|
||||||
|
- ./scripts/gitlab/test-linux.sh nightly
|
||||||
|
- sccache -s
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
build-android:
|
||||||
|
<<: *build-on-linux
|
||||||
|
image: parity/rust-parity-ethereum-android-build:stretch
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: armv7-linux-androideabi
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
<<: *build-on-linux
|
||||||
|
only: *releaseable_branches
|
||||||
|
|
||||||
build-linux-i386:
|
build-linux-i386:
|
||||||
<<: *build-linux
|
<<: *build-on-linux
|
||||||
|
only: *releaseable_branches
|
||||||
image: parity/rust-parity-ethereum-build:i386
|
image: parity/rust-parity-ethereum-build:i386
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: i686-unknown-linux-gnu
|
CARGO_TARGET: i686-unknown-linux-gnu
|
||||||
|
|
||||||
build-linux-arm64:
|
build-linux-arm64:
|
||||||
<<: *build-linux
|
<<: *build-on-linux
|
||||||
|
only: *releaseable_branches
|
||||||
image: parity/rust-parity-ethereum-build:arm64
|
image: parity/rust-parity-ethereum-build:arm64
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: aarch64-unknown-linux-gnu
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
build-linux-armhf:
|
build-linux-armhf:
|
||||||
<<: *build-linux
|
<<: *build-on-linux
|
||||||
|
only: *releaseable_branches
|
||||||
image: parity/rust-parity-ethereum-build:armhf
|
image: parity/rust-parity-ethereum-build:armhf
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
||||||
|
|
||||||
build-darwin:
|
build-darwin:
|
||||||
stage: build
|
stage: build
|
||||||
only: *releaseable_branches
|
|
||||||
<<: *collect_artifacts
|
<<: *collect_artifacts
|
||||||
|
only: *releaseable_branches
|
||||||
variables:
|
variables:
|
||||||
CARGO_TARGET: x86_64-apple-darwin
|
CARGO_TARGET: x86_64-apple-darwin
|
||||||
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
|
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
|
||||||
CC: gcc
|
CC: gcc
|
||||||
CXX: g++
|
CXX: g++
|
||||||
script:
|
script:
|
||||||
@@ -163,19 +205,35 @@ build-windows:
|
|||||||
|
|
||||||
publish-docker:
|
publish-docker:
|
||||||
stage: publish
|
stage: publish
|
||||||
|
<<: *no_git
|
||||||
only: *releaseable_branches
|
only: *releaseable_branches
|
||||||
cache: {}
|
except:
|
||||||
|
variables:
|
||||||
|
- $SCHEDULE_TAG == "nightly"
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-linux
|
- build-linux
|
||||||
tags:
|
environment:
|
||||||
- shell
|
name: parity-build
|
||||||
|
cache: {}
|
||||||
|
image: docker:stable
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
variables:
|
||||||
|
DOCKER_HOST: tcp://localhost:2375
|
||||||
|
DOCKER_DRIVER: overlay2
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
# DOCKERFILE: tools/Dockerfile
|
||||||
|
# CONTAINER_IMAGE: parity/parity
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/publish-docker.sh parity
|
# we stopped pushing nightlies to dockerhub, will push to own registry prb.
|
||||||
|
- ./tools/publish-docker.sh
|
||||||
|
tags:
|
||||||
|
- kubernetes-parity-build
|
||||||
|
|
||||||
publish-snap: &publish-snap
|
publish-snap: &publish-snap
|
||||||
stage: publish
|
stage: publish
|
||||||
|
<<: *no_git
|
||||||
only: *releaseable_branches
|
only: *releaseable_branches
|
||||||
<<: *collect_artifacts
|
|
||||||
image: snapcore/snapcraft
|
image: snapcore/snapcraft
|
||||||
variables:
|
variables:
|
||||||
BUILD_ARCH: amd64
|
BUILD_ARCH: amd64
|
||||||
@@ -185,12 +243,13 @@ publish-snap: &publish-snap
|
|||||||
tags:
|
tags:
|
||||||
- linux-docker
|
- linux-docker
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/publish-snap.sh
|
- ./tools/publish-snap.sh
|
||||||
|
|
||||||
publish-snap-i386:
|
publish-snap-i386:
|
||||||
<<: *publish-snap
|
<<: *publish-snap
|
||||||
variables:
|
variables:
|
||||||
BUILD_ARCH: i386
|
BUILD_ARCH: i386
|
||||||
|
CARGO_TARGET: i686-unknown-linux-gnu
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-linux-i386
|
- build-linux-i386
|
||||||
|
|
||||||
@@ -198,6 +257,7 @@ publish-snap-arm64:
|
|||||||
<<: *publish-snap
|
<<: *publish-snap
|
||||||
variables:
|
variables:
|
||||||
BUILD_ARCH: arm64
|
BUILD_ARCH: arm64
|
||||||
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-linux-arm64
|
- build-linux-arm64
|
||||||
|
|
||||||
@@ -205,11 +265,13 @@ publish-snap-armhf:
|
|||||||
<<: *publish-snap
|
<<: *publish-snap
|
||||||
variables:
|
variables:
|
||||||
BUILD_ARCH: armhf
|
BUILD_ARCH: armhf
|
||||||
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-linux-armhf
|
- build-linux-armhf
|
||||||
|
|
||||||
publish-onchain:
|
publish-onchain:
|
||||||
stage: publish
|
stage: publish
|
||||||
|
<<: *no_git
|
||||||
only: *releaseable_branches
|
only: *releaseable_branches
|
||||||
cache: {}
|
cache: {}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -217,7 +279,7 @@ publish-onchain:
|
|||||||
- build-darwin
|
- build-darwin
|
||||||
- build-windows
|
- build-windows
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/publish-onchain.sh
|
- ./tools/publish-onchain.sh
|
||||||
tags:
|
tags:
|
||||||
- linux-docker
|
- linux-docker
|
||||||
|
|
||||||
@@ -249,14 +311,15 @@ publish-awss3-release:
|
|||||||
|
|
||||||
publish-docs:
|
publish-docs:
|
||||||
stage: publish
|
stage: publish
|
||||||
# <<: *no_git
|
image: parity/rust-parity-ethereum-docs:xenial
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
except:
|
except:
|
||||||
- nightly
|
- nightly
|
||||||
cache: {}
|
cache: {}
|
||||||
|
dependencies: []
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/publish-docs.sh
|
- scripts/gitlab/publish-docs.sh
|
||||||
tags:
|
tags:
|
||||||
- linux-docker
|
- linux-docker
|
||||||
|
allow_failure: true
|
||||||
|
|||||||
33
Cargo.lock
generated
33
Cargo.lock
generated
@@ -1284,6 +1284,7 @@ dependencies = [
|
|||||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memory-cache 0.1.0",
|
"memory-cache 0.1.0",
|
||||||
|
"num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -1547,7 +1548,7 @@ dependencies = [
|
|||||||
"libusb 0.3.0 (git+https://github.com/paritytech/libusb-rs)",
|
"libusb 0.3.0 (git+https://github.com/paritytech/libusb-rs)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"protobuf 1.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"protobuf 1.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 1.0.0 (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)",
|
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"trezor-sys 1.0.0 (git+https://github.com/paritytech/trezor-sys)",
|
"trezor-sys 1.0.0 (git+https://github.com/paritytech/trezor-sys)",
|
||||||
@@ -2349,10 +2350,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.2.6 (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)",
|
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-bigint"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-integer"
|
name = "num-integer"
|
||||||
version = "0.1.39"
|
version = "0.1.39"
|
||||||
@@ -2454,7 +2464,7 @@ dependencies = [
|
|||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"jni 0.10.2 (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",
|
"panic_hook 0.1.0",
|
||||||
"parity-ethereum 2.4.4",
|
"parity-ethereum 2.4.7",
|
||||||
"tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -2484,7 +2494,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parity-ethereum"
|
name = "parity-ethereum"
|
||||||
version = "2.4.4"
|
version = "2.4.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2537,7 +2547,7 @@ dependencies = [
|
|||||||
"parity-rpc 1.12.0",
|
"parity-rpc 1.12.0",
|
||||||
"parity-runtime 0.1.0",
|
"parity-runtime 0.1.0",
|
||||||
"parity-updater 1.12.0",
|
"parity-updater 1.12.0",
|
||||||
"parity-version 2.4.4",
|
"parity-version 2.4.7",
|
||||||
"parity-whisper 0.1.0",
|
"parity-whisper 0.1.0",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2688,7 +2698,7 @@ dependencies = [
|
|||||||
"parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-crypto 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-runtime 0.1.0",
|
"parity-runtime 0.1.0",
|
||||||
"parity-updater 1.12.0",
|
"parity-updater 1.12.0",
|
||||||
"parity-version 2.4.4",
|
"parity-version 2.4.7",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pretty_assertions 0.1.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)",
|
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2787,7 +2797,7 @@ dependencies = [
|
|||||||
"parity-bytes 0.1.0 (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-hash-fetch 1.12.0",
|
||||||
"parity-path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-version 2.4.4",
|
"parity-version 2.4.7",
|
||||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.4.3 (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)",
|
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2797,7 +2807,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parity-version"
|
name = "parity-version"
|
||||||
version = "2.4.4"
|
version = "2.4.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3077,7 +3087,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "protobuf"
|
name = "protobuf"
|
||||||
version = "1.7.4"
|
version = "1.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4082,7 +4092,7 @@ name = "trezor-sys"
|
|||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/paritytech/trezor-sys#8a401705e58c83db6c29c199d9577b78fde40709"
|
source = "git+https://github.com/paritytech/trezor-sys#8a401705e58c83db6c29c199d9577b78fde40709"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"protobuf 1.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"protobuf 1.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4648,6 +4658,7 @@ dependencies = [
|
|||||||
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
|
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
|
||||||
"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
|
"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
|
||||||
"checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1"
|
"checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1"
|
||||||
|
"checksum num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "57450397855d951f1a41305e54851b1a7b8f5d2e349543a02a2effe25459f718"
|
||||||
"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea"
|
"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea"
|
||||||
"checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124"
|
"checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124"
|
||||||
"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
|
"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
|
||||||
@@ -4691,7 +4702,7 @@ dependencies = [
|
|||||||
"checksum primal-estimate 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56ea4531dde757b56906493c8604641da14607bf9cdaa80fb9c9cabd2429f8d5"
|
"checksum primal-estimate 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56ea4531dde757b56906493c8604641da14607bf9cdaa80fb9c9cabd2429f8d5"
|
||||||
"checksum primal-sieve 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "da2d6ed369bb4b0273aeeb43f07c105c0117717cbae827b20719438eb2eb798c"
|
"checksum primal-sieve 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "da2d6ed369bb4b0273aeeb43f07c105c0117717cbae827b20719438eb2eb798c"
|
||||||
"checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee"
|
"checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee"
|
||||||
"checksum protobuf 1.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "52fbc45bf6709565e44ef31847eb7407b3c3c80af811ee884a04da071dcca12b"
|
"checksum protobuf 1.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e14ccd6b79ec748412d4f2dfde1a80fa363a67def4062969f8aed3d790a30f28"
|
||||||
"checksum pulldown-cmark 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8361e81576d2e02643b04950e487ec172b687180da65c731c03cf336784e6c07"
|
"checksum pulldown-cmark 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8361e81576d2e02643b04950e487ec172b687180da65c731c03cf336784e6c07"
|
||||||
"checksum pwasm-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e9135bed7b452e20dbb395a2d519abaf0c46d60e7ecc02daeeab447d29bada1"
|
"checksum pwasm-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e9135bed7b452e20dbb395a2d519abaf0c46d60e7ecc02daeeab447d29bada1"
|
||||||
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
|
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
description = "Parity Ethereum client"
|
description = "Parity Ethereum client"
|
||||||
name = "parity-ethereum"
|
name = "parity-ethereum"
|
||||||
# NOTE Make sure to update util/version/Cargo.toml as well
|
# NOTE Make sure to update util/version/Cargo.toml as well
|
||||||
version = "2.4.4"
|
version = "2.4.7"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
@@ -118,10 +118,13 @@ path = "parity/lib.rs"
|
|||||||
path = "parity/main.rs"
|
path = "parity/main.rs"
|
||||||
name = "parity"
|
name = "parity"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.test]
|
||||||
|
lto = false
|
||||||
|
opt-level = 3 # makes tests slower to compile, but faster to run
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = false
|
debug = false
|
||||||
|
lto = true
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
# This should only list projects that are not
|
# This should only list projects that are not
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ vm = { path = "../vm" }
|
|||||||
keccak-hash = "0.1"
|
keccak-hash = "0.1"
|
||||||
parking_lot = "0.7"
|
parking_lot = "0.7"
|
||||||
memory-cache = { path = "../../util/memory-cache" }
|
memory-cache = { path = "../../util/memory-cache" }
|
||||||
|
num-bigint = "0.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rustc-hex = "1.0"
|
rustc-hex = "1.0"
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ criterion_group!(
|
|||||||
mem_gas_calculation_same_usize,
|
mem_gas_calculation_same_usize,
|
||||||
mem_gas_calculation_same_u256,
|
mem_gas_calculation_same_u256,
|
||||||
mem_gas_calculation_increasing_usize,
|
mem_gas_calculation_increasing_usize,
|
||||||
mem_gas_calculation_increasing_u256
|
mem_gas_calculation_increasing_u256,
|
||||||
|
blockhash_mulmod_small,
|
||||||
|
blockhash_mulmod_large,
|
||||||
);
|
);
|
||||||
criterion_main!(basic);
|
criterion_main!(basic);
|
||||||
|
|
||||||
@@ -150,6 +152,54 @@ fn mem_gas_calculation_increasing(gas: U256, b: &mut Bencher) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn blockhash_mulmod_small(b: &mut Criterion) {
|
||||||
|
b.bench_function("blockhash_mulmod_small", |b| {
|
||||||
|
let factory = Factory::default();
|
||||||
|
let mut ext = FakeExt::new();
|
||||||
|
|
||||||
|
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
|
||||||
|
|
||||||
|
b.iter(|| {
|
||||||
|
let code = black_box(
|
||||||
|
"6080604052348015600f57600080fd5b5060005a90505b60c881111560de5760017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80095060017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80095060017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80095060017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80095060017effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8009505a90506016565b506035806100ed6000396000f3fe6080604052600080fdfea165627a7a72305820bde4a0ac6d0fac28fc879244baf8a6a0eda514bc95fb7ecbcaaebf2556e2687c0029".from_hex().unwrap()
|
||||||
|
);
|
||||||
|
|
||||||
|
let mut params = ActionParams::default();
|
||||||
|
params.address = address.clone();
|
||||||
|
params.gas = U256::from(4_000u64);
|
||||||
|
params.code = Some(Arc::new(code.clone()));
|
||||||
|
|
||||||
|
let vm = factory.create(params, ext.schedule(), 0);
|
||||||
|
|
||||||
|
result(vm.exec(&mut ext).ok().unwrap())
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
fn blockhash_mulmod_large(b: &mut Criterion) {
|
||||||
|
b.bench_function("blockhash_mulmod_large", |b| {
|
||||||
|
let factory = Factory::default();
|
||||||
|
let mut ext = FakeExt::new();
|
||||||
|
|
||||||
|
let address = Address::from_str("0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6").unwrap();
|
||||||
|
|
||||||
|
b.iter(|| {
|
||||||
|
let code = black_box(
|
||||||
|
"608060405234801561001057600080fd5b5060005a90505b60c8811115610177577efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009507efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009507efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009507efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009507efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff17efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08009505a9050610017565b506035806101866000396000f3fe6080604052600080fdfea165627a7a72305820dcaec306f67bb96f3044fff25c9af2ec66f01d0954d0656964f046f42f2780670029".from_hex().unwrap()
|
||||||
|
);
|
||||||
|
|
||||||
|
let mut params = ActionParams::default();
|
||||||
|
params.address = address.clone();
|
||||||
|
params.gas = U256::from(4_000u64);
|
||||||
|
params.code = Some(Arc::new(code.clone()));
|
||||||
|
|
||||||
|
let vm = factory.create(params, ext.schedule(), 0);
|
||||||
|
|
||||||
|
result(vm.exec(&mut ext).ok().unwrap())
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
fn result(r: Result<evm::GasLeft>) -> U256 {
|
fn result(r: Result<evm::GasLeft>) -> U256 {
|
||||||
match r {
|
match r {
|
||||||
Ok(GasLeft::Known(gas_left)) => gas_left,
|
Ok(GasLeft::Known(gas_left)) => gas_left,
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ use std::{cmp, mem};
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use ethereum_types::{U256, U512, H256, Address};
|
use ethereum_types::{U256, H256, Address};
|
||||||
|
use num_bigint::BigUint;
|
||||||
|
|
||||||
use vm::{
|
use vm::{
|
||||||
self, ActionParams, ParamsType, ActionValue, CallType, MessageCallResult,
|
self, ActionParams, ParamsType, ActionValue, CallType, MessageCallResult,
|
||||||
@@ -61,6 +62,17 @@ const TWO_POW_96: U256 = U256([0, 0x100000000, 0, 0]); //0x1 00000000 00000000 0
|
|||||||
const TWO_POW_224: U256 = U256([0, 0, 0, 0x100000000]); //0x1 00000000 00000000 00000000 00000000 00000000 00000000 00000000
|
const TWO_POW_224: U256 = U256([0, 0, 0, 0x100000000]); //0x1 00000000 00000000 00000000 00000000 00000000 00000000 00000000
|
||||||
const TWO_POW_248: U256 = U256([0, 0, 0, 0x100000000000000]); //0x1 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000000
|
const TWO_POW_248: U256 = U256([0, 0, 0, 0x100000000000000]); //0x1 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000000
|
||||||
|
|
||||||
|
fn to_biguint(x: U256) -> BigUint {
|
||||||
|
let mut bytes = [0u8; 32];
|
||||||
|
x.to_little_endian(&mut bytes);
|
||||||
|
BigUint::from_bytes_le(&bytes)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn from_biguint(x: BigUint) -> U256 {
|
||||||
|
let bytes = x.to_bytes_le();
|
||||||
|
U256::from_little_endian(&bytes)
|
||||||
|
}
|
||||||
|
|
||||||
/// Abstraction over raw vector of Bytes. Easier state management of PC.
|
/// Abstraction over raw vector of Bytes. Easier state management of PC.
|
||||||
struct CodeReader {
|
struct CodeReader {
|
||||||
position: ProgramCounter,
|
position: ProgramCounter,
|
||||||
@@ -1009,11 +1021,12 @@ impl<Cost: CostType> Interpreter<Cost> {
|
|||||||
let c = self.stack.pop_back();
|
let c = self.stack.pop_back();
|
||||||
|
|
||||||
self.stack.push(if !c.is_zero() {
|
self.stack.push(if !c.is_zero() {
|
||||||
// upcast to 512
|
let a_num = to_biguint(a);
|
||||||
let a5 = U512::from(a);
|
let b_num = to_biguint(b);
|
||||||
let res = a5.overflowing_add(U512::from(b)).0;
|
let c_num = to_biguint(c);
|
||||||
let x = res % U512::from(c);
|
let res = a_num + b_num;
|
||||||
U256::from(x)
|
let x = res % c_num;
|
||||||
|
from_biguint(x)
|
||||||
} else {
|
} else {
|
||||||
U256::zero()
|
U256::zero()
|
||||||
});
|
});
|
||||||
@@ -1024,10 +1037,12 @@ impl<Cost: CostType> Interpreter<Cost> {
|
|||||||
let c = self.stack.pop_back();
|
let c = self.stack.pop_back();
|
||||||
|
|
||||||
self.stack.push(if !c.is_zero() {
|
self.stack.push(if !c.is_zero() {
|
||||||
let a5 = U512::from(a);
|
let a_num = to_biguint(a);
|
||||||
let res = a5.overflowing_mul(U512::from(b)).0;
|
let b_num = to_biguint(b);
|
||||||
let x = res % U512::from(c);
|
let c_num = to_biguint(c);
|
||||||
U256::from(x)
|
let res = a_num * b_num;
|
||||||
|
let x = res % c_num;
|
||||||
|
from_biguint(x)
|
||||||
} else {
|
} else {
|
||||||
U256::zero()
|
U256::zero()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ extern crate vm;
|
|||||||
extern crate keccak_hash as hash;
|
extern crate keccak_hash as hash;
|
||||||
extern crate memory_cache;
|
extern crate memory_cache;
|
||||||
extern crate parity_bytes as bytes;
|
extern crate parity_bytes as bytes;
|
||||||
|
extern crate num_bigint;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
|
|||||||
@@ -8,11 +8,12 @@
|
|||||||
"difficultyBoundDivisor": "0x0800",
|
"difficultyBoundDivisor": "0x0800",
|
||||||
"durationLimit": "0x0d",
|
"durationLimit": "0x0d",
|
||||||
"blockReward": "0x4563918244F40000",
|
"blockReward": "0x4563918244F40000",
|
||||||
"homesteadTransition": 1150000,
|
"homesteadTransition": "0x118c30",
|
||||||
"ecip1010PauseTransition": 3000000,
|
"ecip1010PauseTransition": "0x2dc6c0",
|
||||||
"ecip1010ContinueTransition": 5000000,
|
"ecip1010ContinueTransition": "0x4c4b40",
|
||||||
"ecip1017EraRounds": 5000000,
|
"ecip1017EraRounds": "0x4c4b40",
|
||||||
"bombDefuseTransition": 5900000
|
"eip100bTransition": "0x7fffffffffffffff",
|
||||||
|
"bombDefuseTransition": "0x5a06e0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -26,11 +27,17 @@
|
|||||||
"chainID": "0x3d",
|
"chainID": "0x3d",
|
||||||
"forkBlock": "0x1d4c00",
|
"forkBlock": "0x1d4c00",
|
||||||
"forkCanonHash": "0x94365e3a8c0b35089c1d1195081fe7489b528a84b22199c916180db8b28ade7f",
|
"forkCanonHash": "0x94365e3a8c0b35089c1d1195081fe7489b528a84b22199c916180db8b28ade7f",
|
||||||
"eip150Transition": 2500000,
|
"eip150Transition": "0x2625a0",
|
||||||
"eip160Transition": 3000000,
|
"eip160Transition": "0x2dc6c0",
|
||||||
"eip161abcTransition": "0x7fffffffffffffff",
|
"eip161abcTransition": "0x7fffffffffffffff",
|
||||||
"eip161dTransition": "0x7fffffffffffffff",
|
"eip161dTransition": "0x7fffffffffffffff",
|
||||||
"eip155Transition": 3000000
|
"eip155Transition": "0x2dc6c0",
|
||||||
|
"maxCodeSize": "0x6000",
|
||||||
|
"maxCodeSizeTransition": "0x7fffffffffffffff",
|
||||||
|
"eip140Transition": "0x7fffffffffffffff",
|
||||||
|
"eip211Transition": "0x7fffffffffffffff",
|
||||||
|
"eip214Transition": "0x7fffffffffffffff",
|
||||||
|
"eip658Transition": "0x7fffffffffffffff"
|
||||||
},
|
},
|
||||||
"genesis": {
|
"genesis": {
|
||||||
"seal": {
|
"seal": {
|
||||||
@@ -3835,7 +3842,7 @@
|
|||||||
"0xc32fd5318214071a41cd8e98499b2b65942c5837c686a06b536146fd0bf294bf",
|
"0xc32fd5318214071a41cd8e98499b2b65942c5837c686a06b536146fd0bf294bf",
|
||||||
"0xac390c012eecd83fa8f4cc77a59992914b5c95af36b28747e07adea13228acbc"
|
"0xac390c012eecd83fa8f4cc77a59992914b5c95af36b28747e07adea13228acbc"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"nodes": [
|
"nodes": [
|
||||||
"enode://efd48ad0879eeb7f9cb5e50f33f7bc21e805a72e90361f145baaa22dd75d111e7cd9c93f1b7060dcb30aa1b3e620269336dbf32339fea4c18925a4c15fe642df@18.205.66.229:30303",
|
"enode://efd48ad0879eeb7f9cb5e50f33f7bc21e805a72e90361f145baaa22dd75d111e7cd9c93f1b7060dcb30aa1b3e620269336dbf32339fea4c18925a4c15fe642df@18.205.66.229:30303",
|
||||||
"enode://5fbfb426fbb46f8b8c1bd3dd140f5b511da558cd37d60844b525909ab82e13a25ee722293c829e52cb65c2305b1637fa9a2ea4d6634a224d5f400bfe244ac0de@162.243.55.45:30303",
|
"enode://5fbfb426fbb46f8b8c1bd3dd140f5b511da558cd37d60844b525909ab82e13a25ee722293c829e52cb65c2305b1637fa9a2ea4d6634a224d5f400bfe244ac0de@162.243.55.45:30303",
|
||||||
@@ -3851,10 +3858,97 @@
|
|||||||
"enode://5cd218959f8263bc3721d7789070806b0adff1a0ed3f95ec886fb469f9362c7507e3b32b256550b9a7964a23a938e8d42d45a0c34b332bfebc54b29081e83b93@35.187.57.94:30303"
|
"enode://5cd218959f8263bc3721d7789070806b0adff1a0ed3f95ec886fb469f9362c7507e3b32b256550b9a7964a23a938e8d42d45a0c34b332bfebc54b29081e83b93@35.187.57.94:30303"
|
||||||
],
|
],
|
||||||
"accounts": {
|
"accounts": {
|
||||||
"0000000000000000000000000000000000000001": { "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
|
"0x0000000000000000000000000000000000000001": {
|
||||||
"0000000000000000000000000000000000000002": { "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
"builtin": {
|
||||||
"0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
"name": "ecrecover",
|
||||||
"0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
"pricing": {
|
||||||
|
"linear": {
|
||||||
|
"base": 3000,
|
||||||
|
"word": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000002": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "sha256",
|
||||||
|
"pricing": {
|
||||||
|
"linear": {
|
||||||
|
"base": 60,
|
||||||
|
"word": 12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000003": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "ripemd160",
|
||||||
|
"pricing": {
|
||||||
|
"linear": {
|
||||||
|
"base": 600,
|
||||||
|
"word": 120
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000004": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "identity",
|
||||||
|
"pricing": {
|
||||||
|
"linear": {
|
||||||
|
"base": 15,
|
||||||
|
"word": 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000005": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "modexp",
|
||||||
|
"activate_at": "0x7fffffffffffffff",
|
||||||
|
"pricing": {
|
||||||
|
"modexp": {
|
||||||
|
"divisor": 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000006": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "alt_bn128_add",
|
||||||
|
"activate_at": "0x7fffffffffffffff",
|
||||||
|
"pricing": {
|
||||||
|
"linear": {
|
||||||
|
"base": 500,
|
||||||
|
"word": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000007": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "alt_bn128_mul",
|
||||||
|
"activate_at": "0x7fffffffffffffff",
|
||||||
|
"pricing": {
|
||||||
|
"linear": {
|
||||||
|
"base": 40000,
|
||||||
|
"word": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000008": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "alt_bn128_pairing",
|
||||||
|
"activate_at": "0x7fffffffffffffff",
|
||||||
|
"pricing": {
|
||||||
|
"alt_bn128_pairing": {
|
||||||
|
"base": 100000,
|
||||||
|
"pair": 80000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"3282791d6fd713f1e94f4bfd565eaa78b3a0599d": {
|
"3282791d6fd713f1e94f4bfd565eaa78b3a0599d": {
|
||||||
"balance": "1337000000000000000000"
|
"balance": "1337000000000000000000"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,17 +7,31 @@
|
|||||||
"stepDuration": "0x4",
|
"stepDuration": "0x4",
|
||||||
"blockReward": "0x4563918244F40000",
|
"blockReward": "0x4563918244F40000",
|
||||||
"validators": {
|
"validators": {
|
||||||
"list": [
|
"multi": {
|
||||||
"0x00D6Cc1BA9cf89BD2e58009741f4F7325BAdc0ED",
|
"0": {
|
||||||
"0x00427feae2419c15b89d1c21af10d1b6650a4d3d",
|
"list": [
|
||||||
"0x4Ed9B08e6354C70fE6F8CB0411b0d3246b424d6c",
|
"0x00D6Cc1BA9cf89BD2e58009741f4F7325BAdc0ED",
|
||||||
"0x0020ee4Be0e2027d76603cB751eE069519bA81A1",
|
"0x00427feae2419c15b89d1c21af10d1b6650a4d3d",
|
||||||
"0x0010f94b296a852aaac52ea6c5ac72e03afd032d",
|
"0x4Ed9B08e6354C70fE6F8CB0411b0d3246b424d6c",
|
||||||
"0x007733a1FE69CF3f2CF989F81C7b4cAc1693387A",
|
"0x0020ee4Be0e2027d76603cB751eE069519bA81A1",
|
||||||
"0x00E6d2b931F55a3f1701c7389d592a7778897879",
|
"0x0010f94b296a852aaac52ea6c5ac72e03afd032d",
|
||||||
"0x00e4a10650e5a6D6001C38ff8E64F97016a1645c",
|
"0x007733a1FE69CF3f2CF989F81C7b4cAc1693387A",
|
||||||
"0x00a0a24b9f0e5ec7aa4c7389b8302fd0123194de"
|
"0x00E6d2b931F55a3f1701c7389d592a7778897879",
|
||||||
]
|
"0x00e4a10650e5a6D6001C38ff8E64F97016a1645c",
|
||||||
|
"0x00a0a24b9f0e5ec7aa4c7389b8302fd0123194de"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"10960440": {
|
||||||
|
"list": [
|
||||||
|
"0x00D6Cc1BA9cf89BD2e58009741f4F7325BAdc0ED",
|
||||||
|
"0x0010f94b296a852aaac52ea6c5ac72e03afd032d",
|
||||||
|
"0x00a0a24b9f0e5ec7aa4c7389b8302fd0123194de"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"10960500": {
|
||||||
|
"safeContract": "0xaE71807C1B0a093cB1547b682DC78316D945c9B8"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"validateScoreTransition": "0x41a3c4",
|
"validateScoreTransition": "0x41a3c4",
|
||||||
"validateStepTransition": "0x16e360",
|
"validateStepTransition": "0x16e360",
|
||||||
@@ -5367,6 +5381,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nodes": [
|
"nodes": [
|
||||||
|
"enode://f6e37b943bad3a78cb8589b1798d30d210ffd39cfcd2c8f2de4f098467fd49c667980100d919da7ca46cd50505d30989abda87f0b9339377de13d6592c22caf8@34.198.49.72:30303",
|
||||||
"enode://56abaf065581a5985b8c5f4f88bd202526482761ba10be9bfdcd14846dd01f652ec33fde0f8c0fd1db19b59a4c04465681fcef50e11380ca88d25996191c52de@40.71.221.215:30303",
|
"enode://56abaf065581a5985b8c5f4f88bd202526482761ba10be9bfdcd14846dd01f652ec33fde0f8c0fd1db19b59a4c04465681fcef50e11380ca88d25996191c52de@40.71.221.215:30303",
|
||||||
"enode://d07827483dc47b368eaf88454fb04b41b7452cf454e194e2bd4c14f98a3278fed5d819dbecd0d010407fc7688d941ee1e58d4f9c6354d3da3be92f55c17d7ce3@52.166.117.77:30303",
|
"enode://d07827483dc47b368eaf88454fb04b41b7452cf454e194e2bd4c14f98a3278fed5d819dbecd0d010407fc7688d941ee1e58d4f9c6354d3da3be92f55c17d7ce3@52.166.117.77:30303",
|
||||||
"enode://38e6e7fd416293ed120d567a2675fe078c0205ab0671abf16982ce969823bd1f3443d590c18b321dfae7dcbe1f6ba98ef8702f255c3c9822a188abb82c53adca@51.77.66.187:30303",
|
"enode://38e6e7fd416293ed120d567a2675fe078c0205ab0671abf16982ce969823bd1f3443d590c18b321dfae7dcbe1f6ba98ef8702f255c3c9822a188abb82c53adca@51.77.66.187:30303",
|
||||||
|
|||||||
@@ -8,11 +8,12 @@
|
|||||||
"difficultyBoundDivisor": "0x0800",
|
"difficultyBoundDivisor": "0x0800",
|
||||||
"durationLimit": "0x0d",
|
"durationLimit": "0x0d",
|
||||||
"blockReward": "0x4563918244F40000",
|
"blockReward": "0x4563918244F40000",
|
||||||
"homesteadTransition": 494000,
|
"homesteadTransition": "0x789b0",
|
||||||
"ecip1010PauseTransition": 1915000,
|
"ecip1010PauseTransition": "0x1d3878",
|
||||||
"ecip1010ContinueTransition": 3415000,
|
"ecip1010ContinueTransition": "0x341bd8",
|
||||||
"ecip1017EraRounds": 2000000,
|
"ecip1017EraRounds": "0x1e8480",
|
||||||
"bombDefuseTransition": 2300000
|
"eip100bTransition": "0x4829ba",
|
||||||
|
"bombDefuseTransition": "0x231860"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -26,11 +27,17 @@
|
|||||||
"chainID": "0x3e",
|
"chainID": "0x3e",
|
||||||
"forkBlock": "0x1b34d8",
|
"forkBlock": "0x1b34d8",
|
||||||
"forkCanonHash": "0xf376243aeff1f256d970714c3de9fd78fa4e63cf63e32a51fe1169e375d98145",
|
"forkCanonHash": "0xf376243aeff1f256d970714c3de9fd78fa4e63cf63e32a51fe1169e375d98145",
|
||||||
"eip150Transition": 1783000,
|
"eip150Transition": "0x1b34d8",
|
||||||
"eip160Transition": 1915000,
|
"eip160Transition": "0x1d3878",
|
||||||
"eip161abcTransition": "0x7fffffffffffffff",
|
"eip161abcTransition": "0x4829ba",
|
||||||
"eip161dTransition": "0x7fffffffffffffff",
|
"eip161dTransition": "0x4829ba",
|
||||||
"eip155Transition": 1915000
|
"eip155Transition": "0x1d3878",
|
||||||
|
"maxCodeSize": "0x6000",
|
||||||
|
"maxCodeSizeTransition": "0x4829ba",
|
||||||
|
"eip140Transition": "0x4829ba",
|
||||||
|
"eip211Transition": "0x4829ba",
|
||||||
|
"eip214Transition": "0x4829ba",
|
||||||
|
"eip658Transition": "0x4829ba"
|
||||||
},
|
},
|
||||||
"genesis": {
|
"genesis": {
|
||||||
"seal": {
|
"seal": {
|
||||||
@@ -68,6 +75,53 @@
|
|||||||
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "1048576", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
"0000000000000000000000000000000000000002": { "balance": "1", "nonce": "1048576", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
|
||||||
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
"0000000000000000000000000000000000000003": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
|
||||||
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
"0000000000000000000000000000000000000004": { "balance": "1", "nonce": "1048576", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
|
||||||
|
"0x0000000000000000000000000000000000000005": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "modexp",
|
||||||
|
"activate_at": "0x4829ba",
|
||||||
|
"pricing": {
|
||||||
|
"modexp": {
|
||||||
|
"divisor": 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000006": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "alt_bn128_add",
|
||||||
|
"activate_at": "0x4829ba",
|
||||||
|
"pricing": {
|
||||||
|
"linear": {
|
||||||
|
"base": 500,
|
||||||
|
"word": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000007": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "alt_bn128_mul",
|
||||||
|
"activate_at": "0x4829ba",
|
||||||
|
"pricing": {
|
||||||
|
"linear": {
|
||||||
|
"base": 40000,
|
||||||
|
"word": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x0000000000000000000000000000000000000008": {
|
||||||
|
"builtin": {
|
||||||
|
"name": "alt_bn128_pairing",
|
||||||
|
"activate_at": "0x4829ba",
|
||||||
|
"pricing": {
|
||||||
|
"alt_bn128_pairing": {
|
||||||
|
"base": 100000,
|
||||||
|
"pair": 80000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"102e61f5d8f9bc71d0ad4a084df4e65e05ce0e1c": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }
|
"102e61f5d8f9bc71d0ad4a084df4e65e05ce0e1c": { "balance": "1606938044258990275541962092341162602522202993782792835301376", "nonce": "1048576" }
|
||||||
},
|
},
|
||||||
"hardcodedSync": {
|
"hardcodedSync": {
|
||||||
|
|||||||
@@ -34,7 +34,10 @@
|
|||||||
"eip140Transition": "0x0",
|
"eip140Transition": "0x0",
|
||||||
"eip211Transition": "0x0",
|
"eip211Transition": "0x0",
|
||||||
"eip214Transition": "0x0",
|
"eip214Transition": "0x0",
|
||||||
"eip658Transition": "0x0"
|
"eip658Transition": "0x0",
|
||||||
|
"eip145Transition": 8582254,
|
||||||
|
"eip1014Transition": 8582254,
|
||||||
|
"eip1052Transition": 8582254
|
||||||
},
|
},
|
||||||
"genesis": {
|
"genesis": {
|
||||||
"seal": {
|
"seal": {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
//! Block header.
|
//! Block header.
|
||||||
|
|
||||||
use std::cmp;
|
|
||||||
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP, keccak};
|
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP, keccak};
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use ethereum_types::{H256, U256, Address, Bloom};
|
use ethereum_types::{H256, U256, Address, Bloom};
|
||||||
@@ -342,7 +341,7 @@ impl Decodable for Header {
|
|||||||
number: r.val_at(8)?,
|
number: r.val_at(8)?,
|
||||||
gas_limit: r.val_at(9)?,
|
gas_limit: r.val_at(9)?,
|
||||||
gas_used: r.val_at(10)?,
|
gas_used: r.val_at(10)?,
|
||||||
timestamp: cmp::min(r.val_at::<U256>(11)?, u64::max_value().into()).as_u64(),
|
timestamp: r.val_at(11)?,
|
||||||
extra_data: r.val_at(12)?,
|
extra_data: r.val_at(12)?,
|
||||||
seal: vec![],
|
seal: vec![],
|
||||||
hash: keccak(r.as_raw()).into(),
|
hash: keccak(r.as_raw()).into(),
|
||||||
@@ -445,4 +444,15 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(header_rlp, encoded_header);
|
assert_eq!(header_rlp, encoded_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn reject_header_with_large_timestamp() {
|
||||||
|
// that's rlp of block header created with ethash engine.
|
||||||
|
// The encoding contains a large timestamp (295147905179352825856)
|
||||||
|
let header_rlp = "f901f9a0d405da4e66f1445d455195229624e133f5baafe72b5cf7b3c36c12c8146e98b7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05fb2b4bfdef7b314451cb138a534d225c922fc0e5fbe25e451142732c3e25c25a088d2ec6b9860aae1a2c3b299f72b6a5d70d7f7ba4722c78f2c49ba96273c2158a007c6fdfa8eea7e86b81f5b0fc0f78f90cc19f4aa60d323151e0cac660199e9a1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefba82524d891000000000000000000080a0a0349d8c3df71f1a48a9df7d03fd5f14aeee7d91332c009ecaff0a71ead405bd88ab4e252a7e8c2a23".from_hex().unwrap();
|
||||||
|
|
||||||
|
// This should fail decoding timestamp
|
||||||
|
let header: Result<Header, _> = rlp::decode(&header_rlp);
|
||||||
|
assert_eq!(header.unwrap_err(), rlp::DecoderError::RlpIsTooBig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,48 @@
|
|||||||
FROM ubuntu:xenial
|
FROM ubuntu:xenial
|
||||||
LABEL MAINTAINER="Parity Technologies <devops-team@parity.io>"
|
|
||||||
|
|
||||||
# install tools and dependencies
|
# metadata
|
||||||
RUN apt update && apt install -y --no-install-recommends openssl libudev-dev file curl jq
|
ARG VCS_REF
|
||||||
|
ARG BUILD_DATE
|
||||||
|
|
||||||
|
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||||
|
io.parity.image.vendor="Parity Technologies" \
|
||||||
|
io.parity.image.title="parity/parity" \
|
||||||
|
io.parity.image.description="Parity Ethereum. The Fastest and most Advanced Ethereum Client." \
|
||||||
|
io.parity.image.source="https://github.com/paritytech/parity-ethereum/blob/${VCS_REF}/\
|
||||||
|
scripts/docker/hub/Dockerfile" \
|
||||||
|
io.parity.image.documentation="https://wiki.parity.io/Parity-Ethereum" \
|
||||||
|
io.parity.image.revision="${VCS_REF}" \
|
||||||
|
io.parity.image.created="${BUILD_DATE}"
|
||||||
|
|
||||||
# show backtraces
|
# show backtraces
|
||||||
ENV RUST_BACKTRACE 1
|
ENV RUST_BACKTRACE 1
|
||||||
|
|
||||||
# cleanup Docker image
|
# install tools and dependencies
|
||||||
RUN apt autoremove -y \
|
RUN set -eux; \
|
||||||
&& apt clean -y \
|
apt-get update; \
|
||||||
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
|
apt-get install -y --no-install-recommends \
|
||||||
|
file curl jq; \
|
||||||
RUN groupadd -g 1000 parity \
|
# apt cleanup
|
||||||
&& useradd -m -u 1000 -g parity -s /bin/sh parity
|
apt-get autoremove -y; \
|
||||||
|
apt-get clean; \
|
||||||
|
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; \
|
||||||
|
# add user
|
||||||
|
groupadd -g 1000 parity; \
|
||||||
|
useradd -m -u 1000 -g parity -s /bin/sh parity
|
||||||
|
|
||||||
WORKDIR /home/parity
|
WORKDIR /home/parity
|
||||||
|
|
||||||
# add parity-ethereum to docker image
|
# add parity-ethereum binary to docker image
|
||||||
COPY artifacts/x86_64-unknown-linux-gnu/parity /bin/parity
|
COPY artifacts/x86_64-unknown-linux-gnu/parity /bin/parity
|
||||||
|
COPY tools/check_sync.sh /check_sync.sh
|
||||||
COPY scripts/docker/hub/check_sync.sh /check_sync.sh
|
|
||||||
|
|
||||||
# switch to user parity here
|
# switch to user parity here
|
||||||
USER parity
|
USER parity
|
||||||
|
|
||||||
|
# check if executable works in this container
|
||||||
|
RUN parity --version
|
||||||
|
|
||||||
EXPOSE 5001 8080 8082 8083 8545 8546 8180 30303/tcp 30303/udp
|
EXPOSE 5001 8080 8082 8083 8545 8546 8180 30303/tcp 30303/udp
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/parity"]
|
ENTRYPOINT ["/bin/parity"]
|
||||||
|
|
||||||
|
|||||||
57
scripts/docker/hub/publish-docker.sh
Executable file
57
scripts/docker/hub/publish-docker.sh
Executable file
@@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e # fail on any error
|
||||||
|
|
||||||
|
VERSION=$(cat ./tools/VERSION)
|
||||||
|
echo "Parity Ethereum version = ${VERSION}"
|
||||||
|
|
||||||
|
test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" \
|
||||||
|
|| ( echo "no docker credentials provided"; exit 1 )
|
||||||
|
docker login -u "$Docker_Hub_User_Parity" -p "$Docker_Hub_Pass_Parity"
|
||||||
|
echo "__________Docker info__________"
|
||||||
|
docker info
|
||||||
|
|
||||||
|
# we stopped pushing nightlies to dockerhub, will push to own registry prb.
|
||||||
|
case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
|
||||||
|
"$SCHEDULE_TAG")
|
||||||
|
echo "Docker TAG - 'parity/parity:${SCHEDULE_TAG}'";
|
||||||
|
docker build --no-cache \
|
||||||
|
--build-arg VCS_REF="${CI_COMMIT_SHA}" \
|
||||||
|
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
|
||||||
|
--tag "parity/parity:${SCHEDULE_TAG}" \
|
||||||
|
--file tools/Dockerfile .;
|
||||||
|
docker push "parity/parity:${SCHEDULE_TAG}";;
|
||||||
|
"beta")
|
||||||
|
echo "Docker TAGs - 'parity/parity:beta', 'parity/parity:latest', \
|
||||||
|
'parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}'";
|
||||||
|
docker build --no-cache \
|
||||||
|
--build-arg VCS_REF="${CI_COMMIT_SHA}" \
|
||||||
|
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
|
||||||
|
--tag "parity/parity:beta" \
|
||||||
|
--tag "parity/parity:latest" \
|
||||||
|
--tag "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}" \
|
||||||
|
--file tools/Dockerfile .;
|
||||||
|
docker push "parity/parity:beta";
|
||||||
|
docker push "parity/parity:latest";
|
||||||
|
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}";;
|
||||||
|
"stable")
|
||||||
|
echo "Docker TAGs - 'parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}', 'parity/parity:stable'";
|
||||||
|
docker build --no-cache \
|
||||||
|
--build-arg VCS_REF="${CI_COMMIT_SHA}" \
|
||||||
|
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
|
||||||
|
--tag "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}" \
|
||||||
|
--tag "parity/parity:stable" \
|
||||||
|
--file tools/Dockerfile .;
|
||||||
|
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}";
|
||||||
|
docker push "parity/parity:stable";;
|
||||||
|
*)
|
||||||
|
echo "Docker TAG - 'parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}'"
|
||||||
|
docker build --no-cache \
|
||||||
|
--build-arg VCS_REF="${CI_COMMIT_SHA}" \
|
||||||
|
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
|
||||||
|
--tag "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}" \
|
||||||
|
--file tools/Dockerfile .;
|
||||||
|
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
docker logout
|
||||||
@@ -18,13 +18,13 @@ cat .cargo/config
|
|||||||
echo "_____ Building target: "$CARGO_TARGET" _____"
|
echo "_____ Building target: "$CARGO_TARGET" _____"
|
||||||
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
||||||
then
|
then
|
||||||
time cargo build --target $CARGO_TARGET --release -p parity-clib --features final
|
time cargo build --target $CARGO_TARGET --verbose --color=always --release -p parity-clib --features final
|
||||||
else
|
else
|
||||||
time cargo build --target $CARGO_TARGET --release --features final
|
time cargo build --target $CARGO_TARGET --verbose --color=always --release --features final
|
||||||
time cargo build --target $CARGO_TARGET --release -p evmbin
|
time cargo build --target $CARGO_TARGET --verbose --color=always --release -p evmbin
|
||||||
time cargo build --target $CARGO_TARGET --release -p ethstore-cli
|
time cargo build --target $CARGO_TARGET --verbose --color=always --release -p ethstore-cli
|
||||||
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
|
time cargo build --target $CARGO_TARGET --verbose --color=always --release -p ethkey-cli
|
||||||
time cargo build --target $CARGO_TARGET --release -p whisper-cli
|
time cargo build --target $CARGO_TARGET --verbose --color=always --release -p whisper-cli
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "_____ Post-processing binaries _____"
|
echo "_____ Post-processing binaries _____"
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ echo "RUSTC_WRAPPER: " $RUSTC_WRAPPER
|
|||||||
echo "SCCACHE_DIR: " $SCCACHE_DIR
|
echo "SCCACHE_DIR: " $SCCACHE_DIR
|
||||||
|
|
||||||
echo "_____ Building target: "$CARGO_TARGET" _____"
|
echo "_____ Building target: "$CARGO_TARGET" _____"
|
||||||
time cargo build --target $CARGO_TARGET --release --features final
|
time cargo build --target $CARGO_TARGET --verbose --release --features final
|
||||||
time cargo build --target $CARGO_TARGET --release -p evmbin
|
time cargo build --target $CARGO_TARGET --verbose --release -p evmbin
|
||||||
time cargo build --target $CARGO_TARGET --release -p ethstore-cli
|
time cargo build --target $CARGO_TARGET --verbose --release -p ethstore-cli
|
||||||
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
|
time cargo build --target $CARGO_TARGET --verbose --release -p ethkey-cli
|
||||||
time cargo build --target $CARGO_TARGET --release -p whisper-cli
|
time cargo build --target $CARGO_TARGET --verbose --release -p whisper-cli
|
||||||
|
|
||||||
echo "__________Sign binaries__________"
|
echo "__________Sign binaries__________"
|
||||||
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.exe
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
##ARGUMENTS: 1. Docker target
|
|
||||||
set -e # fail on any error
|
|
||||||
set -u # treat unset variables as error
|
|
||||||
|
|
||||||
if [ "$CI_COMMIT_REF_NAME" == "master" ];
|
|
||||||
then export DOCKER_BUILD_TAG="${SCHEDULE_TAG:-latest}";
|
|
||||||
else export DOCKER_BUILD_TAG=$CI_COMMIT_REF_NAME;
|
|
||||||
fi
|
|
||||||
docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
|
|
||||||
|
|
||||||
echo "__________Docker TAG__________"
|
|
||||||
echo $DOCKER_BUILD_TAG
|
|
||||||
|
|
||||||
echo "__________Docker target__________"
|
|
||||||
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 scripts/docker/hub/Dockerfile .
|
|
||||||
docker push parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG
|
|
||||||
docker logout
|
|
||||||
@@ -33,8 +33,8 @@ update_wiki_docs() {
|
|||||||
|
|
||||||
setup_git() {
|
setup_git() {
|
||||||
echo "__________Set github__________"
|
echo "__________Set github__________"
|
||||||
git config --global user.email "devops@parity.com"
|
git config --global user.email "devops-team@parity.io"
|
||||||
git config --global user.name "Devops Parity"
|
git config --global user.name "Devops Team Parity"
|
||||||
}
|
}
|
||||||
|
|
||||||
set_remote_wiki() {
|
set_remote_wiki() {
|
||||||
@@ -51,8 +51,11 @@ commit_files() {
|
|||||||
|
|
||||||
upload_files() {
|
upload_files() {
|
||||||
echo "__________Upload files__________"
|
echo "__________Upload files__________"
|
||||||
git push -q origin HEAD
|
# this version of git (2.7.4) will dump the token on failure
|
||||||
git push -q -f --tags
|
git push -q origin HEAD 2>&1 \
|
||||||
|
| sed -r "s|(${GITHUB_USER}):[a-f0-9]+@|\1:REDACTED@|g"
|
||||||
|
git push -q -f --tags 2>&1 \
|
||||||
|
| sed -r "s|(${GITHUB_USER}):[a-f0-9]+@|\1:REDACTED@|g"
|
||||||
}
|
}
|
||||||
|
|
||||||
RPC_TRAITS_DIR="rpc/src/v1/traits"
|
RPC_TRAITS_DIR="rpc/src/v1/traits"
|
||||||
|
|||||||
@@ -7,10 +7,7 @@ echo "__________Register Release__________"
|
|||||||
DATA="secret=$RELEASES_SECRET"
|
DATA="secret=$RELEASES_SECRET"
|
||||||
|
|
||||||
echo "Pushing release to Mainnet"
|
echo "Pushing release to Mainnet"
|
||||||
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$CI_COMMIT_SHA"
|
./tools/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/${SCHEDULE_TAG:-${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/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$CI_COMMIT_SHA"
|
|
||||||
|
|
||||||
cd artifacts
|
cd artifacts
|
||||||
ls -l | sort -k9
|
ls -l | sort -k9
|
||||||
@@ -29,9 +26,7 @@ do
|
|||||||
case $DIR in
|
case $DIR in
|
||||||
x86_64* )
|
x86_64* )
|
||||||
DATA="commit=$CI_COMMIT_SHA&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET"
|
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/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$DIR"
|
../../tools/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$DIR"
|
||||||
# Kovan
|
|
||||||
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$DIR"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
@@ -3,15 +3,11 @@
|
|||||||
set -e # fail on any error
|
set -e # fail on any error
|
||||||
set -u # treat unset variables as error
|
set -u # treat unset variables as error
|
||||||
|
|
||||||
# some necromancy:
|
|
||||||
# gsub(/"/, "", $2) deletes "qoutes"
|
|
||||||
# gsub(/ /, "", $2) deletes whitespaces
|
|
||||||
TRACK=`awk -F '=' '/^track/ {gsub(/"/, "", $2); gsub(/ /, "", $2); print $2}' ./util/version/Cargo.toml`
|
|
||||||
echo Track is: $TRACK
|
|
||||||
# prepare variables
|
# prepare variables
|
||||||
VERSION=v"$(sed -r -n '1,/^version/s/^version = "([^"]+)".*$/\1/p' Cargo.toml)"
|
TRACK=$(cat ./tools/TRACK)
|
||||||
|
echo "Track is: ${TRACK}"
|
||||||
|
VERSION=$(cat ./tools/VERSION)
|
||||||
SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"
|
SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"
|
||||||
CARGO_TARGET="$(ls artifacts)"
|
|
||||||
# Choose snap release channel based on parity ethereum version track
|
# Choose snap release channel based on parity ethereum version track
|
||||||
case ${TRACK} in
|
case ${TRACK} in
|
||||||
nightly) export GRADE="devel" CHANNEL="edge";;
|
nightly) export GRADE="devel" CHANNEL="edge";;
|
||||||
@@ -20,12 +16,8 @@ case ${TRACK} in
|
|||||||
*) echo "No release" && exit 0;;
|
*) echo "No release" && exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Release untagged versions from branches to the candidate snap channel
|
|
||||||
case ${CI_COMMIT_REF_NAME} in
|
|
||||||
beta|stable) export GRADE="stable" CHANNEL="candidate";;
|
|
||||||
esac
|
|
||||||
echo "__________Create snap package__________"
|
echo "__________Create snap package__________"
|
||||||
echo "Release channel :" $GRADE " Branch/tag: " $CI_COMMIT_REF_NAME
|
echo "Release channel :" $GRADE " Branch/tag: " $CI_COMMIT_REF_NAME "Track: " ${TRACK}
|
||||||
echo $VERSION:$GRADE:$BUILD_ARCH:$CARGO_TARGET
|
echo $VERSION:$GRADE:$BUILD_ARCH:$CARGO_TARGET
|
||||||
|
|
||||||
sed -e 's/$VERSION/'"$VERSION"'/g' \
|
sed -e 's/$VERSION/'"$VERSION"'/g' \
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# ARGUMENT $1 Rust flavor to run test with (stable/beta/nightly)
|
||||||
|
|
||||||
echo "________Running test-linux.sh________"
|
echo "________Running test-linux.sh________"
|
||||||
set -e # fail on any error
|
set -e # fail on any error
|
||||||
set -u # treat unset variables as error
|
set -u # treat unset variables as error
|
||||||
|
|
||||||
FEATURES="json-tests,ci-skip-tests"
|
FEATURES="json-tests,ci-skip-tests"
|
||||||
OPTIONS="--release"
|
OPTIONS=""
|
||||||
#use nproc `linux only
|
#use nproc `linux only
|
||||||
THREADS=$(nproc)
|
THREADS=$(nproc)
|
||||||
|
|
||||||
|
rustup default $1
|
||||||
|
rustup show
|
||||||
|
|
||||||
echo "________Running Parity Full Test Suite________"
|
echo "________Running Parity Full Test Suite________"
|
||||||
time cargo test $OPTIONS --features "$FEATURES" --locked --all --target $CARGO_TARGET -- --test-threads $THREADS
|
# Why are we using RUSTFLAGS? See https://github.com/paritytech/parity-ethereum/pull/10719
|
||||||
|
CARGO_INCREMENTAL=0 RUSTFLAGS="-C opt-level=3 -C overflow-checks=on -C debuginfo=2" time cargo test $OPTIONS --features "$FEATURES" --locked --all --target $CARGO_TARGET --verbose --color=never -- --test-threads $THREADS
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ echo "________Running validate_chainspecs.sh________"
|
|||||||
ERR=0
|
ERR=0
|
||||||
|
|
||||||
echo "________Validate chainspecs________"
|
echo "________Validate chainspecs________"
|
||||||
time cargo build --release -p chainspec
|
time cargo build --release -p chainspec --verbose --color=always
|
||||||
|
|
||||||
for spec in ethcore/res/*.json; do
|
for spec in ethcore/res/*.json; do
|
||||||
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
|
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "parity-version"
|
name = "parity-version"
|
||||||
# NOTE: this value is used for Parity Ethereum version string (via env CARGO_PKG_VERSION)
|
# NOTE: this value is used for Parity Ethereum version string (via env CARGO_PKG_VERSION)
|
||||||
version = "2.4.4"
|
version = "2.4.7"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[package.metadata]
|
[package.metadata]
|
||||||
# This versions track. Should be changed to `stable` or `beta` when on respective branches.
|
# This versions track. Should be changed to `stable` or `beta` when on respective branches.
|
||||||
# Used by auto-updater and for Parity version string.
|
# Used by auto-updater and for Parity version string.
|
||||||
track = "beta"
|
track = "stable"
|
||||||
|
|
||||||
# Network specific settings, used ONLY by auto-updater.
|
# Network specific settings, used ONLY by auto-updater.
|
||||||
# Latest supported fork blocks.
|
# Latest supported fork blocks.
|
||||||
|
|||||||
@@ -264,17 +264,17 @@ impl Message {
|
|||||||
|
|
||||||
let mut rng = {
|
let mut rng = {
|
||||||
let mut thread_rng = ::rand::thread_rng();
|
let mut thread_rng = ::rand::thread_rng();
|
||||||
|
|
||||||
XorShiftRng::from_seed(thread_rng.gen::<[u32; 4]>())
|
XorShiftRng::from_seed(thread_rng.gen::<[u32; 4]>())
|
||||||
};
|
};
|
||||||
|
|
||||||
assert!(params.ttl > 0);
|
assert!(params.ttl > 0);
|
||||||
|
|
||||||
let expiry = {
|
let expiry = {
|
||||||
let after_mining = SystemTime::now().checked_sub(Duration::from_millis(params.work))
|
let since_epoch = SystemTime::now()
|
||||||
.ok_or(Error::TimestampOverflow)?;
|
.checked_add(Duration::from_secs(params.ttl))
|
||||||
let since_epoch = after_mining.duration_since(time::UNIX_EPOCH)
|
.and_then(|t| t.checked_add(Duration::from_millis(params.work)))
|
||||||
.expect("time after now is after unix epoch; qed");
|
.ok_or(Error::TimestampOverflow)?
|
||||||
|
.duration_since(time::UNIX_EPOCH).expect("time after now is after unix epoch; qed");
|
||||||
|
|
||||||
// round up the sub-second to next whole second.
|
// round up the sub-second to next whole second.
|
||||||
since_epoch.as_secs() + if since_epoch.subsec_nanos() == 0 { 0 } else { 1 }
|
since_epoch.as_secs() + if since_epoch.subsec_nanos() == 0 { 0 } else { 1 }
|
||||||
|
|||||||
Reference in New Issue
Block a user