From 1b6d840ada25e8c03b5e1926f259882be9baf1d6 Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Mon, 18 Sep 2017 11:12:42 +0200 Subject: [PATCH 1/6] Ropsten fork (#6533) --- ethcore/res/ethereum/ropsten.json | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ethcore/res/ethereum/ropsten.json b/ethcore/res/ethereum/ropsten.json index 1706c433b..f146caf52 100644 --- a/ethcore/res/ethereum/ropsten.json +++ b/ethcore/res/ethereum/ropsten.json @@ -12,7 +12,10 @@ "eip160Transition": 10, "eip161abcTransition": 10, "eip161dTransition": 10, - "maxCodeSize": 24576 + "maxCodeSize": 24576, + "eip649Reward": "0x29A2241AF62C0000", + "eip100bTransition": 1700000, + "eip649Transition": 1700000 } } }, @@ -27,9 +30,12 @@ "forkBlock": 641350, "forkCanonHash": "0x8033403e9fe5811a7b6d6b469905915de1c59207ce2172cbcf5d6ff14fa6a2eb", "eip155Transition": 10, - "eip98Transition": "0x7fffffffffffff", - "eip86Transition": "0x7fffffffffffff" + "eip86Transition": "0x7fffffffffffff", + "eip140Transition": 1700000, + "eip211Transition": 1700000, + "eip214Transition": 1700000, + "eip658Transition": 1700000 }, "genesis": { "seal": { @@ -50,15 +56,15 @@ "enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" ], "accounts": { + "0000000000000000000000000000000000000000": { "balance": "1" }, "0000000000000000000000000000000000000001": { "balance": "1", "nonce": "0", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, "0000000000000000000000000000000000000002": { "balance": "1", "nonce": "0", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } }, "0000000000000000000000000000000000000003": { "balance": "1", "nonce": "0", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, "0000000000000000000000000000000000000004": { "balance": "1", "nonce": "0", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, - "0000000000000000000000000000000000000000": { "balance": "1" }, - "0000000000000000000000000000000000000005": { "balance": "1" }, - "0000000000000000000000000000000000000006": { "balance": "1" }, - "0000000000000000000000000000000000000007": { "balance": "1" }, - "0000000000000000000000000000000000000008": { "balance": "1" }, + "0000000000000000000000000000000000000005": { "balance": "1", "nonce": "0", "builtin": { "name": "modexp", "activate_at": 1700000, "pricing": { "modexp": { "divisor": 20 } } } }, + "0000000000000000000000000000000000000006": { "balance": "1", "nonce": "0", "builtin": { "name": "alt_bn128_add", "activate_at": 1700000, "pricing": { "linear": { "base": 500, "word": 0 } } } }, + "0000000000000000000000000000000000000007": { "balance": "1", "nonce": "0", "builtin": { "name": "alt_bn128_mul", "activate_at": 1700000, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, + "0000000000000000000000000000000000000008": { "balance": "1", "nonce": "0", "builtin": { "name": "alt_bn128_pairing", "activate_at": 1700000, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, "0000000000000000000000000000000000000009": { "balance": "1" }, "000000000000000000000000000000000000000a": { "balance": "0" }, "000000000000000000000000000000000000000b": { "balance": "0" }, From 9196c7268abad6c0f0dc872d6c5936ace5d794d8 Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Mon, 18 Sep 2017 14:40:28 +0200 Subject: [PATCH 2/6] Changelog for 1.7.2 (#6363) * Prepare changelog for 1.7.1 * Update changelog for 1.7.1 * Prepare changelog for 1.7.2 * Update CHANGELOG * Update changelog for 1.7.2 * Snapshot sync kicks in after 10k blocks * Add ropsten fork to changelog * Add Gnosis multi-sig support to Changelog * Update final changelog for 1.7.2 --- CHANGELOG.md | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78bf895ee..dcfef0dc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,152 @@ +## Parity [v1.7.2](https://github.com/paritytech/parity/releases/tag/v1.7.2) (2017-09-18) + +Parity 1.7.2 is a bug-fix release to improve performance and stability. Among others, it addresses the following: + +- Byzantium fork support for the Ropsten and Foundation networks. +- Added support for the ConsenSys and Gnosis multi-signature wallets. +- Significantly increased token registry and token balance lookup performance. +- Fixed issues with the health status indicator in the wallet. +- Tweaked warp-sync to quickly catch up with chains fallen back more than 10,000 blocks. +- Fixes to the Chrome extension and macOS installer upgrades. + +Full list of included changes: + +- Fix output from eth_call. ([#6538](https://github.com/paritytech/parity/pull/6538)) +- Ropsten fork ([#6532](https://github.com/paritytech/parity/pull/6532)) +- Byzantium updates ([#6529](https://github.com/paritytech/parity/pull/6529)) + - Fix modexp bug: return 0 if base=0 ([#6424](https://github.com/paritytech/parity/pull/6424)) + - Running state test using parity-evm ([#6355](https://github.com/paritytech/parity/pull/6355)) + - Initial version of state tests. + - Refactor state to support tracing. + - Unify TransactResult. + - Add test. + - Byzantium updates ([#5855](https://github.com/paritytech/parity/pull/5855)) + - EIP-211 updates + - Benchmarks + - Blockhash instruction gas cost updated + - More benches + - EIP-684 + - EIP-649 + - EIP-658 + - Updated some tests + - Modexp fixes + - STATICCALL fixes + - Pairing fixes + - More STATICALL fixes + - Use paritytech/bn + - Fixed REVERTing of contract creation + - Fixed more tests + - Fixed more tests + - Blockchain tests + - Enable previously broken tests + - Transition test + - Updated tests + - Fixed modexp reading huge numbers + - Enabled max_code_size test + - Review fixes + - Updated pairing pricing + - Missing commas (style) + - Update test.rs + - Small improvements + - Eip161abc +- Fix extension detection ([#6452](https://github.com/paritytech/parity/pull/6452)) ([#6524](https://github.com/paritytech/parity/pull/6524)) + - Fix extension detection. + - Fix mobx quirks. + - Update submodule. +- Fix detecting hardware wallets. ([#6509](https://github.com/paritytech/parity/pull/6509)) +- Allow hardware device reads without lock. ([#6517](https://github.com/paritytech/parity/pull/6517)) +- Backports [#6497](https://github.com/paritytech/parity/pull/6497) + - Fix slow balances ([#6471](https://github.com/paritytech/parity/pull/6471)) + - Update token updates + - Update token info fetching + - Update logger + - Minor fixes to updates and notifications for balances + - Use Pubsub + - Fix timeout. + - Use pubsub for status. + - Fix signer subscription. + - Process tokens in chunks. + - Fix tokens loaded by chunks + - Dispatch tokens asap + - Fix chunks processing. + - Better filter options + - Parallel log fetching. + - Fix signer polling. + - Fix initial block query. + - Token balances updates : the right(er) way + - Better tokens info fetching + - Fixes in token data fetching + - Only fetch what's needed (tokens) + - Fix linting issues + - Update wasm-tests. + - Fixing balances fetching + - Fix requests tracking in UI + - Fix request watching + - Update the Logger + - PR Grumbles Fixes + - Eth_call returns output of contract creations ([#6420](https://github.com/paritytech/parity/pull/6420)) + - Eth_call returns output of contract creations + - Fix parameters order. + - Save outputs for light client as well. + - Don't accept transactions above block gas limit. + - Expose health status over RPC ([#6274](https://github.com/paritytech/parity/pull/6274)) + - Node-health to a separate crate. + - Initialize node_health outside of dapps. + - Expose health over RPC. + - Bring back 412 and fix JS. + - Add health to workspace and tests. + - Fix compilation without default features. + - Fix borked merge. + - Revert to generics to avoid virtual calls. + - Fix node-health tests. + - Add missing trailing comma. + - Fixing/removing failing JS tests. + - Do not activate genesis epoch in immediate transition validator contract ([#6349](https://github.com/paritytech/parity/pull/6349)) + - Fix memory tracing. + - Add test to cover that. + - Ensure balances of constructor accounts are kept + - Test balance of spec-constructed account is kept +- Fix warning spam. [#6369](https://github.com/paritytech/parity/pull/6369) +- Bump to 1.7.2 +- Fix eth_call [#6366](https://github.com/paritytech/parity/pull/6366) +- Backporting [#6352](https://github.com/paritytech/parity/pull/6352) + - Better check the created accounts before showing Startup Wizard [#6331](https://github.com/paritytech/parity/pull/6331) + - Tweaked snapshot params [#6344](https://github.com/paritytech/parity/pull/6344) +- Increase default gas limit for eth_call [#6337](https://github.com/paritytech/parity/pull/6337) + - Fix balance increase. + - Cap gas limit for dapp-originating requests. +- Backports [#6333](https://github.com/paritytech/parity/pull/6333) + - Overflow check in addition + - Unexpose methods on UI RPC. [#6295](https://github.com/paritytech/parity/pull/6295) + - Add more descriptive error when signing/decrypting using hw wallet. + - Format instant change proofs correctly + - Propagate stratum submit share error upstream [#6260](https://github.com/paritytech/parity/pull/6260) + - Updated jsonrpc [#6264](https://github.com/paritytech/parity/pull/6264) + - Using multiple NTP servers [#6173](https://github.com/paritytech/parity/pull/6173) + - Small improvements to time estimation. + - Allow multiple NTP servers to be used. + - Removing boxing. + - Update list of servers and add reference. + - Fix dapps CSP when UI is exposed externally [#6178](https://github.com/paritytech/parity/pull/6178) + - Allow embeding on any page when ui-hosts=all and fix dev_ui + - Fix cache path when using --base-path [#6212](https://github.com/paritytech/parity/pull/6212) + - Bump to v1.7.1 +- UI backports [#6332](https://github.com/paritytech/parity/pull/6332) + - Time should not contribue to overall status. [#6276](https://github.com/paritytech/parity/pull/6276) + - Add warning to web browser and fix links. [#6232](https://github.com/paritytech/parity/pull/6232) + - Extension fixes [#6284](https://github.com/paritytech/parity/pull/6284) + - Fix token symbols in extension. + - Allow connections from firefox extension. + - Add support for ConsenSys multisig wallet [#6153](https://github.com/paritytech/parity/pull/6153) + - First draft of ConsenSys wallet + - Fix transfer store // WIP Consensys Wallet + - Rename walletABI JSON file + - Fix wrong daylimit in wallet modal + - Confirm/Revoke ConsensysWallet txs + - Change of settings for the Multisig Wallet +- Update README for beta [#6270](https://github.com/paritytech/parity/pull/6270) +- Fixed macOS installer upgrade [#6221](https://github.com/paritytech/parity/pull/6221) + ## Parity [v1.7.0](https://github.com/paritytech/parity/releases/tag/v1.7.0) (2017-07-28) Parity 1.7.0 is a major release introducing several important features: From f38d34919bfcee6583b358ebf7d488763f082304 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Tue, 19 Sep 2017 11:34:13 +0200 Subject: [PATCH 3/6] Random cleanups / improvements to a state (#6472) --- ethcore/src/state/mod.rs | 64 +++++++++++++++++------------------ ethcore/src/state/substate.rs | 8 ++--- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/ethcore/src/state/mod.rs b/ethcore/src/state/mod.rs index 3935d7d86..2472557a4 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -450,22 +450,19 @@ impl State { // // In all other cases account is read as clean first, and after that made // dirty in and added to the checkpoint with `note_cache`. - if account.is_dirty() { + let is_dirty = account.is_dirty(); + let old_value = self.cache.borrow_mut().insert(*address, account); + if is_dirty { if let Some(ref mut checkpoint) = self.checkpoints.borrow_mut().last_mut() { - if !checkpoint.contains_key(address) { - checkpoint.insert(address.clone(), self.cache.borrow_mut().insert(address.clone(), account)); - return; - } + checkpoint.entry(*address).or_insert(old_value); } } - self.cache.borrow_mut().insert(address.clone(), account); } fn note_cache(&self, address: &Address) { if let Some(ref mut checkpoint) = self.checkpoints.borrow_mut().last_mut() { - if !checkpoint.contains_key(address) { - checkpoint.insert(address.clone(), self.cache.borrow().get(address).map(AccountEntry::clone_dirty)); - } + checkpoint.entry(*address) + .or_insert_with(|| self.cache.borrow().get(address).map(AccountEntry::clone_dirty)); } } @@ -559,9 +556,8 @@ impl State { } }); - match trie_res { - None => {} - Some(res) => return res, + if let Some(res) = trie_res { + return res; } // otherwise cache the account localy and cache storage key there. @@ -868,27 +864,29 @@ impl State { // load required account data from the databases. fn update_account_cache(require: RequireCache, account: &mut Account, state_db: &B, db: &HashDB) { - match (account.is_cached(), require) { - (true, _) | (false, RequireCache::None) => {} - (false, require) => { - // if there's already code in the global cache, always cache it - // locally. - let hash = account.code_hash(); - match state_db.get_cached_code(&hash) { - Some(code) => account.cache_given_code(code), - None => match require { - RequireCache::None => {}, - RequireCache::Code => { - if let Some(code) = account.cache_code(db) { - // propagate code loaded from the database to - // the global code cache. - state_db.cache_code(hash, code) - } - } - RequireCache::CodeSize => { - account.cache_code_size(db); - } + if let RequireCache::None = require { + return; + } + + if account.is_cached() { + return; + } + + // if there's already code in the global cache, always cache it localy + let hash = account.code_hash(); + match state_db.get_cached_code(&hash) { + Some(code) => account.cache_given_code(code), + None => match require { + RequireCache::None => {}, + RequireCache::Code => { + if let Some(code) = account.cache_code(db) { + // propagate code loaded from the database to + // the global code cache. + state_db.cache_code(hash, code) } + }, + RequireCache::CodeSize => { + account.cache_code_size(db); } } } @@ -938,7 +936,7 @@ impl State { /// Pull account `a` in our cache from the trie DB. `require_code` requires that the code be cached, too. fn require<'a>(&'a self, a: &Address, require_code: bool) -> trie::Result> { - self.require_or_from(a, require_code, || Account::new_basic(U256::from(0u8), self.account_start_nonce), |_|{}) + self.require_or_from(a, require_code, || Account::new_basic(0u8.into(), self.account_start_nonce), |_|{}) } /// Pull account `a` in our cache from the trie DB. `require_code` requires that the code be cached, too. diff --git a/ethcore/src/state/substate.rs b/ethcore/src/state/substate.rs index 4acc54114..8d90c64d1 100644 --- a/ethcore/src/state/substate.rs +++ b/ethcore/src/state/substate.rs @@ -50,11 +50,11 @@ impl Substate { /// Merge secondary substate `s` into self, accruing each element correspondingly. pub fn accrue(&mut self, s: Substate) { - self.suicides.extend(s.suicides.into_iter()); - self.touched.extend(s.touched.into_iter()); - self.logs.extend(s.logs.into_iter()); + self.suicides.extend(s.suicides); + self.touched.extend(s.touched); + self.logs.extend(s.logs); self.sstore_clears_count = self.sstore_clears_count + s.sstore_clears_count; - self.contracts_created.extend(s.contracts_created.into_iter()); + self.contracts_created.extend(s.contracts_created); } /// Get the cleanup mode object from this. From 8a21cde18892334bf5f2819f75a57edf29a9e0c4 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac Date: Tue, 19 Sep 2017 11:58:04 +0200 Subject: [PATCH 4/6] Required validators >= num owners (#6551) --- js/src/modals/CreateWallet/createWalletStore.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/src/modals/CreateWallet/createWalletStore.js b/js/src/modals/CreateWallet/createWalletStore.js index 26ed5816c..c155ad1c1 100644 --- a/js/src/modals/CreateWallet/createWalletStore.js +++ b/js/src/modals/CreateWallet/createWalletStore.js @@ -281,6 +281,12 @@ export default class CreateWalletStore { const daylimitValidation = validateUint(_wallet.daylimit); const nameValidation = validateName(_wallet.name); + const owners = _wallet.owners.filter((owner) => !/^(0x)?0*$/.test(owner)); + + if (_wallet.required > owners.length) { + requiredValidation.valueError = 'the number of required validators should be lower or equal the number of owners'; + } + const errors = { address: addressValidation.addressError, account: accountValidation.addressError, From 99e981abcfa7ffa8ba4f917b687fcd6fffa409f6 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 20 Sep 2017 10:43:14 +0200 Subject: [PATCH 5/6] Fix failing hardware tests (#6553) --- js/src/mobx/hardwareStore.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/src/mobx/hardwareStore.spec.js b/js/src/mobx/hardwareStore.spec.js index c620294f8..7bb979600 100644 --- a/js/src/mobx/hardwareStore.spec.js +++ b/js/src/mobx/hardwareStore.spec.js @@ -39,6 +39,7 @@ function createApi () { }, parity: { hardwareAccountsInfo: sinon.stub().resolves({ ADDRESS: WALLET }), + lockedHardwareAccountsInfo: sinon.stub().resolves({}), setAccountMeta: sinon.stub().resolves(true), setAccountName: sinon.stub().resolves(true) } From 65ca9afce2df9ab364ab5f116b037876b4fa75ec Mon Sep 17 00:00:00 2001 From: GitLab Build Bot Date: Wed, 20 Sep 2017 09:39:32 +0000 Subject: [PATCH 6/6] [ci skip] js-precompiled 20170920-093438 --- Cargo.lock | 2 +- js/package-lock.json | 2 +- js/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bca7d8ed7..7d5195030 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2271,7 +2271,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/paritytech/js-precompiled.git#d2b6b36b4ea27ed5c8b6b1b3cb02dc08983cda18" +source = "git+https://github.com/paritytech/js-precompiled.git#324f106aa40d6c37f8c70f9ada9ad744cd64006e" dependencies = [ "parity-dapps-glue 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package-lock.json b/js/package-lock.json index e50b8e197..e07a95263 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "1.8.20", + "version": "1.8.21", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/js/package.json b/js/package.json index 8dbfa8fdb..69ffad8bb 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "1.8.20", + "version": "1.8.21", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team ",