Merge branch 'master' into ui-2
This commit is contained in:
commit
6a480ffb5b
@ -593,9 +593,9 @@ js-test:
|
||||
tags:
|
||||
- rust
|
||||
- rust-stable
|
||||
js-test-node_7:
|
||||
js-test-node_8:
|
||||
stage: test
|
||||
image: parity/rust-debian-node_7:gitlab-ci
|
||||
image: parity/rust-debian-node_8:gitlab-ci
|
||||
before_script:
|
||||
- git submodule update --init --recursive
|
||||
- export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l)
|
||||
@ -610,6 +610,7 @@ test-rust-beta:
|
||||
stage: test
|
||||
only:
|
||||
- triggers
|
||||
- master
|
||||
image: parity/rust:gitlab-ci
|
||||
before_script:
|
||||
- git submodule update --init --recursive
|
||||
@ -626,6 +627,7 @@ test-rust-nightly:
|
||||
stage: test
|
||||
only:
|
||||
- triggers
|
||||
- master
|
||||
image: parity/rust:gitlab-ci
|
||||
before_script:
|
||||
- git submodule update --init --recursive
|
||||
@ -645,6 +647,7 @@ js-release:
|
||||
- beta
|
||||
- stable
|
||||
- tags
|
||||
- triggers
|
||||
image: parity/rust:gitlab-ci
|
||||
before_script:
|
||||
- export JS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF^ $CI_BUILD_REF | grep ^js/ | wc -l)
|
||||
@ -660,6 +663,7 @@ push-release:
|
||||
stage: push-release
|
||||
only:
|
||||
- tags
|
||||
- triggers
|
||||
image: parity/rust:gitlab-ci
|
||||
script:
|
||||
- rustup default stable
|
||||
|
89
Cargo.lock
generated
89
Cargo.lock
generated
@ -110,11 +110,6 @@ name = "bit-vec"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.5.0"
|
||||
@ -444,7 +439,7 @@ version = "1.7.0"
|
||||
dependencies = [
|
||||
"crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.1 (git+https://github.com/paritytech/mio)",
|
||||
"mio 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -564,7 +559,7 @@ dependencies = [
|
||||
"igd 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.1 (git+https://github.com/paritytech/mio)",
|
||||
"mio 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"path 0.1.0",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -713,7 +708,7 @@ dependencies = [
|
||||
"itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-wordlist 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-wordlist 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -905,14 +900,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "0.10.0-a.0"
|
||||
source = "git+https://github.com/paritytech/hyper#498a39b90ea5f430b2241f93eaf19a301d34bd3c"
|
||||
source = "git+https://github.com/paritytech/hyper#da10f69a4924cd44e98a8d1f9562bd7534d13dcc"
|
||||
dependencies = [
|
||||
"cookie 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rotor 0.6.3 (git+https://github.com/paritytech/rotor)",
|
||||
"rotor 0.6.3 (git+https://github.com/tailhook/rotor)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"spmc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1247,23 +1242,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.6.1"
|
||||
source = "git+https://github.com/paritytech/mio#15a577039bed3c72f2952459f8ad687a56f63e29"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.6.6"
|
||||
version = "0.6.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1272,7 +1251,7 @@ dependencies = [
|
||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -1285,7 +1264,7 @@ dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazycell 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -1296,7 +1275,7 @@ version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1305,7 +1284,7 @@ version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -1316,7 +1295,7 @@ version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -1399,7 +1378,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "net2"
|
||||
version = "0.2.27"
|
||||
version = "0.2.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1409,19 +1388,6 @@ dependencies = [
|
||||
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nodrop"
|
||||
version = "0.1.9"
|
||||
@ -1825,7 +1791,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "parity-ui-precompiled"
|
||||
version = "1.4.0"
|
||||
source = "git+https://github.com/paritytech/js-precompiled.git#94883dbc2ca86af58cb6fffac72bbc0c6789a202"
|
||||
source = "git+https://github.com/paritytech/js-precompiled.git#52ba0075a974e89a723e04c55dd5d5b9941d9a11"
|
||||
dependencies = [
|
||||
"parity-dapps-glue 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -1851,7 +1817,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "parity-wordlist"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2118,10 +2084,10 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rotor"
|
||||
version = "0.6.3"
|
||||
source = "git+https://github.com/paritytech/rotor#2a3764a830174aa94405593be550e8fc7ecea25a"
|
||||
source = "git+https://github.com/tailhook/rotor#80ce2e4cd82fdc7f88bb2d737407fa5106799790"
|
||||
dependencies = [
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.1 (git+https://github.com/paritytech/mio)",
|
||||
"mio 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2554,7 +2520,7 @@ dependencies = [
|
||||
"futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-io 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2578,7 +2544,7 @@ dependencies = [
|
||||
"futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-proto 0.1.0 (git+https://github.com/tomusdrw/tokio-proto)",
|
||||
@ -2604,7 +2570,7 @@ source = "git+https://github.com/tomusdrw/tokio-proto#f6ee08cb594fa2fc1b4178eaac
|
||||
dependencies = [
|
||||
"futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2620,7 +2586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2656,7 +2622,7 @@ dependencies = [
|
||||
"iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio-uds 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-io 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2804,7 +2770,7 @@ dependencies = [
|
||||
"bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2867,7 +2833,6 @@ dependencies = [
|
||||
"checksum bit-set 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e6e1e6fb1c9e3d6fcdec57216a74eaa03e41f52a22f13a16438251d8e88b89da"
|
||||
"checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c"
|
||||
"checksum bit-vec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5b97c2c8e8bbb4251754f559df8af22fb264853c7d009084a576cdf12565089d"
|
||||
"checksum bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3"
|
||||
"checksum bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23"
|
||||
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
|
||||
"checksum blastfig 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "09640e0509d97d5cdff03a9f5daf087a8e04c735c3b113a75139634a19cfc7b2"
|
||||
@ -2948,8 +2913,7 @@ dependencies = [
|
||||
"checksum mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a74cc2587bf97c49f3f5bab62860d6abf3902ca73b66b51d9b049fbdcd727bd2"
|
||||
"checksum mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5e50bf542f81754ef69e5cea856946a3819f7c09ea97b4903c8bc8a89f74e7b6"
|
||||
"checksum miniz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d1f4d337a01c32e1f2122510fed46393d53ca35a7f429cb0450abaedfa3ed54"
|
||||
"checksum mio 0.6.1 (git+https://github.com/paritytech/mio)" = "<none>"
|
||||
"checksum mio 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f27d38f824a0d267d55b29b171e9e99269a53812e385fa75c1fe700ae254a6a4"
|
||||
"checksum mio 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ba718a36791275c6782c0445a5f79b5ef4e68c01a4e60ac04aae28290e4957"
|
||||
"checksum mio-named-pipes 0.1.4 (git+https://github.com/alexcrichton/mio-named-pipes)" = "<none>"
|
||||
"checksum mio-uds 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "78437f00d9615c366932cbfe79790b5c2945706ba67cf78378ffacc0069ed9de"
|
||||
"checksum miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3e690c5df6b2f60acd45d56378981e827ff8295562fc8d34f573deb267a59cd1"
|
||||
@ -2960,8 +2924,7 @@ dependencies = [
|
||||
"checksum nanomsg 0.5.1 (git+https://github.com/paritytech/nanomsg.rs.git?branch=parity-1.7)" = "<none>"
|
||||
"checksum nanomsg-sys 0.5.0 (git+https://github.com/paritytech/nanomsg.rs.git?branch=parity-1.7)" = "<none>"
|
||||
"checksum native-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4e52995154bb6f0b41e4379a279482c9387c1632e3798ba4e511ef8c54ee09"
|
||||
"checksum net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)" = "18b9642ad6222faf5ce46f6966f59b71b9775ad5758c9e09fcf0a6c8061972b4"
|
||||
"checksum nix 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0d95c5fa8b641c10ad0b8887454ebaafa3c92b5cd5350f8fc693adafd178e7b"
|
||||
"checksum net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "bc01404e7568680f1259aa5729539f221cb1e6d047a0d9053cab4be8a73b5d67"
|
||||
"checksum nodrop 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "52cd74cd09beba596430cc6e3091b74007169a56246e1262f0ba451ea95117b2"
|
||||
"checksum nom 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6caab12c5f97aa316cb249725aa32115118e1522b445e26c257dd77cad5ffd4e"
|
||||
"checksum num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "c04bd954dbf96f76bab6e5bd6cef6f1ce1262d15268ce4f926d2b5b778fa7af2"
|
||||
@ -2982,7 +2945,7 @@ dependencies = [
|
||||
"checksum parity-dapps-glue 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1d06f6ee0fda786df3784a96ee3f0629f529b91cbfb7d142f6410e6bcd1ce2c"
|
||||
"checksum parity-tokio-ipc 0.1.5 (git+https://github.com/nikvolf/parity-tokio-ipc)" = "<none>"
|
||||
"checksum parity-ui-precompiled 1.4.0 (git+https://github.com/paritytech/js-precompiled.git)" = "<none>"
|
||||
"checksum parity-wordlist 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07779ab11d958acbee30fcf644c99d3fae132d8fcb41282a25e1ee284097bdd2"
|
||||
"checksum parity-wordlist 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "52142d717754f7ff7ef0fc8da1bdce4f302dd576fb9bf8b727d6a5fdef33348d"
|
||||
"checksum parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aebb68eebde2c99f89592d925288600fde220177e46b5c9a91ca218d245aeedf"
|
||||
"checksum parking_lot_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb1b97670a2ffadce7c397fb80a3d687c4f3060140b885621ef1653d0e5d5068"
|
||||
"checksum phf 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "447d9d45f2e0b4a9b532e808365abf18fc211be6ca217202fcd45236ef12f026"
|
||||
@ -3012,7 +2975,7 @@ dependencies = [
|
||||
"checksum ring 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "595afba2db7545b940ec900dc59b5281f719d327fc0674eeadc9953617e55357"
|
||||
"checksum rocksdb 0.4.5 (git+https://github.com/paritytech/rust-rocksdb)" = "<none>"
|
||||
"checksum rocksdb-sys 0.3.0 (git+https://github.com/paritytech/rust-rocksdb)" = "<none>"
|
||||
"checksum rotor 0.6.3 (git+https://github.com/paritytech/rotor)" = "<none>"
|
||||
"checksum rotor 0.6.3 (git+https://github.com/tailhook/rotor)" = "<none>"
|
||||
"checksum rpassword 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5d3a99497c5c544e629cc8b359ae5ede321eba5fa8e5a8078f3ced727a976c3f"
|
||||
"checksum rpassword 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab6e42be826e215f30ff830904f8f4a0933c6e2ae890e1af8b408f5bae60081e"
|
||||
"checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a"
|
||||
|
@ -16,70 +16,11 @@
|
||||
|
||||
//! Evm factory.
|
||||
//!
|
||||
//! TODO: consider spliting it into two separate files.
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use evm::Evm;
|
||||
use util::U256;
|
||||
use super::interpreter::SharedCache;
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
/// Type of EVM to use.
|
||||
pub enum VMType {
|
||||
/// JIT EVM
|
||||
#[cfg(feature = "jit")]
|
||||
Jit,
|
||||
/// RUST EVM
|
||||
Interpreter
|
||||
}
|
||||
|
||||
impl fmt::Display for VMType {
|
||||
#[cfg(feature="jit")]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", match *self {
|
||||
VMType::Jit => "JIT",
|
||||
VMType::Interpreter => "INT"
|
||||
})
|
||||
}
|
||||
#[cfg(not(feature="jit"))]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", match *self {
|
||||
VMType::Interpreter => "INT"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for VMType {
|
||||
fn default() -> Self {
|
||||
VMType::Interpreter
|
||||
}
|
||||
}
|
||||
|
||||
impl VMType {
|
||||
/// Return all possible VMs (JIT, Interpreter)
|
||||
#[cfg(feature = "jit")]
|
||||
pub fn all() -> Vec<VMType> {
|
||||
vec![VMType::Jit, VMType::Interpreter]
|
||||
}
|
||||
|
||||
/// Return all possible VMs (Interpreter)
|
||||
#[cfg(not(feature = "jit"))]
|
||||
pub fn all() -> Vec<VMType> {
|
||||
vec![VMType::Interpreter]
|
||||
}
|
||||
|
||||
/// Return new jit if it's possible
|
||||
#[cfg(not(feature = "jit"))]
|
||||
pub fn jit() -> Option<Self> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Return new jit if it's possible
|
||||
#[cfg(feature = "jit")]
|
||||
pub fn jit() -> Option<Self> {
|
||||
Some(VMType::Jit)
|
||||
}
|
||||
}
|
||||
use super::vmtype::VMType;
|
||||
|
||||
/// Evm factory. Creates appropriate Evm.
|
||||
#[derive(Clone)]
|
||||
|
@ -23,6 +23,13 @@ pub fn is_push(i: Instruction) -> bool {
|
||||
i >= PUSH1 && i <= PUSH32
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_is_push() {
|
||||
assert!(is_push(PUSH1));
|
||||
assert!(is_push(PUSH32));
|
||||
assert!(!is_push(DUP1));
|
||||
}
|
||||
|
||||
/// Returns number of bytes to read for `PUSHN` instruction
|
||||
/// PUSH1 -> 1
|
||||
pub fn get_push_bytes(i: Instruction) -> usize {
|
||||
|
@ -22,6 +22,8 @@ pub mod interpreter;
|
||||
#[macro_use]
|
||||
pub mod factory;
|
||||
pub mod schedule;
|
||||
|
||||
mod vmtype;
|
||||
mod instructions;
|
||||
#[cfg(feature = "jit" )]
|
||||
mod jit;
|
||||
@ -33,6 +35,7 @@ mod benches;
|
||||
|
||||
pub use self::evm::{Evm, Error, Finalize, FinalizationResult, GasLeft, Result, CostType};
|
||||
pub use self::ext::{Ext, ContractCreateResult, MessageCallResult, CreateContractAddress};
|
||||
pub use self::factory::{Factory, VMType};
|
||||
pub use self::vmtype::VMType;
|
||||
pub use self::factory::Factory;
|
||||
pub use self::schedule::Schedule;
|
||||
pub use types::executed::CallType;
|
||||
|
75
ethcore/src/evm/vmtype.rs
Normal file
75
ethcore/src/evm/vmtype.rs
Normal file
@ -0,0 +1,75 @@
|
||||
// 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/>.
|
||||
|
||||
use std::fmt;
|
||||
|
||||
/// Type of EVM to use.
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum VMType {
|
||||
/// JIT EVM
|
||||
#[cfg(feature = "jit")]
|
||||
Jit,
|
||||
/// RUST EVM
|
||||
Interpreter
|
||||
}
|
||||
|
||||
impl fmt::Display for VMType {
|
||||
#[cfg(feature="jit")]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", match *self {
|
||||
VMType::Jit => "JIT",
|
||||
VMType::Interpreter => "INT"
|
||||
})
|
||||
}
|
||||
#[cfg(not(feature="jit"))]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", match *self {
|
||||
VMType::Interpreter => "INT"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for VMType {
|
||||
fn default() -> Self {
|
||||
VMType::Interpreter
|
||||
}
|
||||
}
|
||||
|
||||
impl VMType {
|
||||
/// Return all possible VMs (JIT, Interpreter)
|
||||
#[cfg(feature = "jit")]
|
||||
pub fn all() -> Vec<VMType> {
|
||||
vec![VMType::Jit, VMType::Interpreter]
|
||||
}
|
||||
|
||||
/// Return all possible VMs (Interpreter)
|
||||
#[cfg(not(feature = "jit"))]
|
||||
pub fn all() -> Vec<VMType> {
|
||||
vec![VMType::Interpreter]
|
||||
}
|
||||
|
||||
/// Return new jit if it's possible
|
||||
#[cfg(not(feature = "jit"))]
|
||||
pub fn jit() -> Option<Self> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Return new jit if it's possible
|
||||
#[cfg(feature = "jit")]
|
||||
pub fn jit() -> Option<Self> {
|
||||
Some(VMType::Jit)
|
||||
}
|
||||
}
|
@ -30,6 +30,7 @@ pub struct Informant {
|
||||
pc: usize,
|
||||
instruction: u8,
|
||||
gas_cost: U256,
|
||||
gas_used: U256,
|
||||
stack: Vec<U256>,
|
||||
memory: Vec<u8>,
|
||||
storage: HashMap<H256, H256>,
|
||||
@ -82,6 +83,19 @@ impl trace::VMTracer for Informant {
|
||||
}
|
||||
|
||||
fn trace_executed(&mut self, gas_used: U256, stack_push: &[U256], mem_diff: Option<(usize, &[u8])>, store_diff: Option<(U256, U256)>) {
|
||||
println!(
|
||||
"{{\"pc\":{pc},\"op\":{op},\"gas\":{gas},\"gasCost\":{gas_cost},\"memory\":{memory},\"stack\":{stack},\"storage\":{storage},\"depth\":{depth}}}",
|
||||
pc = self.pc,
|
||||
op = self.instruction,
|
||||
gas = display::u256_as_str(&(gas_used + self.gas_cost)),
|
||||
gas_cost = display::u256_as_str(&self.gas_cost),
|
||||
memory = self.memory(),
|
||||
stack = self.stack(),
|
||||
storage = self.storage(),
|
||||
depth = self.depth,
|
||||
);
|
||||
|
||||
self.gas_used = gas_used;
|
||||
self.stack.extend_from_slice(stack_push);
|
||||
|
||||
if let Some((pos, data)) = mem_diff {
|
||||
@ -91,18 +105,6 @@ impl trace::VMTracer for Informant {
|
||||
if let Some((pos, val)) = store_diff {
|
||||
self.storage.insert(pos.into(), val.into());
|
||||
}
|
||||
|
||||
println!(
|
||||
"{{\"pc\":{pc},\"op\":{op},\"gas\":{gas},\"gasCost\":{gas_cost},\"memory\":{memory},\"stack\":{stack},\"storage\":{storage},\"depth\":{depth}}}",
|
||||
pc = self.pc,
|
||||
op = self.instruction,
|
||||
gas = display::u256_as_str(&gas_used),
|
||||
gas_cost = display::u256_as_str(&self.gas_cost),
|
||||
memory = self.memory(),
|
||||
stack = self.stack(),
|
||||
storage = self.storage(),
|
||||
depth = self.depth,
|
||||
);
|
||||
}
|
||||
|
||||
fn prepare_subtrace(&self, _code: &[u8]) -> Self where Self: Sized {
|
||||
@ -111,6 +113,16 @@ impl trace::VMTracer for Informant {
|
||||
vm
|
||||
}
|
||||
|
||||
fn done_subtrace(&mut self, _sub: Self) where Self: Sized {}
|
||||
fn done_subtrace(&mut self, mut sub: Self) where Self: Sized {
|
||||
if sub.depth == 1 {
|
||||
// print last line with final state:
|
||||
sub.pc += 1;
|
||||
sub.instruction = 0;
|
||||
sub.gas_cost = 0.into();
|
||||
let gas_used = sub.gas_used;
|
||||
trace::VMTracer::trace_executed(&mut sub, gas_used, &[], None, None);
|
||||
}
|
||||
}
|
||||
|
||||
fn drain(self) -> Option<trace::VMTrace> { None }
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "parity.js",
|
||||
"version": "1.7.85",
|
||||
"version": "1.7.87",
|
||||
"main": "release/index.js",
|
||||
"jsnext:main": "src/index.js",
|
||||
"author": "Parity Team <admin@parity.io>",
|
||||
|
@ -96,4 +96,8 @@ export default class Http extends JsonRpcBase {
|
||||
.then(nextTimeout)
|
||||
.catch(nextTimeout);
|
||||
}
|
||||
|
||||
set url (url) {
|
||||
this._url = url;
|
||||
}
|
||||
}
|
||||
|
@ -249,6 +249,10 @@ export default class Ws extends JsonRpcBase {
|
||||
});
|
||||
}
|
||||
|
||||
set url (url) {
|
||||
this._url = url;
|
||||
}
|
||||
|
||||
get token () {
|
||||
return this._token;
|
||||
}
|
||||
|
@ -26,14 +26,22 @@ export default class SecureApi extends Api {
|
||||
_isConnecting = false;
|
||||
_needsToken = false;
|
||||
_tokens = [];
|
||||
_uiApi = null;
|
||||
|
||||
_dappsUrl = null;
|
||||
_wsUrl = null;
|
||||
_url = null;
|
||||
|
||||
static getProvider (url, sysuiToken, protocol) {
|
||||
static getTransport (url, sysuiToken, protocol) {
|
||||
const transportUrl = SecureApi.transportUrl(url, protocol);
|
||||
|
||||
return new Api.Provider.Ws(transportUrl, sysuiToken, false);
|
||||
}
|
||||
|
||||
static transportUrl (url, protocol) {
|
||||
const proto = protocol() === 'https:' ? 'wss:' : 'ws:';
|
||||
|
||||
return new Api.Provider.Ws(`${proto}//${url}`, sysuiToken, false);
|
||||
return `${proto}//${url}`;
|
||||
}
|
||||
|
||||
// Returns a protocol with `:` at the end.
|
||||
@ -41,22 +49,23 @@ export default class SecureApi extends Api {
|
||||
return window.location.protocol;
|
||||
}
|
||||
|
||||
constructor (url, nextToken, getProvider = SecureApi.getProvider, protocol = SecureApi.protocol) {
|
||||
constructor (uiUrl, nextToken, getTransport = SecureApi.getTransport, protocol = SecureApi.protocol) {
|
||||
const sysuiToken = store.get('sysuiToken');
|
||||
const provider = getProvider(url, sysuiToken, protocol);
|
||||
const transport = getTransport(uiUrl, sysuiToken, protocol);
|
||||
|
||||
super(provider);
|
||||
super(transport);
|
||||
|
||||
this._wsUrl = url;
|
||||
this.protocol = protocol;
|
||||
this._url = uiUrl;
|
||||
this._uiApi = new Api(new Api.Provider.Http(`${this.protocol()}//${this._url}/rpc`, 0), false);
|
||||
this._wsUrl = uiUrl;
|
||||
// Try tokens from localStorage, from hash and 'initial'
|
||||
this._tokens = uniq([sysuiToken, nextToken, 'initial'])
|
||||
.filter((token) => token)
|
||||
.map((token) => ({ value: token, tried: false }));
|
||||
|
||||
// When the transport is closed, try to reconnect
|
||||
console.log('this.provider', this.provider);
|
||||
this.provider.on('close', this.connect, this);
|
||||
transport.on('close', this.connect, this);
|
||||
|
||||
this.connect();
|
||||
}
|
||||
@ -106,7 +115,7 @@ export default class SecureApi extends Api {
|
||||
}
|
||||
|
||||
get isConnected () {
|
||||
return this.provider.isConnected;
|
||||
return this._transport.isConnected;
|
||||
}
|
||||
|
||||
get needsToken () {
|
||||
@ -114,27 +123,7 @@ export default class SecureApi extends Api {
|
||||
}
|
||||
|
||||
get secureToken () {
|
||||
return this.provider.token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the current API with the given values
|
||||
* (`signerPort`, `dappsInterface`, `dappsPort`, ...)
|
||||
*/
|
||||
configure (configuration) {
|
||||
const { dappsInterface, dappsPort, signerPort, wsPort } = configuration;
|
||||
|
||||
if (dappsInterface) {
|
||||
this._dappsUrl = `${dappsInterface}:${this._dappsAddress.port}`;
|
||||
}
|
||||
|
||||
if (dappsPort) {
|
||||
this._dappsUrl = `${this.hostname}:${dappsPort}`;
|
||||
}
|
||||
|
||||
if (signerPort || wsPort) {
|
||||
this._wsUrl = `${this.hostname}:${signerPort || wsPort}`;
|
||||
}
|
||||
return this._transport.token;
|
||||
}
|
||||
|
||||
connect () {
|
||||
@ -190,7 +179,7 @@ export default class SecureApi extends Api {
|
||||
* otherwise (HEAD request to the Node)
|
||||
*/
|
||||
isNodeUp () {
|
||||
return fetch(`${this.protocol()}//${this._wsUrl}`, { method: 'HEAD', mode: 'no-cors' })
|
||||
return fetch(`${this.protocol()}//${this._url}/api/ping`, { method: 'HEAD' })
|
||||
.then(
|
||||
(r) => r.status === 200,
|
||||
() => false
|
||||
@ -241,7 +230,6 @@ export default class SecureApi extends Api {
|
||||
// If correct and valid token, wait until the Node is ready
|
||||
// and resolve as connected
|
||||
return this._waitUntilNodeReady()
|
||||
.then(() => this._fetchSettings())
|
||||
.then(() => true);
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -260,11 +248,16 @@ export default class SecureApi extends Api {
|
||||
// Sanitize the token first
|
||||
const token = this._sanitiseToken(_token);
|
||||
|
||||
// Update the token in the transport layer
|
||||
this.provider.updateToken(token, false);
|
||||
const connectPromise = this._fetchSettings()
|
||||
.then(() => {
|
||||
// Update the URL and token in the transport layer
|
||||
this.transport.url = SecureApi.transportUrl(this._wsUrl, this.protocol);
|
||||
this.transport.updateToken(token, false);
|
||||
|
||||
log.debug('connecting with token', token);
|
||||
|
||||
const connectPromise = this.provider.connect()
|
||||
return this.transport.connect();
|
||||
})
|
||||
.then(() => {
|
||||
log.debug('connected with', token);
|
||||
|
||||
@ -319,12 +312,12 @@ export default class SecureApi extends Api {
|
||||
_fetchSettings () {
|
||||
return Promise
|
||||
.all([
|
||||
this.parity.dappsUrl(),
|
||||
this.parity.wsUrl()
|
||||
this._uiApi.parity.dappsUrl(),
|
||||
this._uiApi.parity.wsUrl()
|
||||
])
|
||||
.then(([dappsUrl, wsUrl]) => {
|
||||
this._dappsUrl = dappsUrl;
|
||||
this._wsUrl = dappsUrl;
|
||||
this._wsUrl = wsUrl;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,8 @@ export default class Status {
|
||||
.then(([nodeKind, netPeers, clientVersion, netVersion, netChain]) => {
|
||||
const isTest = [
|
||||
'2', // morden
|
||||
'3', // ropsten
|
||||
'3', // ropsten,
|
||||
'17', // devchain
|
||||
'42' // kovan
|
||||
].includes(netVersion);
|
||||
|
||||
|
@ -29,10 +29,12 @@ export default class RequestOrigin extends Component {
|
||||
static propTypes = {
|
||||
origin: PropTypes.shape({
|
||||
type: PropTypes.oneOf(['unknown', 'dapp', 'rpc', 'ipc', 'signer']),
|
||||
details: PropTypes.shape({
|
||||
dapp: PropTypes.string,
|
||||
session: PropTypes.string
|
||||
}).isRequired
|
||||
details: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.shape({
|
||||
session: PropTypes.string.isRequired
|
||||
})
|
||||
]).isRequired
|
||||
}).isRequired
|
||||
};
|
||||
|
||||
@ -129,7 +131,9 @@ export default class RequestOrigin extends Component {
|
||||
}
|
||||
|
||||
if (origin.type === 'signer') {
|
||||
return this.renderSigner(origin.details.session || origin.details);
|
||||
const session = origin.details && origin.details.session || origin.details;
|
||||
|
||||
return this.renderSigner(session);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,24 +21,28 @@ es6Promise.polyfill();
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { AppContainer } from 'react-hot-loader';
|
||||
|
||||
import injectTapEventPlugin from 'react-tap-event-plugin';
|
||||
|
||||
import ContractInstances from '@parity/shared/contracts';
|
||||
import { initStore } from '@parity/shared/redux';
|
||||
import { patchApi } from '@parity/shared/util/tx';
|
||||
import ContextProvider from '@parity/ui/ContextProvider';
|
||||
|
||||
import SecureApi from '~/secureApi';
|
||||
import ContractInstances from '~/contracts';
|
||||
|
||||
import '@parity/shared/environment';
|
||||
import { initStore } from '~/redux';
|
||||
import ContextProvider from '~/ui/ContextProvider';
|
||||
import muiTheme from '~/ui/Theme';
|
||||
|
||||
import '@parity/shared/assets/fonts/Roboto/font.css';
|
||||
import '@parity/shared/assets/fonts/RobotoMono/font.css';
|
||||
import { patchApi } from '~/util/tx';
|
||||
import { setApi } from '~/redux/providers/apiActions';
|
||||
|
||||
import '~/environment';
|
||||
|
||||
import '../assets/fonts/Roboto/font.css';
|
||||
import '../assets/fonts/RobotoMono/font.css';
|
||||
|
||||
injectTapEventPlugin();
|
||||
|
||||
import ParityBar from '~/shell/ParityBar';
|
||||
import ParityBar from '~/views/ParityBar';
|
||||
|
||||
// Test transport (std transport should be provided as global object)
|
||||
class FakeTransport {
|
||||
@ -60,7 +64,7 @@ class FakeTransport {
|
||||
|
||||
class FrameSecureApi extends SecureApi {
|
||||
constructor (transport) {
|
||||
super('', null, () => {
|
||||
super(transport.uiUrl, null, () => {
|
||||
return transport;
|
||||
});
|
||||
}
|
||||
@ -87,21 +91,36 @@ class FrameSecureApi extends SecureApi {
|
||||
}
|
||||
}
|
||||
|
||||
const api = new FrameSecureApi(window.secureTransport || new FakeTransport());
|
||||
const transport = window.secureTransport || new FakeTransport();
|
||||
const uiUrl = transport.uiUrl || 'http://127.0.0.1:8180';
|
||||
|
||||
transport.uiUrl = uiUrl.replace('http://', '').replace('https://', '');
|
||||
const api = new FrameSecureApi(transport);
|
||||
|
||||
patchApi(api);
|
||||
ContractInstances.get(api);
|
||||
ContractInstances.create(api);
|
||||
|
||||
const store = initStore(api, null, true);
|
||||
|
||||
store.dispatch({ type: 'initAll', api });
|
||||
store.dispatch(setApi(api));
|
||||
|
||||
window.secureApi = api;
|
||||
|
||||
const app = (
|
||||
<ParityBar dapp externalLink={ uiUrl } />
|
||||
);
|
||||
const container = document.querySelector('#container');
|
||||
|
||||
ReactDOM.render(
|
||||
<AppContainer>
|
||||
<ContextProvider
|
||||
api={ api }
|
||||
muiTheme={ muiTheme }
|
||||
store={ store }
|
||||
>
|
||||
<ParityBar dapp externalLink={ 'http://127.0.0.1:8180' } />
|
||||
</ContextProvider>,
|
||||
document.querySelector('#container')
|
||||
{ app }
|
||||
</ContextProvider>
|
||||
</AppContainer>,
|
||||
container
|
||||
);
|
||||
|
@ -52,7 +52,6 @@ if (process.env.NODE_ENV === 'development') {
|
||||
}
|
||||
|
||||
const AUTH_HASH = '#/auth?';
|
||||
const parityUrl = process.env.PARITY_URL || '127.0.0.1:8546';
|
||||
|
||||
let token = null;
|
||||
|
||||
@ -60,7 +59,8 @@ if (window.location.hash && window.location.hash.indexOf(AUTH_HASH) === 0) {
|
||||
token = qs.parse(window.location.hash.substr(AUTH_HASH.length)).token;
|
||||
}
|
||||
|
||||
const api = new SecureApi(parityUrl, token);
|
||||
const uiUrl = window.location.host;
|
||||
const api = new SecureApi(uiUrl, token);
|
||||
|
||||
patchApi(api);
|
||||
ContractInstances.get(api);
|
||||
|
@ -210,22 +210,24 @@ class TxRow extends Component {
|
||||
|
||||
if (!isCancelOpen && !isEditOpen) {
|
||||
const pendingStatus = this.getCondition();
|
||||
const isPending = pendingStatus === 'pending';
|
||||
|
||||
if (pendingStatus === 'submitting') {
|
||||
return (
|
||||
<div className={ styles.pending }>
|
||||
{
|
||||
isPending
|
||||
? (
|
||||
<div className={ styles.pending }>
|
||||
<div />
|
||||
<div className={ styles.uppercase }>
|
||||
<FormattedMessage
|
||||
id='ui.txList.txRow.submitting'
|
||||
defaultMessage='Submitting'
|
||||
defaultMessage='Pending'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div className={ styles.pending }>
|
||||
) : (
|
||||
<div>
|
||||
<span>
|
||||
{ pendingStatus }
|
||||
</span>
|
||||
@ -235,6 +237,9 @@ class TxRow extends Component {
|
||||
defaultMessage='Scheduled'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
<a onClick={ this.setEdit } className={ styles.uppercase }>
|
||||
<FormattedMessage
|
||||
id='ui.txList.txRow.edit'
|
||||
@ -248,6 +253,16 @@ class TxRow extends Component {
|
||||
defaultMessage='Cancel'
|
||||
/>
|
||||
</a>
|
||||
{ isPending
|
||||
? (
|
||||
<div>
|
||||
<FormattedMessage
|
||||
id='ui.txList.txRow.cancelWarning'
|
||||
defaultMessage='Warning: Editing or Canceling the transaction may not succeed!'
|
||||
/>
|
||||
</div>
|
||||
) : null
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -319,11 +334,10 @@ class TxRow extends Component {
|
||||
|
||||
getCondition = () => {
|
||||
const { blockNumber, tx } = this.props;
|
||||
let { time, block } = tx.condition;
|
||||
let { time, block = 0 } = tx.condition || {};
|
||||
|
||||
if (time) {
|
||||
if ((time.getTime() - Date.now()) >= 0) {
|
||||
// return `${dateDifference(new Date(), time, { compact: true })} left`;
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='ui.txList.txRow.pendingStatus.time'
|
||||
@ -333,14 +347,11 @@ class TxRow extends Component {
|
||||
} }
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return 'submitting';
|
||||
}
|
||||
} else if (blockNumber) {
|
||||
}
|
||||
|
||||
if (blockNumber) {
|
||||
block = blockNumber.minus(block);
|
||||
// return (block.toNumber() < 0)
|
||||
// ? block.abs().toFormat(0) + ' blocks left'
|
||||
// : 'submitting';
|
||||
if (block.toNumber() < 0) {
|
||||
return (
|
||||
<FormattedMessage
|
||||
@ -351,10 +362,10 @@ class TxRow extends Component {
|
||||
} }
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return 'submitting';
|
||||
}
|
||||
}
|
||||
|
||||
return 'pending';
|
||||
}
|
||||
|
||||
cancelTx = () => {
|
||||
|
@ -762,10 +762,6 @@ impl Configuration {
|
||||
}
|
||||
|
||||
fn ui_hosts(&self) -> Option<Vec<String>> {
|
||||
if self.args.flag_ui_no_validation {
|
||||
return None;
|
||||
}
|
||||
|
||||
self.hosts(&self.args.flag_ui_hosts, &self.ui_interface())
|
||||
}
|
||||
|
||||
@ -774,10 +770,18 @@ impl Configuration {
|
||||
}
|
||||
|
||||
fn ws_hosts(&self) -> Option<Vec<String>> {
|
||||
if self.args.flag_ui_no_validation {
|
||||
return None;
|
||||
}
|
||||
|
||||
self.hosts(&self.args.flag_ws_hosts, &self.ws_interface())
|
||||
}
|
||||
|
||||
fn ws_origins(&self) -> Option<Vec<String>> {
|
||||
if self.args.flag_unsafe_expose {
|
||||
return None;
|
||||
}
|
||||
|
||||
Self::parse_hosts(&self.args.flag_ws_origins)
|
||||
}
|
||||
|
||||
@ -1482,13 +1486,15 @@ mod tests {
|
||||
port: 8180,
|
||||
hosts: Some(vec![]),
|
||||
});
|
||||
assert!(conf0.ws_config().unwrap().hosts.is_some());
|
||||
assert_eq!(conf1.directories().signer, "signer".to_owned());
|
||||
assert_eq!(conf1.ui_config(), UiConfiguration {
|
||||
enabled: true,
|
||||
interface: "127.0.0.1".into(),
|
||||
port: 8180,
|
||||
hosts: None,
|
||||
hosts: Some(vec![]),
|
||||
});
|
||||
assert_eq!(conf1.ws_config().unwrap().hosts, None);
|
||||
assert_eq!(conf2.directories().signer, "signer".to_owned());
|
||||
assert_eq!(conf2.ui_config(), UiConfiguration {
|
||||
enabled: true,
|
||||
@ -1496,6 +1502,7 @@ mod tests {
|
||||
port: 3123,
|
||||
hosts: Some(vec![]),
|
||||
});
|
||||
assert!(conf2.ws_config().unwrap().hosts.is_some());
|
||||
assert_eq!(conf3.directories().signer, "signer".to_owned());
|
||||
assert_eq!(conf3.ui_config(), UiConfiguration {
|
||||
enabled: true,
|
||||
@ -1503,6 +1510,7 @@ mod tests {
|
||||
port: 8180,
|
||||
hosts: Some(vec![]),
|
||||
});
|
||||
assert!(conf3.ws_config().unwrap().hosts.is_some());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -1590,6 +1598,7 @@ mod tests {
|
||||
assert_eq!(conf0.http_config().unwrap().hosts, None);
|
||||
assert_eq!(&conf0.ws_config().unwrap().interface, "0.0.0.0");
|
||||
assert_eq!(conf0.ws_config().unwrap().hosts, None);
|
||||
assert_eq!(conf0.ws_config().unwrap().origins, None);
|
||||
assert_eq!(&conf0.ui_config().interface, "0.0.0.0");
|
||||
assert_eq!(conf0.ui_config().hosts, None);
|
||||
assert_eq!(&conf0.secretstore_config().unwrap().interface, "0.0.0.0");
|
||||
|
@ -82,18 +82,6 @@ extern crate pretty_assertions;
|
||||
#[cfg(windows)] extern crate ws2_32;
|
||||
#[cfg(windows)] extern crate winapi;
|
||||
|
||||
macro_rules! dependency {
|
||||
($dep_ty:ident, $url:expr) => {
|
||||
{
|
||||
let dep = boot::dependency::<$dep_ty<_>>($url)
|
||||
.unwrap_or_else(|e| panic!("Fatal: error connecting service ({:?})", e));
|
||||
dep.handshake()
|
||||
.unwrap_or_else(|e| panic!("Fatal: error in connected service ({:?})", e));
|
||||
dep
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mod account;
|
||||
mod blockchain;
|
||||
mod cache;
|
||||
|
@ -16,10 +16,6 @@
|
||||
|
||||
//! RPC Error codes and error objects
|
||||
|
||||
macro_rules! rpc_unimplemented {
|
||||
() => (Err(::v1::helpers::errors::unimplemented(None)))
|
||||
}
|
||||
|
||||
use std::fmt;
|
||||
use rlp::DecoderError;
|
||||
use ethcore::error::{Error as EthcoreError, CallError, TransactionError};
|
||||
|
22
snap/snapcraft.yaml
Normal file
22
snap/snapcraft.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
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]
|
@ -7,7 +7,7 @@ version = "1.7.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
mio = { git = "https://github.com/paritytech/mio" }
|
||||
mio = "0.6.8"
|
||||
crossbeam = "0.2"
|
||||
parking_lot = "0.4"
|
||||
log = "0.3"
|
||||
|
@ -54,6 +54,9 @@
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
//TODO: use Poll from mio
|
||||
#![allow(deprecated)]
|
||||
|
||||
extern crate mio;
|
||||
#[macro_use]
|
||||
extern crate log as rlog;
|
||||
|
@ -8,7 +8,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.3"
|
||||
mio = { git = "https://github.com/paritytech/mio" }
|
||||
mio = "0.6.8"
|
||||
bytes = "0.3.0"
|
||||
rand = "0.3.12"
|
||||
time = "0.1.34"
|
||||
|
@ -54,6 +54,9 @@
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
//TODO: use Poll from mio
|
||||
#![allow(deprecated)]
|
||||
|
||||
extern crate ethcore_io as io;
|
||||
extern crate ethcore_util as util;
|
||||
extern crate parking_lot;
|
||||
|
Loading…
Reference in New Issue
Block a user