diff --git a/Cargo.lock b/Cargo.lock index e38d8aeb4..3d1805576 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1706,7 +1706,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#c02649776ec9636511d90f869a19e746a3eb8654" +source = "git+https://github.com/ethcore/js-precompiled.git#f657cb9c7b048caeb559d2b6f13711ea0812bb19" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/ethcore/res/ethereum/kovan.json b/ethcore/res/ethereum/kovan.json index 69ae9dd4e..e9c059aaa 100644 --- a/ethcore/res/ethereum/kovan.json +++ b/ethcore/res/ethereum/kovan.json @@ -30,7 +30,7 @@ "params": { "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", - "networkID" : "0x2A", + "networkID" : "0x2A" }, "genesis": { "seal": { diff --git a/js/package.json b/js/package.json index a3d32cd42..29ccc289d 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.3.110", + "version": "0.3.111", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team ", diff --git a/js/src/views/Wallet/wallet.js b/js/src/views/Wallet/wallet.js index 77f938a78..61d80ce69 100644 --- a/js/src/views/Wallet/wallet.js +++ b/js/src/views/Wallet/wallet.js @@ -240,8 +240,8 @@ class Wallet extends Component { key='delete' label={ } onClick={ this.showDeleteDialog } diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index bbd5e0cff..5f062d425 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -119,8 +119,8 @@ usage! { flag_ui_no_validation: bool = false, or |_| None, // -- Networking Options - flag_warp: bool = false, - or |c: &Config| otry!(c.network).warp.clone(), + flag_no_warp: bool = false, + or |c: &Config| otry!(c.network).warp.clone().map(|w| !w), flag_port: u16 = 30303u16, or |c: &Config| otry!(c.network).port.clone(), flag_min_peers: u16 = 25u16, @@ -330,6 +330,7 @@ usage! { // Values with optional default value. flag_base_path: Option, display dir::default_data_path(), or |c: &Config| otry!(c.parity).base_path.clone().map(Some), flag_db_path: Option, display dir::CHAINS_PATH, or |c: &Config| otry!(c.parity).db_path.clone().map(Some), + flag_warp: Option, display true, or |c: &Config| Some(otry!(c.network).warp.clone()), } } @@ -638,7 +639,7 @@ mod tests { flag_ui_no_validation: false, // -- Networking Options - flag_warp: true, + flag_no_warp: false, flag_port: 30303u16, flag_min_peers: 25u16, flag_max_peers: 50u16, @@ -779,6 +780,7 @@ mod tests { flag_etherbase: None, flag_extradata: None, flag_cache: None, + flag_warp: Some(true), // -- Miscellaneous Options flag_version: false, diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index 35bc366e9..a36d0a68c 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -97,7 +97,7 @@ UI Options: development. (default: {flag_ui_no_validation}) Networking Options: - --warp Enable syncing from the snapshot over the network. (default: {flag_warp}) + --no-warp Disable syncing from the snapshot over the network. (default: {flag_no_warp}) --port PORT Override the port on which the node should listen (default: {flag_port}). --min-peers NUM Try to maintain at least NUM peers (default: {flag_min_peers}). @@ -385,6 +385,7 @@ Legacy Options: -w --webapp Does nothing; dapps server is on by default now. --dapps-off Equivalent to --no-dapps. --rpc Does nothing; JSON-RPC is on by default now. + --warp Does nothing; Warp sync is on by default. (default: {flag_warp}) --rpcaddr IP Equivalent to --jsonrpc-interface IP. --rpcport PORT Equivalent to --jsonrpc-port PORT. --rpcapi APIS Equivalent to --jsonrpc-apis APIS. diff --git a/parity/configuration.rs b/parity/configuration.rs index 7b7a72a8c..b50816482 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -15,12 +15,13 @@ // along with Parity. If not, see . use std::time::Duration; -use std::io::Read; +use std::io::{Read, Write, stderr}; use std::net::SocketAddr; use std::path::{Path, PathBuf}; use std::cmp::max; use cli::{Args, ArgsError}; use util::{Hashable, H256, U256, Uint, Bytes, version_data, Address}; +use util::journaldb::Algorithm; use util::log::Colour; use ethsync::{NetworkConfiguration, is_valid_node_url, AllowIP}; use ethcore::ethstore::ethkey::Secret; @@ -33,7 +34,7 @@ use ethcore_rpc::NetworkSettings; use cache::CacheConfig; use helpers::{to_duration, to_mode, to_block_id, to_u256, to_pending_set, to_price, replace_home, replace_home_for_db, geth_ipc_path, parity_ipc_path, to_bootnodes, to_addresses, to_address, to_gas_limit, to_queue_strategy}; -use params::{SpecType, ResealPolicy, AccountsConfig, GasPricerConfig, MinerExtras}; +use params::{SpecType, ResealPolicy, AccountsConfig, GasPricerConfig, MinerExtras, Pruning, Switch}; use ethcore_logger::Config as LogConfig; use dir::{self, Directories, default_hypervisor_path, default_local_path, default_data_path}; use dapps::Configuration as DappsConfiguration; @@ -115,7 +116,14 @@ impl Configuration { let fat_db = self.args.flag_fat_db.parse()?; let compaction = self.args.flag_db_compaction.parse()?; let wal = !self.args.flag_fast_and_loose; - let warp_sync = self.args.flag_warp; + match self.args.flag_warp { + // Logging is not initialized yet, so we print directly to stderr + Some(true) if fat_db == Switch::On => writeln!(&mut stderr(), "Warning: Warp Sync is disabled because Fat DB is turned on").expect("Error writing to stderr"), + Some(true) if tracing == Switch::On => writeln!(&mut stderr(), "Warning: Warp Sync is disabled because tracing is turned on").expect("Error writing to stderr"), + Some(true) if pruning == Pruning::Specific(Algorithm::Archive) => writeln!(&mut stderr(), "Warning: Warp Sync is disabled because pruning mode is set to archive").expect("Error writing to stderr"), + _ => {}, + }; + let warp_sync = !self.args.flag_no_warp && fat_db != Switch::On && tracing != Switch::On && pruning != Pruning::Specific(Algorithm::Archive); let geth_compatibility = self.args.flag_geth; let ui_address = self.ui_port().map(|port| (self.ui_interface(), port)); let dapps_conf = self.dapps_config(); @@ -1144,7 +1152,7 @@ mod tests { ipc_conf: Default::default(), net_conf: default_network_config(), network_id: None, - warp_sync: false, + warp_sync: true, acc_conf: Default::default(), gas_pricer: Default::default(), miner_extras: Default::default(),