From 51b61ccdbf75f1a45485a2ba7a2216ffc970a744 Mon Sep 17 00:00:00 2001 From: Dmitry Kashitsyn Date: Sun, 15 Oct 2017 11:57:09 +0700 Subject: [PATCH 1/6] Extracts MemoryLruCache to a separate crate (#6693) --- util/memory_cache/Cargo.toml | 10 ++++++++++ util/{src/cache.rs => memory_cache/src/lib.rs} | 3 +++ util/src/lib.rs | 1 - 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 util/memory_cache/Cargo.toml rename util/{src/cache.rs => memory_cache/src/lib.rs} (98%) diff --git a/util/memory_cache/Cargo.toml b/util/memory_cache/Cargo.toml new file mode 100644 index 000000000..9179b3c8a --- /dev/null +++ b/util/memory_cache/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "memory_cache" +version = "0.1.0" +authors = ["Parity Technologies "] +description = "An LRU-cache which operates on memory used" +license = "GPL3" + +[dependencies] +heapsize = "0.4" +lru-cache = "0.1" diff --git a/util/src/cache.rs b/util/memory_cache/src/lib.rs similarity index 98% rename from util/src/cache.rs rename to util/memory_cache/src/lib.rs index e6f204192..af70b0cff 100644 --- a/util/src/cache.rs +++ b/util/memory_cache/src/lib.rs @@ -18,6 +18,9 @@ //! crate. // TODO: push changes upstream in a clean way. +extern crate heapsize; +extern crate lru_cache; + use heapsize::HeapSizeOf; use lru_cache::LruCache; diff --git a/util/src/lib.rs b/util/src/lib.rs index 863f811c4..7de3c4b39 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -116,7 +116,6 @@ extern crate log as rlog; pub mod misc; pub mod overlaydb; pub mod journaldb; -pub mod cache; pub use misc::*; pub use hashdb::*; From 4df541e47aab465a3d5bc8f6077fd6fe2dc58cdf Mon Sep 17 00:00:00 2001 From: Dmitry Kashitsyn Date: Sun, 15 Oct 2017 18:40:00 +0700 Subject: [PATCH 2/6] Refactors references to MemoryLruCache in ethcore (#6693) --- Cargo.lock | 11 +++++++++++ ethcore/Cargo.toml | 1 + ethcore/evm/Cargo.toml | 1 + ethcore/evm/src/interpreter/shared_cache.rs | 2 +- ethcore/evm/src/lib.rs | 1 + ethcore/light/Cargo.toml | 1 + ethcore/light/src/cache.rs | 2 +- ethcore/light/src/lib.rs | 1 + ethcore/src/engines/validator_set/safe_contract.rs | 2 +- ethcore/src/lib.rs | 1 + ethcore/src/state_db.rs | 2 +- 11 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95b19ce35..24961aa92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -606,6 +606,7 @@ dependencies = [ "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "macros 0.1.0", + "memory_cache 0.1.0", "memorydb 0.1.0", "migration 0.1.0", "native-contracts 0.1.0", @@ -759,6 +760,7 @@ dependencies = [ "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memory_cache 0.1.0", "memorydb 0.1.0", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "patricia_trie 0.1.0", @@ -1047,6 +1049,7 @@ dependencies = [ "heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memory_cache 0.1.0", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", @@ -1645,6 +1648,14 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "memory_cache" +version = "0.1.0" +dependencies = [ + "heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "memorydb" version = "0.1.0" diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index d9df99f9e..88cb97568 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -32,6 +32,7 @@ ethcore-logger = { path = "../logger" } ethcore-stratum = { path = "../stratum" } ethcore-util = { path = "../util" } ethcore-bigint = { path = "../util/bigint" } +memory_cache = { path = "../util/memory_cache" } ethjson = { path = "../json" } ethkey = { path = "../ethkey" } ethstore = { path = "../ethstore" } diff --git a/ethcore/evm/Cargo.toml b/ethcore/evm/Cargo.toml index 17b866428..ac15c362f 100644 --- a/ethcore/evm/Cargo.toml +++ b/ethcore/evm/Cargo.toml @@ -14,6 +14,7 @@ log = "0.3" vm = { path = "../vm" } hash = { path = "../../util/hash" } parking_lot = "0.4" +memory_cache = { path = "../../util/memory_cache" } [dev-dependencies] rustc-hex = "1.0" diff --git a/ethcore/evm/src/interpreter/shared_cache.rs b/ethcore/evm/src/interpreter/shared_cache.rs index 7b3b33b70..d0386b194 100644 --- a/ethcore/evm/src/interpreter/shared_cache.rs +++ b/ethcore/evm/src/interpreter/shared_cache.rs @@ -19,7 +19,7 @@ use hash::KECCAK_EMPTY; use heapsize::HeapSizeOf; use bigint::hash::H256; use parking_lot::Mutex; -use util::cache::MemoryLruCache; +use memory_cache::MemoryLruCache; use bit_set::BitSet; use super::super::instructions; diff --git a/ethcore/evm/src/lib.rs b/ethcore/evm/src/lib.rs index efc88d60d..7ddbed19e 100644 --- a/ethcore/evm/src/lib.rs +++ b/ethcore/evm/src/lib.rs @@ -23,6 +23,7 @@ extern crate parking_lot; extern crate heapsize; extern crate vm; extern crate hash; +extern crate memory_cache; #[macro_use] extern crate lazy_static; diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index fb7030bcc..b6260b7f0 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -40,6 +40,7 @@ stats = { path = "../../util/stats" } hash = { path = "../../util/hash" } triehash = { path = "../../util/triehash" } kvdb = { path = "../../util/kvdb" } +memory_cache = { path = "../../util/memory_cache" } [features] default = [] diff --git a/ethcore/light/src/cache.rs b/ethcore/light/src/cache.rs index 65c3a4d0f..8ec6b53af 100644 --- a/ethcore/light/src/cache.rs +++ b/ethcore/light/src/cache.rs @@ -29,7 +29,7 @@ use time::{SteadyTime, Duration}; use heapsize::HeapSizeOf; use bigint::prelude::U256; use bigint::hash::H256; -use util::cache::MemoryLruCache; +use memory_cache::MemoryLruCache; /// Configuration for how much data to cache. #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/ethcore/light/src/lib.rs b/ethcore/light/src/lib.rs index edf655e4d..a9f3e83e9 100644 --- a/ethcore/light/src/lib.rs +++ b/ethcore/light/src/lib.rs @@ -92,6 +92,7 @@ extern crate vm; extern crate hash; extern crate triehash; extern crate kvdb; +extern crate memory_cache; #[cfg(feature = "ipc")] extern crate ethcore_ipc as ipc; diff --git a/ethcore/src/engines/validator_set/safe_contract.rs b/ethcore/src/engines/validator_set/safe_contract.rs index 7489a26e0..d0ada79ec 100644 --- a/ethcore/src/engines/validator_set/safe_contract.rs +++ b/ethcore/src/engines/validator_set/safe_contract.rs @@ -27,7 +27,7 @@ use parking_lot::{Mutex, RwLock}; use util::*; use bytes::Bytes; -use util::cache::MemoryLruCache; +use memory_cache::MemoryLruCache; use unexpected::Mismatch; use rlp::{UntrustedRlp, RlpStream}; diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index a67eb879a..11220e69b 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -129,6 +129,7 @@ extern crate bloomable; extern crate vm; extern crate wasm; extern crate ethcore_util as util; +extern crate memory_cache; #[macro_use] extern crate macros; diff --git a/ethcore/src/state_db.rs b/ethcore/src/state_db.rs index a2e4dcac4..148c0d8c8 100644 --- a/ethcore/src/state_db.rs +++ b/ethcore/src/state_db.rs @@ -17,7 +17,7 @@ use std::collections::{VecDeque, HashSet}; use std::sync::Arc; use lru_cache::LruCache; -use util::cache::MemoryLruCache; +use memory_cache::MemoryLruCache; use util::journaldb::JournalDB; use kvdb::{KeyValueDB, DBTransaction}; use bigint::hash::H256; From e7690ab658f42b84c0af977198fcd44895ed90c0 Mon Sep 17 00:00:00 2001 From: Dmitry Kashitsyn Date: Sun, 15 Oct 2017 21:46:11 +0700 Subject: [PATCH 3/6] Removes redundant dependencies (#6693) --- Cargo.lock | 1 - util/Cargo.toml | 1 - util/src/lib.rs | 1 - 3 files changed, 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 24961aa92..23196df97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -903,7 +903,6 @@ dependencies = [ "kvdb 0.1.0", "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "memorydb 0.1.0", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "patricia_trie 0.1.0", diff --git a/util/Cargo.toml b/util/Cargo.toml index 61d8b2335..d83d2787d 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -24,7 +24,6 @@ target_info = "0.1" ethcore-bigint = { path = "bigint", features = ["heapsizeof"] } parking_lot = "0.4" tiny-keccak= "1.0" -lru-cache = "0.1.0" ethcore-logger = { path = "../logger" } triehash = { path = "triehash" } error-chain = "0.11.0-rc.2" diff --git a/util/src/lib.rs b/util/src/lib.rs index 7de3c4b39..68ae382e8 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -100,7 +100,6 @@ extern crate ethcore_bytes as bytes; extern crate parking_lot; extern crate tiny_keccak; extern crate rlp; -extern crate lru_cache; extern crate heapsize; extern crate ethcore_logger; extern crate hash as keccak; From b03117b2624ef4fb2609b317d3ff8d51b29a9f75 Mon Sep 17 00:00:00 2001 From: Dmitry Kashitsyn Date: Sun, 15 Oct 2017 22:41:40 +0700 Subject: [PATCH 4/6] Removes redundant `mut` in service.rs.in (#6775) --- ipc/hypervisor/src/service.rs.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipc/hypervisor/src/service.rs.in b/ipc/hypervisor/src/service.rs.in index 6d6f38268..9b881e64c 100644 --- a/ipc/hypervisor/src/service.rs.in +++ b/ipc/hypervisor/src/service.rs.in @@ -49,7 +49,7 @@ impl HypervisorService { // return type for making method synchronous fn module_ready(&self, module_id: u64, control_url: String) -> bool { let mut modules = self.modules.write().unwrap(); - modules.get_mut(&module_id).map(|mut module| { + modules.get_mut(&module_id).map(|module| { module.started = true; module.control_url = control_url; }); @@ -60,7 +60,7 @@ impl HypervisorService { // return type for making method synchronous fn module_shutdown(&self, module_id: u64) -> bool { let mut modules = self.modules.write().unwrap(); - modules.get_mut(&module_id).map(|mut module| { + modules.get_mut(&module_id).map(|module| { module.shutdown = true; }); trace!(target: "hypervisor", "Module shutdown: {}", module_id); From 92a9fd3359f8516ebe012f2b95d35225d5b659b6 Mon Sep 17 00:00:00 2001 From: Dmitry Kashitsyn Date: Mon, 16 Oct 2017 11:05:54 +0700 Subject: [PATCH 5/6] Uses dash instead of underscore in crate name --- Cargo.lock | 8 ++++---- ethcore/Cargo.toml | 2 +- ethcore/evm/Cargo.toml | 2 +- ethcore/light/Cargo.toml | 2 +- util/memory_cache/Cargo.toml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23196df97..246356a02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -606,7 +606,7 @@ dependencies = [ "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "macros 0.1.0", - "memory_cache 0.1.0", + "memory-cache 0.1.0", "memorydb 0.1.0", "migration 0.1.0", "native-contracts 0.1.0", @@ -760,7 +760,7 @@ dependencies = [ "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memory_cache 0.1.0", + "memory-cache 0.1.0", "memorydb 0.1.0", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "patricia_trie 0.1.0", @@ -1048,7 +1048,7 @@ dependencies = [ "heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memory_cache 0.1.0", + "memory-cache 0.1.0", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", @@ -1648,7 +1648,7 @@ dependencies = [ ] [[package]] -name = "memory_cache" +name = "memory-cache" version = "0.1.0" dependencies = [ "heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 88cb97568..fed1362ad 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -32,7 +32,7 @@ ethcore-logger = { path = "../logger" } ethcore-stratum = { path = "../stratum" } ethcore-util = { path = "../util" } ethcore-bigint = { path = "../util/bigint" } -memory_cache = { path = "../util/memory_cache" } +memory-cache = { path = "../util/memory_cache" } ethjson = { path = "../json" } ethkey = { path = "../ethkey" } ethstore = { path = "../ethstore" } diff --git a/ethcore/evm/Cargo.toml b/ethcore/evm/Cargo.toml index ac15c362f..5cef517f4 100644 --- a/ethcore/evm/Cargo.toml +++ b/ethcore/evm/Cargo.toml @@ -14,7 +14,7 @@ log = "0.3" vm = { path = "../vm" } hash = { path = "../../util/hash" } parking_lot = "0.4" -memory_cache = { path = "../../util/memory_cache" } +memory-cache = { path = "../../util/memory_cache" } [dev-dependencies] rustc-hex = "1.0" diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index b6260b7f0..e5c39c82a 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -40,7 +40,7 @@ stats = { path = "../../util/stats" } hash = { path = "../../util/hash" } triehash = { path = "../../util/triehash" } kvdb = { path = "../../util/kvdb" } -memory_cache = { path = "../../util/memory_cache" } +memory-cache = { path = "../../util/memory_cache" } [features] default = [] diff --git a/util/memory_cache/Cargo.toml b/util/memory_cache/Cargo.toml index 9179b3c8a..f2b612463 100644 --- a/util/memory_cache/Cargo.toml +++ b/util/memory_cache/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "memory_cache" +name = "memory-cache" version = "0.1.0" authors = ["Parity Technologies "] description = "An LRU-cache which operates on memory used" From 832879e5c8893e25e380e32660c484e6ecb38c6e Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Mon, 16 Oct 2017 09:35:02 +0200 Subject: [PATCH 6/6] Fix CHANGLOG for 1.8.0 (#6751) * Fix CHANGLOG for 1.8.0 * Update changelog for 1.8.0 * Add changelog for 1.7.7 --- CHANGELOG.md | 41 ++++++++++++++++++++++++----------------- docs/CHANGELOG-1.7.md | 11 +++++++++++ 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be69da8db..b3695b06a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,25 +1,32 @@ -## Parity [v1.8.0](https://github.com/paritytech/parity/releases/tag/v1.8.0) (2017-10-13) +## Parity [v1.8.0](https://github.com/paritytech/parity/releases/tag/v1.8.0) (2017-10-15) -@TODO describe and document +We are happy to announce our newest Parity 1.8 release. Among others, it enables the following features: -- WASM contracts -- light cient improvements (POA chain compatibility) -- Trezor wallet support -- Abstraction of engine: Generalize engine trait, Move more params to the common section -- PICOPS certification badge -- Vouch for Dapps -- Premissioned p2p-connections -- Transaction permissioning -- Add Musicoin and MCIP-3 UBI hardfork. -- Add pagination for trace_filter rpc method -- Rename network_id to chain_id where applicable -- Compatibility with whisper v6 -- Byzantium updates -- Rewards on closing blocks +- Full Whisper v6 integration +- Trezor hardware-wallet support +- WASM contract support +- PICOPS KYC-certified accounts and vouching for community-dapps +- Light client compatibility for Proof-of-Authority networks +- Transaction permissioning and permissioned p2p-connections +- Full Byzantium-fork compatibility +- Full Musicoin MCIP-3 UBI-fork compatibility + +Further, users upgrading from 1.7 should acknowledge the following changes: + +- The chain-engine was further abstracted and chain-specs need to be upgraded. [#6134](https://github.com/paritytech/parity/pull/6134) [#6591](https://github.com/paritytech/parity/pull/6591) +- `network_id` was renamed to `chain_id` where applicable. [#6345](https://github.com/paritytech/parity/pull/6345) +- `trace_filter` RPC method now comes with pagination. [#6312](https://github.com/paritytech/parity/pull/6312) +- Added tracing of rewards on closing blocks. [#6194](https://github.com/paritytech/parity/pull/6194) Full list of included changes: -- CLI: Reject invalid argument values rather than ignore them (#6747) +- Updated ethabi to fix auto-update ([#6771](https://github.com/paritytech/parity/pull/6771)) +- Fixed kovan chain validation ([#6760](https://github.com/paritytech/parity/pull/6760)) + - Fixed kovan chain validation + - Fork detection + - Fixed typo +- Bumped fork block number for auto-update ([#6755](https://github.com/paritytech/parity/pull/6755)) +- CLI: Reject invalid argument values rather than ignore them ([#6747](https://github.com/paritytech/parity/pull/6747)) - Fixed modexp gas calculation overflow ([#6745](https://github.com/paritytech/parity/pull/6745)) - Backport beta - Fixes Badges ([#6732](https://github.com/paritytech/parity/pull/6732)) - Fix badges not showing up ([#6730](https://github.com/paritytech/parity/pull/6730)) diff --git a/docs/CHANGELOG-1.7.md b/docs/CHANGELOG-1.7.md index c77157cd2..4042d56da 100644 --- a/docs/CHANGELOG-1.7.md +++ b/docs/CHANGELOG-1.7.md @@ -1,3 +1,14 @@ +## Parity [v1.7.7](https://github.com/paritytech/parity/releases/tag/v1.7.7) (2017-10-15) + +Parity 1.7.7 Fixes an issue with auto-update system. Updating is recommended, but not required for Byzantium. + +Full list of included changes: + +- Fix auto-update ([#6769](https://github.com/paritytech/parity/pull/6759)) + - Bump to v1.7.7 + - Updated ethabi to fix auto-update +- Bumped fork block number for auto-update ([#6754](https://github.com/paritytech/parity/pull/6754)) + ## Parity [v1.7.6](https://github.com/paritytech/parity/releases/tag/v1.7.6) (2017-10-13) Parity 1.7.6 includes a critical consensus-relevant fix for the Byzantium hard-fork. Please upgrade your Ethereum client before block number `4_370_000`.