From 131aa14afa3f7417e38799010c22ad8f7938e45f Mon Sep 17 00:00:00 2001 From: NikVolf Date: Thu, 16 Mar 2017 03:37:50 +0300 Subject: [PATCH 01/14] ensure sealing work enabled if notifier registed --- ethcore/src/miner/miner.rs | 3 ++- ethcore/src/miner/stratum.rs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index d9df86cef..3d1389f3c 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -234,7 +234,8 @@ pub struct Miner { impl Miner { /// Push notifier that will handle new jobs pub fn push_notifier(&self, notifier: Box) { - self.notifiers.write().push(notifier) + self.notifiers.write().push(notifier); + self.sealing_work.lock().enabled = true; } /// Creates new instance of miner Arc. diff --git a/ethcore/src/miner/stratum.rs b/ethcore/src/miner/stratum.rs index e67cbb5e1..4da5d1849 100644 --- a/ethcore/src/miner/stratum.rs +++ b/ethcore/src/miner/stratum.rs @@ -211,6 +211,8 @@ impl From for Error { impl super::work_notify::NotifyWork for Stratum { fn notify(&self, pow_hash: H256, difficulty: U256, number: u64) { + trace!(target: "stratum", "Notify work"); + self.service.push_work_all( self.dispatcher.payload(pow_hash, difficulty, number) ).unwrap_or_else( From daca82bdfca953a118a26271b1b78262ce218b65 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Thu, 16 Mar 2017 04:09:26 +0300 Subject: [PATCH 02/14] fix condition check --- ethcore/src/miner/miner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 3d1389f3c..5d8d73837 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -305,7 +305,7 @@ impl Miner { fn forced_sealing(&self) -> bool { self.options.force_sealing - || !self.options.new_work_notify.is_empty() + || !self.notifiers.read().is_empty() || Instant::now() > *self.next_mandatory_reseal.read() } From 930c8b63dbc20f98e63463e5c03aab43b04b485f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 16 Mar 2017 13:15:56 +0100 Subject: [PATCH 03/14] Don't remove confirmed requests to early. --- rpc/src/v1/helpers/mod.rs | 1 + rpc/src/v1/helpers/signing_queue.rs | 2 +- rpc/src/v1/impls/signing.rs | 45 +++++++++++++++++++++-------- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/rpc/src/v1/helpers/mod.rs b/rpc/src/v1/helpers/mod.rs index ae8990cdc..76d34abdf 100644 --- a/rpc/src/v1/helpers/mod.rs +++ b/rpc/src/v1/helpers/mod.rs @@ -38,5 +38,6 @@ pub use self::requests::{ }; pub use self::signing_queue::{ ConfirmationsQueue, ConfirmationPromise, ConfirmationResult, SigningQueue, QueueEvent, DefaultAccount, + QUEUE_LIMIT as SIGNING_QUEUE_LIMIT, }; pub use self::signer::SignerService; diff --git a/rpc/src/v1/helpers/signing_queue.rs b/rpc/src/v1/helpers/signing_queue.rs index 36563d061..70f116a4f 100644 --- a/rpc/src/v1/helpers/signing_queue.rs +++ b/rpc/src/v1/helpers/signing_queue.rs @@ -77,7 +77,7 @@ pub enum QueueAddError { } // TODO [todr] to consider: timeout instead of limit? -const QUEUE_LIMIT: usize = 50; +pub const QUEUE_LIMIT: usize = 50; /// A queue of transactions awaiting to be confirmed and signed. pub trait SigningQueue: Send + Sync { diff --git a/rpc/src/v1/impls/signing.rs b/rpc/src/v1/impls/signing.rs index d737131a6..bc01fbcda 100644 --- a/rpc/src/v1/impls/signing.rs +++ b/rpc/src/v1/impls/signing.rs @@ -27,7 +27,7 @@ use jsonrpc_core::Error; use v1::helpers::{ errors, DefaultAccount, - SigningQueue, ConfirmationPromise, ConfirmationResult, SignerService + SIGNING_QUEUE_LIMIT, SigningQueue, ConfirmationPromise, ConfirmationResult, SignerService }; use v1::helpers::dispatch::{self, Dispatcher}; use v1::metadata::Metadata; @@ -42,7 +42,10 @@ use v1::types::{ Origin, }; -const MAX_PENDING_DURATION: u64 = 60 * 60; +/// After 60s entries that are not queried with `check_request` will get garbage collected. +const MAX_PENDING_DURATION_SEC: u64 = 60; +/// Max number of total requests pending and completed, before we start garbage collecting them. +const MAX_TOTAL_REQUESTS: usize = SIGNING_QUEUE_LIMIT; enum DispatchResult { Promise(ConfirmationPromise), @@ -71,6 +74,21 @@ fn handle_dispatch(res: Result, on_response: } } +fn collect_garbage(map: &mut TransientHashMap) { + map.prune(); + if map.len() > MAX_TOTAL_REQUESTS { + // Remove all non-waiting entries. + let non_waiting: Vec<_> = map + .iter() + .filter(|&(_, val)| val.result() != ConfirmationResult::Waiting) + .map(|(key, _)| *key) + .collect(); + for k in non_waiting { + map.remove(&k); + } + } +} + impl SigningQueueClient { /// Creates a new signing queue client given shared signing queue. pub fn new(signer: &Arc, dispatcher: D, accounts: &Arc) -> Self { @@ -78,7 +96,7 @@ impl SigningQueueClient { signer: Arc::downgrade(signer), accounts: Arc::downgrade(accounts), dispatcher: dispatcher, - pending: Arc::new(Mutex::new(TransientHashMap::new(MAX_PENDING_DURATION))), + pending: Arc::new(Mutex::new(TransientHashMap::new(MAX_PENDING_DURATION_SEC))), } } @@ -124,7 +142,10 @@ impl ParitySigning for SigningQueueClient { DispatchResult::Value(v) => RpcEither::Or(v), DispatchResult::Promise(promise) => { let id = promise.id(); - pending.lock().insert(id, promise); + let mut pending = pending.lock(); + collect_garbage(&mut pending); + pending.insert(id, promise); + RpcEither::Either(id.into()) }, }) @@ -138,7 +159,10 @@ impl ParitySigning for SigningQueueClient { DispatchResult::Value(v) => RpcEither::Or(v), DispatchResult::Promise(promise) => { let id = promise.id(); - pending.lock().insert(id, promise); + let mut pending = pending.lock(); + collect_garbage(&mut pending); + pending.insert(id, promise); + RpcEither::Either(id.into()) }, }) @@ -146,18 +170,15 @@ impl ParitySigning for SigningQueueClient { } fn check_request(&self, id: RpcU256) -> Result, Error> { - let mut pending = self.pending.lock(); let id: U256 = id.into(); - let res = match pending.get(&id) { + match self.pending.lock().get(&id) { Some(ref promise) => match promise.result() { - ConfirmationResult::Waiting => { return Ok(None); } + ConfirmationResult::Waiting => Ok(None), ConfirmationResult::Rejected => Err(errors::request_rejected()), ConfirmationResult::Confirmed(rpc_response) => rpc_response.map(Some), }, - _ => { return Err(errors::request_not_found()); } - }; - pending.remove(&id); - res + _ => Err(errors::request_not_found()), + } } fn decrypt_message(&self, meta: Metadata, address: RpcH160, data: RpcBytes) -> BoxFuture { From 0c051fb78e9fb22f9f52cdeef87485fd712d406e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 17 Mar 2017 13:20:10 +0100 Subject: [PATCH 04/14] Bumping multihash and libc --- Cargo.lock | 109 +++++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 36a8acd00..14eac1449 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -205,7 +205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "integer-encoding 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "multibase 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "multihash 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "multihash 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -254,7 +254,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -262,7 +262,7 @@ name = "core-foundation-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -285,7 +285,7 @@ version = "1.1.1" source = "git+https://github.com/ethcore/rust-ctrlc.git#f4927770f89eca80ec250911eea3adcbf579ac48" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -294,7 +294,7 @@ name = "daemonize" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -349,7 +349,7 @@ source = "git+https://github.com/ethcore/rust-secp256k1#98ad9b9ecae44a563efdd642 dependencies = [ "arrayvec 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -423,7 +423,7 @@ version = "0.1.2" dependencies = [ "bigint 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -590,7 +590,7 @@ dependencies = [ "ethcrypto 0.1.0", "ethkey 0.2.0", "igd 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.1 (git+https://github.com/ethcore/mio)", "parking_lot 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -714,7 +714,7 @@ dependencies = [ "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -782,7 +782,7 @@ dependencies = [ "ethkey 0.2.0", "itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -843,7 +843,7 @@ name = "fdlimit" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -863,7 +863,7 @@ name = "flate2" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -938,7 +938,7 @@ version = "0.3.1" source = "git+https://github.com/ethcore/hidapi-rs#9a127c1dca7e327e4fdd428406a76c9f5ef48563" dependencies = [ "gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1065,7 +1065,7 @@ version = "0.1.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)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1174,7 +1174,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.16" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1183,7 +1183,7 @@ version = "0.3.0" source = "git+https://github.com/ethcore/libusb-rs#32bacf61abd981d5cbd4a8fecca5a2dc0b762a96" dependencies = [ "bit-set 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "libusb-sys 0.2.3 (git+https://github.com/ethcore/libusb-sys)", ] @@ -1193,7 +1193,7 @@ version = "0.2.3" source = "git+https://github.com/ethcore/libusb-sys#c10b1180646c9dc3f23a9b6bb825abcd3b7487ce" dependencies = [ "gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1229,7 +1229,7 @@ name = "memchr" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1257,7 +1257,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1266,7 +1266,7 @@ version = "0.5.1" source = "git+https://github.com/ethcore/mio?branch=v0.5.x#3842d3b250ffd7bd9b16f9586b875ddcbac2b0dd" dependencies = [ "bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1282,7 +1282,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1298,7 +1298,7 @@ version = "0.6.0-dev" source = "git+https://github.com/ethcore/mio?branch=timer-fix#31eccc40ece3d47abaefaf23bb2114033175b972" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1314,7 +1314,7 @@ source = "git+https://github.com/ethcore/mio#ef182bae193a9c7457cd2cf661fcaffb226 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.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1330,7 +1330,7 @@ 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)", "lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1370,10 +1370,10 @@ dependencies = [ [[package]] name = "multihash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ring 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1382,7 +1382,7 @@ name = "nanomsg" version = "0.5.1" source = "git+https://github.com/ethcore/nanomsg.rs.git#c40fe442c9afaea5b38009a3d992ca044dcceb00" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "nanomsg-sys 0.5.0 (git+https://github.com/ethcore/nanomsg.rs.git)", ] @@ -1392,7 +1392,7 @@ version = "0.5.0" source = "git+https://github.com/ethcore/nanomsg.rs.git#c40fe442c9afaea5b38009a3d992ca044dcceb00" dependencies = [ "gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1414,7 +1414,7 @@ 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)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (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)", ] @@ -1425,7 +1425,7 @@ version = "0.5.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)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1435,7 +1435,7 @@ 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.16 (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)", @@ -1448,7 +1448,7 @@ 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.16 (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)", @@ -1538,7 +1538,7 @@ name = "num_cpus" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1570,7 +1570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1580,7 +1580,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1635,7 +1635,7 @@ dependencies = [ "hyper 0.10.0-a.0 (git+https://github.com/ethcore/hyper)", "jsonrpc-http-server 6.0.0 (git+https://github.com/ethcore/jsonrpc.git?branch=parity-1.6)", "mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "multihash 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "multihash 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.1.0", ] @@ -1736,7 +1736,7 @@ version = "0.2.0" 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)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1865,7 +1865,7 @@ name = "rand" version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1874,7 +1874,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1912,10 +1912,11 @@ dependencies = [ [[package]] name = "ring" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1934,7 +1935,7 @@ name = "rocksdb" version = "0.4.5" source = "git+https://github.com/ethcore/rust-rocksdb#64c63ccbe1f62c2e2b39262486f9ba813793af58" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "rocksdb-sys 0.3.0 (git+https://github.com/ethcore/rust-rocksdb)", ] @@ -1944,7 +1945,7 @@ version = "0.3.0" source = "git+https://github.com/ethcore/rust-rocksdb#64c63ccbe1f62c2e2b39262486f9ba813793af58" dependencies = [ "gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1965,7 +1966,7 @@ version = "0.2.2" 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)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1976,7 +1977,7 @@ version = "0.3.0" 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)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1999,7 +2000,7 @@ version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2061,7 +2062,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2071,7 +2072,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2277,7 +2278,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.16 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2320,7 +2321,7 @@ name = "termios" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2329,7 +2330,7 @@ version = "2.0.0" 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)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2346,7 +2347,7 @@ version = "0.1.35" 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)", - "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2650,7 +2651,7 @@ dependencies = [ "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "49247ec2a285bb3dcb23cbd9c35193c025e7251bfce77c1d5da97e6362dffe7f" "checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b" -"checksum libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)" = "408014cace30ee0f767b1c4517980646a573ec61a57957aeeabcac8ac0a02e8d" +"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" "checksum libusb 0.3.0 (git+https://github.com/ethcore/libusb-rs)" = "" "checksum libusb-sys 0.2.3 (git+https://github.com/ethcore/libusb-sys)" = "" "checksum linked-hash-map 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bda158e0dabeb97ee8a401f4d17e479d6b891a14de0bba79d5cc2d4d325b5e48" @@ -2670,7 +2671,7 @@ dependencies = [ "checksum miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d5bfc6782530ac8ace97af10a540054a37126b63b0702ddaaa243b73b5745b9a" "checksum msdos_time 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c04b68cc63a8480fb2550343695f7be72effdec953a9d4508161c3e69041c7d8" "checksum multibase 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9c35dac080fd6e16a99924c8dfdef0af89d797dd851adab25feaffacf7850d6" -"checksum multihash 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "755d5a39bee3faaf649437e873beab334990221b2faf1f2e56ca10a9e4600235" +"checksum multihash 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c9f70f2402fa07c16c40be8fd0a748a39257c5dc3ff5c857cbbde2f39135c505" "checksum nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)" = "" "checksum nanomsg-sys 0.5.0 (git+https://github.com/ethcore/nanomsg.rs.git)" = "" "checksum native-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4e52995154bb6f0b41e4379a279482c9387c1632e3798ba4e511ef8c54ee09" @@ -2720,7 +2721,7 @@ dependencies = [ "checksum regex 0.1.68 (registry+https://github.com/rust-lang/crates.io-index)" = "b4329b8928a284580a1c63ec9d846b12f6d3472317243ff7077aff11f23f2b29" "checksum regex-syntax 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "841591b1e05609a643e3b4d0045fce04f701daba7151ddcd3ad47b080693d5a9" "checksum reqwest 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bef9ed8fdfcc30947d6b774938dc0c3f369a474efe440df2c7f278180b2d2e6" -"checksum ring 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "87ac4fce2ee4bb10dd106788e90fdfa4c5a7f3f9f6aae29824db77dc57e2767d" +"checksum ring 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "595afba2db7545b940ec900dc59b5281f719d327fc0674eeadc9953617e55357" "checksum rocksdb 0.4.5 (git+https://github.com/ethcore/rust-rocksdb)" = "" "checksum rocksdb-sys 0.3.0 (git+https://github.com/ethcore/rust-rocksdb)" = "" "checksum rotor 0.6.3 (git+https://github.com/ethcore/rotor)" = "" From 8c98ddb8430da485066721de29466eab2e1756ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 17 Mar 2017 13:47:05 +0100 Subject: [PATCH 05/14] Updating nanomsg --- Cargo.lock | 18 +++++++++--------- ipc/hypervisor/Cargo.toml | 2 +- ipc/nano/Cargo.toml | 2 +- ipc/rpc/Cargo.toml | 2 +- ipc/tests/Cargo.toml | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14eac1449..96e879349 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -493,7 +493,7 @@ version = "1.7.0" dependencies = [ "ethcore-devtools 1.7.0", "ethcore-util 1.7.0", - "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)", + "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7)", "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -516,7 +516,7 @@ dependencies = [ "ethcore-ipc-codegen 1.7.0", "ethcore-ipc-nano 1.7.0", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)", + "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7)", "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -528,7 +528,7 @@ dependencies = [ "ethcore-ipc 1.7.0", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)", + "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7)", ] [[package]] @@ -541,7 +541,7 @@ dependencies = [ "ethcore-ipc-nano 1.7.0", "ethcore-util 1.7.0", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)", + "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7)", "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1380,16 +1380,16 @@ dependencies = [ [[package]] name = "nanomsg" version = "0.5.1" -source = "git+https://github.com/ethcore/nanomsg.rs.git#c40fe442c9afaea5b38009a3d992ca044dcceb00" +source = "git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7#981f791f9b2673bd38a939c5104f7099319f1f9e" dependencies = [ "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "nanomsg-sys 0.5.0 (git+https://github.com/ethcore/nanomsg.rs.git)", + "nanomsg-sys 0.5.0 (git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7)", ] [[package]] name = "nanomsg-sys" version = "0.5.0" -source = "git+https://github.com/ethcore/nanomsg.rs.git#c40fe442c9afaea5b38009a3d992ca044dcceb00" +source = "git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7#981f791f9b2673bd38a939c5104f7099319f1f9e" dependencies = [ "gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2672,8 +2672,8 @@ dependencies = [ "checksum msdos_time 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c04b68cc63a8480fb2550343695f7be72effdec953a9d4508161c3e69041c7d8" "checksum multibase 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9c35dac080fd6e16a99924c8dfdef0af89d797dd851adab25feaffacf7850d6" "checksum multihash 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c9f70f2402fa07c16c40be8fd0a748a39257c5dc3ff5c857cbbde2f39135c505" -"checksum nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)" = "" -"checksum nanomsg-sys 0.5.0 (git+https://github.com/ethcore/nanomsg.rs.git)" = "" +"checksum nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7)" = "" +"checksum nanomsg-sys 0.5.0 (git+https://github.com/ethcore/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.23 (registry+https://github.com/rust-lang/crates.io-index)" = "6a816012ca11cb47009693c1e0c6130e26d39e4d97ee2a13c50e868ec83e3204" "checksum nix 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f05c2fc965fc1cd6b73fa57fa7b89f288178737f2f3ce9e63e4a6a141189000e" diff --git a/ipc/hypervisor/Cargo.toml b/ipc/hypervisor/Cargo.toml index 21955bdf3..8dc12d4bd 100644 --- a/ipc/hypervisor/Cargo.toml +++ b/ipc/hypervisor/Cargo.toml @@ -9,7 +9,7 @@ build = "build.rs" [dependencies] ethcore-ipc = { path = "../rpc" } -nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git" } +nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git", branch = "parity-1.7" } ethcore-ipc-nano = { path = "../nano" } semver = "0.5" log = "0.3" diff --git a/ipc/nano/Cargo.toml b/ipc/nano/Cargo.toml index 9948820fe..59e11aef1 100644 --- a/ipc/nano/Cargo.toml +++ b/ipc/nano/Cargo.toml @@ -8,6 +8,6 @@ license = "GPL-3.0" [dependencies] ethcore-ipc = { path = "../rpc" } -nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git" } +nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git", branch = "parity-1.7" } log = "0.3" lazy_static = "0.2" diff --git a/ipc/rpc/Cargo.toml b/ipc/rpc/Cargo.toml index d8be8b444..6f56b3c98 100644 --- a/ipc/rpc/Cargo.toml +++ b/ipc/rpc/Cargo.toml @@ -8,6 +8,6 @@ license = "GPL-3.0" [dependencies] ethcore-devtools = { path = "../../devtools" } -nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git" } +nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git", branch = "parity-1.7" } ethcore-util = { path = "../../util" } semver = "0.5" diff --git a/ipc/tests/Cargo.toml b/ipc/tests/Cargo.toml index 1e29c5c35..1dffa7cb5 100644 --- a/ipc/tests/Cargo.toml +++ b/ipc/tests/Cargo.toml @@ -11,7 +11,7 @@ path = "run.rs" ethcore-ipc = { path = "../rpc" } ethcore-devtools = { path = "../../devtools" } semver = "0.5" -nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git" } +nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git", branch = "parity-1.7" } ethcore-ipc-nano = { path = "../nano" } ethcore-util = { path = "../../util" } log = "0.3" From 7e9936a3cdf9cc001dc565a08b6100dd84f71590 Mon Sep 17 00:00:00 2001 From: arkpar Date: Fri, 17 Mar 2017 14:10:09 +0100 Subject: [PATCH 06/14] bump nanomsg --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 96e879349..bb0c921d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1380,7 +1380,7 @@ dependencies = [ [[package]] name = "nanomsg" version = "0.5.1" -source = "git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7#981f791f9b2673bd38a939c5104f7099319f1f9e" +source = "git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7#26ec71ecbdb284d7a5d596bdb3d0fde02c55d0bc" dependencies = [ "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "nanomsg-sys 0.5.0 (git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7)", @@ -1389,7 +1389,7 @@ dependencies = [ [[package]] name = "nanomsg-sys" version = "0.5.0" -source = "git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7#981f791f9b2673bd38a939c5104f7099319f1f9e" +source = "git+https://github.com/ethcore/nanomsg.rs.git?branch=parity-1.7#26ec71ecbdb284d7a5d596bdb3d0fde02c55d0bc" dependencies = [ "gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", From e756b09e5b5f57f679034b68e82ca65b2b523a9c Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sat, 18 Mar 2017 10:30:18 +0100 Subject: [PATCH 07/14] Add z-index to small modals as well (#4923) --- js/src/ui/Portal/portal.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/src/ui/Portal/portal.css b/js/src/ui/Portal/portal.css index 2e6ff8370..85e8be4f1 100644 --- a/js/src/ui/Portal/portal.css +++ b/js/src/ui/Portal/portal.css @@ -68,12 +68,13 @@ $popoverZ: 3600; } &.modal { + z-index: $modalZ; + &:not(.small) { bottom: $modalBottom; left: $modalLeft; right: $modalRight; top: $modalTop; - z-index: $modalZ; } /* TODO: Small Portals don't adjust their overall height like we have with the From 124ab28c9e379d3b9e61aad9f674f7b10bf9bc6d Mon Sep 17 00:00:00 2001 From: Callum Macdonald Date: Sun, 19 Mar 2017 08:45:39 +0100 Subject: [PATCH 08/14] Swap out ethcore.io url (#4947) It throws a certificate error on HTTPS because the certificate is only valid on parity.io. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2511e7a4f..33954f67a 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ of RPC APIs. If you run into an issue while using parity, feel free to file one in this repository or hop on our [gitter chat room][gitter-url] to ask a question. We are glad to help! -Parity's current release is 1.5. You can download it at https://ethcore.io/parity.html or follow the instructions +Parity's current release is 1.5. You can download it at https://parity.io or follow the instructions below to build from source. ---- From 34d28189ea48a8d1605508880dce6a9c73517d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Sun, 19 Mar 2017 08:46:51 +0100 Subject: [PATCH 09/14] Remove transaction RPC (#4949) --- ethcore/src/miner/miner.rs | 10 ++++++++ ethcore/src/miner/mod.rs | 4 ++++ rpc/src/v1/impls/light/parity_set.rs | 6 ++++- rpc/src/v1/impls/parity_set.rs | 24 +++++++++---------- rpc/src/v1/tests/helpers/miner_service.rs | 4 ++++ rpc/src/v1/tests/mocked/parity_set.rs | 28 +++++++++++++++++++++++ rpc/src/v1/traits/parity_set.rs | 11 ++++++++- 7 files changed, 72 insertions(+), 15 deletions(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 5d8d73837..5cbc8f76b 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1018,6 +1018,16 @@ impl MinerService for Miner { } } + fn remove_pending_transaction(&self, chain: &MiningBlockChainClient, hash: &H256) -> Option { + let mut queue = self.transaction_queue.lock(); + let tx = queue.find(hash); + if tx.is_some() { + let fetch_nonce = |a: &Address| chain.latest_nonce(a); + queue.remove_invalid(hash, &fetch_nonce); + } + tx + } + fn pending_receipt(&self, best_block: BlockNumber, hash: &H256) -> Option { self.from_pending_block( best_block, diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs index 403aca760..a9e7a9a5d 100644 --- a/ethcore/src/miner/mod.rs +++ b/ethcore/src/miner/mod.rs @@ -150,6 +150,10 @@ pub trait MinerService : Send + Sync { /// Query pending transactions for hash. fn transaction(&self, best_block: BlockNumber, hash: &H256) -> Option; + /// Removes transaction from the queue. + /// NOTE: The transaction is not removed from pending block if mining. + fn remove_pending_transaction(&self, chain: &MiningBlockChainClient, hash: &H256) -> Option; + /// Get a list of all pending transactions in the queue. fn pending_transactions(&self) -> Vec; diff --git a/rpc/src/v1/impls/light/parity_set.rs b/rpc/src/v1/impls/light/parity_set.rs index 2127db345..40af2f44c 100644 --- a/rpc/src/v1/impls/light/parity_set.rs +++ b/rpc/src/v1/impls/light/parity_set.rs @@ -28,7 +28,7 @@ use util::sha3; use jsonrpc_core::Error; use v1::helpers::errors; use v1::traits::ParitySet; -use v1::types::{Bytes, H160, H256, U256, ReleaseInfo}; +use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction}; /// Parity-specific rpc interface for operations altering the settings. pub struct ParitySetClient { @@ -139,4 +139,8 @@ impl ParitySet for ParitySetClient { fn execute_upgrade(&self) -> Result { Err(errors::light_unimplemented(None)) } + + fn remove_transaction(&self, _hash: H256) -> Result, Error> { + Err(errors::light_unimplemented(None)) + } } diff --git a/rpc/src/v1/impls/parity_set.rs b/rpc/src/v1/impls/parity_set.rs index 0c844c163..19483635c 100644 --- a/rpc/src/v1/impls/parity_set.rs +++ b/rpc/src/v1/impls/parity_set.rs @@ -30,15 +30,10 @@ use updater::{Service as UpdateService}; use jsonrpc_core::Error; use v1::helpers::errors; use v1::traits::ParitySet; -use v1::types::{Bytes, H160, H256, U256, ReleaseInfo}; +use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction}; /// Parity-specific rpc interface for operations altering the settings. -pub struct ParitySetClient where - C: MiningBlockChainClient, - M: MinerService, - U: UpdateService, - F: Fetch, -{ +pub struct ParitySetClient { client: Weak, miner: Weak, updater: Weak, @@ -46,12 +41,7 @@ pub struct ParitySetClient where fetch: F, } -impl ParitySetClient where - C: MiningBlockChainClient, - M: MinerService, - U: UpdateService, - F: Fetch, -{ +impl ParitySetClient { /// Creates new `ParitySetClient` with given `Fetch`. pub fn new(client: &Arc, miner: &Arc, updater: &Arc, net: &Arc, fetch: F) -> Self { ParitySetClient { @@ -181,4 +171,12 @@ impl ParitySet for ParitySetClient where let updater = take_weak!(self.updater); Ok(updater.execute_upgrade()) } + + fn remove_transaction(&self, hash: H256) -> Result, Error> { + let miner = take_weak!(self.miner); + let client = take_weak!(self.client); + let hash = hash.into(); + + Ok(miner.remove_pending_transaction(&*client, &hash).map(Into::into)) + } } diff --git a/rpc/src/v1/tests/helpers/miner_service.rs b/rpc/src/v1/tests/helpers/miner_service.rs index f84431e6e..4cdfbbd8c 100644 --- a/rpc/src/v1/tests/helpers/miner_service.rs +++ b/rpc/src/v1/tests/helpers/miner_service.rs @@ -221,6 +221,10 @@ impl MinerService for TestMinerService { self.pending_transactions.lock().get(hash).cloned().map(Into::into) } + fn remove_pending_transaction(&self, _chain: &MiningBlockChainClient, hash: &H256) -> Option { + self.pending_transactions.lock().remove(hash).map(Into::into) + } + fn pending_transactions(&self) -> Vec { self.pending_transactions.lock().values().cloned().map(Into::into).collect() } diff --git a/rpc/src/v1/tests/mocked/parity_set.rs b/rpc/src/v1/tests/mocked/parity_set.rs index 337090499..65d69775a 100644 --- a/rpc/src/v1/tests/mocked/parity_set.rs +++ b/rpc/src/v1/tests/mocked/parity_set.rs @@ -204,3 +204,31 @@ fn rpc_parity_set_hash_content() { assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); } +#[test] +fn rpc_parity_remove_transaction() { + use ethcore::transaction::{Transaction, Action}; + + let miner = miner_service(); + let client = client_service(); + let network = network_service(); + let updater = updater_service(); + let mut io = IoHandler::new(); + io.extend_with(parity_set_client(&client, &miner, &updater, &network).to_delegate()); + + let tx = Transaction { + nonce: 1.into(), + gas_price: 0x9184e72a000u64.into(), + gas: 0x76c0.into(), + action: Action::Call(5.into()), + value: 0x9184e72au64.into(), + data: vec![] + }; + let signed = tx.fake_sign(2.into()); + let hash = signed.hash(); + + let request = r#"{"jsonrpc": "2.0", "method": "parity_removeTransaction", "params":[""#.to_owned() + &format!("0x{:?}", hash) + r#""], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":{"blockHash":null,"blockNumber":null,"condition":null,"creates":null,"from":"0x0000000000000000000000000000000000000002","gas":"0x76c0","gasPrice":"0x9184e72a000","hash":"0x0072c69d780cdfbfc02fed5c7d184151f9a166971d045e55e27695aaa5bcb55e","input":"0x","networkId":null,"nonce":"0x1","publicKey":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","r":"0x0","raw":"0xe9018609184e72a0008276c0940000000000000000000000000000000000000005849184e72a80808080","s":"0x0","standardV":"0x4","to":"0x0000000000000000000000000000000000000005","transactionIndex":null,"v":"0x0","value":"0x9184e72a"},"id":1}"#; + + miner.pending_transactions.lock().insert(hash, signed); + assert_eq!(io.handle_request_sync(&request), Some(response.to_owned())); +} diff --git a/rpc/src/v1/traits/parity_set.rs b/rpc/src/v1/traits/parity_set.rs index d5fc066fa..b91b33574 100644 --- a/rpc/src/v1/traits/parity_set.rs +++ b/rpc/src/v1/traits/parity_set.rs @@ -19,7 +19,7 @@ use jsonrpc_core::Error; use futures::BoxFuture; -use v1::types::{Bytes, H160, H256, U256, ReleaseInfo}; +use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction}; build_rpc_trait! { /// Parity-specific rpc interface for operations altering the settings. @@ -103,5 +103,14 @@ build_rpc_trait! { /// Execute a release which is ready according to upgrade_ready(). #[rpc(name = "parity_executeUpgrade")] fn execute_upgrade(&self) -> Result; + + /// Removes transaction from transaction queue. + /// Makes sense only for transactions that were not propagated to other peers yet + /// like scheduled transactions or transactions in future. + /// It might also work for some local transactions with to low gas price + /// or excessive gas limit that are not accepted by other peers whp. + /// Returns `true` when transaction was removed, `false` if it was not found. + #[rpc(name = "parity_removeTransaction")] + fn remove_transaction(&self, H256) -> Result, Error>; } } From 4ebd59735412c2e67cb8ed1866073427abc21f89 Mon Sep 17 00:00:00 2001 From: Michael Egger Date: Sun, 19 Mar 2017 08:52:00 +0100 Subject: [PATCH 10/14] start parity after network.target (#4952) --- scripts/parity.service | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/parity.service b/scripts/parity.service index 9a2a1f29f..b798908bb 100644 --- a/scripts/parity.service +++ b/scripts/parity.service @@ -1,5 +1,6 @@ [Unit] Description=Parity Daemon +After=network.target [Service] EnvironmentFile=%h/.parity/parity.conf From c009a289d51b0f191ec10d93fa53220ce6d6c5d3 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac Date: Sun, 19 Mar 2017 08:52:14 +0100 Subject: [PATCH 11/14] Fix outputs in Contract Constant Queries (#4953) --- js/src/views/Contract/Queries/queries.js | 53 +++++++++++++++++------- js/src/views/Contract/contract.js | 7 +++- 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/js/src/views/Contract/Queries/queries.js b/js/src/views/Contract/Queries/queries.js index 299d1ee84..de939a93d 100644 --- a/js/src/views/Contract/Queries/queries.js +++ b/js/src/views/Contract/Queries/queries.js @@ -40,7 +40,6 @@ export default class Queries extends Component { if (!contract) { return null; } - const queries = contract.functions .filter((fn) => fn.constant) .sort(this._sortEntries); @@ -113,7 +112,12 @@ export default class Queries extends Component { } renderQuery (fn) { - const { values } = this.props; + const { abi } = fn; + let values = this.props.values[fn.name] || []; + + if (values && typeof values.slice === 'function') { + values = values.slice(); + } return (
@@ -125,40 +129,59 @@ export default class Queries extends Component { - { this.renderValue(values[fn.name], fn.outputs[0].kind.type) } + { + abi.outputs + .map((output, index) => this.renderValue(values[index], output, index)) + }
); } - renderValue (value, type) { - if (typeof value === 'undefined') { + renderValue (tokenValue, output, key) { + if (typeof tokenValue === 'undefined') { return null; } - const { api } = this.context; const { accountsInfo } = this.props; + const { name, type } = output; + const label = `${name ? `${name}: ` : ''}${type}`; + const value = this.getTokenValue(tokenValue); - let valueToDisplay = value; - - if (api.util.isArray(value)) { - valueToDisplay = api.util.bytesToHex(value); - } else if (typeof value === 'boolean') { - valueToDisplay = value ? 'true' : 'false'; - } return ( ); } + getTokenValue (token) { + const { api } = this.context; + const { type, value } = token; + + if (value === null || value === undefined) { + return 'no data'; + } + + if (type === 'array' || type === 'fixedArray') { + return value.map((tok) => this.getTokenValue(tok)); + } + + if (Array.isArray(value)) { + return api.util.bytesToHex(value); + } + + return value; + } + _sortEntries (a, b) { return a.name.localeCompare(b.name); } diff --git a/js/src/views/Contract/contract.js b/js/src/views/Contract/contract.js index 801bd3f43..9f75bcbe8 100644 --- a/js/src/views/Contract/contract.js +++ b/js/src/views/Contract/contract.js @@ -363,12 +363,15 @@ class Contract extends Component { .filter((fn) => !fn.inputs.length); Promise - .all(queries.map((query) => query.call())) + .all(queries.map((query) => query.call({ rawTokens: true }))) .then(results => { const values = queries.reduce((object, fn, idx) => { const key = fn.name; - object[key] = results[idx]; + object[key] = fn.outputs.length === 1 + ? [ results[idx] ] + : results[idx]; + return object; }, {}); From 2d477946ea806bb11b473d65287dd408fa9af851 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Sun, 19 Mar 2017 19:10:18 +0300 Subject: [PATCH 12/14] alow failure to coverage --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c92fdca83..5c97864d2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -516,6 +516,7 @@ test-coverage: # - echo "Coverage:" $COVERAGE tags: - kcov + allow_failure: true test-darwin: stage: test only: From 99c247fe9f19f8eb8368619153fc70ee75768612 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot Date: Sun, 19 Mar 2017 17:16:05 +0000 Subject: [PATCH 13/14] [ci skip] js-precompiled 20170319-171327 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bb0c921d8..8f77fda47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1699,7 +1699,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#547a5352d779bc7821a7a2ec14c6d480833aeabb" +source = "git+https://github.com/ethcore/js-precompiled.git#7039b5b8e44196718333dc3fcdfcadae2a97c7fd" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index 61cdce158..9d50ebe07 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "1.7.18", + "version": "1.7.19", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team ", From 354ec19e3b427c8a02d552b237620e9b4b24fa21 Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Sun, 19 Mar 2017 18:34:31 +0100 Subject: [PATCH 14/14] Always send full chunks (#4960) --- hw/src/ledger.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/src/ledger.rs b/hw/src/ledger.rs index fca1d0c3a..bc449e251 100644 --- a/hw/src/ledger.rs +++ b/hw/src/ledger.rs @@ -271,7 +271,7 @@ impl Manager { chunk_size += size; } trace!("writing {:?}", &hid_chunk[..]); - let n = handle.write(&hid_chunk[0..chunk_size])?; + let n = handle.write(&hid_chunk[..])?; if n < chunk_size { return Err(Error::Protocol("Write data size mismatch")); }