Compare commits
27 Commits
v1.8.8-ci2
...
v1.8.10-ci
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bfabb6752 | ||
|
|
9b54d3f2d3 | ||
|
|
db86dec404 | ||
|
|
d2fa3e3236 | ||
|
|
590362b23c | ||
|
|
5e2258c6de | ||
|
|
f65003c630 | ||
|
|
ceb23638fc | ||
|
|
24ab53245b | ||
|
|
1952d05d9c | ||
|
|
98cccd5b26 | ||
|
|
fd07b608bd | ||
|
|
944ace3b61 | ||
|
|
c697e40e84 | ||
|
|
b322af35bc | ||
|
|
987d26ac46 | ||
|
|
143d4840c7 | ||
|
|
fae7cf6b41 | ||
|
|
d8c1372b7c | ||
|
|
28821142e6 | ||
|
|
791d944a53 | ||
|
|
9e2b3308d4 | ||
|
|
680cc9c0c3 | ||
|
|
346c80ef11 | ||
|
|
efb310f251 | ||
|
|
1ede2fbed2 | ||
|
|
31ef44d718 |
@@ -9,7 +9,7 @@ trim_trailing_whitespace=true
|
||||
max_line_length=120
|
||||
insert_final_newline=true
|
||||
|
||||
[.travis.yml]
|
||||
[*.{yml,sh}]
|
||||
indent_style=space
|
||||
indent_size=2
|
||||
tab_width=8
|
||||
|
||||
@@ -18,14 +18,14 @@ linux-stable:
|
||||
stage: build
|
||||
image: parity/rust:gitlab-ci
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- stable
|
||||
- triggers
|
||||
script:
|
||||
- rustup default stable
|
||||
# ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags
|
||||
- scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64 gcc g++
|
||||
# ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags 6. binary identifier
|
||||
- scripts/gitlab-build.sh x86_64-unknown-linux-gnu x86_64-unknown-linux-gnu amd64 gcc g++ ubuntu
|
||||
tags:
|
||||
- rust-stable
|
||||
artifacts:
|
||||
@@ -36,13 +36,13 @@ linux-stable-debian:
|
||||
stage: build
|
||||
image: parity/rust-debian:gitlab-ci
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- stable
|
||||
- triggers
|
||||
script:
|
||||
- export LIBSSL="libssl1.1 (>=1.1.0)"
|
||||
- scripts/gitlab-build.sh x86_64-unknown-debian-gnu x86_64-unknown-linux-gnu amd64 gcc g++
|
||||
- scripts/gitlab-build.sh x86_64-unknown-debian-gnu x86_64-unknown-linux-gnu amd64 gcc g++ debian
|
||||
tags:
|
||||
- rust-debian
|
||||
artifacts:
|
||||
@@ -53,12 +53,12 @@ linux-centos:
|
||||
stage: build
|
||||
image: parity/rust-centos:gitlab-ci
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- stable
|
||||
- triggers
|
||||
script:
|
||||
- scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu x86_64 gcc g++
|
||||
- scripts/gitlab-build.sh x86_64-unknown-centos-gnu x86_64-unknown-linux-gnu x86_64 gcc g++ centos
|
||||
tags:
|
||||
- rust-centos
|
||||
artifacts:
|
||||
@@ -69,12 +69,12 @@ linux-i686:
|
||||
stage: build
|
||||
image: parity/rust-i686:gitlab-ci
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- stable
|
||||
- triggers
|
||||
script:
|
||||
- scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 gcc g++
|
||||
- scripts/gitlab-build.sh i686-unknown-linux-gnu i686-unknown-linux-gnu i386 gcc g++ ubuntu
|
||||
tags:
|
||||
- rust-i686
|
||||
artifacts:
|
||||
@@ -85,12 +85,12 @@ linux-armv7:
|
||||
stage: build
|
||||
image: parity/rust-armv7:gitlab-ci
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- stable
|
||||
- triggers
|
||||
script:
|
||||
- scripts/gitlab-build.sh armv7-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++
|
||||
- scripts/gitlab-build.sh armv7-unknown-linux-gnueabihf armv7-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ ubuntu
|
||||
tags:
|
||||
- rust-arm
|
||||
artifacts:
|
||||
@@ -101,12 +101,12 @@ linux-arm:
|
||||
stage: build
|
||||
image: parity/rust-arm:gitlab-ci
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- stable
|
||||
- triggers
|
||||
script:
|
||||
- scripts/gitlab-build.sh arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++
|
||||
- scripts/gitlab-build.sh arm-unknown-linux-gnueabihf arm-unknown-linux-gnueabihf armhf arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ ubuntu
|
||||
tags:
|
||||
- rust-arm
|
||||
artifacts:
|
||||
@@ -117,12 +117,12 @@ linux-aarch64:
|
||||
stage: build
|
||||
image: parity/rust-arm64:gitlab-ci
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- stable
|
||||
- triggers
|
||||
script:
|
||||
- scripts/gitlab-build.sh aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu arm64 aarch64-linux-gnu-gcc aarch64-linux-gnu-g++
|
||||
- scripts/gitlab-build.sh aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu arm64 aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ ubuntu
|
||||
tags:
|
||||
- rust-arm
|
||||
artifacts:
|
||||
@@ -131,30 +131,30 @@ linux-aarch64:
|
||||
name: "aarch64-unknown-linux-gnu_parity"
|
||||
linux-snap:
|
||||
stage: build
|
||||
image: parity/snapcraft:gitlab-ci
|
||||
image: snapcore/snapcraft:stable
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- triggers
|
||||
script:
|
||||
- scripts/gitlab-build.sh x86_64-unknown-snap-gnu x86_64-unknown-linux-gnu amd64 gcc g++
|
||||
- scripts/gitlab-build.sh x86_64-unknown-snap-gnu x86_64-unknown-linux-gnu amd64 gcc g++ snap
|
||||
tags:
|
||||
- rust-stable
|
||||
artifacts:
|
||||
paths:
|
||||
- scripts/parity_*_amd64.snap
|
||||
- parity.zip
|
||||
name: "stable-x86_64-unknown-snap-gnu_parity"
|
||||
allow_failure: true
|
||||
darwin:
|
||||
stage: build
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- stable
|
||||
- triggers
|
||||
script:
|
||||
- scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos gcc g++
|
||||
- scripts/gitlab-build.sh x86_64-apple-darwin x86_64-apple-darwin macos gcc g++ macos
|
||||
tags:
|
||||
- osx
|
||||
artifacts:
|
||||
@@ -167,12 +167,12 @@ windows:
|
||||
untracked: true
|
||||
stage: build
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- stable
|
||||
- triggers
|
||||
script:
|
||||
- sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc installer "" "" ""
|
||||
- sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc installer "" "" windows
|
||||
tags:
|
||||
- rust-windows
|
||||
artifacts:
|
||||
@@ -182,14 +182,12 @@ windows:
|
||||
docker-build:
|
||||
stage: build
|
||||
only:
|
||||
- stable
|
||||
- beta
|
||||
- tags
|
||||
- triggers
|
||||
before_script:
|
||||
- docker info
|
||||
script:
|
||||
- DOCKER_TAG=$CI_BUILD_REF_NAME
|
||||
- if [ "$CI_BUILD_REF_NAME" == "beta-release" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi
|
||||
- echo "Tag:" $DOCKER_TAG
|
||||
- docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
|
||||
- scripts/docker-build.sh $DOCKER_TAG
|
||||
@@ -262,8 +260,6 @@ push-release:
|
||||
- triggers
|
||||
image: parity/rust:gitlab-ci
|
||||
script:
|
||||
- rustup default stable
|
||||
- curl --data "secret=$RELEASES_SECRET" http://update.parity.io:1337/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF
|
||||
- curl --data "secret=$RELEASES_SECRET" http://update.parity.io:1338/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF
|
||||
- scripts/gitlab-push-release.sh
|
||||
tags:
|
||||
- curl
|
||||
|
||||
77
Cargo.lock
generated
77
Cargo.lock
generated
@@ -372,7 +372,7 @@ dependencies = [
|
||||
"bloomable 0.1.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethjson 0.1.0",
|
||||
"hash 0.1.0",
|
||||
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -586,7 +586,7 @@ dependencies = [
|
||||
"ethcore-ipc-nano 1.8.0",
|
||||
"ethcore-logger 1.8.0",
|
||||
"ethcore-stratum 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethjson 0.1.0",
|
||||
"ethkey 0.2.0",
|
||||
"ethstore 0.1.0",
|
||||
@@ -621,7 +621,6 @@ dependencies = [
|
||||
"rlp_derive 0.1.0",
|
||||
"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)",
|
||||
"semantic_version 0.1.0",
|
||||
"snappy 0.1.0",
|
||||
"stats 0.1.0",
|
||||
"table 0.1.0",
|
||||
@@ -682,7 +681,7 @@ version = "1.8.0"
|
||||
dependencies = [
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"nanomsg 0.5.1 (git+https://github.com/paritytech/nanomsg.rs.git?branch=parity-1.7)",
|
||||
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@@ -732,7 +731,7 @@ dependencies = [
|
||||
"ethcore-ipc 1.8.0",
|
||||
"ethcore-ipc-codegen 1.8.0",
|
||||
"ethcore-ipc-nano 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nanomsg 0.5.1 (git+https://github.com/paritytech/nanomsg.rs.git?branch=parity-1.7)",
|
||||
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -751,7 +750,7 @@ dependencies = [
|
||||
"ethcore-ipc 1.8.0",
|
||||
"ethcore-ipc-codegen 1.8.0",
|
||||
"ethcore-network 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"evm 0.1.0",
|
||||
"futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hash 0.1.0",
|
||||
@@ -803,7 +802,7 @@ dependencies = [
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-logger 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethcrypto 0.1.0",
|
||||
"ethkey 0.2.0",
|
||||
"hash 0.1.0",
|
||||
@@ -812,6 +811,7 @@ dependencies = [
|
||||
"libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-version 1.8.10",
|
||||
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"path 0.1.0",
|
||||
"rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -840,7 +840,7 @@ dependencies = [
|
||||
"ethcore-ipc-codegen 1.8.0",
|
||||
"ethcore-ipc-nano 1.8.0",
|
||||
"ethcore-logger 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethcrypto 0.1.0",
|
||||
"ethkey 0.2.0",
|
||||
"futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -876,7 +876,7 @@ dependencies = [
|
||||
"ethcore-ipc-codegen 1.8.0",
|
||||
"ethcore-ipc-nano 1.8.0",
|
||||
"ethcore-logger 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"hash 0.1.0",
|
||||
"jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)",
|
||||
"jsonrpc-macros 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)",
|
||||
@@ -889,7 +889,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ethcore-util"
|
||||
version = "1.8.8"
|
||||
version = "1.8.10"
|
||||
dependencies = [
|
||||
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1024,7 +1024,7 @@ dependencies = [
|
||||
"ethcore-ipc-nano 1.8.0",
|
||||
"ethcore-light 1.8.0",
|
||||
"ethcore-network 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethkey 0.2.0",
|
||||
"hash 0.1.0",
|
||||
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1051,7 +1051,7 @@ dependencies = [
|
||||
"common-types 0.1.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-logger 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethjson 0.1.0",
|
||||
"evmjit 1.8.0",
|
||||
"hash 0.1.0",
|
||||
@@ -1073,7 +1073,7 @@ dependencies = [
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethjson 0.1.0",
|
||||
"evm 0.1.0",
|
||||
"panic_hook 0.1.0",
|
||||
@@ -1371,7 +1371,8 @@ dependencies = [
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-ipc 1.8.0",
|
||||
"ethcore-ipc-codegen 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"parity-version 1.8.10",
|
||||
"semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@@ -1882,7 +1883,7 @@ dependencies = [
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-network 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kvdb-memorydb 0.1.0",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -2081,7 +2082,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "parity"
|
||||
version = "1.8.8"
|
||||
version = "1.8.10"
|
||||
dependencies = [
|
||||
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"app_dirs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -2105,7 +2106,7 @@ dependencies = [
|
||||
"ethcore-network 1.8.0",
|
||||
"ethcore-secretstore 1.0.0",
|
||||
"ethcore-stratum 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethkey 0.2.0",
|
||||
"ethsync 1.8.0",
|
||||
"fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -2131,6 +2132,7 @@ dependencies = [
|
||||
"parity-rpc 1.8.0",
|
||||
"parity-rpc-client 1.4.0",
|
||||
"parity-updater 1.8.0",
|
||||
"parity-version 1.8.10",
|
||||
"parity-whisper 0.1.0",
|
||||
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"path 0.1.0",
|
||||
@@ -2163,7 +2165,7 @@ dependencies = [
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-devtools 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"fetch 0.1.0",
|
||||
"futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-cpupool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -2179,6 +2181,7 @@ dependencies = [
|
||||
"parity-hash-fetch 1.8.0",
|
||||
"parity-reactor 0.1.0",
|
||||
"parity-ui 1.8.0",
|
||||
"parity-version 1.8.10",
|
||||
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -2225,7 +2228,7 @@ dependencies = [
|
||||
"ethabi 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"fetch 0.1.0",
|
||||
"futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hash 0.1.0",
|
||||
@@ -2247,7 +2250,7 @@ dependencies = [
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)",
|
||||
"jsonrpc-http-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)",
|
||||
"multihash 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -2261,7 +2264,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"ethcore 1.8.0",
|
||||
"ethcore-io 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethkey 0.2.0",
|
||||
"kvdb 0.1.0",
|
||||
"kvdb-memorydb 0.1.0",
|
||||
@@ -2277,7 +2280,7 @@ name = "parity-machine"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2305,7 +2308,7 @@ dependencies = [
|
||||
"ethcore-light 1.8.0",
|
||||
"ethcore-logger 1.8.0",
|
||||
"ethcore-network 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethcrypto 0.1.0",
|
||||
"ethjson 0.1.0",
|
||||
"ethkey 0.2.0",
|
||||
@@ -2331,6 +2334,7 @@ dependencies = [
|
||||
"order-stat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-reactor 0.1.0",
|
||||
"parity-updater 1.8.0",
|
||||
"parity-version 1.8.10",
|
||||
"parking_lot 0.4.8 (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.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -2401,7 +2405,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "parity-ui-precompiled"
|
||||
version = "1.4.0"
|
||||
source = "git+https://github.com/paritytech/js-precompiled.git?branch=stable#bbc5b6c3e3a43ab21b94d37922cdbed766c7b5c8"
|
||||
source = "git+https://github.com/paritytech/js-precompiled.git?branch=stable#d1ee895501ad2914c523635ff601b3bd35f846b8"
|
||||
dependencies = [
|
||||
"parity-dapps-glue 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@@ -2416,18 +2420,31 @@ dependencies = [
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-ipc 1.8.0",
|
||||
"ethcore-ipc-codegen 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethsync 1.8.0",
|
||||
"futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-common-types 1.8.0",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-hash-fetch 1.8.0",
|
||||
"parity-reactor 0.1.0",
|
||||
"parity-version 1.8.10",
|
||||
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"path 0.1.0",
|
||||
"target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-version"
|
||||
version = "1.8.10"
|
||||
dependencies = [
|
||||
"ethcore-bytes 0.1.0",
|
||||
"rlp 0.2.0",
|
||||
"rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-wasm"
|
||||
version = "0.15.3"
|
||||
@@ -2880,7 +2897,7 @@ name = "rpc-cli"
|
||||
version = "1.4.0"
|
||||
dependencies = [
|
||||
"bigint 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-rpc 1.8.0",
|
||||
"parity-rpc-client 1.4.0",
|
||||
@@ -2988,10 +3005,6 @@ dependencies = [
|
||||
"libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semantic_version"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.1.20"
|
||||
@@ -3604,7 +3617,7 @@ dependencies = [
|
||||
"common-types 0.1.0",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"ethjson 0.1.0",
|
||||
"evmjit 1.8.0",
|
||||
"hash 0.1.0",
|
||||
@@ -3626,7 +3639,7 @@ dependencies = [
|
||||
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-logger 1.8.0",
|
||||
"ethcore-util 1.8.8",
|
||||
"ethcore-util 1.8.10",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-wasm 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vm 0.1.0",
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[package]
|
||||
description = "Parity Ethereum client"
|
||||
name = "parity"
|
||||
version = "1.8.8"
|
||||
# NOTE Make sure to update util/version/Cargo.toml as well
|
||||
version = "1.8.10"
|
||||
license = "GPL-3.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
build = "build.rs"
|
||||
@@ -60,6 +61,7 @@ parity-reactor = { path = "util/reactor" }
|
||||
parity-rpc = { path = "rpc" }
|
||||
parity-rpc-client = { path = "rpc_client" }
|
||||
parity-updater = { path = "updater" }
|
||||
parity-version = { path = "util/version" }
|
||||
parity-whisper = { path = "whisper" }
|
||||
path = { path = "util/path" }
|
||||
panic_hook = { path = "panic_hook" }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# [Parity](https://parity.io/) - fast, light, and robust Ethereum client
|
||||
# [Parity](https://parity.io/) - fast, light, and robust Ethereum client
|
||||
|
||||
[](https://gitlab.parity.io/parity/parity/commits/master)
|
||||
[](https://build.snapcraft.io/user/paritytech/parity)
|
||||
|
||||
@@ -37,6 +37,7 @@ parity-hash-fetch = { path = "../hash-fetch" }
|
||||
parity-reactor = { path = "../util/reactor" }
|
||||
parity-ui = { path = "./ui" }
|
||||
hash = { path = "../util/hash" }
|
||||
parity-version = { path = "../util/version" }
|
||||
|
||||
clippy = { version = "0.0.103", optional = true}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use hyper::{self, mime, header};
|
||||
use hyper::StatusCode;
|
||||
|
||||
use util::version;
|
||||
use parity_version::version;
|
||||
|
||||
use handlers::add_security_headers;
|
||||
use Embeddable;
|
||||
|
||||
@@ -44,6 +44,7 @@ extern crate parity_dapps_glue as parity_dapps;
|
||||
extern crate parity_hash_fetch as hash_fetch;
|
||||
extern crate parity_ui;
|
||||
extern crate hash;
|
||||
extern crate parity_version;
|
||||
|
||||
#[macro_use]
|
||||
extern crate futures;
|
||||
|
||||
@@ -74,7 +74,6 @@ vm = { path = "vm" }
|
||||
wasm = { path = "wasm" }
|
||||
hash = { path = "../util/hash" }
|
||||
triehash = { path = "../util/triehash" }
|
||||
semantic_version = { path = "../util/semantic_version" }
|
||||
unexpected = { path = "../util/unexpected" }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -90,7 +90,14 @@ impl Pending {
|
||||
match self.requests[idx].respond_local(cache) {
|
||||
Some(response) => {
|
||||
self.requests.supply_response_unchecked(&response);
|
||||
|
||||
// update header and back-references after each from-cache
|
||||
// response to ensure that the requests are left in a consistent
|
||||
// state and increase the likelihood of being able to answer
|
||||
// the next request from cache.
|
||||
self.update_header_refs(idx, &response);
|
||||
self.fill_unanswered();
|
||||
|
||||
self.responses.push(response);
|
||||
}
|
||||
None => break,
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
"gasLimit": "0x1000000"
|
||||
},
|
||||
"nodes": [
|
||||
"enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303",
|
||||
"enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303",
|
||||
"enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303",
|
||||
"enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303"
|
||||
],
|
||||
|
||||
@@ -257,9 +257,9 @@ impl AccountProvider {
|
||||
Ok(Address::from(account.address).into())
|
||||
}
|
||||
|
||||
/// Import a new presale wallet.
|
||||
pub fn import_wallet(&self, json: &[u8], password: &str) -> Result<Address, Error> {
|
||||
let account = self.sstore.import_wallet(SecretVaultRef::Root, json, password)?;
|
||||
/// Import a new wallet.
|
||||
pub fn import_wallet(&self, json: &[u8], password: &str, gen_id: bool) -> Result<Address, Error> {
|
||||
let account = self.sstore.import_wallet(SecretVaultRef::Root, json, password, gen_id)?;
|
||||
if self.blacklisted_accounts.contains(&account.address) {
|
||||
self.sstore.remove_account(&account, password)?;
|
||||
return Err(SSError::InvalidAccount.into());
|
||||
|
||||
@@ -41,7 +41,6 @@ use itertools::{self, Itertools};
|
||||
use rlp::{UntrustedRlp, encode};
|
||||
use bigint::prelude::{U256, U128};
|
||||
use bigint::hash::{H256, H520};
|
||||
use semantic_version::SemanticVersion;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use unexpected::{Mismatch, OutOfBounds};
|
||||
use util::Address;
|
||||
@@ -483,8 +482,6 @@ impl IoHandler<()> for TransitionHandler {
|
||||
impl Engine<EthereumMachine> for AuthorityRound {
|
||||
fn name(&self) -> &str { "AuthorityRound" }
|
||||
|
||||
fn version(&self) -> SemanticVersion { SemanticVersion::new(1, 0, 0) }
|
||||
|
||||
fn machine(&self) -> &EthereumMachine { &self.machine }
|
||||
|
||||
/// Two fields - consensus step and the corresponding proposer signature.
|
||||
@@ -919,7 +916,6 @@ mod tests {
|
||||
fn has_valid_metadata() {
|
||||
let engine = Spec::new_test_round().engine;
|
||||
assert!(!engine.name().is_empty());
|
||||
assert!(engine.version().major >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -29,7 +29,6 @@ use ethjson;
|
||||
use header::Header;
|
||||
use client::EngineClient;
|
||||
use machine::{AuxiliaryData, Call, EthereumMachine};
|
||||
use semantic_version::SemanticVersion;
|
||||
use super::signer::EngineSigner;
|
||||
use super::validator_set::{ValidatorSet, SimpleList, new_validator_set};
|
||||
|
||||
@@ -95,7 +94,6 @@ impl BasicAuthority {
|
||||
|
||||
impl Engine<EthereumMachine> for BasicAuthority {
|
||||
fn name(&self) -> &str { "BasicAuthority" }
|
||||
fn version(&self) -> SemanticVersion { SemanticVersion::new(1, 0, 0) }
|
||||
|
||||
fn machine(&self) -> &EthereumMachine { &self.machine }
|
||||
|
||||
@@ -218,7 +216,6 @@ mod tests {
|
||||
fn has_valid_metadata() {
|
||||
let engine = new_test_authority().engine;
|
||||
assert!(!engine.name().is_empty());
|
||||
assert!(engine.version().major >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -54,7 +54,6 @@ use ethkey::Signature;
|
||||
use parity_machine::{Machine, LocalizedMachine as Localized};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use semantic_version::SemanticVersion;
|
||||
use util::*;
|
||||
use unexpected::{Mismatch, OutOfBounds};
|
||||
use bytes::Bytes;
|
||||
@@ -178,8 +177,6 @@ pub enum EpochChange<M: Machine> {
|
||||
pub trait Engine<M: Machine>: Sync + Send {
|
||||
/// The name of this engine.
|
||||
fn name(&self) -> &str;
|
||||
/// The version of this engine. Should be of the form
|
||||
fn version(&self) -> SemanticVersion { SemanticVersion::new(0, 0, 0) }
|
||||
|
||||
/// Get access to the underlying state machine.
|
||||
// TODO: decouple.
|
||||
|
||||
@@ -50,7 +50,6 @@ use super::transition::TransitionHandler;
|
||||
use super::vote_collector::VoteCollector;
|
||||
use self::message::*;
|
||||
use self::params::TendermintParams;
|
||||
use semantic_version::SemanticVersion;
|
||||
use machine::{AuxiliaryData, EthereumMachine};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
|
||||
@@ -443,8 +442,6 @@ impl Tendermint {
|
||||
impl Engine<EthereumMachine> for Tendermint {
|
||||
fn name(&self) -> &str { "Tendermint" }
|
||||
|
||||
fn version(&self) -> SemanticVersion { SemanticVersion::new(1, 0, 0) }
|
||||
|
||||
/// (consensus view, proposal signature, authority signatures)
|
||||
fn seal_fields(&self) -> usize { 3 }
|
||||
|
||||
@@ -857,7 +854,6 @@ mod tests {
|
||||
fn has_valid_metadata() {
|
||||
let engine = Spec::new_test_tendermint().engine;
|
||||
assert!(!engine.name().is_empty());
|
||||
assert!(engine.version().major >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -31,7 +31,6 @@ use engines::{self, Engine};
|
||||
use ethjson;
|
||||
use rlp::{self, UntrustedRlp};
|
||||
use machine::EthereumMachine;
|
||||
use semantic_version::SemanticVersion;
|
||||
|
||||
/// Number of blocks in an ethash snapshot.
|
||||
// make dependent on difficulty incrment divisor?
|
||||
@@ -169,7 +168,6 @@ impl engines::EpochVerifier<EthereumMachine> for Arc<Ethash> {
|
||||
|
||||
impl Engine<EthereumMachine> for Arc<Ethash> {
|
||||
fn name(&self) -> &str { "Ethash" }
|
||||
fn version(&self) -> SemanticVersion { SemanticVersion::new(1, 0, 0) }
|
||||
fn machine(&self) -> &EthereumMachine { &self.machine }
|
||||
|
||||
// Two fields - nonce and mix.
|
||||
@@ -577,7 +575,6 @@ mod tests {
|
||||
fn has_valid_metadata() {
|
||||
let engine = test_spec().engine;
|
||||
assert!(!engine.name().is_empty());
|
||||
assert!(engine.version().major >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -30,15 +30,6 @@ pub use self::denominations::*;
|
||||
use machine::EthereumMachine;
|
||||
use super::spec::*;
|
||||
|
||||
/// Most recent fork block that we support on Mainnet.
|
||||
pub const FORK_SUPPORTED_FOUNDATION: u64 = 4370000;
|
||||
|
||||
/// Most recent fork block that we support on Ropsten.
|
||||
pub const FORK_SUPPORTED_ROPSTEN: u64 = 10;
|
||||
|
||||
/// Most recent fork block that we support on Kovan.
|
||||
pub const FORK_SUPPORTED_KOVAN: u64 = 0;
|
||||
|
||||
fn load<'a, T: Into<Option<SpecParams<'a>>>>(params: T, b: &[u8]) -> Spec {
|
||||
match params.into() {
|
||||
Some(params) => Spec::load(params, b),
|
||||
|
||||
@@ -110,7 +110,6 @@ extern crate memorydb;
|
||||
extern crate patricia_trie as trie;
|
||||
extern crate triehash;
|
||||
extern crate ansi_term;
|
||||
extern crate semantic_version;
|
||||
extern crate unexpected;
|
||||
extern crate kvdb;
|
||||
extern crate kvdb_rocksdb;
|
||||
|
||||
@@ -35,6 +35,15 @@ use std::cell::{RefCell, Cell};
|
||||
|
||||
const STORAGE_CACHE_ITEMS: usize = 8192;
|
||||
|
||||
/// Boolean type for clean/dirty status.
|
||||
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
|
||||
pub enum Filth {
|
||||
/// Data has not been changed.
|
||||
Clean,
|
||||
/// Data has been changed.
|
||||
Dirty,
|
||||
}
|
||||
|
||||
/// Single account in the system.
|
||||
/// Keeps track of changes to the code and storage.
|
||||
/// The changes are applied in `commit_storage` and `commit_code`
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::{fs, io};
|
||||
use std::io::Write;
|
||||
use std::path::{PathBuf, Path};
|
||||
use std::collections::HashMap;
|
||||
use time;
|
||||
@@ -152,31 +153,39 @@ impl<T> DiskDirectory<T> where T: KeyFileManager {
|
||||
)
|
||||
}
|
||||
|
||||
/// insert account with given file name
|
||||
pub fn insert_with_filename(&self, account: SafeAccount, filename: String) -> Result<SafeAccount, Error> {
|
||||
|
||||
/// insert account with given filename. if the filename is a duplicate of any stored account and dedup is set to
|
||||
/// true, a random suffix is appended to the filename.
|
||||
pub fn insert_with_filename(&self, account: SafeAccount, mut filename: String, dedup: bool) -> Result<SafeAccount, Error> {
|
||||
// path to keyfile
|
||||
let mut keyfile_path = self.path.join(filename.as_str());
|
||||
|
||||
// check for duplicate filename and append random suffix
|
||||
if dedup && keyfile_path.exists() {
|
||||
let suffix = ::random::random_string(4);
|
||||
filename.push_str(&format!("-{}", suffix));
|
||||
keyfile_path.set_file_name(&filename);
|
||||
}
|
||||
|
||||
// update account filename
|
||||
let original_account = account.clone();
|
||||
let mut account = account;
|
||||
account.filename = Some(filename.clone());
|
||||
account.filename = Some(filename);
|
||||
|
||||
{
|
||||
// Path to keyfile
|
||||
let mut keyfile_path = self.path.clone();
|
||||
keyfile_path.push(filename.as_str());
|
||||
|
||||
// save the file
|
||||
let mut file = fs::File::create(&keyfile_path)?;
|
||||
if let Err(err) = self.key_manager.write(original_account, &mut file).map_err(|e| Error::Custom(format!("{:?}", e))) {
|
||||
drop(file);
|
||||
fs::remove_file(keyfile_path).expect("Expected to remove recently created file");
|
||||
return Err(err);
|
||||
}
|
||||
|
||||
// write key content
|
||||
self.key_manager.write(original_account, &mut file).map_err(|e| Error::Custom(format!("{:?}", e)))?;
|
||||
|
||||
file.flush()?;
|
||||
|
||||
if let Err(_) = restrict_permissions_to_owner(keyfile_path.as_path()) {
|
||||
drop(file);
|
||||
fs::remove_file(keyfile_path).expect("Expected to remove recently created file");
|
||||
return Err(Error::Io(io::Error::last_os_error()));
|
||||
}
|
||||
|
||||
file.sync_all()?;
|
||||
}
|
||||
|
||||
Ok(account)
|
||||
@@ -199,17 +208,13 @@ impl<T> KeyDirectory for DiskDirectory<T> where T: KeyFileManager {
|
||||
|
||||
fn update(&self, account: SafeAccount) -> Result<SafeAccount, Error> {
|
||||
// Disk store handles updates correctly iff filename is the same
|
||||
self.insert(account)
|
||||
let filename = account_filename(&account);
|
||||
self.insert_with_filename(account, filename, false)
|
||||
}
|
||||
|
||||
fn insert(&self, account: SafeAccount) -> Result<SafeAccount, Error> {
|
||||
// build file path
|
||||
let filename = account.filename.as_ref().cloned().unwrap_or_else(|| {
|
||||
let timestamp = time::strftime("%Y-%m-%dT%H-%M-%S", &time::now_utc()).expect("Time-format string is valid.");
|
||||
format!("UTC--{}Z--{}", timestamp, Uuid::from(account.id))
|
||||
});
|
||||
|
||||
self.insert_with_filename(account, filename)
|
||||
let filename = account_filename(&account);
|
||||
self.insert_with_filename(account, filename, true)
|
||||
}
|
||||
|
||||
fn remove(&self, account: &SafeAccount) -> Result<(), Error> {
|
||||
@@ -285,6 +290,14 @@ impl KeyFileManager for DiskKeyFileManager {
|
||||
}
|
||||
}
|
||||
|
||||
fn account_filename(account: &SafeAccount) -> String {
|
||||
// build file path
|
||||
account.filename.clone().unwrap_or_else(|| {
|
||||
let timestamp = time::strftime("%Y-%m-%dT%H-%M-%S", &time::now_utc()).expect("Time-format string is valid.");
|
||||
format!("UTC--{}Z--{}", timestamp, Uuid::from(account.id))
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
extern crate tempdir;
|
||||
@@ -317,6 +330,38 @@ mod test {
|
||||
let _ = fs::remove_dir_all(dir);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_handle_duplicate_filenames() {
|
||||
// given
|
||||
let mut dir = env::temp_dir();
|
||||
dir.push("ethstore_should_handle_duplicate_filenames");
|
||||
let keypair = Random.generate().unwrap();
|
||||
let password = "hello world";
|
||||
let directory = RootDiskDirectory::create(dir.clone()).unwrap();
|
||||
|
||||
// when
|
||||
let account = SafeAccount::create(&keypair, [0u8; 16], password, 1024, "Test".to_owned(), "{}".to_owned());
|
||||
let filename = "test".to_string();
|
||||
let dedup = true;
|
||||
|
||||
directory.insert_with_filename(account.clone(), "foo".to_string(), dedup).unwrap();
|
||||
let file1 = directory.insert_with_filename(account.clone(), filename.clone(), dedup).unwrap().filename.unwrap();
|
||||
let file2 = directory.insert_with_filename(account.clone(), filename.clone(), dedup).unwrap().filename.unwrap();
|
||||
let file3 = directory.insert_with_filename(account.clone(), filename.clone(), dedup).unwrap().filename.unwrap();
|
||||
|
||||
// then
|
||||
// the first file should have the original names
|
||||
assert_eq!(file1, filename);
|
||||
|
||||
// the following duplicate files should have a suffix appended
|
||||
assert!(file2 != file3);
|
||||
assert_eq!(file2.len(), filename.len() + 5);
|
||||
assert_eq!(file3.len(), filename.len() + 5);
|
||||
|
||||
// cleanup
|
||||
let _ = fs::remove_dir_all(dir);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_manage_vaults() {
|
||||
// given
|
||||
|
||||
@@ -106,7 +106,7 @@ impl VaultDiskDirectory {
|
||||
fn copy_to_vault(&self, vault: &VaultDiskDirectory) -> Result<(), Error> {
|
||||
for account in self.load()? {
|
||||
let filename = account.filename.clone().expect("self is instance of DiskDirectory; DiskDirectory fills filename in load; qed");
|
||||
vault.insert_with_filename(account, filename)?;
|
||||
vault.insert_with_filename(account, filename, true)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -158,9 +158,14 @@ impl SecretStore for EthStore {
|
||||
self.insert_account(vault, keypair.secret().clone(), password)
|
||||
}
|
||||
|
||||
fn import_wallet(&self, vault: SecretVaultRef, json: &[u8], password: &str) -> Result<StoreAccountRef, Error> {
|
||||
fn import_wallet(&self, vault: SecretVaultRef, json: &[u8], password: &str, gen_id: bool) -> Result<StoreAccountRef, Error> {
|
||||
let json_keyfile = json::KeyFile::load(json).map_err(|_| Error::InvalidKeyFile("Invalid JSON format".to_owned()))?;
|
||||
let mut safe_account = SafeAccount::from_file(json_keyfile, None);
|
||||
|
||||
if gen_id {
|
||||
safe_account.id = Random::random();
|
||||
}
|
||||
|
||||
let secret = safe_account.crypto.secret(password).map_err(|_| Error::InvalidPassword)?;
|
||||
safe_account.address = KeyPair::from_secret(secret)?.address();
|
||||
self.store.import(vault, safe_account)
|
||||
|
||||
@@ -116,7 +116,7 @@ pub trait SecretStore: SimpleSecretStore {
|
||||
/// Imports presale wallet
|
||||
fn import_presale(&self, vault: SecretVaultRef, json: &[u8], password: &str) -> Result<StoreAccountRef, Error>;
|
||||
/// Imports existing JSON wallet
|
||||
fn import_wallet(&self, vault: SecretVaultRef, json: &[u8], password: &str) -> Result<StoreAccountRef, Error>;
|
||||
fn import_wallet(&self, vault: SecretVaultRef, json: &[u8], password: &str, gen_id: bool) -> Result<StoreAccountRef, Error>;
|
||||
/// Copies account between stores and vaults.
|
||||
fn copy_account(&self, new_store: &SimpleSecretStore, new_vault: SecretVaultRef, account: &StoreAccountRef, password: &str, new_password: &str) -> Result<(), Error>;
|
||||
/// Checks if password matches given account.
|
||||
|
||||
@@ -14,3 +14,4 @@ semver = "0.6"
|
||||
ethcore-ipc = { path = "../ipc/rpc" }
|
||||
ethcore-util = { path = "../util" }
|
||||
ethcore-bigint = { path = "../util/bigint" }
|
||||
parity-version = { path = "../util/version" }
|
||||
|
||||
@@ -20,6 +20,7 @@ extern crate semver;
|
||||
extern crate ethcore_util as util;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_ipc as ipc;
|
||||
extern crate parity_version as version;
|
||||
|
||||
mod types;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::fmt;
|
||||
use std::str::FromStr;
|
||||
use semver::{Version};
|
||||
use bigint::hash::H160;
|
||||
use util::misc::raw_package_info;
|
||||
use version::raw_package_info;
|
||||
use release_track::ReleaseTrack;
|
||||
|
||||
/// Version information of a particular release.
|
||||
|
||||
@@ -1 +1 @@
|
||||
// test script 11
|
||||
// test script 12
|
||||
|
||||
@@ -105,7 +105,7 @@ export function loadTokens (options = {}) {
|
||||
}
|
||||
|
||||
export function loadTokensBasics (tokenIndexes, options) {
|
||||
const limit = 64;
|
||||
const limit = 128;
|
||||
|
||||
return (dispatch, getState) => {
|
||||
const { api } = getState();
|
||||
@@ -154,7 +154,7 @@ export function loadTokensBasics (tokenIndexes, options) {
|
||||
|
||||
export function fetchTokens (_tokenIndexes) {
|
||||
const tokenIndexes = uniq(_tokenIndexes || []);
|
||||
const tokenChunks = chunk(tokenIndexes, 64);
|
||||
const tokenChunks = chunk(tokenIndexes, 128);
|
||||
|
||||
return (dispatch, getState) => {
|
||||
const { tokenReg } = Contracts.get();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { range } from 'lodash';
|
||||
import { chunk, range } from 'lodash';
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
import { hashToImageUrl } from '~/redux/util';
|
||||
@@ -58,23 +58,17 @@ export function fetchTokensBasics (api, tokenReg, start = 0, limit = 100) {
|
||||
return decodeArray(api, 'address[]', result);
|
||||
})
|
||||
.then((tokenAddresses) => {
|
||||
return tokenAddresses.map((tokenAddress, index) => {
|
||||
if (/^0x0*$/.test(tokenAddress)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return tokenAddresses.map((address, index) => {
|
||||
const tokenIndex = start + index;
|
||||
|
||||
return {
|
||||
address: tokenAddress,
|
||||
id: getTokenId(tokenAddress, tokenIndex),
|
||||
id: getTokenId(address, tokenIndex),
|
||||
address,
|
||||
index: tokenIndex,
|
||||
|
||||
fetched: false
|
||||
};
|
||||
});
|
||||
})
|
||||
.then((tokens) => tokens.filter((token) => token))
|
||||
.then((tokens) => {
|
||||
const randomAddress = sha3(`${Date.now()}`).substr(0, 42);
|
||||
|
||||
@@ -82,8 +76,19 @@ export function fetchTokensBasics (api, tokenReg, start = 0, limit = 100) {
|
||||
.then((_balances) => {
|
||||
const balances = _balances[randomAddress];
|
||||
|
||||
return tokens.filter(({ id }) => balances[id].eq(0));
|
||||
return tokens.map((token) => {
|
||||
if (balances[token.id] && balances[token.id].gt(0)) {
|
||||
token.address = null;
|
||||
}
|
||||
|
||||
return token;
|
||||
});
|
||||
});
|
||||
})
|
||||
.then((tokens) => {
|
||||
return tokens.filter(({ address }) => {
|
||||
return address && !/^0x0*$/.test(address);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -193,19 +198,22 @@ export function fetchAccountsBalances (api, tokens, updates) {
|
||||
});
|
||||
|
||||
const tokenPromise = Object.keys(tokenUpdates)
|
||||
.reduce((tokenPromise, accountAddress) => {
|
||||
.reduce((promises, accountAddress) => {
|
||||
const tokenIds = tokenUpdates[accountAddress];
|
||||
const updateTokens = tokens
|
||||
.filter((t) => tokenIds.includes(t.id));
|
||||
|
||||
return tokenPromise
|
||||
.then(() => fetchTokensBalances(api, updateTokens, [ accountAddress ]))
|
||||
.then((balances) => {
|
||||
tokensBalances[accountAddress] = balances[accountAddress];
|
||||
});
|
||||
}, Promise.resolve());
|
||||
promises.push(
|
||||
fetchTokensBalances(api, updateTokens, [ accountAddress ])
|
||||
.then((balances) => {
|
||||
tokensBalances[accountAddress] = balances[accountAddress];
|
||||
})
|
||||
);
|
||||
|
||||
return Promise.all([ ethPromise, tokenPromise ])
|
||||
return promises;
|
||||
}, []);
|
||||
|
||||
return Promise.all([ ethPromise, Promise.all(tokenPromise) ])
|
||||
.then(() => {
|
||||
const balances = Object.assign({}, tokensBalances);
|
||||
|
||||
@@ -241,29 +249,24 @@ function fetchEthBalances (api, accountAddresses) {
|
||||
});
|
||||
}
|
||||
|
||||
function fetchTokensBalances (api, tokens, accountAddresses) {
|
||||
const tokenAddresses = tokens.map((t) => t.address);
|
||||
const tokensBalancesCallData = encode(
|
||||
api,
|
||||
[ 'address[]', 'address[]' ],
|
||||
[ accountAddresses, tokenAddresses ]
|
||||
);
|
||||
function fetchTokensBalances (api, _tokens, accountAddresses) {
|
||||
const promises = chunk(_tokens, 128).map((tokens) => {
|
||||
const data = tokensBalancesBytecode + encode(
|
||||
api,
|
||||
[ 'address[]', 'address[]' ],
|
||||
[ accountAddresses, tokens.map(({ address }) => address) ]
|
||||
);
|
||||
|
||||
return api.eth
|
||||
.call({ data: tokensBalancesBytecode + tokensBalancesCallData })
|
||||
.then((result) => {
|
||||
const rawBalances = decodeArray(api, 'uint[]', result);
|
||||
return api.eth.call({ data }).then((result) => {
|
||||
const balances = {};
|
||||
const rawBalances = decodeArray(api, 'uint[]', result);
|
||||
|
||||
accountAddresses.forEach((accountAddress, accountIndex) => {
|
||||
const preIndex = accountIndex * tokens.length;
|
||||
const balance = {};
|
||||
const preIndex = accountIndex * tokenAddresses.length;
|
||||
|
||||
tokenAddresses.forEach((tokenAddress, tokenIndex) => {
|
||||
const index = preIndex + tokenIndex;
|
||||
const token = tokens[tokenIndex];
|
||||
|
||||
balance[token.id] = rawBalances[index];
|
||||
tokens.forEach((token, tokenIndex) => {
|
||||
balance[token.id] = rawBalances[preIndex + tokenIndex];
|
||||
});
|
||||
|
||||
balances[accountAddress] = balance;
|
||||
@@ -271,6 +274,31 @@ function fetchTokensBalances (api, tokens, accountAddresses) {
|
||||
|
||||
return balances;
|
||||
});
|
||||
});
|
||||
|
||||
return Promise.all(promises).then((results) => {
|
||||
return results.reduce((combined, result) => {
|
||||
Object
|
||||
.keys(result)
|
||||
.forEach((address) => {
|
||||
if (!combined[address]) {
|
||||
combined[address] = {};
|
||||
}
|
||||
|
||||
Object
|
||||
.keys(result[address])
|
||||
.forEach((token) => {
|
||||
const value = result[address][token];
|
||||
|
||||
if (value && value.gt(0)) {
|
||||
combined[address][token] = result[address][token];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return combined;
|
||||
}, {});
|
||||
});
|
||||
}
|
||||
|
||||
function getTokenId (...args) {
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
<key>OVERWRITE_PERMISSIONS</key>
|
||||
<false/>
|
||||
<key>VERSION</key>
|
||||
<string>1.8.8</string>
|
||||
<string>1.8.10</string>
|
||||
</dict>
|
||||
<key>UUID</key>
|
||||
<string>2DCD5B81-7BAF-4DA1-9251-6274B089FD36</string>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
!define DESCRIPTION "Fast, light, robust Ethereum implementation"
|
||||
!define VERSIONMAJOR 1
|
||||
!define VERSIONMINOR 8
|
||||
!define VERSIONBUILD 8
|
||||
!define VERSIONBUILD 10
|
||||
!define ARGS ""
|
||||
!define FIRST_START_ARGS "--mode=passive ui"
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ macro_rules! usage {
|
||||
use toml;
|
||||
use std::{fs, io, process, cmp};
|
||||
use std::io::{Read, Write};
|
||||
use util::version;
|
||||
use parity_version::version;
|
||||
use clap::{Arg, App, SubCommand, AppSettings, ArgSettings, Error as ClapError, ErrorKind as ClapErrorKind};
|
||||
use helpers::replace_home;
|
||||
use std::ffi::OsStr;
|
||||
|
||||
@@ -25,7 +25,8 @@ use cli::{Args, ArgsError};
|
||||
use hash::keccak;
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{version_data, Address};
|
||||
use util::Address;
|
||||
use parity_version::{version_data, version};
|
||||
use bytes::Bytes;
|
||||
use ansi_term::Colour;
|
||||
use ethsync::{NetworkConfiguration, is_valid_node_url};
|
||||
|
||||
@@ -73,6 +73,7 @@ extern crate parity_local_store as local_store;
|
||||
extern crate parity_reactor;
|
||||
extern crate parity_rpc;
|
||||
extern crate parity_updater as updater;
|
||||
extern crate parity_version;
|
||||
extern crate parity_whisper;
|
||||
extern crate path;
|
||||
extern crate rpc_cli;
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
use std::{str, fs, fmt};
|
||||
use std::time::Duration;
|
||||
use bigint::prelude::U256;
|
||||
use util::{Address, version_data};
|
||||
use util::Address;
|
||||
use util::journaldb::Algorithm;
|
||||
use parity_version::version_data;
|
||||
use ethcore::spec::{Spec, SpecParams};
|
||||
use ethcore::ethereum;
|
||||
use ethcore::client::Mode;
|
||||
|
||||
@@ -41,7 +41,7 @@ use parity_reactor::EventLoop;
|
||||
use parity_rpc::{NetworkSettings, informant, is_major_importing};
|
||||
use updater::{UpdatePolicy, Updater};
|
||||
use ansi_term::Colour;
|
||||
use util::version;
|
||||
use parity_version::version;
|
||||
use parking_lot::{Condvar, Mutex};
|
||||
use node_filter::NodeFilter;
|
||||
use util::journaldb::Algorithm;
|
||||
|
||||
@@ -54,6 +54,7 @@ fetch = { path = "../util/fetch" }
|
||||
node-health = { path = "../dapps/node-health" }
|
||||
parity-reactor = { path = "../util/reactor" }
|
||||
parity-updater = { path = "../updater" }
|
||||
parity-version = { path = "../util/version" }
|
||||
rlp = { path = "../util/rlp" }
|
||||
stats = { path = "../util/stats" }
|
||||
vm = { path = "../ethcore/vm" }
|
||||
|
||||
@@ -61,6 +61,7 @@ extern crate fetch;
|
||||
extern crate node_health;
|
||||
extern crate parity_reactor;
|
||||
extern crate parity_updater as updater;
|
||||
extern crate parity_version as version;
|
||||
extern crate rlp;
|
||||
extern crate stats;
|
||||
extern crate hash;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
use std::sync::Arc;
|
||||
use std::collections::{BTreeMap, HashSet};
|
||||
|
||||
use util::misc::version_data;
|
||||
use version::version_data;
|
||||
|
||||
use crypto::{ecies, DEFAULT_MAC};
|
||||
use ethkey::{Brain, Generator};
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::str::FromStr;
|
||||
use std::collections::{BTreeMap, HashSet};
|
||||
|
||||
use util::Address;
|
||||
use util::misc::version_data;
|
||||
use version::version_data;
|
||||
|
||||
use crypto::{DEFAULT_MAC, ecies};
|
||||
use ethkey::{Brain, Generator};
|
||||
|
||||
@@ -95,7 +95,7 @@ impl ParityAccounts for ParityAccountsClient {
|
||||
let store = self.account_provider()?;
|
||||
|
||||
store.import_presale(json.as_bytes(), &pass)
|
||||
.or_else(|_| store.import_wallet(json.as_bytes(), &pass))
|
||||
.or_else(|_| store.import_wallet(json.as_bytes(), &pass, true))
|
||||
.map(Into::into)
|
||||
.map_err(|e| errors::account("Could not create account.", e))
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Web3 rpc implementation.
|
||||
use hash::keccak;
|
||||
use jsonrpc_core::Error;
|
||||
use util::version;
|
||||
use version::version;
|
||||
use v1::traits::Web3;
|
||||
use v1::types::{H256, Bytes};
|
||||
|
||||
|
||||
@@ -234,14 +234,14 @@ fn rpc_parity_chain_id() {
|
||||
|
||||
#[test]
|
||||
fn rpc_parity_default_extra_data() {
|
||||
use util::misc;
|
||||
use version::version_data;
|
||||
use bytes::ToPretty;
|
||||
|
||||
let deps = Dependencies::new();
|
||||
let io = deps.default_client();
|
||||
|
||||
let request = r#"{"jsonrpc": "2.0", "method": "parity_defaultExtraData", "params": [], "id": 1}"#;
|
||||
let response = format!(r#"{{"jsonrpc":"2.0","result":"0x{}","id":1}}"#, misc::version_data().to_hex());
|
||||
let response = format!(r#"{{"jsonrpc":"2.0","result":"0x{}","id":1}}"#, version_data().to_hex());
|
||||
|
||||
assert_eq!(io.handle_request_sync(request), Some(response));
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ fn should_export_account() {
|
||||
// given
|
||||
let tester = setup();
|
||||
let wallet = r#"{"id":"6a186c80-7797-cff2-bc2e-7c1d6a6cc76e","version":3,"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"a1c6ff99070f8032ca1c4e8add006373"},"ciphertext":"df27e3db64aa18d984b6439443f73660643c2d119a6f0fa2fa9a6456fc802d75","kdf":"pbkdf2","kdfparams":{"c":10240,"dklen":32,"prf":"hmac-sha256","salt":"ddc325335cda5567a1719313e73b4842511f3e4a837c9658eeb78e51ebe8c815"},"mac":"3dc888ae79cbb226ff9c455669f6cf2d79be72120f2298f6cb0d444fddc0aa3d"},"address":"0042e5d2a662eeaca8a7e828c174f98f35d8925b","name":"parity-export-test","meta":"{\"passwordHint\":\"parity-export-test\",\"timestamp\":1490017814987}"}"#;
|
||||
tester.accounts.import_wallet(wallet.as_bytes(), "parity-export-test").unwrap();
|
||||
tester.accounts.import_wallet(wallet.as_bytes(), "parity-export-test", false).unwrap();
|
||||
let accounts = tester.accounts.accounts().unwrap();
|
||||
assert_eq!(accounts.len(), 1);
|
||||
|
||||
@@ -501,6 +501,26 @@ fn should_export_account() {
|
||||
assert_eq!(result, Some(response.into()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_import_wallet() {
|
||||
let tester = setup();
|
||||
|
||||
let id = "6a186c80-7797-cff2-bc2e-7c1d6a6cc76e";
|
||||
let request = r#"{"jsonrpc":"2.0","method":"parity_newAccountFromWallet","params":["{\"id\":\"<ID>\",\"version\":3,\"crypto\":{\"cipher\":\"aes-128-ctr\",\"cipherparams\":{\"iv\":\"478736fb55872c1baf01b27b1998c90b\"},\"ciphertext\":\"fe5a63cc0055d7b0b3b57886f930ad9b63f48950d1348145d95996c41e05f4e0\",\"kdf\":\"pbkdf2\",\"kdfparams\":{\"c\":10240,\"dklen\":32,\"prf\":\"hmac-sha256\",\"salt\":\"658436d6738a19731149a98744e5cf02c8d5aa1f8e80c1a43cc9351c70a984e4\"},\"mac\":\"c7384b26ecf25539d942030230062af9b69de5766cbcc4690bffce1536644631\"},\"address\":\"00bac56a8a27232baa044c03f43bf3648c961735\",\"name\":\"hello world\",\"meta\":\"{}\"}", "himom"],"id":1}"#;
|
||||
let request = request.replace("<ID>", id);
|
||||
let response = r#"{"jsonrpc":"2.0","result":"0x00bac56a8a27232baa044c03f43bf3648c961735","id":1}"#;
|
||||
|
||||
let res = tester.io.handle_request_sync(&request).unwrap();
|
||||
|
||||
assert_eq!(res, response);
|
||||
|
||||
let account_meta = tester.accounts.account_meta("0x00bac56a8a27232baa044c03f43bf3648c961735".into()).unwrap();
|
||||
let account_uuid: String = account_meta.uuid.unwrap().into();
|
||||
|
||||
// the RPC should import the account with a new id
|
||||
assert!(account_uuid != id);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_sign_message() {
|
||||
let tester = setup();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use jsonrpc_core::IoHandler;
|
||||
use util::version;
|
||||
use version::version;
|
||||
use v1::{Web3, Web3Client};
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#!/bin/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
|
||||
./parity import blocks.rlp --chain chain.json
|
||||
./parity restore snap --chain chain.json
|
||||
echo "Aura test complete"
|
||||
|
||||
@@ -2,16 +2,18 @@
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
#ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags
|
||||
#ARGUMENTS: 1. BUILD_PLATFORM (target for binaries) 2. PLATFORM (target for cargo) 3. ARC (architecture) 4. & 5. CC & CXX flags 6. binary identifier
|
||||
BUILD_PLATFORM=$1
|
||||
PLATFORM=$2
|
||||
ARC=$3
|
||||
CC=$4
|
||||
CXX=$5
|
||||
VER="$(grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")"
|
||||
IDENT=$6
|
||||
VER="$(grep -m 1 "version =" Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")"
|
||||
S3WIN=""
|
||||
echo "--------------------"
|
||||
echo "Build for platform: " $BUILD_PLATFORM
|
||||
echo "Build identifier: " $IDENT
|
||||
echo "Cargo target: " $PLATFORM
|
||||
echo "CC&CXX flags: " $CC ", " $CXX
|
||||
echo "Architecture: " $ARC
|
||||
@@ -20,6 +22,14 @@ echo "Parity version: " $VER
|
||||
echo "Branch: " $CI_BUILD_REF_NAME
|
||||
echo "--------------------"
|
||||
|
||||
echo "Rhash version:"
|
||||
# NOTE for md5 and sha256 we want to display filename as well
|
||||
# hence we use --* instead of -p *
|
||||
MD5_BIN="rhash --md5"
|
||||
SHA256_BIN="rhash --sha256"
|
||||
# NOTE For SHA3 we need only hash (hence -p)
|
||||
SHA3_BIN="rhash -p %{sha3-256}"
|
||||
|
||||
set_env () {
|
||||
echo "Set ENVIROMENT"
|
||||
export HOST_CC=gcc
|
||||
@@ -50,21 +60,34 @@ build () {
|
||||
echo "Build ethkey-cli:"
|
||||
cargo build --target $PLATFORM --release -p ethkey-cli
|
||||
}
|
||||
strip_md5 () {
|
||||
strip_binaries () {
|
||||
echo "Strip binaries:"
|
||||
$STRIP_BIN -v target/$PLATFORM/release/parity
|
||||
$STRIP_BIN -v target/$PLATFORM/release/parity-evm
|
||||
$STRIP_BIN -v target/$PLATFORM/release/ethstore
|
||||
$STRIP_BIN -v target/$PLATFORM/release/ethkey;
|
||||
export SHA3=$(rhash --sha3-256 target/$PLATFORM/release/parity -p %h)
|
||||
}
|
||||
calculate_checksums () {
|
||||
echo "Checksum calculation:"
|
||||
rhash --version
|
||||
rm -rf *.md5
|
||||
export SHA3=$(rhash --sha3-256 target/$PLATFORM/release/parity -p %h)
|
||||
echo "Parity file SHA3:" $SHA3
|
||||
md5sum target/$PLATFORM/release/parity > parity.md5
|
||||
md5sum target/$PLATFORM/release/parity-evm > parity-evm.md5
|
||||
md5sum target/$PLATFORM/release/ethstore > ethstore.md5
|
||||
md5sum target/$PLATFORM/release/ethkey > ethkey.md5
|
||||
rm -rf *.sha256
|
||||
|
||||
export SHA3="$($SHA3_BIN target/$PLATFORM/release/parity$S3WIN)"
|
||||
# NOTE rhash 1.3.1 doesnt support keccak, workaround
|
||||
if [ "$SHA3" == "%{sha3-256}" ]; then
|
||||
export SHA3="$(target/$PLATFORM/release/parity$S3WIN tools hash target/$PLATFORM/release/parity$S3WIN)"
|
||||
fi
|
||||
|
||||
echo "Parity file SHA3: $SHA3"
|
||||
$MD5_BIN target/$PLATFORM/release/parity$S3WIN > parity$S3WIN.md5
|
||||
$SHA256_BIN target/$PLATFORM/release/parity$S3WIN > parity$S3WIN.sha256
|
||||
$MD5_BIN target/$PLATFORM/release/parity-evm$S3WIN > parity-evm$S3WIN.md5
|
||||
$SHA256_BIN target/$PLATFORM/release/parity-evm$S3WIN > parity-evm$S3WIN.sha256
|
||||
$MD5_BIN target/$PLATFORM/release/ethstore$S3WIN > ethstore$S3WIN.md5
|
||||
$SHA256_BIN target/$PLATFORM/release/ethstore$S3WIN > ethstore$S3WIN.sha256
|
||||
$MD5_BIN target/$PLATFORM/release/ethkey$S3WIN > ethkey$S3WIN.md5
|
||||
$SHA256_BIN target/$PLATFORM/release/ethkey$S3WIN > ethkey$S3WIN.sha256
|
||||
}
|
||||
make_deb () {
|
||||
rm -rf deb
|
||||
@@ -98,8 +121,9 @@ make_deb () {
|
||||
cp target/$PLATFORM/release/parity-evm deb/usr/bin/parity-evm
|
||||
cp target/$PLATFORM/release/ethstore deb/usr/bin/ethstore
|
||||
cp target/$PLATFORM/release/ethkey deb/usr/bin/ethkey
|
||||
dpkg-deb -b deb "parity_"$VER"_"$ARC".deb"
|
||||
md5sum "parity_"$VER"_"$ARC".deb" > "parity_"$VER"_"$ARC".deb.md5"
|
||||
dpkg-deb -b deb "parity_"$VER"_"$IDENT"_"$ARC".deb"
|
||||
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC".deb" > "parity_"$VER"_"$IDENT"_"$ARC".deb.md5"
|
||||
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC".deb" > "parity_"$VER"_"$IDENT"_"$ARC".deb.sha256"
|
||||
}
|
||||
make_rpm () {
|
||||
rm -rf /install
|
||||
@@ -108,9 +132,12 @@ make_rpm () {
|
||||
cp target/$PLATFORM/release/parity-evm /install/usr/bin/parity-evm
|
||||
cp target/$PLATFORM/release/ethstore /install/usr/bin/ethstore
|
||||
cp target/$PLATFORM/release/ethkey /install/usr/bin/ethkey
|
||||
|
||||
rm -rf "parity-"$VER"-1."$ARC".rpm" || true
|
||||
fpm -s dir -t rpm -n parity -v $VER --epoch 1 --license GPLv3 -d openssl --provides parity --url https://parity.io --vendor "Parity Technologies" -a x86_64 -m "<devops@parity.io>" --description "Ethereum network client by Parity Technologies" -C /install/
|
||||
cp "parity-"$VER"-1."$ARC".rpm" "parity_"$VER"_"$ARC".rpm"
|
||||
md5sum "parity_"$VER"_"$ARC".rpm" > "parity_"$VER"_"$ARC".rpm.md5"
|
||||
cp "parity-"$VER"-1."$ARC".rpm" "parity_"$VER"_"$IDENT"_"$ARC".rpm"
|
||||
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC".rpm" > "parity_"$VER"_"$IDENT"_"$ARC".rpm.md5"
|
||||
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC".rpm" > "parity_"$VER"_"$IDENT"_"$ARC".rpm.sha256"
|
||||
}
|
||||
make_pkg () {
|
||||
echo "make PKG"
|
||||
@@ -123,19 +150,14 @@ make_pkg () {
|
||||
cd ..
|
||||
packagesbuild -v mac/Parity.pkgproj
|
||||
productsign --sign 'Developer ID Installer: PARITY TECHNOLOGIES LIMITED (P2PX3JU8FT)' target/release/Parity\ Ethereum.pkg target/release/Parity\ Ethereum-signed.pkg
|
||||
mv target/release/Parity\ Ethereum-signed.pkg "parity_"$VER"_"$ARC".pkg"
|
||||
md5sum "parity_"$VER"_"$ARC"."$EXT >> "parity_"$VER"_"$ARC".pkg.md5"
|
||||
mv target/release/Parity\ Ethereum-signed.pkg "parity_"$VER"_"$IDENT"_"$ARC".pkg"
|
||||
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT >> "parity_"$VER"_"$IDENT"_"$ARC".pkg.md5"
|
||||
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT >> "parity_"$VER"_"$IDENT"_"$ARC".pkg.sha256"
|
||||
}
|
||||
sign_exe () {
|
||||
./sign.cmd $keyfile $certpass "target/$PLATFORM/release/parity.exe"
|
||||
}
|
||||
make_exe () {
|
||||
./sign.cmd $keyfile $certpass "target/$PLATFORM/release/parity.exe"
|
||||
SHA3=$(rhash --sha3-256 target/$PLATFORM/release/parity.exe -p %h)
|
||||
echo "Checksum calculation:"
|
||||
rm -rf *.md5
|
||||
echo "Parity file SHA3:" $SHA3
|
||||
rhash --md5 target/$PLATFORM/release/parity.exe -p %h > parity.exe.md5
|
||||
rhash --md5 target/$PLATFORM/release/parity-evm.exe -p %h > parity-evm.exe.md5
|
||||
rhash --md5 target/$PLATFORM/release/ethstore.exe -p %h > ethstore.exe.md5
|
||||
rhash --md5 target/$PLATFORM/release/ethkey.exe -p %h > ethkey.exe.md5
|
||||
./msbuild.cmd
|
||||
./sign.cmd $keyfile $certpass windows/ptray/x64/release/ptray.exe
|
||||
cd nsis
|
||||
@@ -143,9 +165,10 @@ make_exe () {
|
||||
echo "makensis.exe installer.nsi" > nsis.cmd
|
||||
./nsis.cmd
|
||||
cd ..
|
||||
cp nsis/installer.exe "parity_"$VER"_"$ARC"."$EXT
|
||||
./sign.cmd $keyfile $certpass "parity_"$VER"_"$ARC"."$EXT
|
||||
rhash --md5 "parity_"$VER"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$ARC"."$EXT".md5"
|
||||
cp nsis/installer.exe "parity_"$VER"_"$IDENT"_"$ARC"."$EXT
|
||||
./sign.cmd $keyfile $certpass "parity_"$VER"_"$IDENT"_"$ARC"."$EXT
|
||||
$MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5"
|
||||
$SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256"
|
||||
}
|
||||
push_binaries () {
|
||||
echo "Push binaries to AWS S3"
|
||||
@@ -160,25 +183,36 @@ push_binaries () {
|
||||
aws s3 rm --recursive s3://$S3_BUCKET/$CI_BUILD_REF_NAME/$BUILD_PLATFORM
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity$S3WIN --body target/$PLATFORM/release/parity$S3WIN
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity$S3WIN.md5 --body parity$S3WIN.md5
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity$S3WIN.sha256 --body parity$S3WIN.sha256
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity-evm$S3WIN --body target/$PLATFORM/release/parity-evm$S3WIN
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity-evm$S3WIN.md5 --body parity-evm$S3WIN.md5
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/parity-evm$S3WIN.sha256 --body parity-evm$S3WIN.sha256
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethstore$S3WIN --body target/$PLATFORM/release/ethstore$S3WIN
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethstore$S3WIN.md5 --body ethstore$S3WIN.md5
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethstore$S3WIN.sha256 --body ethstore$S3WIN.sha256
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN --body target/$PLATFORM/release/ethkey$S3WIN
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN.md5 --body ethkey$S3WIN.md5
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$ARC"."$EXT --body "parity_"$VER"_"$ARC"."$EXT
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$ARC"."$EXT".md5" --body "parity_"$VER"_"$ARC"."$EXT".md5"
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/ethkey$S3WIN.sha256 --body ethkey$S3WIN.sha256
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5"
|
||||
aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256"
|
||||
}
|
||||
make_archive () {
|
||||
echo "add artifacts to archive"
|
||||
rm -rf parity.zip
|
||||
zip -r parity.zip target/$PLATFORM/release/parity$S3WIN target/$PLATFORM/release/parity-evm$S3WIN target/$PLATFORM/release/ethstore$S3WIN target/$PLATFORM/release/ethkey$S3WIN parity$S3WIN.md5 parity-evm$S3WIN.md5 ethstore$S3WIN.md5 ethkey$S3WIN.md5
|
||||
zip -r parity.zip target/$PLATFORM/release/parity$S3WIN target/$PLATFORM/release/parity-evm$S3WIN target/$PLATFORM/release/ethstore$S3WIN target/$PLATFORM/release/ethkey$S3WIN parity$S3WIN.md5 parity-evm$S3WIN.md5 ethstore$S3WIN.md5 ethkey$S3WIN.md5 parity$S3WIN.sha256 parity-evm$S3WIN.sha256 ethstore$S3WIN.sha256 ethkey$S3WIN.sha256
|
||||
}
|
||||
push_release () {
|
||||
|
||||
updater_push_release () {
|
||||
echo "push release"
|
||||
curl --data "commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity&secret=$RELEASES_SECRET" http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$PLATFORM
|
||||
curl --data "commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity&secret=$RELEASES_SECRET" http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$PLATFORM
|
||||
|
||||
DATA="commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity$S3WIN&secret=$RELEASES_SECRET"
|
||||
# Mainnet
|
||||
source scripts/safe_curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$BUILD_PLATFORM"
|
||||
# Kovan
|
||||
source scripts/safe_curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$BUILD_PLATFORM"
|
||||
}
|
||||
|
||||
case $BUILD_PLATFORM in
|
||||
x86_64-unknown-linux-gnu)
|
||||
#set strip bin
|
||||
@@ -186,11 +220,12 @@ case $BUILD_PLATFORM in
|
||||
#package extention
|
||||
EXT="deb"
|
||||
build
|
||||
strip_md5
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_deb
|
||||
make_archive
|
||||
push_binaries
|
||||
push_release
|
||||
updater_push_release
|
||||
;;
|
||||
x86_64-unknown-debian-gnu)
|
||||
STRIP_BIN="strip"
|
||||
@@ -198,95 +233,118 @@ case $BUILD_PLATFORM in
|
||||
LIBSSL="libssl1.1 (>=1.1.0)"
|
||||
echo "Use libssl1.1 (>=1.1.0) for Debian builds"
|
||||
build
|
||||
strip_md5
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_deb
|
||||
make_archive
|
||||
push_binaries
|
||||
push_release
|
||||
;;
|
||||
x86_64-unknown-centos-gnu)
|
||||
STRIP_BIN="strip"
|
||||
EXT="rpm"
|
||||
build
|
||||
strip_md5
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_rpm
|
||||
make_archive
|
||||
push_binaries
|
||||
push_release
|
||||
;;
|
||||
i686-unknown-linux-gnu)
|
||||
STRIP_BIN="strip"
|
||||
EXT="deb"
|
||||
set_env
|
||||
build
|
||||
strip_md5
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_deb
|
||||
make_archive
|
||||
push_binaries
|
||||
push_release
|
||||
;;
|
||||
armv7-unknown-linux-gnueabihf)
|
||||
STRIP_BIN="arm-linux-gnueabihf-strip"
|
||||
EXT="deb"
|
||||
set_env
|
||||
build
|
||||
strip_md5
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_deb
|
||||
make_archive
|
||||
push_binaries
|
||||
push_release
|
||||
;;
|
||||
arm-unknown-linux-gnueabihf)
|
||||
STRIP_BIN="arm-linux-gnueabihf-strip"
|
||||
EXT="deb"
|
||||
set_env
|
||||
build
|
||||
strip_md5
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_deb
|
||||
make_archive
|
||||
push_binaries
|
||||
push_release
|
||||
;;
|
||||
aarch64-unknown-linux-gnu)
|
||||
STRIP_BIN="aarch64-linux-gnu-strip"
|
||||
EXT="deb"
|
||||
set_env
|
||||
build
|
||||
strip_md5
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_deb
|
||||
make_archive
|
||||
push_binaries
|
||||
push_release
|
||||
;;
|
||||
x86_64-apple-darwin)
|
||||
STRIP_BIN="strip"
|
||||
PLATFORM="x86_64-apple-darwin"
|
||||
EXT="pkg"
|
||||
build
|
||||
strip_md5
|
||||
strip_binaries
|
||||
calculate_checksums
|
||||
make_pkg
|
||||
make_archive
|
||||
push_binaries
|
||||
push_release
|
||||
updater_push_release
|
||||
;;
|
||||
x86_64-unknown-snap-gnu)
|
||||
cd snap
|
||||
ARC="amd64"
|
||||
EXT="snap"
|
||||
rm -rf *snap
|
||||
sed -i 's/master/'"$VER"'/g' snapcraft.yaml
|
||||
snapcraft
|
||||
cp "parity_"$CI_BUILD_REF_NAME"_amd64.snap" "parity_"$VER"_amd64.snap"
|
||||
md5sum "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5"
|
||||
push_binaries
|
||||
apt install -y expect zip rhash
|
||||
snapcraft clean
|
||||
echo "Prepare snapcraft.yaml for build on Gitlab CI in Docker image"
|
||||
sed -i 's/git/'"$VER"'/g' snap/snapcraft.yaml
|
||||
if [[ "$CI_BUILD_REF_NAME" = "stable" || "$VER" == *1.8* ]];
|
||||
then
|
||||
sed -i -e 's/grade: devel/grade: stable/' snap/snapcraft.yaml;
|
||||
fi
|
||||
mv -f snap/snapcraft.yaml snapcraft.yaml
|
||||
snapcraft -d
|
||||
snapcraft_login=$(expect -c "
|
||||
spawn snapcraft login
|
||||
expect \"Email:\"
|
||||
send \"$SNAP_EMAIL\n\"
|
||||
expect \"Password:\"
|
||||
send \"$SNAP_PASS\n\"
|
||||
expect \"\$\"
|
||||
")
|
||||
echo "$snapcraft_login"
|
||||
snapcraft push "parity_"$VER"_amd64.snap"
|
||||
snapcraft status parity
|
||||
snapcraft logout
|
||||
$MD5_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.md5"
|
||||
$SHA256_BIN "parity_"$VER"_amd64.snap" > "parity_"$VER"_amd64.snap.sha256"
|
||||
echo "add artifacts to archive"
|
||||
rm -rf parity.zip
|
||||
zip -r parity.zip "parity_"$VER"_amd64.snap" "parity_"$VER"_amd64.snap.md5" "parity_"$VER"_amd64.snap.sha256"
|
||||
;;
|
||||
x86_64-pc-windows-msvc)
|
||||
set_env_win
|
||||
EXT="exe"
|
||||
S3WIN=".exe"
|
||||
build
|
||||
sign_exe
|
||||
calculate_checksums
|
||||
make_exe
|
||||
make_archive
|
||||
push_binaries
|
||||
push_release
|
||||
updater_push_release
|
||||
esac
|
||||
|
||||
12
scripts/gitlab-push-release.sh
Executable file
12
scripts/gitlab-push-release.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
|
||||
DATA="secret=$RELEASES_SECRET"
|
||||
|
||||
echo "Pushing release to Mainnet"
|
||||
./scripts/safe_curl.sh $DATA "http://update.parity.io:1337/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF"
|
||||
|
||||
echo "Pushing release to Kovan"
|
||||
./scripts/safe_curl.sh $DATA "http://update.parity.io:1338/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF"
|
||||
@@ -23,11 +23,12 @@ rust_test () {
|
||||
rustup show
|
||||
if [[ "${RUST_FILES_MODIFIED}" == "0" ]];
|
||||
then echo "Skipping Rust tests since no Rust files modified.";
|
||||
else ./test.sh;
|
||||
fi
|
||||
if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]];
|
||||
then sh scripts/aura-test.sh;
|
||||
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
|
||||
}
|
||||
js_test () {
|
||||
git submodule update --init --recursive
|
||||
|
||||
20
scripts/safe_curl.sh
Executable file
20
scripts/safe_curl.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DATA=$1
|
||||
ADDRESS=$2
|
||||
|
||||
CODE=$(curl -o out.txt -w '%{http_code}' --data $DATA $ADDRESS)
|
||||
cat out.txt && rm out.txt
|
||||
echo "\n"
|
||||
|
||||
if [[ $CODE -eq 200 ]]; then
|
||||
echo 'Pushed to updater service.';
|
||||
elif [[ $CODE -eq 202 ]]; then
|
||||
echo 'Updater service ignored request.';
|
||||
else
|
||||
echo 'Unable to push info to updater service.';
|
||||
exit 2
|
||||
fi
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
name: parity
|
||||
version: master
|
||||
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.
|
||||
|
||||
grade: devel
|
||||
confinement: strict
|
||||
|
||||
apps:
|
||||
parity:
|
||||
command: parity
|
||||
plugs: [network, network-bind]
|
||||
|
||||
parts:
|
||||
parity:
|
||||
source: ..
|
||||
plugin: rust
|
||||
build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config]
|
||||
BIN
snap/gui/icon.png
Normal file
BIN
snap/gui/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
8
snap/gui/parity.desktop
Normal file
8
snap/gui/parity.desktop
Normal file
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
Name=parity
|
||||
Comment=Fast, light, robust Ethereum implementation
|
||||
Exec=parity
|
||||
Icon=/usr/share/pixmaps/icon.png
|
||||
Terminal=true
|
||||
@@ -13,10 +13,27 @@ confinement: strict
|
||||
apps:
|
||||
parity:
|
||||
command: parity
|
||||
plugs: [network, network-bind]
|
||||
plugs: [home, network, network-bind, mount-observe, x11, unity7, desktop, desktop-legacy, wayland]
|
||||
desktop: usr/share/applications/parity.desktop
|
||||
|
||||
icon: snap/gui/icon.png
|
||||
|
||||
parts:
|
||||
desktop-icon:
|
||||
source: ./snap
|
||||
plugin: nil
|
||||
prepare: |
|
||||
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: .
|
||||
plugin: rust
|
||||
build-attributes: [no-system-libraries]
|
||||
build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config]
|
||||
stage-packages: [libc6, libssl1.0.0, libudev1, libstdc++6]
|
||||
df:
|
||||
plugin: nil
|
||||
stage-packages: [coreutils]
|
||||
stage: [bin/df]
|
||||
|
||||
@@ -24,4 +24,5 @@ parity-hash-fetch = { path = "../hash-fetch" }
|
||||
ipc-common-types = { path = "../ipc-common-types" }
|
||||
ethcore-ipc = { path = "../ipc/rpc" }
|
||||
parity-reactor = { path = "../util/reactor" }
|
||||
parity-version = { path = "../util/version" }
|
||||
path = { path = "../util/path" }
|
||||
|
||||
@@ -30,6 +30,7 @@ extern crate ethcore_ipc as ipc;
|
||||
extern crate futures;
|
||||
extern crate target_info;
|
||||
extern crate parity_reactor;
|
||||
extern crate parity_version as version;
|
||||
extern crate path;
|
||||
|
||||
mod updater;
|
||||
|
||||
68
updater/src/types/version_info.rs
Normal file
68
updater/src/types/version_info.rs
Normal file
@@ -0,0 +1,68 @@
|
||||
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Types used in the public API
|
||||
|
||||
use std::fmt;
|
||||
use semver::{Version};
|
||||
use bigint::hash::H160;
|
||||
use version::raw_package_info;
|
||||
use types::ReleaseTrack;
|
||||
|
||||
/// Version information of a particular release.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct VersionInfo {
|
||||
/// The track on which it was released.
|
||||
pub track: ReleaseTrack,
|
||||
/// The version.
|
||||
pub version: Version,
|
||||
/// The (SHA1?) 160-bit hash of this build's code base.
|
||||
pub hash: H160,
|
||||
}
|
||||
|
||||
impl fmt::Display for VersionInfo {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
write!(f, "{}.{}.{}-{}-{}", self.version.major, self.version.minor, self.version.patch, self.track, self.hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl VersionInfo {
|
||||
/// Get information for this (currently running) binary.
|
||||
pub fn this() -> Self {
|
||||
let raw = raw_package_info();
|
||||
VersionInfo {
|
||||
track: raw.0.into(),
|
||||
version: { let mut v = Version::parse(raw.1).expect("Environment variables are known to be valid; qed"); v.build = vec![]; v.pre = vec![]; v },
|
||||
hash: raw.2.parse::<H160>().unwrap_or_else(|_| H160::zero()),
|
||||
}
|
||||
}
|
||||
|
||||
/// Compose the information from the provided raw fields.
|
||||
pub fn from_raw(semver: u32, track: u8, hash: H160) -> Self {
|
||||
let t = track.into();
|
||||
VersionInfo {
|
||||
version: Version {
|
||||
major: (semver >> 16) as u64,
|
||||
minor: ((semver >> 8) & 0xff) as u64,
|
||||
patch: (semver & 0xff) as u64,
|
||||
build: vec![],
|
||||
pre: vec![],
|
||||
},
|
||||
track: t,
|
||||
hash: hash,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ use bigint::hash::{H160, H256};
|
||||
use util::Address;
|
||||
use bytes::Bytes;
|
||||
use parking_lot::Mutex;
|
||||
use util::misc;
|
||||
use version;
|
||||
|
||||
/// Filter for releases.
|
||||
#[derive(Debug, Eq, PartialEq, Clone)]
|
||||
@@ -116,7 +116,7 @@ fn platform() -> String {
|
||||
} else if cfg!(target_os = "linux") {
|
||||
format!("{}-unknown-linux-gnu", Target::arch())
|
||||
} else {
|
||||
misc::platform()
|
||||
version::platform()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,8 @@ description = "Ethcore utility library"
|
||||
homepage = "http://parity.io"
|
||||
license = "GPL-3.0"
|
||||
name = "ethcore-util"
|
||||
version = "1.8.8"
|
||||
version = "1.8.10"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
log = "0.3"
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
extern crate vergen;
|
||||
extern crate rustc_version;
|
||||
|
||||
use vergen::*;
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
vergen(OutputFns::all()).unwrap();
|
||||
let out_dir = env::var("OUT_DIR").unwrap();
|
||||
let dest_path = Path::new(&out_dir).join("rustc_version.rs");
|
||||
let mut f = File::create(&dest_path).unwrap();
|
||||
f.write_all(format!("
|
||||
/// Returns compiler version.
|
||||
pub fn rustc_version() -> &'static str {{
|
||||
\"{}\"
|
||||
}}
|
||||
", rustc_version::version()).as_bytes()).unwrap();
|
||||
}
|
||||
@@ -36,6 +36,7 @@ hash = { path = "../hash" }
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
serde_derive = "1.0"
|
||||
parity-version = { path = "../version" }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
@@ -30,7 +30,7 @@ use mio::*;
|
||||
use mio::deprecated::{EventLoop};
|
||||
use mio::tcp::*;
|
||||
use bigint::hash::*;
|
||||
use util::version;
|
||||
use version::version;
|
||||
use rlp::*;
|
||||
use session::{Session, SessionInfo, SessionData};
|
||||
use error::*;
|
||||
|
||||
@@ -82,6 +82,7 @@ extern crate ipnetwork;
|
||||
extern crate hash;
|
||||
extern crate serde;
|
||||
extern crate serde_json;
|
||||
extern crate parity_version as version;
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
[package]
|
||||
name = "semantic_version"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
@@ -1,47 +0,0 @@
|
||||
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Semantic version formatting and comparing.
|
||||
|
||||
/// A version value with strict meaning. Use `as_u32` to convert to a simple integer.
|
||||
///
|
||||
/// # Example
|
||||
/// ```
|
||||
/// extern crate semantic_version;
|
||||
/// use semantic_version::*;
|
||||
///
|
||||
/// fn main() {
|
||||
/// assert_eq!(SemanticVersion::new(1, 2, 3).as_u32(), 0x010203);
|
||||
/// }
|
||||
/// ```
|
||||
pub struct SemanticVersion {
|
||||
/// Major version - API/feature removals & breaking changes.
|
||||
pub major: u8,
|
||||
/// Minor version - API/feature additions.
|
||||
pub minor: u8,
|
||||
/// Tiny version - bug fixes.
|
||||
pub tiny: u8,
|
||||
}
|
||||
|
||||
impl SemanticVersion {
|
||||
/// Create a new object.
|
||||
pub fn new(major: u8, minor: u8, tiny: u8) -> SemanticVersion { SemanticVersion{major: major, minor: minor, tiny: tiny} }
|
||||
|
||||
/// Convert to a `u32` representation.
|
||||
pub fn as_u32(&self) -> u32 { ((self.major as u32) << 16) + ((self.minor as u32) << 8) + self.tiny as u32 }
|
||||
}
|
||||
|
||||
// TODO: implement Eq, Comparison and Debug/Display for SemanticVersion.
|
||||
@@ -87,6 +87,7 @@
|
||||
//! cargo build --release
|
||||
//! ```
|
||||
|
||||
extern crate util_error as error;
|
||||
extern crate rustc_hex;
|
||||
extern crate rocksdb;
|
||||
extern crate env_logger;
|
||||
@@ -106,9 +107,7 @@ extern crate ethcore_logger;
|
||||
extern crate hash as keccak;
|
||||
extern crate hashdb;
|
||||
extern crate memorydb;
|
||||
extern crate patricia_trie as trie;
|
||||
extern crate kvdb;
|
||||
extern crate util_error as error;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate kvdb_memorydb;
|
||||
@@ -116,12 +115,10 @@ extern crate kvdb_memorydb;
|
||||
#[macro_use]
|
||||
extern crate log as rlog;
|
||||
|
||||
pub mod misc;
|
||||
pub mod overlaydb;
|
||||
pub mod journaldb;
|
||||
pub mod cache;
|
||||
|
||||
pub use misc::*;
|
||||
pub use hashdb::*;
|
||||
pub use memorydb::MemoryDB;
|
||||
pub use overlaydb::*;
|
||||
|
||||
35
util/version/Cargo.toml
Normal file
35
util/version/Cargo.toml
Normal file
@@ -0,0 +1,35 @@
|
||||
# NOTE This file is used by the auto-updater service.
|
||||
# Make sure to update the service if it's moved or the structure is changed.
|
||||
[package]
|
||||
name = "parity-version"
|
||||
# NOTE: this value is used for Parity version string (via env CARGO_PKG_VERSION)
|
||||
version = "1.8.10"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
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 = "stable"
|
||||
|
||||
# Indicates a critical release in this track (i.e. consensus issue)
|
||||
critical = false
|
||||
|
||||
# Latest supported fork blocks for various networks. Used ONLY by auto-updater.
|
||||
[package.metadata.forks]
|
||||
foundation = 4370000
|
||||
ropsten = 10
|
||||
kovan = 5067000
|
||||
|
||||
[dependencies]
|
||||
ethcore-bytes = { path = "../bytes" }
|
||||
rlp = { path = "../rlp" }
|
||||
target_info = "0.1"
|
||||
|
||||
[build-dependencies]
|
||||
vergen = "0.1"
|
||||
rustc_version = "0.1.0"
|
||||
toml = "0.4"
|
||||
|
||||
[features]
|
||||
final = []
|
||||
57
util/version/build.rs
Normal file
57
util/version/build.rs
Normal file
@@ -0,0 +1,57 @@
|
||||
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
extern crate rustc_version;
|
||||
extern crate toml;
|
||||
extern crate vergen;
|
||||
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::path::Path;
|
||||
use vergen::{vergen, OutputFns};
|
||||
|
||||
const ERROR_MSG: &'static str = "Failed to generate metadata files";
|
||||
|
||||
fn main() {
|
||||
vergen(OutputFns::all()).expect(ERROR_MSG);
|
||||
|
||||
let version = rustc_version::version();
|
||||
|
||||
let cargo: toml::Value = toml::from_str(include_str!("./Cargo.toml")).expect(ERROR_MSG);
|
||||
let track = cargo["package"]["metadata"]["track"].as_str().expect("'track' has to be a string!");
|
||||
|
||||
create_file("meta.rs", format!("
|
||||
/// This versions track.
|
||||
#[allow(unused)]
|
||||
pub const TRACK: &str = {track:?};
|
||||
|
||||
/// Returns compiler version.
|
||||
pub fn rustc_version() -> &'static str {{
|
||||
\"{version}\"
|
||||
}}
|
||||
",
|
||||
track = track,
|
||||
version = version,
|
||||
));
|
||||
}
|
||||
|
||||
fn create_file(filename: &str, data: String) {
|
||||
let out_dir = env::var("OUT_DIR").expect(ERROR_MSG);
|
||||
let dest_path = Path::new(&out_dir).join(filename);
|
||||
let mut f = File::create(&dest_path).expect(ERROR_MSG);
|
||||
f.write_all(data.as_bytes()).expect(ERROR_MSG);
|
||||
}
|
||||
@@ -14,32 +14,33 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Diff misc.
|
||||
//! Parity version specific information.
|
||||
|
||||
extern crate target_info;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate rlp;
|
||||
|
||||
use rlp::RlpStream;
|
||||
use target_info::Target;
|
||||
use bytes::Bytes;
|
||||
use rlp::RlpStream;
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/version.rs"));
|
||||
include!(concat!(env!("OUT_DIR"), "/rustc_version.rs"));
|
||||
mod vergen {
|
||||
#![allow(unused)]
|
||||
include!(concat!(env!("OUT_DIR"), "/version.rs"));
|
||||
}
|
||||
|
||||
mod generated {
|
||||
include!(concat!(env!("OUT_DIR"), "/meta.rs"));
|
||||
}
|
||||
|
||||
#[cfg(feature = "final")]
|
||||
const THIS_TRACK: &'static str = "stable";
|
||||
// ^^^ should be reset to "stable" or "beta" according to the release branch.
|
||||
const THIS_TRACK: &'static str = generated::TRACK;
|
||||
// ^^^ should be reset in Cargo.toml to "stable" or "beta" according to the release branch.
|
||||
|
||||
#[cfg(not(feature = "final"))]
|
||||
const THIS_TRACK: &'static str = "unstable";
|
||||
// ^^^ This gets used when we're not building a final release; should stay as "unstable".
|
||||
|
||||
/// Boolean type for clean/dirty status.
|
||||
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
|
||||
pub enum Filth {
|
||||
/// Data has not been changed.
|
||||
Clean,
|
||||
/// Data has been changed.
|
||||
Dirty,
|
||||
}
|
||||
|
||||
/// Get the platform identifier.
|
||||
pub fn platform() -> String {
|
||||
let env = Target::env();
|
||||
@@ -49,11 +50,11 @@ pub fn platform() -> String {
|
||||
|
||||
/// Get the standard version string for this software.
|
||||
pub fn version() -> String {
|
||||
let sha3 = short_sha();
|
||||
let sha3 = vergen::short_sha();
|
||||
let sha3_dash = if sha3.is_empty() { "" } else { "-" };
|
||||
let commit_date = commit_date().replace("-", "");
|
||||
let commit_date = vergen::commit_date().replace("-", "");
|
||||
let date_dash = if commit_date.is_empty() { "" } else { "-" };
|
||||
format!("Parity/v{}-{}{}{}{}{}/{}/rustc{}", env!("CARGO_PKG_VERSION"), THIS_TRACK, sha3_dash, sha3, date_dash, commit_date, platform(), rustc_version())
|
||||
format!("Parity/v{}-{}{}{}{}{}/{}/rustc{}", env!("CARGO_PKG_VERSION"), THIS_TRACK, sha3_dash, sha3, date_dash, commit_date, platform(), generated::rustc_version())
|
||||
}
|
||||
|
||||
/// Get the standard version data for this software.
|
||||
@@ -65,12 +66,12 @@ pub fn version_data() -> Bytes {
|
||||
env!("CARGO_PKG_VERSION_PATCH").parse::<u32>().expect("Environment variables are known to be valid; qed");
|
||||
s.append(&v);
|
||||
s.append(&"Parity");
|
||||
s.append(&rustc_version());
|
||||
s.append(&generated::rustc_version());
|
||||
s.append(&&Target::os()[0..2]);
|
||||
s.out()
|
||||
}
|
||||
|
||||
/// Provide raw information on the package.
|
||||
pub fn raw_package_info() -> (&'static str, &'static str, &'static str) {
|
||||
(THIS_TRACK, env!["CARGO_PKG_VERSION"], sha())
|
||||
(THIS_TRACK, env!["CARGO_PKG_VERSION"], vergen::sha())
|
||||
}
|
||||
Reference in New Issue
Block a user