From c2c7231cad8cb24995dfd2255f2ab07ffbfbe75f Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac Date: Tue, 30 May 2017 19:28:50 +0200 Subject: [PATCH 01/13] Recover from empty phrase in dev mode (#5698) * Add dev chain to isTest * Fix signer * Fix no condfition transactions * Fix case : old parity * Fix propTypes. --- js/src/redux/providers/status.js | 7 +-- js/src/ui/TxList/TxRow/txRow.js | 4 +- .../components/RequestOrigin/requestOrigin.js | 11 +++- js/yarn.lock | 51 ++++++++++++++++++- 4 files changed, 65 insertions(+), 8 deletions(-) diff --git a/js/src/redux/providers/status.js b/js/src/redux/providers/status.js index e2e4b81de..ef329f662 100644 --- a/js/src/redux/providers/status.js +++ b/js/src/redux/providers/status.js @@ -254,9 +254,10 @@ export default class Status { .all(statusPromises) .then(([nodeKind, netPeers, clientVersion, netVersion, netChain]) => { const isTest = [ - '2', // morden - '3', // ropsten - '42' // kovan + '2', // morden + '3', // ropsten, + '17', // devchain + '42' // kovan ].includes(netVersion); const nodeKindFull = nodeKind && diff --git a/js/src/ui/TxList/TxRow/txRow.js b/js/src/ui/TxList/TxRow/txRow.js index c839a04b1..c2061a581 100644 --- a/js/src/ui/TxList/TxRow/txRow.js +++ b/js/src/ui/TxList/TxRow/txRow.js @@ -319,7 +319,7 @@ class TxRow extends Component { getCondition = () => { const { blockNumber, tx } = this.props; - let { time, block } = tx.condition; + let { time, block } = tx.condition || {}; if (time) { if ((time.getTime() - Date.now()) >= 0) { @@ -336,7 +336,7 @@ class TxRow extends Component { } else { return 'submitting'; } - } else if (blockNumber) { + } else if (blockNumber && block) { block = blockNumber.minus(block); // return (block.toNumber() < 0) // ? block.abs().toFormat(0) + ' blocks left' diff --git a/js/src/views/Signer/components/RequestOrigin/requestOrigin.js b/js/src/views/Signer/components/RequestOrigin/requestOrigin.js index 435d90a6b..0f5055a1f 100644 --- a/js/src/views/Signer/components/RequestOrigin/requestOrigin.js +++ b/js/src/views/Signer/components/RequestOrigin/requestOrigin.js @@ -29,7 +29,12 @@ export default class RequestOrigin extends Component { static propTypes = { origin: PropTypes.shape({ type: PropTypes.oneOf(['unknown', 'dapp', 'rpc', 'ipc', 'signer']), - details: PropTypes.string.isRequired + details: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.shape({ + session: PropTypes.string.isRequired + }) + ]).isRequired }).isRequired }; @@ -126,7 +131,9 @@ export default class RequestOrigin extends Component { } if (origin.type === 'signer') { - return this.renderSigner(origin.details); + const session = origin.details && origin.details.session || origin.details; + + return this.renderSigner(session); } } diff --git a/js/yarn.lock b/js/yarn.lock index c1367d8fe..6a817fe5e 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -724,6 +724,15 @@ babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015 babel-runtime "^6.22.0" babel-template "^6.22.0" +babel-plugin-transform-es2015-modules-commonjs@6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + babel-plugin-transform-es2015-modules-commonjs@^6.22.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.0, babel-plugin-transform-es2015-modules-commonjs@^6.6.0: version "6.24.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.0.tgz#e921aefb72c2cc26cb03d107626156413222134f" @@ -895,6 +904,13 @@ babel-plugin-transform-strict-mode@^6.22.0: babel-runtime "^6.22.0" babel-types "^6.22.0" +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babel-plugin-webpack-alias@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/babel-plugin-webpack-alias/-/babel-plugin-webpack-alias-2.1.2.tgz#05a1ba23c28595660fb6ea5736424fc596b4a247" @@ -904,7 +920,7 @@ babel-plugin-webpack-alias@2.1.2: lodash.some "^4.5.1" lodash.template "^4.3.0" -babel-polyfill@6.23.0, babel-polyfill@^6.23.0: +babel-polyfill@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" dependencies: @@ -1070,6 +1086,16 @@ babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.23.0, babel-te babylon "^6.11.0" lodash "^4.2.0" +babel-template@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + lodash "^4.2.0" + babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.19.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1: version "6.23.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" @@ -1084,6 +1110,20 @@ babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.19.0, babel-tr invariant "^2.2.0" lodash "^4.2.0" +babel-traverse@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + babel-types@^6.14.0, babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" @@ -1093,6 +1133,15 @@ babel-types@^6.14.0, babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19 lodash "^4.2.0" to-fast-properties "^1.0.1" +babel-types@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + babylon@^6.11.0, babylon@^6.13.0, babylon@^6.14.1, babylon@^6.15.0: version "6.16.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" From 480741894bd06c7f8735a5201e288536c4486187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Tue, 30 May 2017 19:30:15 +0200 Subject: [PATCH 02/13] JSON format printing pre-state. (#5712) --- evmbin/src/display/json.rs | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/evmbin/src/display/json.rs b/evmbin/src/display/json.rs index 685579521..604d3d3c3 100644 --- a/evmbin/src/display/json.rs +++ b/evmbin/src/display/json.rs @@ -30,6 +30,7 @@ pub struct Informant { pc: usize, instruction: u8, gas_cost: U256, + gas_used: U256, stack: Vec, memory: Vec, storage: HashMap, @@ -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 { None } } From 5a20c63b70a57f84650627dc53ccb545d2a34a8f Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Wed, 31 May 2017 01:31:43 +0800 Subject: [PATCH 03/13] two small changes in evm (#5700) * add a simple test for is_push so that every small utility has a corresponding unit test * split evm/factory.rs into two files as the TODO suggests * style fixes according to review comments --- ethcore/src/evm/factory.rs | 61 +-------------------------- ethcore/src/evm/instructions.rs | 7 +++ ethcore/src/evm/mod.rs | 5 ++- ethcore/src/evm/vmtype.rs | 75 +++++++++++++++++++++++++++++++++ 4 files changed, 87 insertions(+), 61 deletions(-) create mode 100644 ethcore/src/evm/vmtype.rs diff --git a/ethcore/src/evm/factory.rs b/ethcore/src/evm/factory.rs index fc16b1955..2d8934ca1 100644 --- a/ethcore/src/evm/factory.rs +++ b/ethcore/src/evm/factory.rs @@ -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 { - vec![VMType::Jit, VMType::Interpreter] - } - - /// Return all possible VMs (Interpreter) - #[cfg(not(feature = "jit"))] - pub fn all() -> Vec { - vec![VMType::Interpreter] - } - - /// Return new jit if it's possible - #[cfg(not(feature = "jit"))] - pub fn jit() -> Option { - None - } - - /// Return new jit if it's possible - #[cfg(feature = "jit")] - pub fn jit() -> Option { - Some(VMType::Jit) - } -} +use super::vmtype::VMType; /// Evm factory. Creates appropriate Evm. #[derive(Clone)] diff --git a/ethcore/src/evm/instructions.rs b/ethcore/src/evm/instructions.rs index 336a3dcf1..2fb6cfd66 100644 --- a/ethcore/src/evm/instructions.rs +++ b/ethcore/src/evm/instructions.rs @@ -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 { diff --git a/ethcore/src/evm/mod.rs b/ethcore/src/evm/mod.rs index 8693a3467..3b27c1f31 100644 --- a/ethcore/src/evm/mod.rs +++ b/ethcore/src/evm/mod.rs @@ -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; diff --git a/ethcore/src/evm/vmtype.rs b/ethcore/src/evm/vmtype.rs new file mode 100644 index 000000000..608ab1e81 --- /dev/null +++ b/ethcore/src/evm/vmtype.rs @@ -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 . + +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 { + vec![VMType::Jit, VMType::Interpreter] + } + + /// Return all possible VMs (Interpreter) + #[cfg(not(feature = "jit"))] + pub fn all() -> Vec { + vec![VMType::Interpreter] + } + + /// Return new jit if it's possible + #[cfg(not(feature = "jit"))] + pub fn jit() -> Option { + None + } + + /// Return new jit if it's possible + #[cfg(feature = "jit")] + pub fn jit() -> Option { + Some(VMType::Jit) + } +} From c5c1978584f72adf9830f38158149eb164a97fa0 Mon Sep 17 00:00:00 2001 From: DevOps Parity Date: Wed, 31 May 2017 21:17:44 +0300 Subject: [PATCH 04/13] initial support snapcraft.io create snapcraft.yaml for snapcraft.io --- snap/snapcraft.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 snap/snapcraft.yaml diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 000000000..d05e6978f --- /dev/null +++ b/snap/snapcraft.yaml @@ -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] From d7e531c373eb5bc5bc5780175bd52605a8084e7e Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Thu, 1 Jun 2017 00:05:11 +0300 Subject: [PATCH 05/13] JS test Node 7 -> 8 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c8f5f4d77..47730e547 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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) From 45d8cc706cfef61563b1c9ab736da4a4d25f9241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 2 Jun 2017 13:06:41 +0200 Subject: [PATCH 06/13] Bump wordlist. (#5748) --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 49b0c5246..93502c7ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -713,7 +713,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)", @@ -1851,7 +1851,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)", @@ -2982,7 +2982,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)" = "" "checksum parity-ui-precompiled 1.4.0 (git+https://github.com/paritytech/js-precompiled.git)" = "" -"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" From 5ec5d2fa0bac81cce5b83f7812a0300c9030f59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Sat, 3 Jun 2017 14:41:31 +0200 Subject: [PATCH 07/13] Fix local transactions without condition. (#5716) --- js/src/ui/TxList/TxRow/txRow.js | 75 +++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 32 deletions(-) diff --git a/js/src/ui/TxList/TxRow/txRow.js b/js/src/ui/TxList/TxRow/txRow.js index c2061a581..cefa41110 100644 --- a/js/src/ui/TxList/TxRow/txRow.js +++ b/js/src/ui/TxList/TxRow/txRow.js @@ -210,31 +210,36 @@ class TxRow extends Component { if (!isCancelOpen && !isEditOpen) { const pendingStatus = this.getCondition(); + const isPending = pendingStatus === 'pending'; - if (pendingStatus === 'submitting') { - return ( -
-
-
- -
-
- ); - } return (
- - { pendingStatus } - -
- -
+ { + isPending + ? ( +
+
+
+ +
+
+ ) : ( +
+ + { pendingStatus } + +
+ +
+
+ ) + } + { isPending + ? ( +
+ +
+ ) : null + }
); } @@ -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 ( ); - } else { - return 'submitting'; } - } else if (blockNumber && block) { + } + + if (blockNumber) { block = blockNumber.minus(block); - // return (block.toNumber() < 0) - // ? block.abs().toFormat(0) + ' blocks left' - // : 'submitting'; if (block.toNumber() < 0) { return ( ); - } else { - return 'submitting'; } } + + return 'pending'; } cancelTx = () => { From 68c894829450e02e969a73b3ff5499bec447661d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Sat, 3 Jun 2017 14:41:42 +0200 Subject: [PATCH 08/13] fix WS server expose issue. (#5728) --- parity/configuration.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/parity/configuration.rs b/parity/configuration.rs index 5e5b43a64..84f38482b 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -778,6 +778,10 @@ impl Configuration { } fn ws_origins(&self) -> Option> { + if self.args.flag_unsafe_expose { + return None; + } + Self::parse_hosts(&self.args.flag_ws_origins) } @@ -1590,6 +1594,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"); From e89d49d958754bcc269fc26b4666f42a2f86e4ff Mon Sep 17 00:00:00 2001 From: GitLab Build Bot Date: Sat, 3 Jun 2017 13:18:47 +0000 Subject: [PATCH 09/13] [ci skip] js-precompiled 20170603-131456 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 93502c7ea..7276e53ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1825,7 +1825,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#d90d2f0f750cf0611495a3be86dadbdd3948ec1d" dependencies = [ "parity-dapps-glue 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index d72e2007b..14ac634cb 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "1.7.85", + "version": "1.7.86", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team ", From 8a364bbfaa03dff3f6d6166c79d6769ed4f13614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Sun, 4 Jun 2017 12:34:03 +0200 Subject: [PATCH 10/13] Fixing UI issues after UI server refactor (#5710) * Self-sufficient secureApi. * Updating embed. * Linting issues. --- js/src/api/transport/http/http.js | 4 +++ js/src/api/transport/ws/ws.js | 4 +++ js/src/embed.js | 10 ++++-- js/src/index.js | 4 +-- js/src/secureApi.js | 60 ++++++++++++++----------------- parity/configuration.rs | 14 +++++--- 6 files changed, 53 insertions(+), 43 deletions(-) diff --git a/js/src/api/transport/http/http.js b/js/src/api/transport/http/http.js index fed28e9e6..f7ef4579d 100644 --- a/js/src/api/transport/http/http.js +++ b/js/src/api/transport/http/http.js @@ -96,4 +96,8 @@ export default class Http extends JsonRpcBase { .then(nextTimeout) .catch(nextTimeout); } + + set url (url) { + this._url = url; + } } diff --git a/js/src/api/transport/ws/ws.js b/js/src/api/transport/ws/ws.js index d4e933917..63cfcc5ec 100644 --- a/js/src/api/transport/ws/ws.js +++ b/js/src/api/transport/ws/ws.js @@ -249,6 +249,10 @@ export default class Ws extends JsonRpcBase { }); } + set url (url) { + this._url = url; + } + get token () { return this._token; } diff --git a/js/src/embed.js b/js/src/embed.js index 56532257c..b59f55cd1 100644 --- a/js/src/embed.js +++ b/js/src/embed.js @@ -64,7 +64,7 @@ class FakeTransport { class FrameSecureApi extends SecureApi { constructor (transport) { - super('', null, () => { + super(transport.uiUrl, null, () => { return transport; }); } @@ -91,7 +91,11 @@ 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.create(api); @@ -104,7 +108,7 @@ store.dispatch(setApi(api)); window.secureApi = api; const app = ( - + ); const container = document.querySelector('#container'); diff --git a/js/src/index.js b/js/src/index.js index 9a5c34d3e..7e85dd51f 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -53,7 +53,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; @@ -61,7 +60,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); loadSender(api); diff --git a/js/src/secureApi.js b/js/src/secureApi.js index 2fd33fb9b..b539f3ece 100644 --- a/js/src/secureApi.js +++ b/js/src/secureApi.js @@ -26,14 +26,22 @@ export default class SecureApi extends Api { _isConnecting = false; _needsToken = false; _tokens = []; + _uiApi = null; _dappsUrl = null; _wsUrl = null; + _url = null; static getTransport (url, sysuiToken, protocol) { + const transportUrl = SecureApi.transportUrl(url, protocol); + + return new Api.Transport.Ws(transportUrl, sysuiToken, false); + } + + static transportUrl (url, protocol) { const proto = protocol() === 'https:' ? 'wss:' : 'ws:'; - return new Api.Transport.Ws(`${proto}//${url}`, sysuiToken, false); + return `${proto}//${url}`; } // Returns a protocol with `:` at the end. @@ -41,14 +49,16 @@ export default class SecureApi extends Api { return window.location.protocol; } - constructor (url, nextToken, getTransport = SecureApi.getTransport, protocol = SecureApi.protocol) { + constructor (uiUrl, nextToken, getTransport = SecureApi.getTransport, protocol = SecureApi.protocol) { const sysuiToken = store.get('sysuiToken'); - const transport = getTransport(url, sysuiToken, protocol); + const transport = getTransport(uiUrl, sysuiToken, protocol); super(transport); - this._wsUrl = url; this.protocol = protocol; + this._url = uiUrl; + this._uiApi = new Api(new Api.Transport.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) @@ -116,26 +126,6 @@ export default class SecureApi extends Api { return this._transport.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}`; - } - } - connect () { if (this._isConnecting) { return; @@ -189,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 @@ -240,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) => { @@ -259,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.transport.updateToken(token, false); - log.debug('connecting with token', token); + 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); - const connectPromise = this.transport.connect() + log.debug('connecting with token', token); + + return this.transport.connect(); + }) .then(() => { log.debug('connected with', token); @@ -318,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; }); } diff --git a/parity/configuration.rs b/parity/configuration.rs index 84f38482b..c211b29d5 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -762,10 +762,6 @@ impl Configuration { } fn ui_hosts(&self) -> Option> { - if self.args.flag_ui_no_validation { - return None; - } - self.hosts(&self.args.flag_ui_hosts, &self.ui_interface()) } @@ -774,6 +770,10 @@ impl Configuration { } fn ws_hosts(&self) -> Option> { + if self.args.flag_ui_no_validation { + return None; + } + self.hosts(&self.args.flag_ws_hosts, &self.ws_interface()) } @@ -1486,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, @@ -1500,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, @@ -1507,6 +1510,7 @@ mod tests { port: 8180, hosts: Some(vec![]), }); + assert!(conf3.ws_config().unwrap().hosts.is_some()); } #[test] From 754abdb8612636d76317828a4b8b3fb48c2c6212 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot Date: Sun, 4 Jun 2017 11:09:12 +0000 Subject: [PATCH 11/13] [ci skip] js-precompiled 20170604-110515 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7276e53ae..446ba8eeb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1825,7 +1825,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/paritytech/js-precompiled.git#d90d2f0f750cf0611495a3be86dadbdd3948ec1d" +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)", ] diff --git a/js/package.json b/js/package.json index 14ac634cb..cd6059033 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "1.7.86", + "version": "1.7.87", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team ", From 815f427c95afbe4978a48bb00fbe88be97a8b44f Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Mon, 5 Jun 2017 15:44:37 +0300 Subject: [PATCH 12/13] Update .gitlab-ci.yml add rust beta&nigthly test for master add more triggers --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 47730e547..d6e64475a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 From ad6ea4fa49d8a14f0fadec983813593a56985f89 Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Mon, 5 Jun 2017 20:40:40 +0200 Subject: [PATCH 13/13] Bump mio (#5763) * Bump mio * Fixed warnings * Update mio to crates. --- Cargo.lock | 81 ++++++++++-------------------------- parity/main.rs | 12 ------ rpc/src/v1/helpers/errors.rs | 4 -- util/io/Cargo.toml | 2 +- util/io/src/lib.rs | 3 ++ util/network/Cargo.toml | 2 +- util/network/src/lib.rs | 3 ++ 7 files changed, 30 insertions(+), 77 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 446ba8eeb..8b62d673e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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)", @@ -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" @@ -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)" = "" -"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)" = "" "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)" = "" "checksum nanomsg-sys 0.5.0 (git+https://github.com/paritytech/nanomsg.rs.git?branch=parity-1.7)" = "" "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" @@ -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)" = "" "checksum rocksdb-sys 0.3.0 (git+https://github.com/paritytech/rust-rocksdb)" = "" -"checksum rotor 0.6.3 (git+https://github.com/paritytech/rotor)" = "" +"checksum rotor 0.6.3 (git+https://github.com/tailhook/rotor)" = "" "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" diff --git a/parity/main.rs b/parity/main.rs index c05c9ba59..65a621adf 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -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; diff --git a/rpc/src/v1/helpers/errors.rs b/rpc/src/v1/helpers/errors.rs index 8ec266c76..df7d65067 100644 --- a/rpc/src/v1/helpers/errors.rs +++ b/rpc/src/v1/helpers/errors.rs @@ -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}; diff --git a/util/io/Cargo.toml b/util/io/Cargo.toml index d72aacff5..4f75270a5 100644 --- a/util/io/Cargo.toml +++ b/util/io/Cargo.toml @@ -7,7 +7,7 @@ version = "1.7.0" authors = ["Parity Technologies "] [dependencies] -mio = { git = "https://github.com/paritytech/mio" } +mio = "0.6.8" crossbeam = "0.2" parking_lot = "0.4" log = "0.3" diff --git a/util/io/src/lib.rs b/util/io/src/lib.rs index 63b2d5669..486ec4790 100644 --- a/util/io/src/lib.rs +++ b/util/io/src/lib.rs @@ -54,6 +54,9 @@ //! } //! ``` +//TODO: use Poll from mio +#![allow(deprecated)] + extern crate mio; #[macro_use] extern crate log as rlog; diff --git a/util/network/Cargo.toml b/util/network/Cargo.toml index c6cf35ec5..edbbefd17 100644 --- a/util/network/Cargo.toml +++ b/util/network/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Parity Technologies "] [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" diff --git a/util/network/src/lib.rs b/util/network/src/lib.rs index c4cc524f4..8fae474ff 100644 --- a/util/network/src/lib.rs +++ b/util/network/src/lib.rs @@ -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;